transition#

import qrules.transition

Find allowed transitions between an initial and final state.

SpinFormalism#

Name for the spin formalism to be used.

The options "helicity", "canonical-helicity", and "canonical" are all used for the helicity formalism, but "canonical-helicity" and "canonical" generate angular momentum and coupled spins as well on the interaction nodes.

alias of Literal[‘helicity’, ‘canonical-helicity’, ‘canonical’]

class SolvingMode(value)[source]#

Bases: Enum

Types of modes for solving.

FAST = 1[source]#

Find “likeliest” solutions only.

FULL = 2[source]#

Find all possible solutions.

class ExecutionInfo(not_executed_node_rules: dict[int, set[str]] = _Nothing.NOTHING, violated_node_rules: dict[int, set[str]] = _Nothing.NOTHING, not_executed_edge_rules: dict[int, set[str]] = _Nothing.NOTHING, violated_edge_rules: dict[int, set[str]] = _Nothing.NOTHING)[source]#

Bases: object

not_executed_node_rules: dict[int, set[str]][source]#
violated_node_rules: dict[int, set[str]][source]#
not_executed_edge_rules: dict[int, set[str]][source]#
violated_edge_rules: dict[int, set[str]][source]#
extend(other_result: ExecutionInfo, intersect_violations: bool = False) None[source]#
clear() None[source]#
class ProblemSet(topology: Topology, initial_facts: InitialFacts, solving_settings: GraphSettings)[source]#

Bases: object

Particle reaction problem set as a graph-like data structure.

topology: Topology[source]#

Topology over which the problem set is defined.

initial_facts: InitialFacts[source]#

Information about the initial and final state.

solving_settings: GraphSettings[source]#

Solving settings, such as conservation rules and QN-domains.

to_qn_problem_set() QNProblemSet[source]#
class StateTransitionManager(initial_state: Sequence[StateDefinition], final_state: Sequence[StateDefinition], particle_db: ParticleCollection | None = None, allowed_intermediate_particles: list[str] | None = None, interaction_type_settings: dict[InteractionType, tuple[EdgeSettings, NodeSettings]] | None = None, formalism: SpinFormalism = 'helicity', topology_building: str = 'isobar', solving_mode: SolvingMode = SolvingMode.FAST, reload_pdg: bool = False, mass_conservation_factor: float | None = 3.0, max_angular_momentum: int = 1, max_spin_magnitude: float = 2.0, number_of_threads: int | None = None)[source]#

Bases: object

Main handler for decay topologies.

interaction_determinators: list[InteractionDeterminator][source]#

Checks that are executed over selected conservation rules.

See also

{ref}`usage/reaction:Select interaction types`

topologies: tuple[Topology, ...][source]#

Topology instances over which the STM propagates quantum numbers.

set_allowed_intermediate_particles(name_patterns: Iterable[str] | str, regex: bool = False) None[source]#
property formalism: Literal['helicity', 'canonical-helicity', 'canonical'][source]#
add_final_state_grouping(fs_group: list[str] | list[list[str]]) None[source]#
get_allowed_interaction_types() list[InteractionType] | dict[int, list[InteractionType]][source]#
get_allowed_interaction_types(node_id: int) list[InteractionType]
set_allowed_interaction_types(allowed_interaction_types: Iterable[InteractionType], node_id: int | None = None) None[source]#
create_problem_sets() dict[float, list[ProblemSet]][source]#
find_solutions(problem_sets: dict[float, list[ProblemSet]]) ReactionInfo[source]#

Check for solutions for a specific set of interaction settings.

find_quantum_number_transitions(problem_sets: dict[float, list[ProblemSet]]) dict[float, list[tuple[QNProblemSet, QNResult]]][source]#

Find allowed transitions purely in terms of quantum number sets.

class State(particle: Particle, spin_projection: SupportsFloat)[source]#

Bases: object

particle: Particle[source]#
spin_projection: float[source]#
StateTransition#

Transition of some initial State to a final State.

alias of FrozenTransition[State, InteractionProperties]

class ReactionInfo(transitions: Iterable[StateTransition], formalism: Literal['helicity', 'canonical-helicity', 'canonical'])[source]#

Bases: object

Ordered collection of StateTransition instances.

transitions: tuple[StateTransition, ...][source]#
formalism: Literal['helicity', 'canonical-helicity', 'canonical'][source]#
initial_state: FrozenDict[int, Particle][source]#
final_state: FrozenDict[int, Particle][source]#
get_intermediate_particles() ParticleCollection[source]#

Extract the names of the intermediate state particles.

group_by_topology() dict[Topology, list[StateTransition]][source]#