Crates.io | roqoqo-derive |
lib.rs | roqoqo-derive |
version | 1.16.1 |
source | src |
created_at | 2021-06-30 12:21:58.124938 |
updated_at | 2024-11-07 09:42:27.406294 |
description | Macros for the roqoqo crate |
homepage | |
repository | |
max_upload_size | |
id | 416803 |
size | 122,018 |
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:
What roqoqo/qoqo is not:
This repository contains two components:
roqoqo provides:
Circuit
struct to represent quantum circuitsQuantumProgram
enum to represent quantum programs using different measurement methodsOperation
for all operations or SingleQubitGateOperation
for all unitary operations acting on a single qubit)EvaluatingBackend
trait defining a standard for interfacing from qoqo to hardware and simulators that can return measured valuesDevice
trait defining a standard to obtain connectivity information and a noise model for quantum computing devicesCircuit
and QuantumProgram
via the serde crate.This software is still in the beta stage. Functions and documentation are not yet complete and breaking changes can occur.
To use roqoqo in a Rust project simply add
roqoqo = {version="1.0"}
to the [dependencies]
section of the project Cargo.toml.
qoqo provides the Python interface to the underlying roqoqo library, including:
Circuit
class to represent quantum circuitsQuantumProgram
class to represent quantum programsOn 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 mscOS
RUSTFLAGS="-C link-arg=-undefined -C link-arg=dynamic_lookup" pip install qoqo
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="1.0", default-features=false}
to the [dependencies]
section of the project Cargo.toml.
A source distribution now exists but requires a Rust install with a rust version > 1.47 and a maturin version { >= 0.12, <0.13 } in order to be built.
Since qoqo provides a full python interface to the underlying roqoqo library, there are examples for python users and for Rust users.
For an expanded collection of examples please see the jupyter notebooks in the extra repository qoqo_examples. The qoqo examples require the qoqo_quest and qoqo_mock interfaces.
This project has been partly supported by PlanQK and is partially supported by QSolid and PhoQuant.
We welcome contributions to the project. If you want to contribute code, please have a look at CONTRIBUTE.md for our code contribution guidelines.
In order to facilitate the contribution of the addition of a new gate, please also have a look at add_new_gate.md to read a quick explanation of the main steps necessary.