Skip to content

Commit 47a38c3

Browse files
[docs] improve api reference
1 parent 1c30568 commit 47a38c3

5 files changed

Lines changed: 83 additions & 29 deletions

File tree

docs/api_reference.rst

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
API Reference
2+
=============
3+
4+
5+
The RydState python API can be accessed via the ``rydstate`` module by
6+
7+
.. code-block:: python
8+
9+
import rydstate
10+
11+
12+
All the available classes, methods and functions are documented below:
13+
14+
.. currentmodule:: rydstate
15+
16+
**Rydberg States**
17+
18+
.. autosummary::
19+
:toctree: _autosummary/
20+
21+
RydbergStateSQDT
22+
RydbergStateSQDTAlkali
23+
RydbergStateSQDTAlkalineLS
24+
RydbergStateSQDTAlkalineJJ
25+
RydbergStateSQDTAlkalineFJ
26+
27+
**Rydberg Basis**
28+
29+
.. autosummary::
30+
:toctree: _autosummary/
31+
32+
BasisSQDTAlkali
33+
BasisSQDTAlkalineLS
34+
BasisSQDTAlkalineJJ
35+
BasisSQDTAlkalineFJ
36+
37+
**Angular module**
38+
39+
.. autosummary::
40+
:toctree: _autosummary/
41+
42+
angular.AngularKetLS
43+
angular.AngularKetJJ
44+
angular.AngularKetFJ
45+
angular.AngularState
46+
angular.utils
47+
48+
49+
**Radial module**
50+
51+
.. autosummary::
52+
:toctree: _autosummary/
53+
54+
radial.RadialKet
55+
radial.Wavefunction
56+
radial.Model
57+
radial.numerov
58+
59+
**Species module and parameters**
60+
61+
.. autosummary::
62+
:toctree: _autosummary/
63+
64+
species.SpeciesObject
65+
species.HydrogenTextBook
66+
species.Hydrogen
67+
species.Lithium
68+
species.Sodium
69+
species.Potassium
70+
species.Rubidium
71+
species.Cesium
72+
species.Strontium87
73+
species.Strontium88
74+
species.Ytterbium171
75+
species.Ytterbium173
76+
species.Ytterbium174

docs/index.rst

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,4 @@
99
:hidden:
1010

1111
examples.rst
12-
13-
14-
.. toctree::
15-
:maxdepth: 2
16-
:caption: References
17-
:hidden:
18-
19-
modules.rst
12+
api_reference.rst

docs/modules.rst

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/rydstate/angular/utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ def try_trivial_spin_addition(s_1: float, s_2: float, s_tot: float | None, name:
2727

2828

2929
def check_spin_addition_rule(s_1: float, s_2: float, s_tot: float) -> bool:
30-
"""Check if the spin addition rule is satisfied.
30+
r"""Check if the spin addition rule is satisfied.
3131
3232
This means check the following conditions:
33-
- |s_1 - s_2| <= s_tot <= s_1 + s_2
34-
- s_1 + s_2 + s_tot is an integer
33+
:math:`|s_1 - s_2| \leq s_{tot} \leq s_1 + s_2`
34+
and
35+
:math:`s_1 + s_2 + s_{tot}` is an integer
3536
"""
3637
return abs(s_1 - s_2) <= s_tot <= s_1 + s_2 and (s_1 + s_2 + s_tot) % 1 == 0
3738

src/rydstate/radial/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from rydstate.radial import numerov
12
from rydstate.radial.grid import Grid
23
from rydstate.radial.model import Model, PotentialType
34
from rydstate.radial.numerov import run_numerov_integration
@@ -14,5 +15,6 @@
1415
"WavefunctionNumerov",
1516
"WavefunctionWhittaker",
1617
"calc_radial_matrix_element_from_w_z",
18+
"numerov",
1719
"run_numerov_integration",
1820
]

0 commit comments

Comments
 (0)