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 -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
Metadata
Release files for feedback-grape 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| feedback_grape-1.1.1.tar.gz | 46.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| feedback_grape-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 84.7 kB
Release files / feedback_grape-1.1.1.tar.gz
| Download URL | feedback_grape-1.1.1.tar.gz |
|---|---|
| Size | 46.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f6a931e780db1af96e0e5b0e52068a1b4fd51695331d553da1952d0ff8f5743a
|
|
BLAKE2b-256 checksum How to use checksums |
7f4f2b8fa0aaff7ff68fb4baecc5fda87bc897705ef75cc0bc3f80bb6fda1d2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.
Transparency logRelease files / feedback_grape-1.1.1-py3-none-any.whl
| Download URL | feedback_grape-1.1.1-py3-none-any.whl |
|---|---|
| Size | 37.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
097c92fc710da9d895b8a14233123aa3dca11f25d119f8905fe1941fb5fdcd02
|
|
BLAKE2b-256 checksum How to use checksums |
7f0c6a8f58691aada560334cb07a90ba96bf54efbf642ca78dcb7520eeacddbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.
Transparency log