Skip to main content

qBraid-SDK extension providing support for QIR conversions

Project description

qbraid-qir-header

CI Documentation Status PyPI version PyPI version License Discord

Work in progress

qBraid-SDK extension providing support for QIR conversions.

This project aims to make QIR representations accessible via the qBraid-SDK transpiler, and by doing so, open the door to language-specific conversions from any and all high-level quantum languages supported by qbraid. See QIR Alliance: why do we need it?.

Getting started

Installation

pip install qbraid-qir

Example

import cirq
from qbraid_qir import cirq_to_qir

q0, q1 = cirq.LineQubit.range(2)

circuit = cirq.Circuit(
  cirq.H(q0),
  cirq.CNOT(q0, q1),
  cirq.measure(q0, q1)
)

module = cirq_to_qir(circuit, name="my-circuit")

ir = str(module)

Development

Install from source

git clone https://github.com/qBraid/qbraid-qir.git
cd qbraid-qir
pip install -e .

Run tests

pip install -r requirements-dev.txt
pytest tests

with coverage report

pytest --cov=qbraid_qir --cov-report=term tests/

Build docs

cd docs
pip install -r requirements.txt
make html

Architecture diagram

architecture

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

qbraid-qir-0.0.1.dev20240103022636.tar.gz (248.8 kB view hashes)

Uploaded Source

Built Distribution

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