pygsti.tools.matrixmod2.random_invertable_matrix

pygsti.tools.matrixmod2.random_invertable_matrix#

random_invertable_matrix(n, failcount=0, rand_state=None)#

Finds a random invertable matrix M over GL(n,2)

Parameters:
  • n (int) – matrix dimension

  • failcount (int, optional) – Internal use only.

  • rand_state (np.random.RandomState, optional) – Random number generator to allow for determinism.

Return type:

numpy.ndarray