nikolasibalic / ARC-Alkali-Rydberg-Calculator

Object-oriented Python library for computation of properties of highly-excited Rydbeg states of alkali and divalent atoms.
https://atomcalc.org
BSD 3-Clause "New" or "Revised" License
86 stars 72 forks source link

Breit Rabi isn't outputting the right F and mf states #159

Closed VNastya closed 2 months ago

VNastya commented 9 months ago

Hi,

I've been reviewing the documentation of the breitRabi function, and it appears there might be an issue with two of its outputs. According to my understanding, this function should output both the energy and also the F and mf states for a given magnetic field:

image

While the energy values it outputs agree with previous calculations I have seen it doesn't output the right m and MF states. I checked it for various atoms and atomic states, the result is the same. It's possible that there's an error in the calculation of the quantum numbers, or I might be misunderstanding the documentation. I have attached a code example and the hyperfine structure it generates for potassium 40. It this particular case, the F states should be 9/2 and 7/2.

Thanks,

Nastya

image

image

nikolasibalic commented 2 months ago

Thank you @VNastya for your contribution!

Fix released in version 3.5.0 Please update via pip to the latest version.

dehond commented 2 weeks ago

@nikolasibalic We've encountered a bug that's possibly related to this issue:

from arc import Rubidium87

f = Rubidium87().breitRabi(n=7, l=2, j=2.5, B=np.array([0.0]))
print(f[1])

# [4.  4.  4.  4.  4.  4.  4.  4.  4.  3.  3.  3.  3.  3.  3.  2.  3.  2.   2.  2.  1.5 2.  1.  1. ]

These are all supposed to be integers. In an older version (tested v3.2.2) this doesn't happen.