Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

environment:
name: pypi
url: https://pypi.org/p/ryd-numerov
url: https://pypi.org/p/rydstate

permissions:
id-token: write
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/python_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ jobs:
- name: Test wheel # TODO: replace this by using tox or nox
run: |
uv pip uninstall .
uv pip install dist/ryd_numerov*.whl
uv pip install dist/rydstate*.whl
uv run --no-project pytest
- name: Upload wheels
uses: actions/upload-artifact@v5
with:
name: dist
path: dist/ryd_numerov*
path: dist/rydstate*

publish-to-testpypi:
name: Publish to TestPyPI
Expand All @@ -42,7 +42,7 @@ jobs:

environment:
name: testpypi
url: https://test.pypi.org/p/ryd-numerov
url: https://test.pypi.org/p/rydstate

permissions:
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The ryd-numerov software is licensed under:
The RydState software is licensed under:

SPDX-License-Identifier: LGPL-3.0-or-later

Expand Down
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
# Rydberg Numerov
# RydState - A Rydberg State Calculator

[![PyPI Package][pypi-svg]][pypi-link]
[![License: LGPL v3][license-lgpl-svg]][license-lgpl-link]
[![CI Workflow][gh-workflow-svg]][gh-workflow-link]
[![Documentation][docs-svg]][docs-link]

[pypi-svg]: https://img.shields.io/pypi/v/ryd-numerov.svg?style=flat
[pypi-link]: https://pypi.org/project/ryd-numerov/
[pypi-svg]: https://img.shields.io/pypi/v/rydstate.svg?style=flat
[pypi-link]: https://pypi.org/project/rydstate/
[license-lgpl-svg]: https://img.shields.io/badge/License-LGPL_v3-blue.svg?style=flat
[license-lgpl-link]: https://www.gnu.org/licenses/lgpl-3.0.html
[gh-workflow-svg]: https://github.com/pairinteraction/ryd-numerov/actions/workflows/python_wheel.yml/badge.svg
[gh-workflow-link]: https://github.com/pairinteraction/ryd-numerov/actions/workflows/python_wheel.yml
[docs-svg]: https://img.shields.io/badge/Documentation-rydnumerov-blue.svg?style=flat
[docs-link]: https://www.pairinteraction.org/ryd-numerov/sphinx/html/
[gh-workflow-svg]: https://github.com/pairinteraction/rydstate/actions/workflows/python_wheel.yml/badge.svg
[gh-workflow-link]: https://github.com/pairinteraction/rydstate/actions/workflows/python_wheel.yml
[docs-svg]: https://img.shields.io/badge/Documentation-rydstate-blue.svg?style=flat
[docs-link]: https://www.pairinteraction.org/rydstate/sphinx/html/

The *Rydberg Numerov* software calculates properties of Rydberg states.
The *RydState* software calculates properties of Rydberg states.
We especially focus on the calculation of the radial wavefunction of Rydberg states via the Numerov method.
The software can be installed via pip (requires Python >= 3.9):

```bash
pip install ryd-numerov
pip install rydstate
```

To install the latest development version from github, use:

```bash
pip install git+https://github.com/pairinteraction/ryd-numerov
pip install git+https://github.com/pairinteraction/rydstate
```


Expand Down Expand Up @@ -71,21 +71,21 @@ This package relies on quantum defects provided by the community. Consider citin

**User Guide**

- [Tutorials] - Examples of how to use the Rydberg Numerov library.
- [Tutorials] - Examples of how to use the RydState library.

- [API Reference] - Documentation of classes and functions of the Rydberg Numerov Python library.
- [API Reference] - Documentation of classes and functions of the RydState Python library.


[Tutorials]: https://www.pairinteraction.org/ryd-numerov/sphinx/html/examples.html
[API Reference]: https://www.pairinteraction.org/ryd-numerov/sphinx/html/modules.html
[Tutorials]: https://www.pairinteraction.org/rydstate/sphinx/html/examples.html
[API Reference]: https://www.pairinteraction.org/rydstate/sphinx/html/modules.html


## Using custom quantum defects
To use custom quantum defects (or quantum defects for a new species), you can simply create a subclass of `ryd_numerov.species.species_object.SpeciesObject` (e.g. `class CustomRubidium(SpeciesObject):`) with a custom species name (e.g. `name = "Custom_Rb"`).
Then, similarly to `ryd_numerov.species.rubidium.py` you can define the quantum defects (and model potential parameters, ...) for your species.
Finally, you can use the custom species by simply calling `ryd_numerov.RydbergStateAlkali("Custom_Rb", n=50, l=0, j=1/2, m=1/2)` (the code will look for all subclasses of `SpeciesObject` until it finds one with the species name "Custom_Rb").
To use custom quantum defects (or quantum defects for a new species), you can simply create a subclass of `rydstate.species.species_object.SpeciesObject` (e.g. `class CustomRubidium(SpeciesObject):`) with a custom species name (e.g. `name = "Custom_Rb"`).
Then, similarly to `rydstate.species.rubidium.py` you can define the quantum defects (and model potential parameters, ...) for your species.
Finally, you can use the custom species by simply calling `rydstate.RydbergStateAlkali("Custom_Rb", n=50, l=0, j=1/2, m=1/2)` (the code will look for all subclasses of `SpeciesObject` until it finds one with the species name "Custom_Rb").


