Skip to main content

Quantum computing circuit toolkit. Python interface of roqoqo

Project description

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_qest, 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 a full python interface to the underlying roqoqo library, including:

  • A circuit class to represent quantum programs
  • Single-Qubit, Two-Qubit and Multi-Qubit Operations that can be executed (decomposed) on any universal quantum computer
  • PRAGMA Operations that only apply to certain hardware, simulators or annotate circuits with additional information
  • Classical Register and Measurement operations to use with a quantum program
  • Measurement structs for evaluating observable measurements based on projective measurements from quantum hardware or simulator readouts
  • A QuantumProgram class combining circuits and measurement information in complete quantum programms with a simple interface
  • 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.

Installation

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

pip install qoqo

For other platforms we recommend using the source distribution from PyPi to build a python package for qoqo locally via pip. The install requires the maturin tool (also available via pip) and a working rust toolchain.

pip install qoqo

Alternatively one can check out the latest tagged version from github and use the maturin tool to build a python package for qoqo locally and install it via pip. Please note that the package should be built from the top level directory of the workspace selecting the qoqo package with the -m qoqo/Cargo.toml option. Specifically for macOS on Apple Silicon the following build command should be used.

maturin build -m qoqo/Cargo.toml  --release
pip install target/wheels/$NAME_OF_WHEEL

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


Release history Release notifications | RSS feed

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.0.0_beta.1.tar.gz (160.1 kB view hashes)

Uploaded Source

Built Distributions

qoqo-1.0.0_beta.1-cp310-none-win_amd64.whl (1.5 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

qoqo-1.0.0_beta.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64

qoqo-1.0.0_beta.1-cp310-cp310-macosx_10_7_x86_64.whl (1.7 MB view hashes)

Uploaded CPython 3.10 macOS 10.7+ x86-64

qoqo-1.0.0_beta.1-cp39-none-win_amd64.whl (1.5 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

qoqo-1.0.0_beta.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

qoqo-1.0.0_beta.1-cp39-cp39-macosx_10_7_x86_64.whl (1.7 MB view hashes)

Uploaded CPython 3.9 macOS 10.7+ x86-64

qoqo-1.0.0_beta.1-cp38-none-win_amd64.whl (1.5 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

qoqo-1.0.0_beta.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

qoqo-1.0.0_beta.1-cp38-cp38-macosx_10_7_x86_64.whl (1.7 MB view hashes)

Uploaded CPython 3.8 macOS 10.7+ x86-64

qoqo-1.0.0_beta.1-cp37-none-win_amd64.whl (1.5 MB view hashes)

Uploaded CPython 3.7 Windows x86-64

qoqo-1.0.0_beta.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

qoqo-1.0.0_beta.1-cp37-cp37m-macosx_10_7_x86_64.whl (1.7 MB view hashes)

Uploaded CPython 3.7m macOS 10.7+ x86-64

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