ffsim.random.random_molecular_hamiltonian

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

Sample a random molecular Hamiltonian.

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

  • 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 one- and two-body tensors. The constant term will always be of type float.

Return type:

MolecularHamiltonian

Returns:

The sampled molecular Hamiltonian.