pygsti.objects.GateSet.rotate

GateSet.rotate(rotate=None, max_rotate=None, seed=None)

Apply rotation uniformly or randomly to this gateset, and return the result, without modifying the original (this) gateset. You must specify either ‘rotate’ or ‘max_rotate’. This method currently only works on single-qubit gatesets.

Parameters:
  • rotate (float or tuple of floats, optional) – if a single float, apply rotation of rotate radians along each of the pauli-product axes (X,Y,Z for 1-qubit) of all gates in the gateset. For a 1-qubit gateset, a 3-tuple of floats can be specifed to apply separate rotations along the X, Y, and Z axes. For a 2-qubit gateset, a 15-tuple of floats can be specified to apply separate rotations along the IX, IY, IZ, XI, XX, XY, XZ, YI, YX, YY, YZ, ZI, ZX, ZY, ZZ axes.
  • max_rotate (float, optional) – specified instead of ‘rotate’; apply a random rotation with maximum max_rotate radians along each of the relevant axes of each each gate in the gateset. That is, rotations of a particular gate around different axes are different random amounts.
  • seed (int, optional) – if not None, seed numpy’s random number generator with this value before generating random depolarizations.
Returns:

the rotated GateSet

Return type:

GateSet