Skip to content

Commit 53f5364

Browse files
fixup basis sqdt
1 parent 4531794 commit 53f5364

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/rydstate/basis/basis_sqdt.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ def __init__(self, species: str, n_min: int = 1, n_max: int | None = None) -> No
1919
self.states = []
2020
for n in range(n_min, n_max + 1):
2121
for l in range(n):
22+
if not self.species.is_allowed_shell(n, l, s):
23+
continue
2224
for j in np.arange(abs(l - s), l + s + 1):
2325
for f in np.arange(abs(j - i_c), j + i_c + 1):
2426
state = RydbergStateSQDTAlkali(species, n=n, l=l, j=float(j), f=float(f))
@@ -35,9 +37,11 @@ def __init__(self, species: str, n_min: int = 1, n_max: int | None = None) -> No
3537
i_c = self.species.i_c if self.species.i_c is not None else 0
3638

3739
self.states = []
38-
for s_tot in [0, 1]:
39-
for n in range(n_min, n_max + 1):
40-
for l in range(n):
40+
for n in range(n_min, n_max + 1):
41+
for l in range(n):
42+
for s_tot in [0, 1]:
43+
if not self.species.is_allowed_shell(n, l, s_tot):
44+
continue
4145
for j_tot in range(abs(l - s_tot), l + s_tot + 1):
4246
for f_tot in np.arange(abs(j_tot - i_c), j_tot + i_c + 1):
4347
state = RydbergStateSQDTAlkalineLS(

0 commit comments

Comments
 (0)