combinatorics

import qrules.combinatorics

Perform permutations on the edges of a StateTransitionGraph.

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

class InitialFacts(edge_props: Dict[int, Tuple[qrules.particle.Particle, float]] = NOTHING, node_props: Dict[int, qrules.quantum_numbers.InteractionProperties] = NOTHING)[source]

Bases: object

__eq__(other)

Method generated by attrs for class InitialFacts.

edge_props: Dict[int, Tuple[qrules.particle.Particle, float]]
node_props: Dict[int, qrules.quantum_numbers.InteractionProperties]
create_initial_facts(topology: qrules.topology.Topology, particle_db: qrules.particle.ParticleCollection, initial_state: Sequence[Union[str, Tuple[str, Sequence[float]]]], final_state: Sequence[Union[str, Tuple[str, Sequence[float]]]], final_state_groupings: Optional[Union[List[List[List[str]]], List[List[str]], List[str]]] = None)List[qrules.combinatorics.InitialFacts][source]
match_external_edges(graphs: List[qrules.topology.StateTransitionGraph[Tuple[qrules.particle.Particle, float]]])None[source]
perform_external_edge_identical_particle_combinatorics(graph: qrules.topology.StateTransitionGraph)List[qrules.topology.StateTransitionGraph][source]

Create combinatorics clones of the StateTransitionGraph.

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!