Pasqal interface for circuit-based quantum computing SDKs
Project description
Qadence is a Python package that provides a simple interface to build digital-analog quantum programs 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.
Feature highlights
-
A block-based system for composing complex digital-analog programs in a flexible and scalable manner, inspired by the Julia quantum SDK Yao.jl and functional programming concepts.
-
An intuitive expression-based system developed on top of the symbolic library Sympy to construct parametric quantum programs easily.
-
Out-of-the-box automatic differentiability of quantum programs with PyTorch integration.
-
High-order generalized parameter shift rules for differentiating parametrized quantum operations.
-
A simple interface to work with interacting neutral-atom qubit systems using arbitrary registers topologies.
Installation guide
Qadence is available on PyPI and can be installed using pip
as follows:
pip install qadence
The default, pre-installed backend for Qadence is PyQTorch, a differentiable state vector simulator for digital-analog simulation based on PyTorch
. 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 of protocols for error mitigation in Qadence.libs
: A collection of functionalities for graph machine learning problems build on top of Qadence.pulser
: The Pulser backend for composing, simulating and executing pulse sequences for neutral-atom quantum devices (experimental).
Qadence also supports a JAX
engine which is currently supporting the Horqrux backend. horqrux
is currently only available via the low-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]"
IMPORTANT
Before installing qadence
with the visualization
extra, make sure to install the graphviz
package
on your system:
# For Debian-based distributions (e.g. Debian, Ubuntu)
sudo apt install graphviz
# on MacOS
brew install graphviz
# via conda
conda install python-graphviz
On Windows Linux Subsystem (WSL2) it has been reported that in some cases "wslutilities" must be installed. Please follow instructions here for your flavour. For example on Ubuntu 22.04 LTS and later you must run:
sudo add-apt-repository ppa:wslutilities/wslu
sudo apt update
sudo apt install wslu
Contributing
Before making a contribution, please review our code of conduct.
- Submitting Issues: To submit bug reports or feature requests, please use our issue tracker.
- Developing in qadence: To learn more about how to develop within
qadence
, please refer to contributing guidelines.
Setting up qadence in development mode
We recommend to use the hatch
environment manager to install qadence
from source:
python -m pip install hatch
# get into a shell with all the dependencies
python -m hatch shell
# run a command within the virtual environment with all the dependencies
python -m hatch run python my_script.py
WARNING
hatch
will not combine nicely with other environment managers such as Conda. If you still want to use Conda,
install it from source using pip
:
# within the Conda environment
python -m pip install -e .
Users also report problems running Hatch on Windows, we suggest using WSL2.
Citation
If you use Qadence for a publication, we kindly ask you to cite our work using the following BibTex entry:
@article{qadence2024pasqal,
title = {Qadence: a differentiable interface for digital-analog programs.},
author={Dominik Seitz and Niklas Heim and João P. Moutinho and Roland Guichard and Vytautas Abramavicius and Aleksander Wennersteen and Gert-Jan Both and Anton Quelle and Caroline de Groot and Gergana V. Velikova and Vincent E. Elfving and Mario Dagrada},
journal={arXiv:2401.09915},
url = {https://github.com/pasqal-io/qadence},
year = {2024}
}
License
Qadence is a free and open source software package, released under the Apache License, Version 2.0.
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
File details
Details for the file qadence-1.8.0.tar.gz
.
File metadata
- Download URL: qadence-1.8.0.tar.gz
- Upload date:
- Size: 189.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b20bb944d8cf290b3af324f03f24af72f372937069162e73f79e13bb1293ac0b |
|
MD5 | e66c5115d14c67302db710e992847ca6 |
|
BLAKE2b-256 | 685966b57f04ee0ee780efefe193fd2569572319d1698fd44d9fbd98353aa4ff |
File details
Details for the file qadence-1.8.0-py3-none-any.whl
.
File metadata
- Download URL: qadence-1.8.0-py3-none-any.whl
- Upload date:
- Size: 247.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e7dcba6567e7793b370d281c19e662c3ca8d0b00e05e08ec896d63e74086a91 |
|
MD5 | 9702d77be7d4be9428f8db0b68541ff0 |
|
BLAKE2b-256 | 42fa4064e906195628a73e1f6ed131f022dc691e16fcb2ce93bbee505659af6a |