Skip to content

olgOk/qbraid-qir

 
 

Repository files navigation

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

About

qBraid-SDK QIR transpiler integration

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 84.3%
  • Shell 6.9%
  • LLVM 6.0%
  • Dockerfile 2.8%