## License

The ryd-numerov software is licensed under [LGPL v3][license-lgpl-link]. For more information, see [LICENSE.txt](https://github.com/pairinteraction/ryd-numerov/blob/master/LICENSE.txt).
The rydstate software is licensed under [LGPL v3][license-lgpl-link]. For more information, see [LICENSE.txt](https://github.com/pairinteraction/rydstate/blob/master/LICENSE.txt).
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ clean:
@$(SPHINXBUILD) -M clean $(ALLSPHINXOPTS)

livehtml:
sphinx-autobuild -b html $(ALLSPHINXOPTS) --watch ../src/ryd_numerov/
sphinx-autobuild -b html $(ALLSPHINXOPTS) --watch ../src/rydstate/
2 changes: 1 addition & 1 deletion docs/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
display: none;
}
</style>
<a href="https://github.com/pairinteraction/ryd-numerov" class="gitbutton">Explore<small>the GitHub repository</small></a>
<a href="https://github.com/pairinteraction/rydstate" class="gitbutton">Explore<small>the GitHub repository</small></a>
{% endblock %}
10 changes: 5 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# ruff: noqa: INP001

import ryd_numerov
import rydstate

# -- Project information -----------------------------------------------------

project = "ryd-numerov"
copyright = "2025, Rydberg Numerov Developers" # noqa: A001
author = "Rydberg Numerov Developers"
project = "RydState"
copyright = "2025, RydState Developers" # noqa: A001
author = "RydState Developers"

version = ryd_numerov.__version__ # The short X.Y version, use via |version|
version = rydstate.__version__ # The short X.Y version, use via |version|
release = version # The full version, including alpha/beta/rc tags, use via |release|

language = "en"
Expand Down
10 changes: 5 additions & 5 deletions docs/examples/angular/angular_state.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "803cf823",
"metadata": {},
"outputs": [],
"source": [
"from ryd_numerov.angular import AngularKetFJ, AngularKetJJ, AngularKetLS"
"from rydstate.angular import AngularKetFJ, AngularKetJJ, AngularKetLS"
]
},
{
Expand Down Expand Up @@ -207,7 +207,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": null,
"id": "51756a1f",
"metadata": {},
"outputs": [
Expand All @@ -224,14 +224,14 @@
"ket1 = AngularKetFJ(f_c=2, l_r=1, j_r=1.5, f_tot=2.5, species=\"Yb173\")\n",
"ket2 = AngularKetFJ(f_c=2, l_r=2, j_r=1.5, f_tot=2.5, species=\"Yb173\")\n",
"\n",
"print(ket1.calc_reduced_matrix_element(ket2, operator=\"SPHERICAL\", kappa=1))\n",
"print(ket1.calc_reduced_matrix_element(ket2, operator=\"spherical\", kappa=1))\n",
"print(ket1.calc_reduced_matrix_element(ket1, operator=\"s_tot\", kappa=1))"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "ryd-numerov",
"display_name": "rydstate",
"language": "python",
"name": "python3"
},
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/benchmark/benchmark_njit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"\n",
"import numpy as np\n",
"\n",
"from ryd_numerov.rydberg_state import RydbergStateAlkali\n",
"from rydstate.rydberg_state import RydbergStateAlkali\n",
"\n",
"test_cases: list[tuple[str, int, int, bool]] = [\n",
" # species, n, l, use_njit\n",
Expand Down Expand Up @@ -115,7 +115,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "ryd-numerov",
"display_name": "rydstate",
"language": "python",
"name": "python3"
},
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/comparisons/arc_fixed.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
if TYPE_CHECKING:
import arc

from ryd_numerov.units import NDArray
from rydstate.units import NDArray


