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.6"}

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.6", 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.6.3-cp39-cp39-macosx_10_7_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.9macOS 10.7+ x86-64

qoqo-0.6.3-cp38-cp38-macosx_10_7_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.8macOS 10.7+ x86-64

qoqo-0.6.3-cp37-cp37m-macosx_10_7_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.7mmacOS 10.7+ x86-64

qoqo-0.6.3-cp36-cp36m-macosx_10_7_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.6mmacOS 10.7+ x86-64

File details

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

File metadata

  • Download URL: qoqo-0.6.3-cp39-cp39-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.9, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for qoqo-0.6.3-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 9fdf93c49a39a9dfa1ff194084671a380657b364a5480b80ca4ff628a2622f6d
MD5 8e252cff5d7f008eacb089f0d97c6dbe
BLAKE2b-256 5203501ff2ca38822111d64bf42a0d43644560aeadfa14db18c0df58c6ab0161

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qoqo-0.6.3-cp38-cp38-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.8, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for qoqo-0.6.3-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 330c1589d191cbea098e4cab5b6643d9a819da59f11aefad985f0dae706303b2
MD5 ab3ee32b93442ad789e439a2c7034d02
BLAKE2b-256 d4ec582a46f5ee46de39722c144e705b72fe94522ff80516e4b503d793844e0f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qoqo-0.6.3-cp37-cp37m-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.7m, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12

File hashes

Hashes for qoqo-0.6.3-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 e87a0acf4ba93756457328a1bcb0404fa3471f9f83bc6e421e13e7aa19b1be17
MD5 24e2c7bb9e664d306cfeb1dcd4735d2c
BLAKE2b-256 84a64d4b6643e5993ee059550cadfe33bc9dcc19d46a7bd3426bcbb582e6eb16

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qoqo-0.6.3-cp36-cp36m-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.6m, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15

File hashes

Hashes for qoqo-0.6.3-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 400dc33d72dc3d17b040b3a17f69baa1c95685f0c4da60bdee5a3c6df41103b1
MD5 978b93b850603ad144f78b9b85182d7f
BLAKE2b-256 86ed3c954261f47398d2db59d8ab641a294d6e997cab9cf602bc9996cd4a9287

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