Skip to main content

Pasqal interface for circuit-based quantum computing SDKs

Project description

Qadence logo

For a high-level overview of Qadence features, check out our white paper.

Qadence is a Python package that provides a simple interface to build digital-analog quantum programs with tunable qubit interaction defined on arbitrary register topologies realizable on neutral atom devices.

Linting Tests Documentation Pypi License

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.

  • A simple interface to work with interacting neutral-atom qubit systems using arbitrary registers topologies.

  • An intuitive expression-based system developed on top of the symbolic library Sympy to construct parametric quantum programs easily.

  • High-order generalized parameter shift rules for differentiating parametrized quantum operations.

  • Out-of-the-box automatic differentiability of quantum programs with PyTorch integration.

  • Efficient execution on a variety of different purpose backends: from state vector simulators to tensor network emulators and real devices.

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:

  • pulser: The Pulser backend for composing, simulating and executing pulse sequences for neutral-atom quantum devices.
  • braket: The Braket backend, an open source library that provides a framework for interacting with quantum computing hardware devices through Amazon Braket.
  • visualization: A visualization library to display quantum circuit diagrams.

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[braket,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

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 .

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


Download files

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

Source Distribution

qadence-1.2.7.tar.gz (169.4 kB view details)

Uploaded Source

Built Distribution

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

qadence-1.2.7-py3-none-any.whl (226.0 kB view details)

Uploaded Python 3

File details

Details for the file qadence-1.2.7.tar.gz.

File metadata

  • Download URL: qadence-1.2.7.tar.gz
  • Upload date:
  • Size: 169.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.26.0

File hashes

Hashes for qadence-1.2.7.tar.gz
Algorithm Hash digest
SHA256 ecce0a6f600842ccbece486fb14fe427a701db2f7ce9975e18bba6d649268d77
MD5 3a305784d9326195402fcc17925c97a7
BLAKE2b-256 46fe910a6ee122b9bc6aa38c62298883113f4f65d02acbfc16ae6455d7569d32

See more details on using hashes here.

File details

Details for the file qadence-1.2.7-py3-none-any.whl.

File metadata

  • Download URL: qadence-1.2.7-py3-none-any.whl
  • Upload date:
  • Size: 226.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.26.0

File hashes

Hashes for qadence-1.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9ac21d5f849fb09fe5f67620a7d828e42bbb8a62ecd71235c0e6c8284b43fa56
MD5 3b4cf052566eeabcc0fa627f03240513
BLAKE2b-256 7a896383a9b3dacfd2a32c5b7e6e10fd2dd00acba4a81f91194b163c00e15274

See more details on using hashes here.

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