AmplitudeLeg
symbolica.community.hepkit Class
AmplitudeLeg()One 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"))Member details
index
Property · read-only#index: 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]particle
Property · read-only#state
Property · read-only#state: 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"]momentum
Property · read-only#momentum: ExpressionUnindexed physical momentum P(index).
Examples
Using the setup in the AmplitudeLeg class example:
external_momentum = leg.momentumtensor_index
Property · read-only#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"))slots
Property · read-only#slots: list[Slot] Typed open spin/color slots attached to this physical state.
Examples
Using the setup in the AmplitudeLeg class example:
open_slots = leg.slots__repr__
Method#__repr__() -> strDescribe the state and its physical leg identity.
Examples
Using the setup in the AmplitudeLeg class example:
print(amplitude.legs[0])View generated signature source: docs/api/python/feynkit-community.pyi:249