Wavefunction
symbolica.community.hepkit Class
Wavefunction()A fixed numerical external state in GammaLoop's MadGraph phase convention.
Obtain states from FourMomentum.wavefunction(kind, helicity). Vector components use (E,x,y,z) and signature +---; spinors use the chiral gamma-matrix basis. These external states have four components independently of the dimension used for internal symbolic Lorentz/Dirac algebra. A scalar has one component. No helicity sum, spin average or coupling is included.
Examples
from symbolica.community import hepkit as hep
momentum = hep.FourMomentum(150.0, 0.0, 0.0, 150.0)
state = momentum.wavefunction("epsilon", hep.Helicity.PLUS)
assert state.kind == "epsilon" and len(state) == 4Member details
kind
Property · read-only#kind: strOne of scalar, epsilon, epsilon_bar, u, u_bar, v, v_bar.
Examples
Using the setup in the Wavefunction class example:
assert state.kind == "epsilon"components
Property · read-only#components: list[complex] Return a copy of the numerical components as native Python complex values.
Examples
Using the setup in the Wavefunction class example:
values = state.components
assert len(values) == 4 and values[0] == 0j
assert abs(values[1] + 2**-0.5) < 1e-14bar
Method#bar() -> WavefunctionConjugate a scalar/vector or take the chiral Dirac adjoint of a spinor.
Calling this twice restores both the original components and state kind.
Examples
Using the setup in the Wavefunction class example:
assert state.bar().kind == "epsilon_bar"
assert state.bar().bar() == state__len__
Method#__len__() -> intReturn one for scalar states and four for vector or spinor states.
Examples
Using the setup in the Wavefunction class example:
assert len(state) == 4__repr__
Method#__repr__() -> strDescribe the numerical state kind and its components.
Examples
Using the setup in the Wavefunction class example:
assert "Wavefunction" in repr(state)__eq__
Method#__eq__(other: Wavefunction) -> boolCompare both the external-state kind and its numerical components.
Examples
Using the setup in the Wavefunction class example:
assert state == state.bar().bar()Parameters
| Name | Type | Default | Description |
|---|---|---|---|
other | Wavefunction | — | State to compare with this one. |
View generated signature source: docs/api/python/feynkit-community.pyi:12250