def radialWavefunction( # noqa: N802
Expand Down
12 changes: 6 additions & 6 deletions docs/examples/comparisons/compare_dipole_matrix_element.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"from ryd_numerov.rydberg_state import RydbergStateAlkali\n",
"from ryd_numerov.units import ureg"
"from rydstate.rydberg_state import RydbergStateAlkali\n",
"from rydstate.units import ureg"
]
},
{
Expand Down Expand Up @@ -76,7 +76,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand All @@ -94,10 +94,10 @@
" q = round(qn2[-1] - qn1[-1])\n",
" state_i = RydbergStateAlkali(\"Rb\", n=qn1[0], l=qn1[1], j=qn1[2], m=qn1[3])\n",
" state_f = RydbergStateAlkali(\"Rb\", n=qn2[0], l=qn2[1], j=qn2[2], m=qn2[3])\n",
" dipole_me = state_i.calc_matrix_element(state_f, \"ELECTRIC_DIPOLE\", q, unit=\"a.u.\")\n",
" dipole_me = state_i.calc_matrix_element(state_f, \"electric_dipole\", q, unit=\"a.u.\")\n",
" matrixelements.append(dipole_me)\n",
"\n",
"results[\"ryd-numerov\"] = np.array(matrixelements)"
"results[\"rydstate\"] = np.array(matrixelements)"
]
},
{
Expand Down Expand Up @@ -207,7 +207,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "ryd-numerov",
"display_name": "rydstate",
"language": "python",
"name": "python3"
},
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/comparisons/compare_model_potentials.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"source": [
"import matplotlib.pyplot as plt\n",
"\n",
"from ryd_numerov.rydberg_state import RydbergStateAlkali, RydbergStateAlkalineLS"
"from rydstate.rydberg_state import RydbergStateAlkali, RydbergStateAlkalineLS"
]
},
{
Expand Down Expand Up @@ -178,7 +178,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "ryd-numerov",
"display_name": "rydstate",
"language": "python",
"name": "python3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"from ryd_numerov.species import Strontium88"
"from rydstate.species import Strontium88"
]
},
{
Expand Down Expand Up @@ -124,7 +124,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "ryd-numerov",
"display_name": "rydstate",
"language": "python",
"name": "python3"
},
Expand Down
12 changes: 6 additions & 6 deletions docs/examples/comparisons/compare_radial_matrix_element.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"from ryd_numerov.rydberg_state import RydbergStateAlkali\n",
"from ryd_numerov.units import ureg"
"from rydstate.rydberg_state import RydbergStateAlkali\n",
"from rydstate.units import ureg"
]
},
{
Expand Down Expand Up @@ -47,7 +47,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand All @@ -60,7 +60,7 @@
],
"source": [
"for species in [\"Rb\", \"H_textbook\"]:\n",
" key = \"ryd-numerov \" + species\n",
" key = \"rydstate \" + species\n",
" results[key] = []\n",
" for qn1, qn2 in zip(qn1_list, qn2_list):\n",
" print(f\"n={qn1[0]}\", end=\"\\r\")\n",
Expand Down Expand Up @@ -138,7 +138,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand All @@ -153,7 +153,7 @@
}
],
"source": [
"ls_dict = {\"ryd-numerov H\": \"--\", \"ARC fixed (>=v3.9)\": \":\"}\n",
"ls_dict = {\"rydstate H\": \"--\", \"ARC fixed (>=v3.9)\": \":\"}\n",
"\n",
"fig, ax = plt.subplots()\n",
"\n",
Expand Down
16 changes: 8 additions & 8 deletions docs/examples/comparisons/compare_wavefunctions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"from ryd_numerov.rydberg_state import RydbergStateAlkali"
"from rydstate.rydberg_state import RydbergStateAlkali"
]
},
{
Expand All @@ -38,16 +38,16 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"results[\"ryd-numerov\"] = []\n",
"results[\"rydstate\"] = []\n",
"for qn in qns:\n",
" state = RydbergStateAlkali(\"Rb\", n=qn[0], l=qn[1], j=qn[2])\n",
" state.radial.create_grid()\n",
" state.radial.create_wavefunction()\n",
" results[\"ryd-numerov\"].append(\n",
" results[\"rydstate\"].append(\n",
" {\n",
" \"x\": state.radial.grid.x_list,\n",
" \"z\": state.radial.grid.z_list,\n",
Expand Down Expand Up @@ -86,7 +86,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand All @@ -107,7 +107,7 @@
" for i, ax in enumerate(row):\n",
" for k, r_list in results.items():\n",
" r = r_list[i]\n",
" ls = {\"ryd-numerov\": \"-\", \"ARC v3.8.1\": \":\", \"ARC fixed (>=v3.9)\": \":\"}.get(k, k)\n",
" ls = {\"rydstate\": \"-\", \"ARC v3.8.1\": \":\", \"ARC fixed (>=v3.9)\": \":\"}.get(k, k)\n",
" ax.plot(r[\"z\"], r[\"w\"], ls=ls, label=f\"{k}\")\n",
"\n",
" ax.set_xlabel(r\"$z$\")\n",
Expand Down Expand Up @@ -142,8 +142,8 @@
"# the small difference of the wavefunctions explains the difference in the radial matrix element of circular states\n",
"# (see also the compare_radial_matrix_element and compare_dipole_matrix_element notebooks)\n",
"\n",
"from ryd_numerov.radial.radial_matrix_element import calc_radial_matrix_element_from_w_z\n",
"from ryd_numerov.units import ureg\n",
"from rydstate.radial.radial_matrix_element import calc_radial_matrix_element_from_w_z\n",
"from rydstate.units import ureg\n",
"\n",
"to_mum = ureg.Quantity(1, \"bohr_radius\").to(\"micrometer\").magnitude\n",
"\n",
Expand Down
Loading