Skip to content

Installation

Requirements

Qadence is fully tested on Linux/MacOS operating systems. For Windows users, we recommend using WSL2 to install a Linux distribution of choice.

Installation

Qadence can be installed from PyPI with pip as follows:

pip install qadence

By default, this will also install PyQTorch, a differentiable state vector simulator which serves as the main numerical backend for Qadence.

It is possible to install additional backends and the circuit visualization library using the following extras:

  • visualization: to display quantum circuits.
  • pulser: the Pulser backend for composing, simulating and executing pulse sequences for neutral-atom quantum devices (in development).

To install other backends or the visualization tool, please use:

pip install "qadence[pulser, visualization]"

Note

In order to correctly install the visualization extra, the graphviz package needs to be installed in your system:

# on Ubuntu
sudo apt install graphviz

# on MacOS
brew install graphviz

# via conda
conda install python-graphviz

Install from source

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 Conda. If you want to use Conda, install it from source using pip:

# within the Conda environment
python -m pip install -e .

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}
}