combinatorics#

import qrules.combinatorics

Perform permutations on the edges of a MutableTransition.

In a MutableTransition, the edges represent quantum states, while the nodes represent interactions. This module provides tools to permutate, modify or extract these edge and node properties.

InitialFacts: TypeAlias = 'MutableTransition[ParticleWithSpin, InteractionProperties]'#

A Transition with only initial and final state information.

ensure_nested_list(nested_list: List[str] | List[List[str]]) List[List[str]][source]#
create_initial_facts(topology: Topology, initial_state: Sequence[str | Tuple[str, Sequence[float]]], final_state: Sequence[str | Tuple[str, Sequence[float]]], particle_db: ParticleCollection) List[MutableTransition[Tuple[Particle, float], InteractionProperties]][source]#
permutate_topology_kinematically(topology: Topology, initial_state: List[str | Tuple[str, Sequence[float]]], final_state: List[str | Tuple[str, Sequence[float]]], final_state_groupings: List[List[List[str]]] | List[List[str]] | List[str] | None = None) List[Topology][source]#
match_external_edges(graphs: List[MutableTransition[Tuple[Particle, float], InteractionProperties]]) None[source]#
perform_external_edge_identical_particle_combinatorics(graph: MutableTransition) List[MutableTransition][source]#

Create combinatorics clones of the MutableTransition.

In case of identical particles in the initial or final state. Only identical particles, which do not enter or exit the same node allow for combinatorics!