Skip to content

Commit c13c9fe

Browse files
add RydbergStateSQDTAlkalineFJ
1 parent 7753ed7 commit c13c9fe

3 files changed

Lines changed: 72 additions & 5 deletions

File tree

src/rydstate/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from rydstate.rydberg import (
44
RydbergStateSQDT,
55
RydbergStateSQDTAlkali,
6+
RydbergStateSQDTAlkalineFJ,
67
RydbergStateSQDTAlkalineJJ,
78
RydbergStateSQDTAlkalineLS,
89
)
@@ -13,6 +14,7 @@
1314
"BasisSQDTAlkalineLS",
1415
"RydbergStateSQDT",
1516
"RydbergStateSQDTAlkali",
17+
"RydbergStateSQDTAlkalineFJ",
1618
"RydbergStateSQDTAlkalineJJ",
1719
"RydbergStateSQDTAlkalineLS",
1820
"angular",

src/rydstate/rydberg/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
from rydstate.rydberg.rydberg_sqdt import (
22
RydbergStateSQDT,
33
RydbergStateSQDTAlkali,
4+
RydbergStateSQDTAlkalineFJ,
45
RydbergStateSQDTAlkalineJJ,
56
RydbergStateSQDTAlkalineLS,
67
)
78

89
__all__ = [
910
"RydbergStateSQDT",
1011
"RydbergStateSQDTAlkali",
12+
"RydbergStateSQDTAlkalineFJ",
1113
"RydbergStateSQDTAlkalineJJ",
1214
"RydbergStateSQDTAlkalineLS",
1315
]

src/rydstate/rydberg/rydberg_sqdt.py

Lines changed: 68 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from rydstate.units import BaseQuantities, MatrixElementOperatorRanks, ureg
1616

1717
if TYPE_CHECKING:
18-
from rydstate.angular.angular_ket import AngularKetBase, AngularKetJJ, AngularKetLS
18+
from rydstate.angular.angular_ket import AngularKetBase, AngularKetFJ, AngularKetJJ, AngularKetLS
1919
from rydstate.units import MatrixElementOperator, PintFloat
2020

2121

@@ -418,11 +418,74 @@ def nu(self) -> float:
418418
if self._nu is not None:
419419
return self._nu
420420
assert self.n is not None
421-
nu_singlet = self.species.calc_nu(self.n, self.l, self.j_tot, s_tot=0)
422-
nu_triplet = self.species.calc_nu(self.n, self.l, self.j_tot, s_tot=1)
423-
if abs(nu_singlet - nu_triplet) > 1e-10:
421+
nus = [self.species.calc_nu(self.n, self.l, self.j_tot, s_tot=s_tot) for s_tot in [0, 1]]
422+
423+
if any(abs(nu - nus[0]) > 1e-10 for nu in nus[1:]):
424424
raise ValueError(
425425
"RydbergStateSQDTAlkalineJJ is intended for high-l states only, "
426426
"where the quantum defects are the same for singlet and triplet states."
427427
)
428-
return nu_singlet
428+
return nus[0]
429+
430+
431+
class RydbergStateSQDTAlkalineFJ(RydbergStateSQDT):
432+
"""Create an Alkaline Rydberg state, including the radial and angular states."""
433+
434+
angular: AngularKetFJ
435+
436+
def __init__(
437+
self,
438+
species: str | SpeciesObject,
439+
n: int,
440+
l: int,
441+
j_r: float,
442+
f_c: float | None = None,
443+
f_tot: float | None = None,
444+
m: float | None = None,
445+
nu: float | None = None,
446+
) -> None:
447+
r"""Initialize the Rydberg state.
448+
449+
Args:
450+
species: Atomic species.
451+
n: Principal quantum number of the rydberg electron.
452+
l: Orbital angular momentum quantum number of the rydberg electron.
453+
j_r: Total angular momentum quantum number of the Rydberg electron.
454+
f_c: Total angular momentum quantum number of the core (core electron + nucleus).
455+
f_tot: Total angular momentum quantum number of the atom (rydberg electron + core)
456+
Optional, only needed if the species supports hyperfine structure (i.e. species.i_c is not None or 0).
457+
m: Total magnetic quantum number.
458+
Optional, only needed for concrete angular matrix elements.
459+
nu: Effective principal quantum number of the rydberg electron.
460+
Optional, if not given it will be calculated from n, l.
461+
462+
"""
463+
super().__init__(species=species, n=n, nu=nu, l_r=l, j_r=j_r, f_c=f_c, f_tot=f_tot, m=m)
464+
465+
self.l = self.angular.l_r
466+
self.j_r = self.angular.j_r
467+
self.f_c = self.angular.f_c
468+
self.f_tot = self.angular.f_tot
469+
self.m = self.angular.m
470+
471+
def __repr__(self) -> str:
472+
species, n, l, j_r, f_c, f_tot, m = self.species, self.n, self.l, self.j_r, self.f_c, self.f_tot, self.m
473+
return f"{self.__class__.__name__}({species.name}, {n=}, {l=}, {j_r=}, {f_c=}, {f_tot=}, {m=})"
474+
475+
@cached_property
476+
def nu(self) -> float:
477+
if self._nu is not None:
478+
return self._nu
479+
assert self.n is not None
480+
nus = [
481+
self.species.calc_nu(self.n, self.l, float(j_tot), s_tot=s_tot)
482+
for s_tot in [0, 1]
483+
for j_tot in np.arange(abs(self.j_r - 1 / 2), self.j_r + 1 / 2 + 1)
484+
]
485+
486+
if any(abs(nu - nus[0]) > 1e-10 for nu in nus[1:]):
487+
raise ValueError(
488+
"RydbergStateSQDTAlkalineFJ is intended for high-l states only, "
489+
"where the quantum defects are the same for singlet and triplet states."
490+
)
491+
return nus[0]

0 commit comments

Comments
 (0)