ffsim.random.random_t2_amplitudes

ffsim.random.random_t2_amplitudes(norb, nocc, *, seed=None, dtype=<class 'complex'>)[source]

Sample a random t2 amplitudes tensor.

A t2 amplitudes tensor satisfies t2[i, j, a, b] == t2[j, i, b, a], so viewed as a matrix indexed by the occupied-virtual orbital pairs (i, a) and (j, b), it is a symmetric matrix. The tensor is sampled from the canonical Gaussian distribution over such matrices: the Gaussian orthogonal ensemble if dtype is a real type (see random_real_symmetric_matrix()), and its complex analog, which is invariant under the map mat -> unitary @ mat @ unitary.T, if dtype is a complex type.

Parameters:
  • norb (int) – The number of orbitals.

  • nocc (int) – The number of orbitals that are occupied by an electron.

  • 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 t2 amplitudes tensor.