A package for GRAPE with feedback
Project description
feedback-grape
feedback-grape is a high-performance Python package for simulating and optimizing quantum systems with feedback. It builds on the GRAPE (Gradient Ascent Pulse Engineering) method and introduces a new approach that integrates feedback in a natural, differentiable, and efficient way.
🚀 Features
- ✅ Vectorized, GPU-enabled, and differentiable simulations using JAX
- ✅ Efficient quantum optimal control via GRAPE
- ✅ Feedback support with the newly developed feedbackGRAPE technique
- ✅ Think of it as a parallelized, feedback-enabled, high-performance alternative to QuTiP
📦 Installation
For Users
Install the latest version via pip:
pip install feedback-grape
To enable GPU acceleration (CUDA 12):
pip install feedback-grape[cuda12]
For Developers
Install development dependencies:
pip install -U -r requirements.txt
To include tools for testing, linting, and formatting:
pip install -U -r requirements_dev.txt
To run notebooks with proper rendering:
conda install conda-forge::pandoc
To use GPU support with JAX:
pip install -U "jax[cuda12]==0.5.2"
Or alternatively:
pip install -U -r requirements_gpu.txt
📚 Documentation
- User Guide: https://feedbackgrape.readthedocs.io
- Developer Docs:
cd docs
make html
Open docs/build/html/index.html using a Live Server or your browser
✅ Testing & Code Quality
Run Tests
pytest
Generates test results and a coverage report.
tox
This tests the code across multiple python environments and ensures consistency.
Type Checking
mypy feedback_grape
Linting & Formatting
- Lint code:
ruff check
- Auto-format:
ruff format
📖 References
The feedbackGRAPE method was introduced in:
- Porotti, Peano, Marquardt, PRX Quantum 4, 030305 (2023)
https://journals.aps.org/prxquantum/abstract/10.1103/PRXQuantum.4.030305
It extends traditional GRAPE by incorporating feedback control, which is crucial for applications like quantum state stabilization and quantum error correction. It is designed to work seamlessly with neural networks and automatic differentiation frameworks.
A full application to quantum error correction with the GKP code is shown in:
- Puviani et al., Phys. Rev. Lett. 134, 020601 (2025)
https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.134.020601
🧠 Related Repositories
- https://github.com/rporotti/feedback_grape — Repository for feedbackGRAPE paper
- https://github.com/Matteo-Puviani/GQF — Repository for GKP quantum error correction implementation
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 feedback_grape-0.0.3.tar.gz.
File metadata
- Download URL: feedback_grape-0.0.3.tar.gz
- Upload date:
- Size: 39.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ce5e37d68e9158eaed77c415ba3851f72a1989bdf755dce48b08bee015ae66b
|
|
| MD5 |
a3ff1726b5db6d928687aa4a24719f27
|
|
| BLAKE2b-256 |
227f0fd23b9423e1ac97cabd4c2496345f5756ad67389b734a8b6aa2fd6879bc
|
Provenance
The following attestation bundles were made for feedback_grape-0.0.3.tar.gz:
Publisher:
publish_to_pypi.yml on YousefElbrolosy/feedbackGRAPE
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
feedback_grape-0.0.3.tar.gz -
Subject digest:
6ce5e37d68e9158eaed77c415ba3851f72a1989bdf755dce48b08bee015ae66b - Sigstore transparency entry: 297717085
- Sigstore integration time:
-
Permalink:
YousefElbrolosy/feedbackGRAPE@600c2e40d4bf22eaed9836c92fc7d5ec878d9b24 -
Branch / Tag:
refs/tags/0.0.3 - Owner: https://github.com/YousefElbrolosy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_to_pypi.yml@600c2e40d4bf22eaed9836c92fc7d5ec878d9b24 -
Trigger Event:
push
-
Statement type:
File details
Details for the file feedback_grape-0.0.3-py3-none-any.whl.
File metadata
- Download URL: feedback_grape-0.0.3-py3-none-any.whl
- Upload date:
- Size: 31.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07d93cb6a87b21d6bad12db2f2d2667f8cfabc6064cc8d5938235b1f07ff867c
|
|
| MD5 |
95209cf373f0c6686b0dafc9d26d91ee
|
|
| BLAKE2b-256 |
f5412cc5dae9929e5d8a65912021abea81226e2c71f528356c43e3316e12135c
|
Provenance
The following attestation bundles were made for feedback_grape-0.0.3-py3-none-any.whl:
Publisher:
publish_to_pypi.yml on YousefElbrolosy/feedbackGRAPE
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
feedback_grape-0.0.3-py3-none-any.whl -
Subject digest:
07d93cb6a87b21d6bad12db2f2d2667f8cfabc6064cc8d5938235b1f07ff867c - Sigstore transparency entry: 297717126
- Sigstore integration time:
-
Permalink:
YousefElbrolosy/feedbackGRAPE@600c2e40d4bf22eaed9836c92fc7d5ec878d9b24 -
Branch / Tag:
refs/tags/0.0.3 - Owner: https://github.com/YousefElbrolosy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_to_pypi.yml@600c2e40d4bf22eaed9836c92fc7d5ec878d9b24 -
Trigger Event:
push
-
Statement type: