Skip to main content

A package for GRAPE with feedback

Project description

feedbackGRAPE

This is the main repository for the feedbackGRAPE package (under development), eventually offering:

  • vectorized, GPU-enabled, differentiable simulations of driven dissipative quantum systems via jax
  • efficient quantum optimal control (gradient-ascent pulse engineering, GRAPE)
  • including feedback (using the newly developed feedbackGRAPE approach)

Think of parallelized, highly efficient qutip with feedback control.

Installation

To install dependencies necessary for the package
pip install -U -r requirements.txt
To install dependencies necessary for testing, linting, formating, ...
pip install -U -r requirements_dev.txt
To be able to render the jupyter notebooks, make sure to install pandoc, in conda the command is:
conda install conda-forge::pandoc
To be able to run your code on GPUs please make sure to install jax[cuda12] using the following command:
pip install -U "jax[cuda12]==0.5.2" or
pip install -U -r requirements_gpu.txt

Documentation

For Development: Enter the command cd docs then make html and then open index.html in docs/build/html with Live Server to take a look at the Documentaion.

Testing

Simply type pytest. This would also generate a coverage report.

checking for dynamically typed errors

Simply type mypy feedback_grape. This would give you type checking errors if any.

linting and formating

For Linting ruff check
For Formating ruff format

Before Commiting and Pushing

Simply type tox. This would test the code on different environments.

References

FeedbackGRAPE was introduced in Porotti, Peano, Marquardt, PRX Quantum 4, 030305 (2023). It enables the addition of feedback to GRAPE-style numerical quantum optimal control, important for modern tasks like quantum state stabilization or quantum error correction. In addition, it is formulated in such a way that the use of neural networks and modern autodifferentiation frameworks is easy. See a first full-fledged application to the Gottesman-Kitaev-Preskill bosonic code quantum error correction in Puviani et al, Phys. Rev. Lett. 134, 020601 (2025). Both of these papers come with github repositories, but with code specialized to the examples and use cases: rporotti/feedback_grape and Matteo-Puviani/GQF. The purpose of the framework offered in this repository here is to make it very easy for everyone to do the same for their own problems, with minimum overhead.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

feedback_grape-0.0.1rc2.tar.gz (39.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

feedback_grape-0.0.1rc2-py3-none-any.whl (31.6 kB view details)

Uploaded Python 3

File details

Details for the file feedback_grape-0.0.1rc2.tar.gz.

File metadata

  • Download URL: feedback_grape-0.0.1rc2.tar.gz
  • Upload date:
  • Size: 39.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for feedback_grape-0.0.1rc2.tar.gz
Algorithm Hash digest
SHA256 0baf77a03c6b5dfa0252f0413a7e8d7f66d7a2acd2bcc72a40728a87c9593563
MD5 79d91b665d66b98e939b903b047b9d0d
BLAKE2b-256 fb0a2e12f61ed3462d2eaacaa7c9f4118971974755132aa33b4e1fc583aa35e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for feedback_grape-0.0.1rc2.tar.gz:

Publisher: publish_to_pypi.yml on YousefElbrolosy/feedbackGRAPE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file feedback_grape-0.0.1rc2-py3-none-any.whl.

File metadata

File hashes

Hashes for feedback_grape-0.0.1rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 399ecaf325c2209b08cf98cfdade465a61c07360313d0a9da3c081d51f5b912c
MD5 de8db1217b5cfac3e978deffa3535e8a
BLAKE2b-256 5d20e3783344088714f43ccf137ac7e74a7c7a175ccecf9e6210ac60f4da82dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for feedback_grape-0.0.1rc2-py3-none-any.whl:

Publisher: publish_to_pypi.yml on YousefElbrolosy/feedbackGRAPE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page