Helicity

Symbolica documentation for getting started, symbolic expressions, numerical evaluation, pattern matching, and APIs in Python and Rust.

Helicity

class Helicity

A spin projection along a particle’s direction of motion.

HEP represents the physical minus, longitudinal, and plus helicity states by the integers -1, 0, and 1.

Examples

from symbolica.community import hepkit as hep
incoming_fermion_helicity = hep.Helicity(-1)
incoming_fermion_helicity == hep.Helicity.MINUS
True

Parameters

  • value (int) Helicity value; must be -1, 0, or 1.

Attributes

Name Description
MINUS Return the negative-helicity singleton.
PLUS Return the positive-helicity singleton.
value Return the helicity as -1, 0, or 1.
ZERO Return the zero-helicity singleton.

MINUS

MINUS: Helicity

Return the negative-helicity singleton.

Examples

int(Helicity.MINUS)
-1

PLUS

PLUS: Helicity

Return the positive-helicity singleton.

Examples

int(Helicity.PLUS)
1

value

Helicity.value: builtins.int

Return the helicity as -1, 0, or 1.

Examples

Using the setup in the Helicity class example:

hep.Helicity.PLUS.value
1

ZERO

ZERO: Helicity

Return the zero-helicity singleton.

Examples

int(Helicity.ZERO)
0

Methods

Name Description
__eq__ Compare with another helicity value.
__int__ Convert this helicity to its integer value.
__new__ Construct a physical helicity from -1, 0, or 1.
__repr__ Return an evaluable-style representation of this helicity.
parse Parse a named, signed, or integer helicity value.

__eq__

Helicity.__eq__(other: typing.Any) -> builtins.bool

Compare with another helicity value.

Examples

Using the setup in the Helicity class example:

hep.Helicity(0) == hep.Helicity.ZERO
True

Parameters

  • other (object) Object to compare with this helicity value.

__int__

Helicity.__int__() -> builtins.int

Convert this helicity to its integer value.

Examples

Using the setup in the Helicity class example:

int(hep.Helicity.MINUS)
-1

__new__

Helicity.__new__(value: builtins.int) -> Helicity

Construct a physical helicity from -1, 0, or 1.

Examples

Using the setup in the Helicity class example:

helicity = hep.Helicity(-1)

Parameters

  • value (int) Integer helicity value.

__repr__

Helicity.__repr__() -> builtins.str

Return an evaluable-style representation of this helicity.

Examples

Using the setup in the Helicity class example:

print(f"selected external helicity: {hep.Helicity.PLUS!r}")

parse

Helicity.parse(value: builtins.str) -> Helicity

Parse a named, signed, or integer helicity value.

Examples

Using the setup in the Helicity class example:

hep.Helicity.parse("+") == hep.Helicity.PLUS
True

Parameters

  • value (str) Helicity spelling such as "-", "0", or "+".