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.
Along the same lines of what they do in
qiskit-qir:where you can specify
profile="BasicExecution"orprofile="AdaptiveExecution"(what they support by default, and what we want to support as an additional option) passed toqasm3_to_qirwith aprofile="adaptive"keyword argument.For more see
qir-alliance/qir-spec: Adaptive_Profile.mdTODO:
qasm3_to_qirand the QIR Adaptive profile specification.qbraid_qir/profilessection 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.qasm3_to_qirconversion (e.g. via aprofile="adaptive"keyword argument) that ensures generated QIR adheres strictly to the spec.