Skip to content

Spin

Irreducible representation label for SU(2).

Spin

Spin(j_doubled: int)

SU(2) irreducible representation label, stored as doubled integer 2j.

Parameters:

Name Type Description Default
j_doubled int

The doubled spin value 2j. Must be a non-negative integer.

required

Raises:

Type Description
ValueError

If j_doubled is negative.

Examples:

>>> import yuzuha
>>> j_half = yuzuha.Spin(1)   # j = 1/2
>>> j1     = yuzuha.Spin(2)   # j = 1
>>> print(j_half.value())
0.5
>>> print(j1.dimension())
3

value

value() -> float

Return the spin as a float j = j_doubled / 2.

Returns:

Type Description
float

The spin value j.

twice

twice() -> int

Return the internal doubled integer 2j.

Returns:

Type Description
int

The doubled spin value.

dimension

dimension() -> int

Return the representation dimension 2j + 1.

Returns:

Type Description
int

The number of magnetic quantum number states.

is_integer

is_integer() -> bool

Return True if j is a non-negative integer.

Returns:

Type Description
bool

True for integer spin, False for half-integer spin.

is_half_integer

is_half_integer() -> bool

Return True if j is a strict half-integer.

Returns:

Type Description
bool

True for half-integer spin, False for integer spin.

Description

Spin represents an SU(2) irreducible representation by its spin quantum number \(j \in \{0, \frac{1}{2}, 1, \frac{3}{2}, \ldots\}\). Internally, spins are stored as doubled integers \(2j\) to avoid floating-point arithmetic throughout all computations.

The constructor takes the doubled spin value as an integer argument:

import yuzuha

j0    = yuzuha.Spin(0)   # j = 0
jhalf = yuzuha.Spin(1)   # j = 1/2
j1    = yuzuha.Spin(2)   # j = 1
j32   = yuzuha.Spin(3)   # j = 3/2

Properties

  • value() — spin as a Python float (\(j = n/2\))
  • twice() — internal doubled integer \(2j\)
  • dimension() — representation dimension \(2j + 1\)
  • is_integer() — True if \(j\) is a non-negative integer
  • is_half_integer() — True if \(j\) is a strict half-integer

See Also

Notes

Spin values are immutable. Comparison and hashing are supported, so Spin objects can be used as dictionary keys and in sets.

The identity representation is Spin(0) (\(j = 0\)), which has dimension 1 and contributes a trivial factor in all coupling coefficients.