Skip to main content

Qiskit to QIR translator

Project description

qiskit-qir

Qiskit to QIR translator.

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

iqm_qiskit_qir-0.8.0.tar.gz (33.1 kB view details)

Uploaded Source

Built Distribution

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

iqm_qiskit_qir-0.8.0-py2.py3-none-any.whl (19.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file iqm_qiskit_qir-0.8.0.tar.gz.

File metadata

  • Download URL: iqm_qiskit_qir-0.8.0.tar.gz
  • Upload date:
  • Size: 33.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for iqm_qiskit_qir-0.8.0.tar.gz
Algorithm Hash digest
SHA256 9daf362943eaf1c2970bc3e045837f01334d573a03b3eac4f6bfc4c5e683ce5c
MD5 e1b5a815062d1d28504f6827727407e1
BLAKE2b-256 8bcf41acb3d6e3c07bb8f9091ffb97c0a2cff53006e076f781f73eb5db659f5e

See more details on using hashes here.

File details

Details for the file iqm_qiskit_qir-0.8.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for iqm_qiskit_qir-0.8.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e15b2c84259cb779d1fd889f6c8e171b17daf44e12e3de35ef1b3911aa5ddfbf
MD5 0f8dafba16d5faefe9dc2007fcc43eca
BLAKE2b-256 1acb828af1a0a5c9d504cbd6f1433fb2b71de2a26bca544acce840db120999e2

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