Research-grade simulated quantum annealing toolkit
Project description
qanneal
Research-grade simulated quantum annealing toolkit (CPU-first, CUDA-ready).
Quick install (recommended)
macOS / Linux
./setup.sh
Windows (PowerShell)
.\setup.ps1
Windows (Command Prompt)
setup.bat
If you prefer pure pip:
python -m pip install . --no-build-isolation
Install from PyPI (after first release)
python -m pip install qanneal
Windows prerequisites
- Install Visual Studio Build Tools with the Desktop development with C++ workload.
- Install CMake (e.g.,
winget install Kitware.CMake).
Windows + VS Code quickstart
- Install VS Code and the Python extension.
- Open the project folder in VS Code.
- Open a terminal in VS Code (
Ctrl+`). - Create/activate a venv:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
- Run the setup:
.\setup.ps1
- Run an example:
python examples\python\sqa_basic.py
Build (C++ core)
cmake -S . -B build
cmake --build build
ctest --test-dir build
Install as a pip package (manual)
From a clone:
python -m pip install -U pip
python -m pip install . --no-build-isolation
Build a wheel locally:
python -m pip install -U build
python -m build .
The wheel/sdist will be in dist/.
If you want to install directly from Git:
python -m pip install "git+https://your-repo-url.git"
CMake presets (CPU-only)
Requires CMake 3.19+ for presets.
cmake --preset cpu-only
cmake --build --preset cpu-only
ctest --preset cpu-only
CPU + MPI preset (OpenMPI recommended)
cmake --preset cpu-mpi
cmake --build --preset cpu-mpi
If CMake cannot find OpenMPI, set QANNEAL_MPI_HOME or MPI_HOME:
cmake -S . -B build -DQANNEAL_ENABLE_MPI=ON -DQANNEAL_MPI_HOME=/path/to/openmpi
Python examples
python examples/python/sa_multi.py
python examples/python/sqa_basic.py
python examples/python/metrics_plot.py
python examples/python/parallel_tempering.py
Release (PyPI wheels)
- Update the version in
pyproject.toml. - Commit and tag:
git tag v0.1.0
git push origin v0.1.0
- GitHub Actions will build wheels for Linux/macOS/Windows and publish to PyPI.
Notes
- Publishing uses GitHub Actions OIDC. Ensure PyPI is configured to trust this repo.
- You can also run the publish workflow manually from GitHub Actions.
Optional MPI build
cmake -S . -B build -DQANNEAL_ENABLE_MPI=ON
cmake --build build
Run MPI example:
mpirun -n 4 build/qanneal_mpi_example
SLURM examples (OpenMPI)
Use either launcher style depending on your cluster policy:
qanneal/scripts/slurm/run_sa_mpi_srun.sh(srun)qanneal/scripts/slurm/run_sa_mpi_mpirun.sh(mpirun)
The original qanneal/scripts/slurm/run_sa_mpi.sh remains as a simple srun starter.
Roadmap
- Core Ising/QUBO models
- Classical and SQA annealers
- Observer and metrics API
- CUDA backend (optional)
- Python bindings (pybind11)
- MPI / SLURM examples
License
Apache-2.0 (see LICENSE). Portions derived from the sqaod project with attribution in NOTICE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qanneal-0.1.0.tar.gz.
File metadata
- Download URL: qanneal-0.1.0.tar.gz
- Upload date:
- Size: 2.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
901e2e77e949a5d2d2d3ee604827a779c64d83e6a30745457e68a4b991a8efab
|
|
| MD5 |
5116f9f6c4ee40366b1b369acabf2d84
|
|
| BLAKE2b-256 |
6118f44122ae2dc7bde038429b1cfcad65b169b23f7bacb97a3bd1f4a0fc8242
|
File details
Details for the file qanneal-0.1.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: qanneal-0.1.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 574.1 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ca3bd2473ae405ad238bae0ed9fe92de7db0847d0d404e44d6ca218c3fa3316
|
|
| MD5 |
34ae7918303359228606fa25ac80bbc9
|
|
| BLAKE2b-256 |
cc178dce99feafb480d1be6eaec3299c53a4316f91879d4c3c229e440ad79302
|