qbraid-qir
define the rules, restrictions,
and capabilities that govern how OpenQASM 3 programs are converted to QIR. When converting a QASM
program to QIR using qbraid-qir
, you must specify a profile—either Base or Adaptive—which
determines the allowed quantum operations, branching, measurement handling, and output recording.
This ensures that the generated QIR is compliant with the requirements of the target quantum backend
or workflow.
Base
if
statements) is supported.goto
or loops).AdaptiveExecution
profile
argument:
qir_base
and qir_adaptive
variables will contain the generated QIR code for the specified profile.
qbraid-qir
, always choose the profile that matches your target
backend’s requirements The Base
profile is strict and suitable for simple, hardware-oriented
workflows, while the Adaptive
profile enables more advanced quantum programming features such as
qubit reuse, grouped output, and flexible control flow.