FeynKit · latest
On this page

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) == 4

Member details

kind

Property · read-only#
kind: str

One 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-14

bar

Method#
bar() -> Wavefunction

Conjugate 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__() -> int

Return 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__() -> str

Describe 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) -> bool

Compare both the external-state kind and its numerical components.

Examples

Using the setup in the Wavefunction class example:

assert state == state.bar().bar()

Parameters

NameTypeDefaultDescription
otherWavefunction—

State to compare with this one.