Wigner Symbols¶
Wigner, Clebsch-Gordan, Racah, and Gaunt coefficients
Collection of functions for calculating Wigner 3j, 6j, 9j, Clebsch-Gordan, Racah as well as Gaunt coefficients exactly, all evaluating to a rational number times the square root of a rational number [Rasch03].
Please see the description of the individual functions for further details and examples.
References¶
[Rasch03] | (1, 2, 3, 4, 5, 6) J. Rasch and A. C. H. Yu, ‘Efficient Storage Scheme for Pre-calculated Wigner 3j, 6j and Gaunt Coefficients’, SIAM J. Sci. Comput. Volume 25, Issue 4, pp. 1416-1428 (2003) |
Credits and Copyright¶
This code was taken from Sage with the permission of all authors:
https://groups.google.com/forum/#!topic/sage-devel/M4NZdu-7O38
AUTHORS:
- Jens Rasch (2009-03-24): initial version for Sage
- Jens Rasch (2009-05-31): updated to sage-4.0
Copyright (C) 2008 Jens Rasch <jyr2000@gmail.com>
-
sympy.physics.wigner.
clebsch_gordan
(j_1, j_2, j_3, m_1, m_2, m_3)[source]¶ Calculates the Clebsch-Gordan coefficient
.
The reference for this function is [Edmonds74].
INPUT:
j_1
,j_2
,j_3
,m_1
,m_2
,m_3
- integer or half integer
OUTPUT:
Rational number times the square root of a rational number.
EXAMPLES:
>>> from sympy import S >>> from sympy.physics.wigner import clebsch_gordan >>> clebsch_gordan(S(3)/2, S(1)/2, 2, S(3)/2, S(1)/2, 2) 1 >>> clebsch_gordan(S(3)/2, S(1)/2, 1, S(3)/2, -S(1)/2, 1) sqrt(3)/2 >>> clebsch_gordan(S(3)/2, S(1)/2, 1, -S(1)/2, S(1)/2, 0) -sqrt(2)/2
NOTES:
The Clebsch-Gordan coefficient will be evaluated via its relation to Wigner 3j symbols:
See also the documentation on Wigner 3j symbols which exhibit much higher symmetry relations than the Clebsch-Gordan coefficient.
AUTHORS:
- Jens Rasch (2009-03-24): initial version
-
sympy.physics.wigner.
dot_rot_grad_Ynm
(j, p, l, m, theta, phi)[source]¶ Returns dot product of rotational gradients of spherical harmonics.
This function returns the right hand side of the following expression:
Arguments
j, p, l, m …. indices in spherical harmonics (expressions or integers) theta, phi …. angle arguments in spherical harmonics
Example
>>> from sympy import symbols >>> from sympy.physics.wigner import dot_rot_grad_Ynm >>> theta, phi = symbols("theta phi") >>> dot_rot_grad_Ynm(3, 2, 2, 0, theta, phi).doit() 3*sqrt(55)*Ynm(5, 2, theta, phi)/(11*sqrt(pi))
-
sympy.physics.wigner.
gaunt
(l_1, l_2, l_3, m_1, m_2, m_3, prec=None)[source]¶ Calculate the Gaunt coefficient.
The Gaunt coefficient is defined as the integral over three spherical harmonics:
INPUT:
l_1
,l_2
,l_3
,m_1
,m_2
,m_3
- integerprec
- precision, default:None
. Providing a precision can drastically speed up the calculation.
OUTPUT:
Rational number times the square root of a rational number (if
prec=None
), or real number if a precision is given.Examples
>>> from sympy.physics.wigner import gaunt >>> gaunt(1,0,1,1,0,-1) -1/(2*sqrt(pi)) >>> gaunt(1000,1000,1200,9,3,-12).n(64) 0.00689500421922113448...
It is an error to use non-integer values for
and
:
sage: gaunt(1.2,0,1.2,0,0,0) Traceback (most recent call last): ... ValueError: l values must be integer sage: gaunt(1,0,1,1.1,0,-1.1) Traceback (most recent call last): ... ValueError: m values must be integer
NOTES:
The Gaunt coefficient obeys the following symmetry rules:
invariant under any permutation of the columns
invariant under space inflection, i.e.
symmetric with respect to the 72 Regge symmetries as inherited for the
symbols [Regge58]
zero for
,
,
not fulfilling triangle relation
zero for violating any one of the conditions:
,
,
non-zero only for an even sum of the
, i.e.
for
in
ALGORITHM:
This function uses the algorithm of [Liberatodebrito82] to calculate the value of the Gaunt coefficient exactly. Note that the formula contains alternating sums over large factorials and is therefore unsuitable for finite precision arithmetic and only useful for a computer algebra system [Rasch03].
REFERENCES:
[Liberatodebrito82] ‘FORTRAN program for the integral of three spherical harmonics’, A. Liberato de Brito, Comput. Phys. Commun., Volume 25, pp. 81-85 (1982) AUTHORS:
- Jens Rasch (2009-03-24): initial version for Sage
-
sympy.physics.wigner.
racah
(aa, bb, cc, dd, ee, ff, prec=None)[source]¶ Calculate the Racah symbol
.
INPUT:
a
, …,f
- integer or half integerprec
- precision, default:None
. Providing a precision can drastically speed up the calculation.
OUTPUT:
Rational number times the square root of a rational number (if
prec=None
), or real number if a precision is given.Examples
>>> from sympy.physics.wigner import racah >>> racah(3,3,3,3,3,3) -1/14
NOTES:
The Racah symbol is related to the Wigner 6j symbol:
Please see the 6j symbol for its much richer symmetries and for additional properties.
ALGORITHM:
This function uses the algorithm of [Edmonds74] to calculate the value of the 6j symbol exactly. Note that the formula contains alternating sums over large factorials and is therefore unsuitable for finite precision arithmetic and only useful for a computer algebra system [Rasch03].
AUTHORS:
- Jens Rasch (2009-03-24): initial version
-
sympy.physics.wigner.
wigner_3j
(j_1, j_2, j_3, m_1, m_2, m_3)[source]¶ Calculate the Wigner 3j symbol
.
INPUT:
j_1
,j_2
,j_3
,m_1
,m_2
,m_3
- integer or half integer
OUTPUT:
Rational number times the square root of a rational number.
Examples
>>> from sympy.physics.wigner import wigner_3j >>> wigner_3j(2, 6, 4, 0, 0, 0) sqrt(715)/143 >>> wigner_3j(2, 6, 4, 0, 0, 1) 0
It is an error to have arguments that are not integer or half integer values:
sage: wigner_3j(2.1, 6, 4, 0, 0, 0) Traceback (most recent call last): ... ValueError: j values must be integer or half integer sage: wigner_3j(2, 6, 4, 1, 0, -1.1) Traceback (most recent call last): ... ValueError: m values must be integer or half integer
NOTES:
The Wigner 3j symbol obeys the following symmetry rules:
invariant under any permutation of the columns (with the exception of a sign change where
):
invariant under space inflection, i.e.
symmetric with respect to the 72 additional symmetries based on the work by [Regge58]
zero for
,
,
not fulfilling triangle relation
zero for
zero for violating any one of the conditions
,
,
ALGORITHM:
This function uses the algorithm of [Edmonds74] to calculate the value of the 3j symbol exactly. Note that the formula contains alternating sums over large factorials and is therefore unsuitable for finite precision arithmetic and only useful for a computer algebra system [Rasch03].
REFERENCES:
[Regge58] (1, 2) ‘Symmetry Properties of Clebsch-Gordan Coefficients’, T. Regge, Nuovo Cimento, Volume 10, pp. 544 (1958) [Edmonds74] (1, 2, 3, 4, 5) ‘Angular Momentum in Quantum Mechanics’, A. R. Edmonds, Princeton University Press (1974) AUTHORS:
- Jens Rasch (2009-03-24): initial version
-
sympy.physics.wigner.
wigner_6j
(j_1, j_2, j_3, j_4, j_5, j_6, prec=None)[source]¶ Calculate the Wigner 6j symbol
.
INPUT:
j_1
, …,j_6
- integer or half integerprec
- precision, default:None
. Providing a precision can drastically speed up the calculation.
OUTPUT:
Rational number times the square root of a rational number (if
prec=None
), or real number if a precision is given.Examples
>>> from sympy.physics.wigner import wigner_6j >>> wigner_6j(3,3,3,3,3,3) -1/14 >>> wigner_6j(5,5,5,5,5,5) 1/52
It is an error to have arguments that are not integer or half integer values or do not fulfill the triangle relation:
sage: wigner_6j(2.5,2.5,2.5,2.5,2.5,2.5) Traceback (most recent call last): ... ValueError: j values must be integer or half integer and fulfill the triangle relation sage: wigner_6j(0.5,0.5,1.1,0.5,0.5,1.1) Traceback (most recent call last): ... ValueError: j values must be integer or half integer and fulfill the triangle relation
NOTES:
The Wigner 6j symbol is related to the Racah symbol but exhibits more symmetries as detailed below.
The Wigner 6j symbol obeys the following symmetry rules:
Wigner 6j symbols are left invariant under any permutation of the columns:
They are invariant under the exchange of the upper and lower arguments in each of any two columns, i.e.
additional 6 symmetries [Regge59] giving rise to 144 symmetries in total
only non-zero if any triple of
‘s fulfill a triangle relation
ALGORITHM:
This function uses the algorithm of [Edmonds74] to calculate the value of the 6j symbol exactly. Note that the formula contains alternating sums over large factorials and is therefore unsuitable for finite precision arithmetic and only useful for a computer algebra system [Rasch03].
REFERENCES:
[Regge59] ‘Symmetry Properties of Racah Coefficients’, T. Regge, Nuovo Cimento, Volume 11, pp. 116 (1959)
-
sympy.physics.wigner.
wigner_9j
(j_1, j_2, j_3, j_4, j_5, j_6, j_7, j_8, j_9, prec=None)[source]¶ Calculate the Wigner 9j symbol
.
INPUT:
j_1
, …,j_9
- integer or half integerprec
- precision, default:None
. Providing a precision can drastically speed up the calculation.
OUTPUT:
Rational number times the square root of a rational number (if
prec=None
), or real number if a precision is given.Examples
>>> from sympy.physics.wigner import wigner_9j >>> wigner_9j(1,1,1, 1,1,1, 1,1,0 ,prec=64) # ==1/18 0.05555555...
It is an error to have arguments that are not integer or half integer values or do not fulfill the triangle relation:
sage: wigner_9j(0.5,0.5,0.5, 0.5,0.5,0.5, 0.5,0.5,0.5,prec=64) Traceback (most recent call last): ... ValueError: j values must be integer or half integer and fulfill the triangle relation sage: wigner_9j(1,1,1, 0.5,1,1.5, 0.5,1,2.5,prec=64) Traceback (most recent call last): ... ValueError: j values must be integer or half integer and fulfill the triangle relation
ALGORITHM:
This function uses the algorithm of [Edmonds74] to calculate the value of the 3j symbol exactly. Note that the formula contains alternating sums over large factorials and is therefore unsuitable for finite precision arithmetic and only useful for a computer algebra system [Rasch03].