argument_handling#

import qrules.argument_handling

Handles argument handling for rules.

Responsibilities are the check of requirements for rules and the creation of the arguments from general graph property maps. The information is extracted from the type annotations of the rules.

GraphEdgePropertyMap#

Type alias for a graph edge property map.

alias of Dict[Type[Union[pid, mass, width, spin_magnitude, spin_projection, charge, isospin_magnitude, isospin_projection, strangeness, charmness, bottomness, topness, baryon_number, electron_lepton_number, muon_lepton_number, tau_lepton_number, parity, c_parity, g_parity]], Union[int, float]]

GraphNodePropertyMap#

Type alias for a graph node property map.

alias of Dict[Type[Union[l_magnitude, l_projection, s_magnitude, s_projection, parity_prefactor]], Union[int, float]]

class RuleArgumentHandler[source]#

Bases: object

register_rule(rule: GraphElementRule | EdgeQNConservationRule | ConservationRule) tuple[Callable, Callable][source]#
get_required_qns(rule: GraphElementRule | EdgeQNConservationRule | ConservationRule) tuple[set[type[pid | mass | width | spin_magnitude | spin_projection | charge | isospin_magnitude | isospin_projection | strangeness | charmness | bottomness | topness | baryon_number | electron_lepton_number | muon_lepton_number | tau_lepton_number | parity | c_parity | g_parity]], set[type[l_magnitude | l_projection | s_magnitude | s_projection | parity_prefactor]]][source]#