Skip to main content

Quantum computing circuit toolkit. Python interface of roqoqo

Project description

qoqo logo

qoqo

Quantum Operation Quantum Operation
Yes we use reduplication

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

This repository contains two components:

  • roqoqo: the core rust library
  • qoqo: the python interface to roqoqo

What roqoqo/qoqo is:

  • A toolkit to represent quantum operations and circuits
  • 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_pyqest, 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

roqoqo

Crates.io GitHub Workflow Status docs.rs Crates.io codecov

roqoqo provides:

  • A circuit struct 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 Registers 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 Backend trait defining a standard for interfacing from qoqo to other toolkits, hardware and simulators that can return measured values
  • Serialize and deserialize support for circuits and measurement information via the serde crate.

This software is still in the beta stage. Functions and documentation are not yet complete and breaking changes can occur.

Installation

To use roqoqo in a Rust project simply add

roqoqo = {version="0.8"}

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

qoqo

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 DoUnitary 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 checking out the latest tagged version from github and using 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.

RUSTFLAGS="-C link-arg=-undefined -C link-arg=dynamic_lookup" 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="0.8", default-features=false}

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

Examples

For an expanded collection of Examples see the jupyter notebooks in qoqo/examples. The examples require the qoqo_pyquest and qoqo_mock interfaces.

Contributing

We welcome contributions to the project. If you want to contribute code, please have a look at CONTRIBUTE.md for our code contribution guidelines.

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

qoqo-0.8.2-cp39-none-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.9Windows x86-64

qoqo-0.8.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.12+ x86-64

qoqo-0.8.2-cp39-cp39-macosx_10_7_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.9macOS 10.7+ x86-64

qoqo-0.8.2-cp38-none-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.8Windows x86-64

qoqo-0.8.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.12+ x86-64

qoqo-0.8.2-cp38-cp38-macosx_10_7_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.8macOS 10.7+ x86-64

qoqo-0.8.2-cp37-none-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.7Windows x86-64

qoqo-0.8.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.12+ x86-64

qoqo-0.8.2-cp37-cp37m-macosx_10_7_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.7mmacOS 10.7+ x86-64

qoqo-0.8.2-cp36-none-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.6Windows x86-64

qoqo-0.8.2-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.12+ x86-64

qoqo-0.8.2-cp36-cp36m-macosx_10_7_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.6mmacOS 10.7+ x86-64

File details

Details for the file qoqo-0.8.2-cp39-none-win_amd64.whl.

File metadata

  • Download URL: qoqo-0.8.2-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for qoqo-0.8.2-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 6553e2ba3f9e66de46deae95c83c1e835d97cd33fc04cb25821ba4db0d560b93
MD5 4240aacddfde235b6a338b930f2b02fa
BLAKE2b-256 09f6759f7fce0e96c55125e5feac81ca87a4f53a1b8cafd5d9f74b78e783a870

See more details on using hashes here.

File details

Details for the file qoqo-0.8.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

  • Download URL: qoqo-0.8.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for qoqo-0.8.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 361e39cf1100883f9f426094f997913db43510cbb39f21b623eacba76ee6839c
MD5 096c7ec1bd28519b78d3ae37dbd3aab4
BLAKE2b-256 016133f960f47c4a69fde4fe7f560ee21f8fa0fd866bf84f7f34e74a1347a21d

See more details on using hashes here.

File details

Details for the file qoqo-0.8.2-cp39-cp39-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: qoqo-0.8.2-cp39-cp39-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.9, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for qoqo-0.8.2-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 10be9f1233df82979cadb8dd3c443b17831244fa85c899aa935b4af2ce131bb9
MD5 c7eb004de8c27c7158975ea4a001dad5
BLAKE2b-256 0f4d821ef33c4056dd9c99db87c40039dc5578188b3fe0510f54567f30daa218

See more details on using hashes here.

File details

Details for the file qoqo-0.8.2-cp38-none-win_amd64.whl.

File metadata

  • Download URL: qoqo-0.8.2-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for qoqo-0.8.2-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 37e1d7855d3341edadbaa0a804d679888a20854109ffed712043bd1507d42906
