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.10.0.tar.gz (31.7 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.10.0-py2.py3-none-any.whl (20.1 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for iqm_qiskit_qir-0.10.0.tar.gz
Algorithm Hash digest
SHA256 5a6544fce953091e67bc7e3432b5ae6f97351c0955fe0bf455c447a6229d1eae
MD5 beaaa5a96467b3262f50f4adbd6160b9
BLAKE2b-256 a32991c4def73c6548fc5ab4e4589bda6b9ab4c2be383706ab4ca23d7333423e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for iqm_qiskit_qir-0.10.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 234e5a45bd2c6cfbb44f4535dada7802cb238f97cabe7035610a9637e1d01072
MD5 907e135c546d5b69eb138e6bd8678fe2
BLAKE2b-256 bce116cb54c7ebd8bd4c3baf8c34d8a9ccf3e20d9869168d99297d6265572498

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