quantum_numbers#
import qrules.quantum_numbers
Definitions used internally for type hints and signatures.
qrules is strictly typed. This module bundles structures and definitions that donβt
serve as data containers but only as type hints. EdgeQuantumNumbers and
NodeQuantumNumbers are the main structures and serve as a bridge between the
particle and the conservation_rules module.
- class EdgeQuantumNumbers[source]#
Bases:
objectDefinition of quantum numbers for edges.
This class defines the types that are used in the
conservation_rules, for instance inadditive_quantum_number_rule. You can also create data classes (seeattrs.define()) with data members that are typed as the data members ofEdgeQuantumNumbers(see for exampleHelicityParityEdgeInput) and use them in conservation rules that satisfy the appropriate rule protocol (seeConservationRule,EdgeQNConservationRule).
- EdgeQuantumNumber#
Type hint for quantum numbers of edges
alias of
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
- class QuantumNumberType(*args, **kwargs)[source]#
Bases:
Protocol[_QuantumNumber_co]Runtime factory object created by
typing.NewType.
- EdgeQuantumNumberTypes#
Type-Union for accessing the keys of the dicts in
EdgeSettingsalias of
QuantumNumberType[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]
- class NodeQuantumNumbers[source]#
Bases:
objectDefinition of quantum numbers for interaction nodes.
- NodeQuantumNumber#
Type hint for quantum numbers of interaction nodes.
alias of
l_magnitude|l_projection|s_magnitude|s_projection|parity_prefactor
- NodeQuantumNumberTypes#
Type-Union for accessing the keys of the dicts in
NodeSettingsalias of
QuantumNumberType[l_magnitude|l_projection|s_magnitude|s_projection|parity_prefactor]
- class InteractionProperties(l_magnitude: int | None = None, l_projection: int | None = None, s_magnitude: Fraction | None = None, s_projection: Fraction | None = None, parity_prefactor: float | None = None)[source]#
Bases:
objectImmutable data structure containing interaction properties.
Interactions are represented by a node on a
MutableTransition. This class represents the properties that are carried collectively by the edges that this node connects.Interaction properties are in particular important in the canonical basis of the helicity formalism. There, the coupled spin and angular momentum of each interaction are used for the Clebsch-Gordan coefficients for each term in a sequential amplitude.
Note
As opposed to
NodeQuantumNumbers, theInteractionPropertiesclass serves as an interface to the user.