Skip to content

Commit

Permalink
Add proviso on repeated conditionals in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jakelishman committed Mar 6, 2024
1 parent b9bbae5 commit a357a4d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion qiskit/circuit/instruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,13 @@ def _return_repeat(self, exponent):
)

def repeat(self, n):
"""Creates an instruction with `gate` repeated `n` amount of times.
"""Creates an instruction with ``self`` repeated :math`n` times.
If this operation has a conditional, the output instruction will have the same conditional
and the inner repeated operations will be unconditional; instructions within a compound
definition cannot be conditioned on registers within Qiskit's data model. This means that
it is not valid to apply a repeated instruction to a clbit that it both writes to and reads
from in its condition.
Args:
n (int): Number of times to repeat the instruction
Expand Down

0 comments on commit a357a4d

Please sign in to comment.