MD5 64e91fbc3313bb3a5eecd3eb5a892853
BLAKE2b-256 31da863adfd8bf913cd46d21b786852c5b439da385b8faca668fbe2f1bf36e76

See more details on using hashes here.

File details

Details for the file qoqo-0.8.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

  • Download URL: qoqo-0.8.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for qoqo-0.8.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 b48f3cb12665086ea375d9097ac159a807748729af66ca730ac1addb2822ea8d
MD5 a1337ae2bdca33ec5dd7fefb475fda7e
BLAKE2b-256 8a9164116d972c51eccaecaa31bf5e8d619752155df3d4cb63facea61f9710fb

See more details on using hashes here.

File details

Details for the file qoqo-0.8.2-cp38-cp38-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: qoqo-0.8.2-cp38-cp38-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.8, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for qoqo-0.8.2-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 f0bd9be2463c1b04874f8b84e73185827dd70e9e2345c6ce642927fe98372842
MD5 e4f64630e898f1e757917b057ec8acca
BLAKE2b-256 3980b2b7c445f196d877baa526eb8c1e8bea4ac003c03ac1e94466395b069408

See more details on using hashes here.

File details

Details for the file qoqo-0.8.2-cp37-none-win_amd64.whl.

File metadata

  • Download URL: qoqo-0.8.2-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.7, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for qoqo-0.8.2-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 e275296a35aac82fb39840c33695b96c07e8fe05f8252d265071b9a7c3101ac8
MD5 1a35af7906f6e6d5255a4f1f96d5c3a5
BLAKE2b-256 3452f1a8c024718d05ee49686ef1e99495688c5762ced83d8cceb0dfee61ae64

See more details on using hashes here.

File details

Details for the file qoqo-0.8.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

  • Download URL: qoqo-0.8.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for qoqo-0.8.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 b12a3b0f2df4d702b06b9a0cb6db31f90a11c2e9c9de3d9ac1d2c71db88a5486
MD5 8289b2025dc90e99515387e1a18e4ddd
BLAKE2b-256 339d916777020a246b430e3f58ed6d05cfb908f565c97fe3a1565346f5005804

See more details on using hashes here.

File details

Details for the file qoqo-0.8.2-cp37-cp37m-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: qoqo-0.8.2-cp37-cp37m-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.7m, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for qoqo-0.8.2-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 938d09699eb75f9ff86fdad7476b47536400d9ede0765d23f771dff08380fae9
MD5 c736f2d7270c79acb64fa502baf99232
BLAKE2b-256 387b0301b4b1b373dd2c636604aca38a05a90315292b8d2faccc071eb2634835

See more details on using hashes here.

File details

Details for the file qoqo-0.8.2-cp36-none-win_amd64.whl.

File metadata

  • Download URL: qoqo-0.8.2-cp36-none-win_amd64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.6, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for qoqo-0.8.2-cp36-none-win_amd64.whl
Algorithm Hash digest
SHA256 4f5aeb6156b3aba05cf9548004458c22e199b8b04ccc6170bbdebcea452d944b
MD5 500d30a66308ba2f565db96752829d69
BLAKE2b-256 6a67da0134b949f3a7f09ec64eecb954954856790ba3b794b1828f6e2f104d23

See more details on using hashes here.

File details

Details for the file qoqo-0.8.2-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

  • Download URL: qoqo-0.8.2-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for qoqo-0.8.2-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 1e0174ae1d4104ddc73ec35061622737ae9e7685797b447c2c2efaee9d36ace1
MD5 fbce6abfa6396b239c5e3adafc5e98c1
BLAKE2b-256 0bc8834c0a7d0f6966ad4c1fe6bd1c7df9a7db37de0899ffb3f5adeaf694120f

See more details on using hashes here.

File details

Details for the file qoqo-0.8.2-cp36-cp36m-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: qoqo-0.8.2-cp36-cp36m-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.6m, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for qoqo-0.8.2-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 2f732e8c2a774c6089b8d05854204df15925a878e1be8e3294c3123f1e5eb481
MD5 b6fa93c3ce1071d6c5e7af7c48421408
BLAKE2b-256 6e5c0b52bd403e44b90a63e9f2f4c0c9268d9958522e816f297f6284cb65d827

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