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 Distributions

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

Built Distribution

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

qiskit_qir_alice_bob_fork-0.6.0-py2.py3-none-any.whl (21.0 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

File hashes

Hashes for qiskit_qir_alice_bob_fork-0.6.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c87b71e1236818722b20fe64fd055d0e9fdd43e01ced10448854c687b080b37c
MD5 77e7277be00cc61be15c7c5bd92a13b9
BLAKE2b-256 c2550c0e36df97ffdc6790154c7e0d7421f8f4b5c945ba17b176f1be7e64630d

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