ffsim.random.random_antihermitian

ffsim.random.random_antihermitian(dim, *, seed=None, dtype=<class 'complex'>)[source]

Return a random anti-Hermitian matrix.

The sampled matrix is 1j times a matrix sampled from the Gaussian unitary ensemble, the canonical distribution over Hermitian matrices; see random_hermitian(). Its eigenvalues are purely imaginary, and their imaginary parts follow the semicircle law on [-2 * sqrt(dim), 2 * sqrt(dim)].

Parameters:
  • dim (int) – The width and height of the matrix.

  • seed – A seed to initialize the pseudorandom number generator. Should be a valid input to np.random.default_rng.

  • dtype – The data type to use for the result.

Return type:

ndarray

Returns:

The sampled anti-Hermitian matrix.