qit.utils.rand_U1

qit.utils.rand_U1(n)

Random diagonal unitary matrix.

Parameters

n (int) – matrix size

Returns

random diagonal unitary n*n matrix

Return type

array[complex]

The matrix is random with respect to the Haar measure.