Skip to content

[FEATURE] QIR Adaptive Profile compliant QASM conversions #199

@ryanhill1

Description

@ryanhill1

Along the same lines of what they do in qiskit-qir:

where you can specify profile="BasicExecution" or profile="AdaptiveExecution" (what they support by default, and what we want to support as an additional option) passed to qasm3_to_qir with a profile="adaptive" keyword argument.

For more see qir-alliance/qir-spec: Adaptive_Profile.md

from qbraid_qir.qasm import qasm3_to_qir

qasm_str = """
OPENQASM 3.0;
include "stdgates.inc";
qubit[2] q;
bit[2] c;
h q[0];
cx q[0], q[1];
c = measure q;
"""

module = qasm3_to_qir(qasm_str, name="bell", profile="adaptive")

TODO:

  • Identify gaps in compliance between the QIR currently generated by qasm3_to_qir and the QIR Adaptive profile specification.
  • Add a qbraid_qir/profiles section and define a representation of AdaptiveProfile in the repository. Use a relevant data structure and format (eg. json) to define the necessary attributes of the AdaptiveProfile. Think of it as a "rules" file for the profile against which the QIR will be validated.
  • Add an Adaptive Profile–compliant option to qasm3_to_qir conversion (e.g. via a profile="adaptive" keyword argument) that ensures generated QIR adheres strictly to the spec.
  • In your PR, clearly describe the compliance issues you identified and explain the changes you made to address them.

Metadata

Metadata

Assignees

Labels

unitary-hackBountied issue for Unitary Hack

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions