From e8306443f0bce7f4a966c4c41181c3f06788ec6f Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Sun, 3 Mar 2024 22:36:48 +0100 Subject: [PATCH] FIX: document `SpinFormalism` type --- docs/conf.py | 3 ++- src/qrules/transition.py | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index dab953bf..199db8df 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -64,8 +64,8 @@ def create_constraints_inventory() -> None: api_target_substitutions: dict[str, str | tuple[str, str]] = { "EdgeType": "typing.TypeVar", "GraphEdgePropertyMap": ("obj", "qrules.argument_handling.GraphEdgePropertyMap"), - "GraphNodePropertyMap": ("obj", "qrules.argument_handling.GraphNodePropertyMap"), "GraphElementProperties": ("obj", "qrules.solving.GraphElementProperties"), + "GraphNodePropertyMap": ("obj", "qrules.argument_handling.GraphNodePropertyMap"), "GraphSettings": ("obj", "qrules.solving.GraphSettings"), "InitialFacts": ("obj", "qrules.combinatorics.InitialFacts"), "NewEdgeType": "typing.TypeVar", @@ -75,6 +75,7 @@ def create_constraints_inventory() -> None: "ParticleWithSpin": ("obj", "qrules.particle.ParticleWithSpin"), "qrules.topology.EdgeType": "typing.TypeVar", "qrules.topology.NodeType": "typing.TypeVar", + "SpinFormalism": ("obj", "qrules.transition.SpinFormalism"), "StateDefinition": ("obj", "qrules.combinatorics.StateDefinition"), "TypeAlias": "typing.TypeAlias", "typing_extensions.TypeAlias": "typing.TypeAlias", diff --git a/src/qrules/transition.py b/src/qrules/transition.py index ec5443b4..59e683ae 100644 --- a/src/qrules/transition.py +++ b/src/qrules/transition.py @@ -88,6 +88,13 @@ "canonical-helicity", "canonical", ] +"""Name for the spin formalism to be used. + +The options :code:`"helicity"`, :code:`"canonical-helicity"`, and :code:`"canonical"` +are all used for the helicity formalism, but :code:`"canonical-helicity"` and +:code:`"canonical"` generate angular momentum and coupled spins as well on the +interaction nodes. +""" class SolvingMode(Enum):