Quil-T
API Reference
Program.
while_do
While a classical register at index classical_reg is 1, loop q_program
Equivalent to the following construction:
WHILE [c]: instr... => LABEL @START JUMP-UNLESS @END [c] instr... JUMP @START LABEL @END
classical_reg (MemoryReferenceDesignator) – The classical register to check
q_program (Program) – The Quil program to loop.
Program
The Quil Program with the loop instructions added.