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.3.1.tar.gz (33.0 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for qiskit-qir-0.3.1.tar.gz
Algorithm Hash digest
SHA256 bb374f68ce5213f43b7d506375c4484e15db83787c5dc8451e4523c757cd1037
MD5 88d0d27ad4d1dc5bab4aea001e78b591
BLAKE2b-256 b04a1eb071835345b1b7cb3fcf047595e2e40afdb4a959652da8992350f4924e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qiskit_qir-0.3.1-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.9.15

File hashes

Hashes for qiskit_qir-0.3.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3ac956f4c242aee25c36b144a1b203c38247f356a0b9c8a3095e4499a2b7b7c8
MD5 55dc1c75368ef64c8d0f4f77ce217e8a
BLAKE2b-256 a34740001bbe379686e78aa8903119fa45ad0a75403082458ad99c03783c4e79

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