French
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.circuit.QuantumCircuit.continue_loop

QuantumCircuit.continue_loop()[source]

Apply ContinueLoopOp.

Avertissement

If you are using the context-manager « builder » forms of if_test(), for_loop() or while_loop(), you can only call this method if you are within a loop context, because otherwise the « resource width » of the operation cannot be determined. This would quickly lead to invalid circuits, and so if you are trying to construct a reusable loop body (without the context managers), you must also use the non-context-manager form of if_test() and if_else(). Take care that the ContinueLoopOp instruction must span all the resources of its containing loop, not just the immediate scope.

Type renvoyé

InstructionSet

Renvoie

A handle to the instruction created.

Lève

CircuitError – if this method was called within a builder context, but not contained within a loop.