|
15 | 15 | from rydstate.units import BaseQuantities, MatrixElementOperatorRanks, ureg |
16 | 16 |
|
17 | 17 | if TYPE_CHECKING: |
18 | | - from rydstate.angular.angular_ket import AngularKetBase, AngularKetJJ, AngularKetLS |
| 18 | + from rydstate.angular.angular_ket import AngularKetBase, AngularKetFJ, AngularKetJJ, AngularKetLS |
19 | 19 | from rydstate.units import MatrixElementOperator, PintFloat |
20 | 20 |
|
21 | 21 |
|
@@ -418,11 +418,74 @@ def nu(self) -> float: |
418 | 418 | if self._nu is not None: |
419 | 419 | return self._nu |
420 | 420 | 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:]): |
424 | 424 | raise ValueError( |
425 | 425 | "RydbergStateSQDTAlkalineJJ is intended for high-l states only, " |
426 | 426 | "where the quantum defects are the same for singlet and triplet states." |
427 | 427 | ) |
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