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.5.0.tar.gz (35.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.5.0-py2.py3-none-any.whl (20.9 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

File hashes

Hashes for qiskit_qir_alice_bob_fork-0.5.0.tar.gz
Algorithm Hash digest
SHA256 4294e275ae12a13a3ab5ad189961d408b89ba470d7bb4a24b16bb5dc2e372c56
MD5 9d00f38afc14dd692e812bc740fecaa6
BLAKE2b-256 47d0e55ceac120428cddf11ac088e4b14686ce7922392c5cdd525d32dabf7852

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qiskit_qir_alice_bob_fork-0.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5562114ef3919de4ad151cba1b53601d2c24e35d98d463734b9db1f90ee73de8
MD5 686bfe501ac040c567fc51cb9a2a5efe
BLAKE2b-256 a7ed5849995cd222dd163b6caf4dbd7fdaf071ffc020f1a31e8b1c6da507b9b7

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