ffsim.testing.random_occupied_orbitals

ffsim.testing.random_occupied_orbitals(norb, nelec, *, seed=None)[source]

Return a random pair of occupied orbitals lists.

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

  • nelec (int | tuple[int, int]) – Either a single integer representing the number of fermions for a spinless system, or a pair of integers storing 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.

Return type:

list[int] | tuple[list[int], list[int]]

Returns:

The sampled pair of (occ_a, occ_b) occupied orbitals lists.