ffsim.random.random_t2_amplitudes_unrestricted

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

Sample random unrestricted t2 amplitudes.

The unrestricted t2 amplitudes are returned as a tuple (t2aa, t2ab, t2bb) of the alpha-alpha, alpha-beta, and beta-beta blocks, with shapes (nocc_a, nocc_a, nvrt_a, nvrt_a), (nocc_a, nocc_b, nvrt_a, nvrt_b), and (nocc_b, nocc_b, nvrt_b, nvrt_b). The same-spin blocks t2aa and t2bb satisfy t2[i, j, a, b] == -t2[j, i, a, b] == -t2[i, j, b, a] and are sampled using random_t2_amplitudes_spinless(). The alpha-beta block t2ab has no symmetry constraint, and its entries are sampled independently from the standard normal distribution if dtype is a real type, and from the standard complex normal distribution if dtype is a complex type.

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

  • nelec (tuple[int, int]) – The numbers of spin alpha and spin beta fermions.

  • 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:

tuple[ndarray, ndarray, ndarray]

Returns:

The sampled t2 amplitudes, as a tuple (t2aa, t2ab, t2bb).