ffsim.random.random_molecular_hamiltonian_unrestricted¶
- ffsim.random.random_molecular_hamiltonian_unrestricted(norb, seed=None, dtype=<class 'complex'>)[source]¶
Sample a random spin-unrestricted molecular Hamiltonian.
The one- and two-body tensors of each spin sector are sampled independently, so the resulting Hamiltonian is not invariant under exchanging the spin alpha and spin beta orbitals.
The alpha-beta two-body tensor is sampled without imposing the symmetry under exchanging its two index pairs that the same-spin tensors possess. This symmetry is not required of the alpha-beta tensor, because the beta-alpha term of the Hamiltonian supplies the transposed contribution. See
MolecularHamiltonianUnrestricted.- 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:
- Returns:
The sampled spin-unrestricted molecular Hamiltonian.