Repository navigation
Remove QRules from interface #281
Copy link
Copy link
Open
Labels
⚠️ InterfaceBreaking changes to the APIBreaking changes to the API🔨 MaintenanceMaintenance and upkeep improvementsMaintenance and upkeep improvements
Milestone
Description
Activity
- added🔨 MaintenanceMaintenance and upkeep improvementsMaintenance and upkeep improvements⚠️ InterfaceBreaking changes to the APIBreaking changes to the API
on Apr 27, 2022 Some idea:
from typing import Generic from attrs import frozen State = TypeVar("State") Interaction = TypeVar("Interaction") @frozen class IsobarNode(Generic[State, Interaction]): parent: State child1: State | IsobarNode child2: State | IsobarNode interaction: Interaction | None = field(default=None) @property def children(self) -> tuple[State, ...]: def flatten( obj: State | IsobarNode[State, Interaction] ) -> Sequence[State]: if isinstance(obj, IsobarNode): return obj.children return [obj] return (*flatten(self.child1), *flatten(self.child2))
where
StateandInteractioncould be further specified with e.g.:import sympy as sp @frozen class Particle: # State name: str spin: sp.Rational # polarization: sp.Rational # (?) parity: int @frozen class LSCoupling: # Interaction L: int S: sp.Rational
- added a parent issue
on Jul 4, 2026 - added 4 commits that reference this issue
on Sep 2, 2026
Metadata
Metadata
Assignees
Labels
⚠️ InterfaceBreaking changes to the APIBreaking changes to the API🔨 MaintenanceMaintenance and upkeep improvementsMaintenance and upkeep improvements
It would be better if AmpForm modules can be built from an internal data structure, just like is happening in ComPWA/compwa.github.io#129 and ComPWA/compwa.github.io#133 (see in particular ComPWA/compwa.github.io#133 (comment)). That would make it easier to build up an amplitude model without having to generate all transitions with QRules. A problem with QRules is that its
Transitionclass is too general for isobar decays, which makes the amplitude building code clunky.So we need a data structure that: