diff --git a/qiskit/transpiler/passes/utils/unroll_forloops.py b/qiskit/transpiler/passes/utils/unroll_forloops.py index b4df3609014a..c83a47f72eec 100644 --- a/qiskit/transpiler/passes/utils/unroll_forloops.py +++ b/qiskit/transpiler/passes/utils/unroll_forloops.py @@ -19,15 +19,19 @@ class UnrollForLoops(TransformationPass): - """UnrollForLoops transpilation pass unrolls for-loops when possible.""" + """``UnrollForLoops`` transpilation pass unrolls for-loops when possible.""" def __init__(self, max_target_depth=-1): """Things like `for x in {0, 3, 4} {rx(x) qr[1];}` will turn into `rx(0) qr[1]; rx(3) qr[1]; rx(4) qr[1];`. + .. note:: + The ``UnrollForLoops`` unrolls only one level of block depth. No inner loop will + be considered by ``max_target_depth``. + Args: - max_target_depth (int): Optional. Checks if the unrolled block is over a particular depth. - To disable the check, use ``-1`` (Default) + max_target_depth (int): Optional. Checks if the unrolled block is over a particular + subcircuit depth. To disable the check, use ``-1`` (Default). """ super().__init__() self.max_target_depth = max_target_depth