qbraid.transpiler.conversions.qasm3.qasm3_to_cirq

qasm3_to_cirq(qasm)[source]

Returns a Cirq circuit equivalent to the input OpenQASM 3 string.

Cirq’s built-in importer handles most OpenQASM 2/3 directly, including single-line conditionals. When it cannot, the program is normalized into a form Cirq accepts – gate aliases renamed, custom gates unrolled, barriers removed, and QASM 3 braced if blocks rewritten to single-line syntax – and parsing is retried.

Parameters:

qasm (Qasm3StringType) – OpenQASM 3 string to convert to a Cirq circuit.

Return type:

Circuit

Returns:

Cirq circuit representation equivalent to the input OpenQASM 3 string.