ffsim.random.random_molecular_hamiltonian_unrestricted¶
- ffsim.random.random_molecular_hamiltonian_unrestricted(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 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.The scale arguments are applied to every spin sector; see
random_molecular_hamiltonian().- Parameters:
norb (
int) – The number of spatial 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. Seerandom_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:
- Returns:
The sampled spin-unrestricted molecular Hamiltonian.