ffsim.random.random_fermion_operator¶
- ffsim.random.random_fermion_operator(norb, n_terms=None, max_term_length=None, seed=None)[source]¶
Sample a random fermion operator.
- Parameters:
norb (
int) – The number of spatial orbitals.n_terms (
int|None) – The number of terms to include in the operator. If not specified,norbis used.max_term_length (
int|None) – The maximum length of a term. If not specified,norbis used.seed – A seed to initialize the pseudorandom number generator. Should be a valid input to
np.random.default_rng.
- Return type:
- Returns:
The sampled fermion operator.