ffsim.random.random_molecular_hamiltonian_spinless

ffsim.random.random_molecular_hamiltonian_spinless(norb, *, one_body_scale=1.0, two_body_scale=1.0, constant_scale=1.0, rank=None, seed=None, dtype=<class 'complex'>)[source]

Sample a random spinless molecular Hamiltonian.

The one_body_scale, two_body_scale, and constant_scale arguments multiply the sampled one-body tensor, two-body tensor, and constant. Since the underlying distributions are normalized so that their scale does not depend on the rank of the two-body tensor (see random_two_body_tensor()), the ratio two_body_scale / one_body_scale sets the strength of the interaction relative to the one-body term, analogous to the ratio \(U / t\) of a Fermi-Hubbard model: increasing it yields a more strongly interacting Hamiltonian. Scaling all three arguments by a common factor only changes the unit of energy.

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

  • one_body_scale (float) – Multiplies the sampled one-body tensor.

  • two_body_scale (float) – Multiplies the sampled two-body tensor.

  • constant_scale (float) – Multiplies the sampled constant.

  • rank (int | None) – The rank of the sampled two-body tensor. See random_two_body_tensor().

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

MolecularHamiltonianSpinless

Returns:

The sampled spinless molecular Hamiltonian.