qbraid.transpiler.conversions.pyquil.pyquil_to_qasm3

pyquil_to_qasm3(program)[source]

Returns an OpenQASM 3 string equivalent to the input pyQuil Program.

Supports the gates recognized by pyqasm (Clifford+T, rotations, U, iswap/pswap/xy/rxx/ryy/rzz/cphaseshift00|01|10), S/T daggers, measurement, RESET (-> reset), FENCE (-> barrier), and DELAY (-> delay).

Known limitation: classical feed-forward (pyQuil JUMP/JUMP-WHEN) has no straightforward OpenQASM 3 structured-control reconstruction and raises ProgramConversionError rather than being silently dropped.

Parameters:

program (pyquil.quil.Program) – pyQuil Program to convert.

Returns:

OpenQASM 3 string equivalent to the input program.

Return type:

str

Raises:

ProgramConversionError – If the program contains an instruction, gate, or modifier that this conversion does not support.