Skip to main content

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

Metadata

Release files for qiskit-qir-alice-bob-fork 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qiskit-qir-alice-bob-fork 0.6.1
File Size Uploaded
qiskit_qir_alice_bob_fork-0.6.1.tar.gz 36.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for qiskit-qir-alice-bob-fork 0.6.1
File Interpreter ABI Platform
qiskit_qir_alice_bob_fork-0.6.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 57.8 kB

Release files / qiskit_qir_alice_bob_fork-0.6.1.tar.gz

Download URL qiskit_qir_alice_bob_fork-0.6.1.tar.gz
Size 36.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d675a9e900809a85c5da8935145273ca789259e3fd093e8b8be86f3fa17ba356
BLAKE2b-256 checksum
How to use checksums
e481031a1ac3666b0cdaca1b67ee3676bb874bfbf49d6b0fa773f0a93412c696
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.4

Release files / qiskit_qir_alice_bob_fork-0.6.1-py2.py3-none-any.whl

Download URL qiskit_qir_alice_bob_fork-0.6.1-py2.py3-none-any.whl
Size 21.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
21d90174e08d68e0e9b69c12601aebab7550a6cb1dc0aad02d069b624404698e
BLAKE2b-256 checksum
How to use checksums
216e8883480f1b972605017500f3d4cba116994367930882e89dfc02f62091f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.4
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page