pygsti.construction.repeat¶
-
pygsti.construction.
repeat
(x, nTimes, assertAtLeastOneRep=False)¶ Repeat x nTimes times.
Parameters: - x (tuple or GateString) – the gate string to repeat
- nTimes (int) – the number of times to repeat x
- assertAtLeastOneRep (bool, optional) – if True, assert that nTimes > 0. This can be useful when used within a create_gatestring_list inner loop to build a gate string lists where a string must be repeated at least once to be added to the list.
Returns: Return type: tuple or GateString (whichever x was)