qbraid.transpiler.conversions.openqasm3.openqasm3_to_pyquil
- openqasm3_to_pyquil(program)[source]
Returns a pyQuil Program equivalent to the input OpenQASM 3 program.
Supports the standard gate set (including gate modifiers and controlled gates, which
pyqasmdecomposes during unrolling), measurement,barrier(-> pyQuilFENCE),reset(->RESET),delay(->DELAY), andif (c == 0|1)classical feedforward (-> conditionalJUMP-WHEN). Declared-but-idle qubits are padded with identity so the operator dimension matches the source register width.- Parameters:
program (str or openqasm3.ast.Program) – OpenQASM 3 program to convert.
- Returns:
pyQuil Program equivalent to the input program.
- Return type:
pyquil.Program
- Raises:
ProgramConversionError – If the program is malformed or contains a gate/statement that is not supported by the conversion.