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.6.1.tar.gz (36.7 kB view details)

Uploaded Source

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.1-py2.py3-none-any.whl (21.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file qiskit_qir_alice_bob_fork-0.6.1.tar.gz.

File metadata

File hashes

Hashes for qiskit_qir_alice_bob_fork-0.6.1.tar.gz
Algorithm Hash digest
SHA256 d675a9e900809a85c5da8935145273ca789259e3fd093e8b8be86f3fa17ba356
MD5 f50f79731a1a69c88c3951b649cb58c1
BLAKE2b-256 e481031a1ac3666b0cdaca1b67ee3676bb874bfbf49d6b0fa773f0a93412c696

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qiskit_qir_alice_bob_fork-0.6.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 21d90174e08d68e0e9b69c12601aebab7550a6cb1dc0aad02d069b624404698e
MD5 b041b9c96cd8f1560641c75f57856395
BLAKE2b-256 216e8883480f1b972605017500f3d4cba116994367930882e89dfc02f62091f2

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