openfermion.testing.random_interaction_operator

Generate a random instance of InteractionOperator.

n_orbitals The number of orbitals.
expand_spin Whether to expand each orbital symmetrically into two spin orbitals. Note that if this option is set to True, then the total number of orbitals will be doubled.
real Whether to use only real numbers.
seed A random number generator seed.