Skip to main content

Qiskit to QIR translator

Project description

qiskit-qir

Qiskit to QIR translator.

This is a temporary fork until the upstream qiskit-qir supports user-defined instructions.

Example

from qiskit import QuantumCircuit
from qiskit_qir import to_qir_module

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])

module, entry_points = to_qir_module(circuit)
bitcode = module.bitcode
ir = str(module)

Installation

Install qiskit-qir with pip:

pip install qiskit-qir

Note: this will automatically install PyQIR if needed.

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


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-alice-bob-fork-0.3.2.tar.gz (33.7 kB view details)

Uploaded Source

Built Distribution

qiskit_qir_alice_bob_fork-0.3.2-py2.py3-none-any.whl (20.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file qiskit-qir-alice-bob-fork-0.3.2.tar.gz.

File metadata

File hashes

Hashes for qiskit-qir-alice-bob-fork-0.3.2.tar.gz
Algorithm Hash digest
SHA256 afb1acada80f52384f20364d27a35466da88a95d8bccda32aeeba7500f41e8d8
MD5 9e4449bc2c4ef175177dc64e41afe600
BLAKE2b-256 83c5f1ba0a49a34a974d759e09613d621ba5c5d6c094557cc104ccbde502b9da

See more details on using hashes here.

File details

Details for the file qiskit_qir_alice_bob_fork-0.3.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for qiskit_qir_alice_bob_fork-0.3.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2824e00a7e7dcf238de2944bd5dddf4abd2066a846b1d3312a2176617139c510
MD5 d376bfc1ae30bfdd86dbb7bef631b37c
BLAKE2b-256 789a80669f587790c208e98f0c9292ac30006b49a978814f451518c18c5f538a

See more details on using hashes here.

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