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

qiskit-qir-0.4.0.tar.gz (33.1 kB view details)

Uploaded Source

Built Distribution

qiskit_qir-0.4.0-py2.py3-none-any.whl (19.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file qiskit-qir-0.4.0.tar.gz.

File metadata

  • Download URL: qiskit-qir-0.4.0.tar.gz
  • Upload date:
  • Size: 33.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for qiskit-qir-0.4.0.tar.gz
Algorithm Hash digest
SHA256 44dd20fba5b755b0c398a68f139e15fe63b5be4539bf67ef200d1f3c9b5f9a89
MD5 c016a5b5aed467344d1c8e8ca7ac2777
BLAKE2b-256 005901c0391e93de6cf9a4ec282505e5e1c6b7eed368810111de3cfd7dc0d8b3

See more details on using hashes here.

File details

Details for the file qiskit_qir-0.4.0-py2.py3-none-any.whl.

File metadata

  • Download URL: qiskit_qir-0.4.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for qiskit_qir-0.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d2606574f316772a96e2aee6a8a2f5e2d973c2ba07d9cc066b0b76ccb8999a58
MD5 ab8780393644fdda7c68789ce14fc115
BLAKE2b-256 9cb16217ab3efa91cfbf36e5ac647eedfb75352e37dd9331b62e8c9a42235ef6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page