OPENQASM 3.1; // Repeat until success on measured bits, under a declared bound. qubit q; bit c; c = measure q; @wai.max_iterations 3 while (c == 0) { x q; c = measure q; }