- Notifications
You must be signed in to change notification settings - Fork22
Digital-analog quantum programming interface
License
pasqal-io/qadence
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Qadence is a Python package that provides a simple interface to builddigital-analog quantumprograms with tunable qubit interactions and arbitrary register topologies realizable on neutral atom devices.
For a high-level overview of Qadence features,check out our white paper.
**For more detailed information,check out the documentation.
**For any questions or comments,feel free to start a discussion.**
Ablock-based system for composingcomplex digital-analogprograms in a flexible and scalable manner, inspired by the Julia quantum SDKYao.jl and functional programming concepts.
An intuitiveexpression-based system developed on top of the symbolic librarySympy to constructparametric quantum programs easily.
Out-of-the-boxautomatic differentiability of quantum programs withPyTorch integration.
High-order generalized parameter shift rules fordifferentiating parametrized quantum operations.
Asimple interface to work withinteracting neutral-atom qubit systemsusingarbitrary registers topologies.
Qadence is available onPyPI and can be installed usingpip
as follows:
pip install qadence
The default, pre-installed backend for Qadence isPyQTorch, a differentiable state vector simulator for digital-analog simulation based onPyTorch
. It is possible to install additional,PyTorch
-based backends and the circuit visualization library using the following extras:
visualization
: A visualization library to display quantum circuit diagrams.protocols
: A collection ofprotocols for error mitigation in Qadence.libs
: A collection offunctionalities for graph machine learning problems build on top of Qadence.pulser
: ThePulser backend for composing, simulating and executing pulse sequences for neutral-atom quantum devices (experimental).
Qadence also supports aJAX
engine which is currently supporting theHorqrux backend.horqrux
is currently only available via thelow-level API.
To install individual extras, use the following syntax (IMPORTANT Make sure to use quotes):
pip install"qadence[pulser,visualization]"
To install all available extras, simply do:
pip install"qadence[all]"
IMPORTANTBefore installingqadence
with thevisualization
extra, make sure to install thegraphviz
packageon your system:
# For Debian-based distributions (e.g. Debian, Ubuntu)sudo apt install graphviz# on MacOSbrew install graphviz# via condaconda install python-graphviz
On Windows Linux Subsystem (WSL2) it has been reported that in some cases "wslutilities" must be installed.Please follow instructionshere for your flavour.For example on Ubuntu 22.04 LTS and later you must run:
sudo add-apt-repository ppa:wslutilities/wslusudo apt updatesudo apt install wslu
Before making a contribution, please review ourcode of conduct.
- Submitting Issues: To submit bug reports or feature requests, please use ourissue tracker.
- Developing in qadence: To learn more about how to develop within
qadence
, please refer tocontributing guidelines.
We recommend to use thehatch
environment manager to installqadence
from source:
python -m pip install hatch# get into a shell with all the dependenciespython -m hatch shell# run a command within the virtual environment with all the dependenciespython -m hatch run python my_script.py
WARNINGhatch
will not combine nicely with other environment managers such as Conda. If you still want to use Conda,install it from source usingpip
:
# within the Conda environmentpython -m pip install -e.
Users also report problems running Hatch on Windows, we suggest using WSL2.
If you use Qadence for a publication, we kindly ask you to cite our work using the following BibTex entry:
@article{qadence2025,author = {Seitz, Dominik and Heim, Niklas and Moutinho, João and Guichard, Roland and Abramavicius, Vytautas and Wennersteen, Aleksander and Both, Gert-Jan and Quelle, Anton and Groot, Caroline and Velikova, Gergana and Elfving, Vincent and Dagrada, Mario},year = {2025},month = {01},pages = {1-14},title = {Qadence: a differentiable interface for digital and analog programs},volume = {PP},journal = {IEEE Software},doi = {10.1109/MS.2025.3536607}}
Qadence is a free and open source software package, released under the Apache License, Version 2.0.
About
Digital-analog quantum programming interface