ffsim.random.random_hermitian

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

Return a random Hermitian matrix.

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

  • rank – The rank of the matrix. If None, the maximum rank is used.

  • 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 Hermitian matrix.