qbraid.passes.qasm.contains_feedforward

contains_feedforward(program)[source]

Check whether an unrolled OpenQASM program still contains an if or switch.

Pass QasmModule.unrolled_ast, not the original program: unrolling resolves if and switch statements on compile-time constants. It keeps any if on a bit, though, even one never measured; use branches_on_measurement() on the unrolled program to tell those apart.

Return type:

bool