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.7.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.7.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.7.0.tar.gz.

File metadata

  • Download URL: iqm_qiskit_qir-0.7.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.7.0.tar.gz
Algorithm Hash digest
SHA256 bc3f8004fa036191a2881682c34ac76228b8a3930b5ac93d9c3ecb1c32104859
MD5 27b869a861fba4d6d4d04994cfd11de9
BLAKE2b-256 6ca0526864a0beed5ab8522716ee5d43cd0f3748a67ce524e4d4ba3c2fa7a6d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for iqm_qiskit_qir-0.7.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 66c58a927953f62abc5897147d0be70f66f37e5695422c9f7949d6dc00c8973c
MD5 7207287c47315d5d95867cc1c138bc94
BLAKE2b-256 4722142f477d669c41608d98bacc098cd51a051da86ab61601ad707b7808e83e

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