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.9.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.9.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.9.0.tar.gz.

File metadata

  • Download URL: iqm_qiskit_qir-0.9.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.7

File hashes

Hashes for iqm_qiskit_qir-0.9.0.tar.gz
Algorithm Hash digest
SHA256 f82922dc7eb20957a315f48fe37234277aa8601a1e622b998df08904b671999c
MD5 1556b2800077f7f98a5a8ba6a3ebec8f
BLAKE2b-256 e60978cf225e7382929cdc87ffabe2914118aca8cf0edadf61426ea4aa0ab5b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for iqm_qiskit_qir-0.9.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f8a49a236f77bdfe8a98738c1d23c9daf280bbf0c44d92b68b5a144ae4af4be6
MD5 5cb73d93c1b4a90aad64b33db8e6fa2b
BLAKE2b-256 b1a5e93e428a4e9eea3b2b0cf9ac4dad3c2e02c58ece9d24e9b5f93a577fc3d1

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