pygsti.circuits.circuitconstruction.repeat#
- repeat(x, num_times, assert_at_least_one_rep=False)#
Repeat x num_times times.
- Parameters:
x (tuple or Circuit) – the operation sequence to repeat
num_times (int) – the number of times to repeat x
assert_at_least_one_rep (bool, optional) – if True, assert that num_times > 0. This can be useful when used within a create_circuits inner loop to build a operation sequence lists where a string must be repeated at least once to be added to the list.
- Return type:
tuple or Circuit (whichever x was)