Skip to content

Commit

Permalink
Merge pull request #23 from QTC-UMD/v2rc
Browse files Browse the repository at this point in the history
Rydiqule v2.0.0 beta release
  • Loading branch information
dihm authored Feb 27, 2025
2 parents 657b2a3 + e404625 commit 29cdf95
Show file tree
Hide file tree
Showing 86 changed files with 16,506 additions and 6,437 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,26 @@ jobs:
- name: Run Unit Tests
run: |
pytest ./tests/ -m "not high_memory and not slow"
pytest . -m "not high_memory and not slow"
pytest-np2:
name: Unit Tests with Numpy 2
runs-on: ubuntu-latest
if: github.repository_owner == 'QTC-UMD' || github.repository_owner == 'naqslab'
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install Rydiqule and Dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[tests]
- name: Run Unit Tests
run: |
pytest . -m "not high_memory and not slow and not backend"
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,7 @@ instance/

# Sphinx documentation
docs/source/api/_autosummary
docs/source/_examples
docs/source/_intro_nbs
# track the output pdf
docs/build/*
!docs/build/latex
docs/build/latex/*
!docs/build/latex/rydiqule.pdf

# PyBuilder
target/
Expand Down Expand Up @@ -166,3 +160,4 @@ Untitled.ipynb
profiling
*.pkl
sensor_inventory/*.pkl
.vscode/settings.json
145 changes: 6 additions & 139 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ It also functions as a general master equation solver based on the semi-classica
[![Python Version](https://img.shields.io/pypi/pyversions/rydiqule.svg)](https://python.org)
[![License](https://img.shields.io/pypi/l/rydiqule.svg)](https://github.com/QTC-UMD/rydiqule/raw/main/LICENSE)
[![Docs](https://readthedocs.org/projects/rydiqule/badge/?version=latest)](https://rydiqule.readthedocs.io/en/latest)
[![DOI](https://img.shields.io/badge/DOI-10.1016%2Fj.cpc.2023.108952-goldenrod.svg)](https://doi.org/10.1016/j.cpc.2023.108952)

### Please cite as

Expand All @@ -19,142 +20,8 @@ RydIQule: A Graph-based paradigm for modeling Rydberg and atomic sensors,

## Installation

Installation is done via pip or conda.
See below for detailed instructions.

In all cases, it is highly recommended to install rydiqule in a virtual environment.

### Conda installation (recommended)

Installation via conda is recommended for rydiqule.
It handles dependency installation as well as a virtual environment to ensure packages do not conflict with other usages on the same system.
Finally, the `numpy` provided by anaconda has been compiled against optimized BLAS/LAPACK implementations, which results in much better performance in rydiqule itself.

Assuming you have not already created a separate environment for RydIQule (recommended), run the following to create a new environment:
```shell
(base) ~/> conda create -n rydiqule python=3.11
(base) ~/> conda activate rydiqule
```
RydIQule currently requires python >3.8.
For a new installation, it is recommended to use the newest supported python.

Now install via rydiqule's anaconda channel.
This channel provides rydiqule as well as its dependencies that are not available in the default anaconda channel.
If one of these dependencies is outdated, please raise an issue with the [vendoring repository](https://github.com/QTC-UMD/rydiqule-vendored-conda-builds).
```shell
(rydiqule) ~/> conda install -c rydiqule rydiqule
```

If you would like to install rydiqule in editable mode to locally modify its source,
this must be done using pip.
Follow the above to install rydiqule and its dependencies,
then run the following to uninstall rydiqule as provided by conda
and install the editable local repository.
```shell
(rydiqule) ~/> conda remove rydiqule --force
# following must be run from root of local repository
(rydiqule) ~/> pip install -e .
```

Note that editable installations require `git`.
This can be provided by a system-wide installation or via conda in the virtual environment (`conda install git`).

While rydiqule is a pure python package (ie it is platform independent), its core dependency ARC is not.
If a pre-built package of ARC is not available for your platform in our anaconda channel,
you will need to install ARC via `pip` to build it locally before installing `rydiqule`.
To see what architectures are supported, please see the [vendoring repository](https://github.com/QTC-UMD/rydiqule-vendored-conda-builds).


### Pure pip installation

To install normally, run:
```shell
pip install rydiqule
```
This command will use pip to install all necessary dependencies.

To install in an editable way (which allows edits of the source code),
run the following from the root directory of the cloned repository:
```shell
pip install -e .
```

Editable installation requires `git` to be installed.

### Confirm installation

Proper installation can be confirmed by executing the following commands in a python terminal.
```shell
>>> import rydiqule as rq
>>> rq.about()

Rydiqule
================

Rydiqule Version: 1.1.0
Installation Path: ~\Miniconda3\envs\rydiqule\lib\site-packages\rydiqule

Dependencies
================

NumPy Version: 1.24.3
SciPy Version: 1.10.1
Matplotlib Version: 3.7.1
ARC Version: 3.3.0
Python Version: 3.9.16
Python Install Path: ~\Miniconda3\envs\rydiqule
Platform Info: Windows (AMD64)
CPU Count: 12
Total System Memory: 128 GB
```

### Updating an existing installation

Upgrading an existing installation is simple.
Simply run the appropriate upgrade command for the installation method used.

For conda installations, run the following command to upgrade rydiqule
```shell
conda upgrade rydiqule
```

For `pip`, you can use the installation command to upgrade.
Optionally, include the update flag to greedily update dependencies as well.
```shell
pip install -U rydiqule
```
This command will also install any new dependencies that are required.

If using an editable install, simply replacing the files in the same directory is sufficient.
Though it is recommended to also run the appropriate pip update command as well to capture updated dependencies.
```shell
pip install -U -e .
```

### Dependencies

This package requires installation of the excellent [ARC](https://github.com/nikolasibalic/ARC-Alkali-Rydberg-Calculator) package, which is used to get Rydberg atomic properties.
It also requires other standard computation dependenices, such as `numpy`, `scipy`, `matplotlib`, etc.
These dependencies will be automatically installed if not already present.

Rydiqule's performance does depend on these depedencies.
In particular, `numpy` can be compiled with a variety of backends that implements
BLAS and LAPACK routines that can have different performance for different computer architectures.
When using Windows, it is recommended to install `numpy` from conda,
which is built against the IntelMKL and has generally shown the best performance for Intel-based PCs.

Optional timesolver backend dependencies include the [numbakit-ode](https://github.com/hgrecco/numbakit-ode)
and [CyRK](https://github.com/jrenaud90/CyRK) packages.
Both are available via `pip` or our anaconda channel.
They can be installed automatically via the optional extras specification for the `pip` command.
```shell
pip install rydiqule[backends]
```

For conda installations, these dependencies must be installed manually.
```shell
conda install -c rydiqule CyRK numbakit-ode
```
Installation can be done via pip or conda.
See the [documentation](https://rydiqule.readthedocs.io/en/latest/installation.html) for details.

## Documentation

Expand All @@ -163,8 +30,8 @@ PDF or EPUB formats of the documentation can be downloaded from the online docum

### Examples

Example jupyter notebooks that demonstrate RydIQule can be found in the `examples` subdirectory.
Printouts of these notebooks are available in the documentation as well.
Example jupyter notebooks that demonstrate RydIQule can be found in the documentation,
with back-links to download them directly from the github repository.

## Support

Expand All @@ -180,4 +47,4 @@ The github repository is for code distribution only.
While we monitor it,
we will not directly respond to issues or pull requests posted to it.
If you would like a response from the developers, please e-mail
[email protected] or [email protected]
[email protected] or [email protected]
8 changes: 7 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@ SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
AUTOSUMMARYDIR = source/api/_autosummary

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile
clean:
@echo "Removing autosummary directory"
@rm -rf $(AUTOSUMMARYDIR)
@$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help clean Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
Expand Down
8 changes: 8 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ if "%SPHINXBUILD%" == "" (
)
set SOURCEDIR=source
set BUILDDIR=build
set AUTOSUMMARYDIR=source\api\_autosummary

if "%1" == "" goto help
if "%1" == "clean" goto clean

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
Expand All @@ -30,6 +32,12 @@ goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:clean
echo Removing autosummary directory
rmdir /s/q %AUTOSUMMARYDIR%
%SPHINXBUILD% -M clean %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
215 changes: 215 additions & 0 deletions docs/source/_static/Rydiqule_Icon_64.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
215 changes: 215 additions & 0 deletions docs/source/_static/Rydiqule_Icon_64_Transparent.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/source/_templates/autosummary-module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@
:template: autosummary-module.rst
:recursive:
{% for item in modules %}
{% if not item.endswith('conftest') %}
{{ item }}
{%- endif %}
{%- endfor %}
{% endif %}
{% endblock %}
Loading

0 comments on commit 29cdf95

Please sign in to comment.