[中文]
A package to calculate CG-coefficient, Racah coefficient, Wigner 3j, 6j, 9j symbols and Moshinsky brakets.
One can get the exact result with SqrtRational type, which use BigInt to avoid overflow. And we also offer float version for numeric calculation, which is about twice faster than GNU Scientific Library.
I also rewrite the float version with c++ for numeric calculation: WignerSymbol.
For more details and the calculation formula, please see the document .
Just start a Julia REPL, and install it
julia> ]
pkg> add CGcoefficientjulia> CG(1,2,3,1,1,2)
√(2//3)
julia> nineJ(1,2,3,4,5,6,3,6,9)
1//1274√(3//5)
julia> f6j(6,6,6,6,6,6)
-0.07142857142857142For more examples please see the document.
This package contains two types of functions:
- The exact functions return
SqrtRational, which are designed for demonstration. They useBigIntin the internal calculation, and do not cache the binomial table, so they are not efficient. - The floating-point functions return
Float64, which are designed for numeric calculation. They useInt, Float64in the internal calculation, and you should pre-callwigner_init_floatto calculate and cache the binomial table for later calculation. They may give inaccurate result for vary large angular momentum, due to floating-point arithmetic. They are trustworthy for angular momentum numberJmax <= 60.
CG(j1, j2, j3, m1, m2, m3), CG-coefficient, arguments areHalfInts, akaIntegerorRationallike3//2.CG0(j1, j2, j3), CG-coefficient form1 = m2 = m3 = 0, only integer angular momentum number is meaningful.threeJ(j1, j2, j3, m1, m2, m3), Wigner 3j-symbol,HalfIntarguments.sixJ(j1, j2, j3, j4, j5, j6), Wigner 6j-symbol,HalfIntarguments.Racah(j1, j2, j3, j4, j5, j6), Racah coefficient,HalfIntarguments.nineJ(j1, j2, j3, j4, j5, j6, j7, j8, j9), Wigner 9j-symbol,HalfIntarguments.norm9J(j2, j3, j4, j5, j5, j6, j7, j8, j9), normalized 9j-symbol,HalfIntarguments.lsjj(l1, l2, j1, j2, L, S, J), LS-coupling to jj-coupling transform coefficient. It actually equals to a normalized 9j-symbol, but easy to use and faster.j1, j2can beHalfInt.Moshinsky(N, L, n, l, n1, l1, n2, l2, Λ), Moshinsky brakets,Integerarguments.
For faster numeric calculation, if the angular momentum number can be half-integer, the argument of the functions is actually double of the number. So that all arguments are integers. The doubled arguments are named starts with d.
fCG(dj1, dj2, dj3, dm1, dm2, dm3), CG-coefficient.fCG0(j1, j2, j3), CG-coefficient form1 = m2 = m3 = 0.fCGspin(ds1, ds2, S), quicker CG-coefficient for two spin-1/2 coupling.f3j(dj1, dj2, dj3, dm1, dm2, dm3), Wigner 3j-symbol.f6j(dj1, dj2, dj3, dj4, dj5, dj6), Wigner 6j-symbol.fRacah(dj1, dj2, dj3, dj4, dj5, dj6), Racah coefficient.f9j(dj1, dj2, dj3, dj4, dj5, dj6, dj7, dj8, dj9), Wigner 9j-symbol.fnorm9j(dj1, dj2, dj3, dj4, dj5, dj6, dj7, dj8, dj9), normalized 9j-symbol.flsjj(l1, l2, dj1, dj2, L, S, J), LS-coupling to jj-coupling transform coefficient.fMoshinsky(N, L, n, l, n1, l1, n2, l2, Λ), Moshinsky brakets.dfunc(dj, dm1, dm2, β), Wigner d-function.
- https://github.com/ManyBodyPhysics/CENS
- D. A. Varshalovich, A. N. Moskalev and V. K. Khersonskii, Quantum Theory of Angular Momentum, (World Scientific, 1988).