Qiskit to QIR translator
Project description
qiskit-qir
Qiskit to QIR translator.
Example
from qiskit import QuantumCircuit
from qiskit_qir import to_qir
circuit = QuantumCircuit(3, 3, name="my-circuit")
circuit.h(0)
circuit.cx(0, 1)
circuit.cx(1, 2)
circuit.measure([0,1,2], [0, 1, 2])
qir = to_qir(circuit)
Installation
Install the pyqir-generator
dependency first for your platform.
# For Darwin:
pip install https://github.com/qir-alliance/pyqir/releases/download/v0.2.0a1/pyqir_generator-0.2.0a1-cp36-abi3-macosx_10_7_x86_64.whl
# For Windows:
pip install https://github.com/qir-alliance/pyqir/releases/download/v0.2.0a1/pyqir_generator-0.2.0a1-cp36-abi3-win_amd64.whl
# For Linux:
pip install https://github.com/qir-alliance/pyqir/releases/download/v0.2.0a1/pyqir_generator-0.2.0a1-cp36-abi3-linux_x86_64.whl
Then, install qiskit-qir
with pip
:
pip install qiskit-qir
Development
Install from source
To install the package from source, clone the repo onto your machine, browse to the root directory and run
pip install -e .
Tests
First, install the development dependencies using
pip install -r requirements_dev.txt
To run the tests in your local environment, run
make test
To run the tests in virtual environments on supported Python versions, run
make test-all
Docs
To build the docs using Sphinx, run
make docs
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
qiskit-qir-0.1.0b3.tar.gz
(17.9 kB
view hashes)
Built Distribution
Close
Hashes for qiskit_qir-0.1.0b3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b7c4d7e91440f347ff74b827b1308ae7c0d0bb6a185bb9d9212c63dfff36ccd |
|
MD5 | 833f5b8f40ad6efefe3f3e297252f260 |
|
BLAKE2b-256 | 174766f7fae6b1aa14668f9ed54775270f1b0f341d9577cddda63b8a8a0cb63a |