threej – Wigner 3j symbols

Support for numba

Origin

The threejj() and threejm() functions are Python implementations of the DRC3JJ and DRC3JM routines in the SLATEC library, written by R. G. Gordon & K. Schulten.

Reference

threejj

threej.threejj(l2, l3, m2, m3, out=None)

Evaluate the Wigner 3j symbol

f(l1) = ⎛  l1    l2  l3 ⎞
        ⎝-m2-m3  m2  m3 ⎠

for all allowed values of l1, the other parameters being held fixed.

Parameters
l2, l3, m2, m3float

Parameters in 3j symbol.

outarray_like, optional

Output array for coefficients. Must have space for l1max-l1min+1 elements. If None, a new array is created.

Returns
l1minfloat

Smallest allowable l1 in 3j symbol.

thrcof(l1max-l1min+1,) array_like

Set of 3j coefficients for all allowed values of l1.

Notes

The subroutine generates f(l1min), f(l1min+1), … where l1min is defined above. The sequence f(l1) is generated by a three-term recurrence algorithm with scaling to control overflow. Both backward and forward recurrence are used to maintain numerical stability. The two recurrence sequences are matched at an interior point and are normalized from the unitary property of 3j coefficients and Wigner’s phase convention. The algorithm is suited to applications in which large quantum numbers arise.

Although conventionally the parameters of the vector addition coefficients satisfy certain restrictions, such as being integers or integers plus 1/2, the restrictions imposed on input to this subroutine are somewhat weaker. See, for example, Section 27.9 of Abramowitz and Stegun or Appendix C of Volume II of A. Messiah. The restrictions imposed by this subroutine are

  1. l2 >= abs(m2) and l3 >= abs(m3);

  2. l2+abs(m2) and l3+abs(m3) must be integers;

  3. l1max-l1min must be a non-negative integer, where l1max=l2+l3 and l1min=max(abs(l2-l3), abs(m2+m3)).

If the conventional restrictions are satisfied, then these restrictions are met. However, the user should be cautious in using input parameters that do not satisfy the conventional restrictions. For example, the the subroutine produces values threejj(2.5, 5.8, 1.5, -1.2) for l1 = 3.3, 4.3, ..., 8.3 but none of the symmetry properties of the 3j symbol are satisfied.

References

1

Abramowitz, M., and Stegun, I. A., Eds., Handbook of Mathematical Functions with Formulas, Graphs and Mathematical Tables, NBS Applied Mathematics Series 55, June 1964 and subsequent printings.

2

Messiah, Albert., Quantum Mechanics, Volume II, North-Holland Publishing Company, 1963.

3

Schulten, Klaus and Gordon, Roy G., Exact recursive evaluation of 3j and 6j coefficients for quantum-mechanical coupling of angular momenta, J Math Phys, v 16, no. 10, October 1975, pp. 1961-1970.

4

Schulten, Klaus and Gordon, Roy G., Semiclassical approximations to 3j and 6j coefficients for quantum-mechanical coupling of angular momenta, J Math Phys, v 16, no. 10, October 1975, pp. 1971-1988.

5

Schulten, Klaus and Gordon, Roy G., Recursive evaluation of 3j and 6j coefficients, Computer Phys Comm, v 11, 1976, pp. 269-278.

Examples

>>> from threej import threejj
>>> l1min, thrcof = threejj(3, 1, 1, -1)
>>> l1min
2.0
>>> thrcof
[0.239045..., 0.267261..., 0.154303...]

Half-integer arguments are fully supported.

>>> l1min, thrcof = threej.threejj(5/2, 3/2, 1/2, -1/2)
>>> l1min
1.0
>>> thrcof
[0.316227..., 0.119522..., -0.169030..., -0.218217...]

threejm

threej.threejm()