conservation_rules#
import qrules.conservation_rules
Collection of quantum number conservation rules for particle reactions.
This module is the place where the βexpertβ defines the rules that verify quantum numbers of the reaction.
A rule is a function that takes quantum numbers as input and outputs a boolean. There are three different types of rules:
GraphElementRulethat work on individual graph edges or nodes.EdgeQNConservationRulethat work on the interaction level, which use ingoing edges, outgoing edges as arguments. E.g.:ChargeConservation.ConservationRulethat work on the interaction level, which use ingoing edges, outgoing edges and a interaction node as arguments. E.g:parity_conservation.
The arguments can be any type of quantum number. However a rule argument resembling
edges only accepts EdgeQuantumNumbers. Similarly arguments that
resemble a node only accept NodeQuantumNumbers. The argument types
do not have to be limited to a single quantum number, but can be a composite (see
CParityEdgeInput).
Warning
Besides the rule logic itself, a rule also has the responsibility of
stating its run conditions. These run conditions must be stated by
the type annotations of its __call__ method. The type annotations
therefore are not just there for static type checking: they also
carry more information about the rule that is extracted dynamically
by the solving module.
Generally, the conditions can be separated into two categories:
variable conditions
toplogical conditions
Currently, only variable conditions are being used. Topological conditions could be
created in the form of Tuple instead of List.
For additive quantum numbers, the decorator additive_quantum_number_rule can be used
to automatically generate the appropriate behavior.
The module is therefore strongly typed (both for the reader of the code and for type
checking with mypy). An example is HelicityParityEdgeInput, which
has been defined to provide type checks on parity_conservation_helicity.
See also
- additive_quantum_number_rule(quantum_number: type) Callable[[Any], EdgeQNConservationRule][source]#
Class decorator for creating an additive conservation rule.
Use this decorator to create a
EdgeQNConservationRulefor a quantum number to which an additive conservation rule applies:\[\sum q_{in} = \sum q_{out}\]- Parameters:
quantum_number β Quantum number to which you want to apply the additive conservation check. An example would be
EdgeQuantumNumbers.charge.
- class ChargeConservation(*args, **kwargs)[source]#
Bases:
EdgeQNConservationRuleDecorated via
additive_quantum_number_rule.Check for
chargeconservation.
- class BaryonNumberConservation(*args, **kwargs)[source]#
Bases:
EdgeQNConservationRuleDecorated via
additive_quantum_number_rule.Check for
baryon_numberconservation.
- class ElectronLNConservation(*args, **kwargs)[source]#
Bases:
EdgeQNConservationRuleDecorated via
additive_quantum_number_rule.Check for
electron_lepton_numberconservation.
- class MuonLNConservation(*args, **kwargs)[source]#
Bases:
EdgeQNConservationRuleDecorated via
additive_quantum_number_rule.Check for
muon_lepton_numberconservation.
- class TauLNConservation(*args, **kwargs)[source]#
Bases:
EdgeQNConservationRuleDecorated via
additive_quantum_number_rule.Check for
tau_lepton_numberconservation.
- class StrangenessConservation(*args, **kwargs)[source]#
Bases:
EdgeQNConservationRuleDecorated via
additive_quantum_number_rule.Check for
strangenessconservation.
- class CharmConservation(*args, **kwargs)[source]#
Bases:
EdgeQNConservationRuleDecorated via
additive_quantum_number_rule.Check for
charmnessconservation.
- class BottomnessConservation(*args, **kwargs)[source]#
Bases:
EdgeQNConservationRuleDecorated via
additive_quantum_number_rule.Check for
bottomnessconservation.
- parity_conservation(ingoing_edge_qns: list[parity], outgoing_edge_qns: list[parity], l_magnitude: l_magnitude) bool[source]#
Implement \(P_{in} = P_{out} \cdot (-1)^L\).
- class HelicityParityEdgeInput(parity: Parity | int, spin_magnitude: SupportsFloat, spin_projection: SupportsFloat)[source]#
Bases:
object
- parity_conservation_helicity(ingoing_edge_qns: list[HelicityParityEdgeInput], outgoing_edge_qns: list[HelicityParityEdgeInput], parity_prefactor: parity_prefactor) bool[source]#
Implements parity conservation for helicity formalism.
Check the following:
\[A_{-\lambda_1-\lambda_2} = P_1 P_2 P_3 (-1)^{S_2+S_3-S_1} A_{\lambda_1\lambda_2}\]\[\mathrm{parity\,prefactor} = P_1 P_2 P_3 (-1)^{S_2+S_3-S_1}\]Note
Only the special case \(\lambda_1=\lambda_2=0\) may return
Falseindependent on the parity prefactor.
- class CParityEdgeInput(spin_magnitude: SupportsFloat, pid, c_parity: Parity | int | None = None)[source]#
Bases:
object
- class CParityNodeInput(l_magnitude: SupportsFloat, s_magnitude: SupportsFloat)[source]#
Bases:
object
- c_parity_conservation(ingoing_edge_qns: list[CParityEdgeInput], outgoing_edge_qns: list[CParityEdgeInput], interaction_node_qns: CParityNodeInput) bool[source]#
Check for \(C\)-parity conservation.
Implements \(C_{in} = C_{out}\).
- class GParityEdgeInput(isospin_magnitude: SupportsFloat, spin_magnitude: SupportsFloat, pid, g_parity: Parity | int | None = None)[source]#
Bases:
object
- class GParityNodeInput(l_magnitude: SupportsFloat, s_magnitude: SupportsFloat)[source]#
Bases:
object
- g_parity_conservation(ingoing_edge_qns: list[GParityEdgeInput], outgoing_edge_qns: list[GParityEdgeInput], interaction_qns: GParityNodeInput) bool[source]#
Check for \(G\)-parity conservation.
Implements for \(G_{in} = G_{out}\).
- class IdenticalParticleSymmetryOutEdgeInput(spin_magnitude: SupportsFloat, spin_projection: SupportsFloat, pid)[source]#
Bases:
object
- identical_particle_symmetrization(ingoing_parities: list[parity], outgoing_edge_qns: list[IdenticalParticleSymmetryOutEdgeInput]) bool[source]#
Verifies multi particle state symmetrization for identical particles.
In case of a multi particle state with identical particles, their exchange symmetry has to follow the spin statistic theorem.
For bosonic systems the total exchange symmetry (parity) has to be even (+1). For fermionic systems the total exchange symmetry (parity) has to be odd (-1).
In case of a particle decaying into N identical particles (N>1), the decaying particle has to have the same parity as required by the spin statistic theorem of the multi body state.
- class SpinNodeInput(l_magnitude: SupportsFloat, l_projection: SupportsFloat, s_magnitude: SupportsFloat, s_projection: SupportsFloat)[source]#
Bases:
object
- class SpinMagnitudeNodeInput(l_magnitude: SupportsFloat, s_magnitude: SupportsFloat)[source]#
Bases:
object
- ls_spin_validity(spin_input: SpinNodeInput) bool[source]#
Check for valid isospin magnitude and projection.
- class IsoSpinEdgeInput(isospin_magnitude: SupportsFloat, isospin_projection: SupportsFloat)[source]#
Bases:
object
- isospin_validity(isospin: IsoSpinEdgeInput) bool[source]#
Check for valid isospin magnitude and projection.
- isospin_conservation(ingoing_isospins: list[IsoSpinEdgeInput], outgoing_isospins: list[IsoSpinEdgeInput]) bool[source]#
Check for isospin conservation.
Implements
\[|I_1 - I_2| \leq I \leq |I_1 + I_2|\]Also checks \(I_{1,z} + I_{2,z} = I_z\) and if Clebsch-Gordan coefficients are all 0.
- spin_validity(spin: SpinEdgeInput) bool[source]#
Check for valid spin magnitude and projection.
- spin_conservation(ingoing_spins: list[SpinEdgeInput], outgoing_spins: list[SpinEdgeInput], interaction_qns: SpinNodeInput) bool[source]#
Check for spin conservation.
Implements
\[|S_1 - S_2| \leq S \leq |S_1 + S_2|\]and
\[|L - S| \leq J \leq |L + S|\]Also checks \(M_1 + M_2 = M\) and if Clebsch-Gordan coefficients are all 0.
See also
/docs/usage/ls-coupling
- spin_magnitude_conservation(ingoing_spin_magnitudes: list[spin_magnitude], outgoing_spin_magnitudes: list[spin_magnitude], interaction_qns: SpinMagnitudeNodeInput) bool[source]#
Check for spin conservation.
Implements
\[|S_1 - S_2| \leq S \leq |S_1 + S_2|\]and
\[|L - S| \leq J \leq |L + S|\]
- clebsch_gordan_helicity_to_canonical(ingoing_spins: list[SpinEdgeInput], outgoing_spins: list[SpinEdgeInput], interaction_qns: SpinNodeInput) bool[source]#
Implement Clebsch-Gordan checks.
For \(S_1, S_2\) to \(S\) and the \(L,S\) to \(J\) coupling based on the conversion of helicity to canonical amplitude sums.
Note
This rule does not check that the spin magnitudes couple correctly to \(L\) and \(S\), as this is already performed by
spin_magnitude_conservation.
- helicity_conservation(ingoing_spin_mags: list[spin_magnitude], outgoing_helicities: list[spin_projection]) bool[source]#
Implementation of helicity conservation.
Check for \(|\lambda_2-\lambda_3| \leq S_1\).
- class GellMannNishijimaInput(charge, isospin_projection=None, strangeness=None, charmness=None, bottomness=None, topness=None, baryon_number=None, electron_lepton_number=None, muon_lepton_number=None, tau_lepton_number=None)[source]#
Bases:
object
- gellmann_nishijima(edge_qns: GellMannNishijimaInput) bool[source]#
Check the Gell-Mann-Nishijima formula.
\[Q = I_3 + \frac{1}{2}(B+S+C+B'+T)\]where \(Q\) is charge (computed), \(I_3\) is
Spin.projectionofisospin, \(B\) isbaryon_number, \(S\) isstrangeness, \(C\) ischarmness, \(B'\) isbottomness, and \(T\) istopness.
- class MassConservation(width_factor: float)[source]#
Bases:
objectMass conservation rule.
- __call__(ingoing_edge_qns: list[MassEdgeInput], outgoing_edge_qns: list[MassEdgeInput]) bool[source]#
Implements mass conservation.
\(M_{out} - N \cdot W_{out} < M_{in} + N \cdot W_{in}\)
It makes sure that the net mass outgoing state \(M_{out}\) is smaller than the net mass of the ingoing state \(M_{in}\). Also the width \(W\) of the states is taken into account.