sf.utils.random_interferometer

random_interferometer(N, real=False)[source]

Random unitary matrix representing an interferometer.

For more details, see [23].

Parameters
  • N (int) – number of modes

  • real (bool) – return a random real orthogonal matrix

Returns

random \(N\times N\) unitary distributed with the Haar measure

Return type

array