64 releases (24 stable)

1.11.0 Apr 5, 2024
1.11.0-alpha.2 Mar 28, 2024
1.10.0 Feb 12, 2024
1.8.0 Dec 8, 2023
0.5.1 Jul 29, 2021

#25 in Science

Download history 101/week @ 2023-12-31 713/week @ 2024-01-07 366/week @ 2024-01-14 809/week @ 2024-01-21 544/week @ 2024-01-28 513/week @ 2024-02-04 304/week @ 2024-02-11 112/week @ 2024-02-18 1722/week @ 2024-02-25 802/week @ 2024-03-03 220/week @ 2024-03-10 932/week @ 2024-03-17 516/week @ 2024-03-24 665/week @ 2024-03-31 678/week @ 2024-04-07 412/week @ 2024-04-14

2,282 downloads per month
Used in 7 crates

Apache-2.0

12MB
18K SLoC

Contains (ELF lib, 10MB) qoqo/qoqo.cpython-39-x86_64-linux-gnu.so

qoqo

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 Crates.io Crates.io

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.

Installation

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.

Dependencies

~12–21MB
~296K SLoC