Closed ohno closed 3 weeks ago
There is a mismatch between the definition and the implementation in the spherical harmonics.
Y_{lm}(\theta,\varphi) = (-1)^{\frac{|m|+m}{2}} \sqrt{\frac{2l+1}{4\pi} \frac{(l-|m|)!}{(l+|m|)!}} P_l^{|m|} (\cos\theta) \mathrm{e}^{im\varphi}.
https://github.com/ohno/Antique.jl/blob/54fde9ab8408d503bf9f3cf740d3b1bf44c8846d/src/HydrogenAtom.jl#L50-L53
These are mathematically equivalent.
i^{|m|+m} \sqrt{\frac{(l-|m|)!}{(l+|m|)!}} P_l^{|m|} = (-1)^{\frac{|m|+m}{2}} \sqrt{\frac{(l-|m|)!}{(l+|m|)!}} P_l^{|m|} = (-1)^m \sqrt{\frac{(l-m)!}{(l+m)!}} P_l^{m}.
However, they are not equivalent programmatically.
julia> im^(abs(-1) + -1) 1 + 0im julia> (-1)^((abs(-1) + -1)/2) 1.0
The phase factor is called as "Condon-Shortley Phase":
This issue is related to https://github.com/ohno/Antique.jl/issues/49 and https://github.com/ohno/Antique.jl/issues/51.
There is a mismatch between the definition and the implementation in the spherical harmonics.
https://github.com/ohno/Antique.jl/blob/54fde9ab8408d503bf9f3cf740d3b1bf44c8846d/src/HydrogenAtom.jl#L50-L53
These are mathematically equivalent.
However, they are not equivalent programmatically.