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.

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]#