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

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])

qir = to_qir(circuit)

Installation

Install the pyqir-generator dependency first for your platform.

# For Darwin:
pip install https://github.com/qir-alliance/pyqir/releases/download/v0.2.0a1/pyqir_generator-0.2.0a1-cp36-abi3-macosx_10_7_x86_64.whl

# For Windows:
pip install https://github.com/qir-alliance/pyqir/releases/download/v0.2.0a1/pyqir_generator-0.2.0a1-cp36-abi3-win_amd64.whl

# For Linux:
pip install https://github.com/qir-alliance/pyqir/releases/download/v0.2.0a1/pyqir_generator-0.2.0a1-cp36-abi3-linux_x86_64.whl

Then, install qiskit-qir with pip:

pip install qiskit-qir

Development

Install from source

To install the package from source, clone the repo onto your machine, browse to qdk-python/qiskit-qir 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.1.0b1.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

qiskit_qir-0.1.0b1-py2.py3-none-any.whl (6.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file qiskit-qir-0.1.0b1.tar.gz.

File metadata

  • Download URL: qiskit-qir-0.1.0b1.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.8.2 requests/2.27.1 setuptools/58.0.4 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.9.7

File hashes

Hashes for qiskit-qir-0.1.0b1.tar.gz
Algorithm Hash digest
SHA256 58b58fc9442b42b4d19dc0ec1f0b7565652a52b5ac833d13ea52b1f4759703ef
MD5 9e206c4bbbffb89809f99676f1171fd6
BLAKE2b-256 188f0f2db5816e9b99da7175b2119d4095a23188da96a46de48044c613413243

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qiskit_qir-0.1.0b1-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.8.2 requests/2.27.1 setuptools/58.0.4 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.9.7

File hashes

Hashes for qiskit_qir-0.1.0b1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b924b98a9fb76fc4f66c89e0c648b671719c9e9da3058274fe4d9f15cb6c5eb8
MD5 5d5d98a3598f7ca457e82483c7c13a4e
BLAKE2b-256 a0a0e63a0c956672eddaf885f6f5bfc01fc8f357a263db8f4311fe8863de0f20

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