Skip to main content

Quantum computing circuit toolkit. Python interface of roqoqo

Project description


Quantum Operation Quantum Operation
Yes we use reduplication

qoqo/roqoqo is a toolkit to represent quantum circuits by HQS Quantum Simulations.

For a detailed introduction see the user documentation and the qoqo examples repository

What roqoqo/qoqo is:

  • A toolkit to represent quantum programs including circuits and measurement information
  • A thin runtime to run quantum measurements
  • A way to serialize quantum circuits and measurement information
  • A set of optional interfaces to devices, simulators and toolkits (e.g. qoqo_quest, qoqo_mock, qoqo_qasm)

What roqoqo/qoqo is not:

  • A decomposer translating circuits to a specific set of gates
  • A quantum circuit optimizer
  • A collection of quantum algorithms

Documentation Status GitHub Workflow Status PyPI PyPI - Format

qoqo provides the Python interface to the underlying roqoqo library, including:

  • A Circuit class to represent quantum circuits
  • A QuantumProgram class to represent quantum programs
  • Classes representing single-qubit, two-qubit, multi-qubit and measurement operations that can be executed (decomposed) on any universal quantum computer
  • Classes representing so-called PRAGMA operations that only apply to certain hardware, simulators or annotate circuits with additional information
  • Support for symbolic variables
  • Readout based on classical registers
  • Measurement classes for evaluating observable measurements based on raw readout date returned by quantum computer backends
  • Serialization to json and deserialization from json for circuits and measurement information. Serialization support can easily be expanded to other targets with the help of the serde crate.

This project is partly supported by PlanQK.


On Linux, macOS and Windows on x86 precompiled packages can be found on PyPi and installed via

pip install qoqo

If no pre-built python wheel is available for your architecture you can install qoqo from the source distribution using a rust toolchain (for example available via rustup) and maturin (also available via pip). After installing the rust toolchain and maturing run the same pip install command as above. In some cases on macOS it can be necessary to provide specific linker arguments as shown below:

# can be necessary on macOS
pip install qoqo

When using qoqo in a rust project providing a python interface add

qoqo = {version="1.0.0", default-features=false}

to the [dependencies] section of the project Cargo.toml.

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

qoqo-1.7.0.tar.gz (257.9 kB view hashes)

Uploaded source

Built Distributions

qoqo-1.7.0-cp311-none-win_amd64.whl (4.1 MB view hashes)

Uploaded cp311

qoqo-1.7.0-cp311-cp311-macosx_11_0_arm64.whl (3.3 MB view hashes)

Uploaded cp311

qoqo-1.7.0-cp310-none-win_amd64.whl (4.1 MB view hashes)

Uploaded cp310

qoqo-1.7.0-cp310-cp310-macosx_11_0_arm64.whl (3.3 MB view hashes)

Uploaded cp310

qoqo-1.7.0-cp39-none-win_amd64.whl (4.1 MB view hashes)

Uploaded cp39

qoqo-1.7.0-cp39-cp39-macosx_11_0_arm64.whl (3.3 MB view hashes)

Uploaded cp39

qoqo-1.7.0-cp38-none-win_amd64.whl (4.0 MB view hashes)

Uploaded cp38

qoqo-1.7.0-cp38-cp38-macosx_11_0_arm64.whl (3.3 MB view hashes)

Uploaded cp38

qoqo-1.7.0-cp37-none-win_amd64.whl (4.0 MB view hashes)

Uploaded cp37

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page