AmplitudeLeg
AmplitudeLeg
class AmplitudeLegOne physical external state of a symbolic amplitude.
Examples
from symbolica import S, E
from symbolica.community import hepkit as hep
model = hep.Model.phi4()
process = model.process(["phi", "phi"], ["phi", "phi"])
generated = process.generate_diagrams()
diagram = generated.diagrams[0]
amplitude = hep.Amplitude(generated.diagrams)
leg = amplitude.legs[0]
state = (leg.index, leg.particle.name, leg.state)
spin_sum = leg.particle.spin_sum(leg.momentum, leg.tensor_index, S("conjugate_index"))Attributes
| Name | Description |
|---|---|
index |
Stable external-leg label shared by every diagram. |
momentum |
Unindexed physical momentum P(index). |
particle |
Model particle, including particle/antiparticle identity. |
slots |
Typed open spin/color slots attached to this physical state. |
state |
Whether the state is incoming or outgoing. |
tensor_index |
Bare label shared by this leg’s spin and color slots. |
index
AmplitudeLeg.index: builtins.intStable external-leg label shared by every diagram.
Examples
Using the setup in the AmplitudeLeg class example:
label = leg.index
assert label in [state.index for state in amplitude.legs]momentum
AmplitudeLeg.momentum: ExpressionUnindexed physical momentum P(index).
Examples
Using the setup in the AmplitudeLeg class example:
external_momentum = leg.momentumparticle
AmplitudeLeg.particle: ParticleModel particle, including particle/antiparticle identity.
Examples
Using the setup in the AmplitudeLeg class example:
particle_name = leg.particle.nameslots
AmplitudeLeg.slots: builtins.list[Slot]Typed open spin/color slots attached to this physical state.
Examples
Using the setup in the AmplitudeLeg class example:
open_slots = leg.slotsstate
AmplitudeLeg.state: builtins.strWhether the state is incoming or outgoing.
Examples
Using the setup in the AmplitudeLeg class example:
incoming = [state for state in amplitude.legs if state.state == "incoming"]tensor_index
AmplitudeLeg.tensor_index: ExpressionBare label shared by this leg’s spin and color slots.
Examples
Using the setup in the AmplitudeLeg class example:
spin_sum = leg.particle.spin_sum(leg.momentum, leg.tensor_index, S("bra"))Methods
| Name | Description |
|---|---|
__repr__ |
Describe the state and its physical leg identity. |
__repr__
AmplitudeLeg.__repr__() -> builtins.strDescribe the state and its physical leg identity.
Examples
Using the setup in the AmplitudeLeg class example:
print(amplitude.legs[0])