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.6.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.6.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.6.0.tar.gz.

File metadata

  • Download URL: iqm_qiskit_qir-0.6.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.6.0.tar.gz
Algorithm Hash digest
SHA256 09d0f9372b37322a24f3afec6524602ce8c2f568455fae8836f52a1c1dea9a6d
MD5 ba6e2f3cc5bde8272fd8a4c0203c202d
BLAKE2b-256 7f402c042a90c40ef016b4c857228d98938e396d2cebabbd4902d234704bfff5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for iqm_qiskit_qir-0.6.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 18e32e0d96a7b75e420a16138596c0720b64d9d95e4188b2e06fc0da9d9b6e2a
MD5 6e8665ebc1e01ae2e44ea9b563894fe7
BLAKE2b-256 1452bb5eff5497c24c735e747f78296fbef2fbe63a8f88622c9274a909a0d686

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