Home

Awesome

<p align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="./docs/extras/assets/logo/qadence_logo_white.svg" width="75%"> <source media="(prefers-color-scheme: light)" srcset="./docs/extras/assets/logo/qadence_logo.svg" width="75%"> <img alt="Qadence logo" src="./docs/assets/logo/qadence_logo.svg" width="75%"> </picture> </p>

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.

Linting Tests Documentation Pypi License

Feature highlights

<p align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="./docs/extras/assets/qadence_arch.svg" width="75%"> <source media="(prefers-color-scheme: light)" srcset="./docs/extras/assets/qadence_arch.svg" width="75%"> <img alt="Qadence architecture" src="./docs/assets/qadence_arch.svg" width="75%"> </picture> <p align="center">

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:

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.

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.