ffsim.random.random_double_factorized_hamiltonian¶
- ffsim.random.random_double_factorized_hamiltonian(norb, *, rank=None, z_representation=False, real=False, seed=None)[source]¶
Sample a random double-factorized Hamiltonian.
- Parameters:
norb (
int) – The number of spatial orbitals.rank (
int|None) – The desired number of terms in the two-body part of the Hamiltonian. If not specified, it will be set tonorb * (norb + 1) // 2.z_representation (
bool) – Whether to return a Hamiltonian in the “Z” representation.real (
bool) – Whether to sample a real-valued object rather than a complex-valued one.seed – A seed to initialize the pseudorandom number generator. Should be a valid input to
np.random.default_rng.
- Return type:
- Returns:
The sampled double-factorized Hamiltonian.