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_matrixgives 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_dgives one element at a real or complex angle from a Jacobi polynomial recurrence inO(l)time. Its kernel takes anumerics::Jetangle, so the Euler-angle pullbacks ofwigner_d_arraydifferentiate 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Β§
- Wigner3j
Row π - Wigner 3j symbols
(j1 j2 j3; m1 m2 -m1-m2)for every admissiblej3from one recurrence, equal bit for bit towigner3jat eachj3. - WignerD
Residual - What
wigner_d_arraysaves 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) inj3,j3 A(j3 + 1) f(j3 + 1) + B(j3) f(j3) + (j3 + 1) A(j3) f(j3 - 1) = 0forf(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 ofc: Eq. (7) of Xu (1998), treams_coeffd. - decay_
start π - The lowest
jinstop..=maximumdown to which the downward recurrence of the row frommaximum = j1 + j2grows in magnitude at every step, so that the symbols decay upward fromjon;stopif they do down tostop. The mirror ofgrowth_end. - growth_
end π - The first
jinminimum + 1..=stopat which the upward recurrence of the row(j1 j2 j; m1 m2 -m1-m2)stops growing in magnitude, orstop + 1. Iterates the ratio of consecutive symbols, which needs no closed-form start value. - highest π
- The symbol at the upper end
j3 = j1 + j2of a row, in closed form, as treams starts its downward recurrence (_wigner3jbackward). - index π
- Position
l + mof ordermin a degree-lblock ordered-l..=l. - initial_
j π - The closed form of the symbol at the lower end
j3 = j1 - j2of a row: Eq. (14) of Xu (1998), treams_initforwardj. - initial_
m π - The closed form of the symbol at the lower end
j3 = m1 + m2of a row: Eq. (16) of Xu (1998), treams_initforwardm. - ladder π
- Ladder coefficient
sqrt(l(l + 1) - m(m + 1)) / 2of the angular-momentum generator. - lowest π
- The symbol at the lower end
j3 = minimumof a row, in closed form:initial_jorinitial_m, with labels swapped or negated by the symmetries of the symbol. - turn π
- The first degree
visitrecurs downward, as far asfirst..=lastcan tell:max(growth_end, min(switch, decay_start))with each scan cut off where it no longer decides a degree in the range. Whether aj3 >= firstlies below the turn is therefore the same for every range. - visit π
- Visits
(j3, (j1 j2 j3; m1 m2 -m1-m2))for everyj3infirst..=last, a subrange of the admissiblemax(|j1 - j2|, |m1 + m2|)..=j1 + j2, with treamsβ two-sided recurrence inj3(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_dvalues 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| > lor|k| > lgive 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) inO(l)time andO(1)storage. Half-angle powers keep the off-diagonal limits wherecos(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.