Generate a random instance of QuadraticHamiltonian.

Used in the notebooks

Used in the tutorials

n_orbitals(int): the number of orbitals conserves_particle_number(bool): whether the returned Hamiltonian should conserve particle number real(bool): whether to use only real numbers
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.