View source on GitHub |
Generates a random interaction operator with non-zero coefficients only on terms corresponding to the given number of unique orbitals.
openfermion.testing.random_interaction_operator_term(
order: int, real: bool = True, seed: Optional[int] = None
) -> 'openfermion.InteractionOperator'
The number of orbitals is equal to the given order.
Args | |
---|---|
order
|
How many unique orbitals the non-zero terms should correspond to. |
real
|
Whether or not the coefficients should be real. Defaults to True. |
seed
|
The seed. If None (default), uses np.random. |