cirq.testing.random_orthogonal

Returns a random orthogonal matrix distributed with Haar measure.

dim The width and height of the matrix.
random_state A seed (int) or np.random.RandomState class to use when generating random values. If not set, defaults to using the module methods in np.random.

The sampled orthogonal matrix.

References:

'How to generate random matrices from the classical compact groups' http://arxiv.org/abs/math-ph/0609050