Module wigner

Module wigner 

Source
Expand description

Wigner 3j symbols from the Schulten-Gordon recurrence in j3, continued in each direction while the symbols grow, and the Wigner small-d and D functions in the z-y-z convention.

Upstream: treams.special.wigner3j (_wigner3j.pyx), wignersmalld and wignerd (_wignerd.pyx).

Two algorithms compute small-d values, because their callers need different things:

  • wigner_small_d_matrix gives the whole real (2l + 1) x (2l + 1) block of one degree at a real angle, from the eigenvectors of the symmetric angular-momentum generator. Multipole rotations need every element of a block, and the eigensystem avoids the cancellation of the factorial sums.
  • wigner_small_d gives one element at a real or complex angle from a Jacobi polynomial recurrence in O(l) time. Its kernel takes a numerics::Jet angle, so the Euler-angle pullbacks of wigner_d_array differentiate the same code.

The two agree to 2e-12 + 1e-10 |d| per element up to degree 128: the property wigner_small_d_matches_the_generator_exponential in properties/special.rs checks this bound.

StructsΒ§

Wigner3jRow πŸ”’
Wigner 3j symbols (j1 j2 j3; m1 m2 -m1-m2) for every admissible j3 from one recurrence, equal bit for bit to wigner3j at each j3.
WignerDResidual
What wigner_d_array saves for its pullback: the labels and the Euler angles. The pullback applies the local chain rules.

ConstantsΒ§

PARALLEL πŸ”’
Wigner arrays evaluate in parallel from this many elements.

FunctionsΒ§

c πŸ”’
The coefficient A(j3) of the three-term recurrence of Schulten and Gordon (1975) in j3, j3 A(j3 + 1) f(j3 + 1) + B(j3) f(j3) + (j3 + 1) A(j3) f(j3 - 1) = 0 for f(j3) = (j1 j2 j3; m1 m2 m3): Eq. (7) of Y.-L. Xu, J. Comput. Phys. 139, 137 (1998), as cited by treams (_coeffc).
d πŸ”’
The coefficient B(j3) of the recurrence of c: Eq. (7) of Xu (1998), treams _coeffd.
decay_start πŸ”’
The lowest j in stop..=maximum down to which the downward recurrence of the row from maximum = j1 + j2 grows in magnitude at every step, so that the symbols decay upward from j on; stop if they do down to stop. The mirror of growth_end.
growth_end πŸ”’
The first j in minimum + 1..=stop at which the upward recurrence of the row (j1 j2 j; m1 m2 -m1-m2) stops growing in magnitude, or stop + 1. Iterates the ratio of consecutive symbols, which needs no closed-form start value.
highest πŸ”’
The symbol at the upper end j3 = j1 + j2 of a row, in closed form, as treams starts its downward recurrence (_wigner3jbackward).
index πŸ”’
Position l + m of order m in a degree-l block ordered -l..=l.
initial_j πŸ”’
The closed form of the symbol at the lower end j3 = j1 - j2 of a row: Eq. (14) of Xu (1998), treams _initforwardj.
initial_m πŸ”’
The closed form of the symbol at the lower end j3 = m1 + m2 of a row: Eq. (16) of Xu (1998), treams _initforwardm.
ladder πŸ”’
Ladder coefficient sqrt(l(l + 1) - m(m + 1)) / 2 of the angular-momentum generator.
lowest πŸ”’
The symbol at the lower end j3 = minimum of a row, in closed form: initial_j or initial_m, with labels swapped or negated by the symmetries of the symbol.
turn πŸ”’
The first degree visit recurs downward, as far as first..=last can tell: max(growth_end, min(switch, decay_start)) with each scan cut off where it no longer decides a degree in the range. Whether a j3 >= first lies below the turn is therefore the same for every range.
visit πŸ”’
Visits (j3, (j1 j2 j3; m1 m2 -m1-m2)) for every j3 in first..=last, a subrange of the admissible max(|j1 - j2|, |m1 + m2|)..=j1 + j2, with treams’ two-sided recurrence in j3 (Schulten and Gordon).
wigner3j
Wigner 3j symbol (j1 j2 j3; m1 m2 m3), zero outside the admissible labels.
wigner_d
Wigner D element D^l_(mk)(phi, theta, psi) = e^(-i m phi) d^l_(mk)(theta) e^(-i k psi) in the z-y-z convention, allowing complex Euler angles.
wigner_d_array
Broadcast wigner_d values with all three Euler angles differentiable: each input is either one value or one value per element.
wigner_d_jet πŸ”’
The same Euler-angle chain rule serves both one tangent and three adjoint partials, with the derivative width selected by the caller.
wigner_small_d
Wigner small-d element d^l_(mk)(theta) at a real or complex angle, without a matrix. Orders with |m| > l or |k| > l give zero.
wigner_small_d_jet πŸ”’
One small-d element d^l_(mk)(theta) at a jet angle, from the Jacobi recurrence (DLMF 18.9.1-2) in O(l) time and O(1) storage. Half-angle powers keep the off-diagonal limits where cos(theta) rounds to one. Symmetries keep both Jacobi parameters nonnegative.
wigner_small_d_matrix πŸ”’
Complete real Wigner small-d matrix d^l(theta) of one degree, rows and columns ordered -l..=l, for multipole rotations. A symmetric angular-momentum eigensystem avoids factorial-sum cancellation.