We're celebrating World Quantum Day 2022! Join us

Module: openfermion.hamiltonians


general_hubbard module: This module constructs Hamiltonians for the multiband Fermi-Hubbard model.

hartree_fock module: Module performs gradient based RHF, [WIP] UHF, [WIP] GHF

hubbard module: This module constructs Hamiltonians for the Fermi- and Bose-Hubbard models.

jellium module: This module constructs Hamiltonians for the uniform electron gas.

jellium_hf_state module: This module constructs the uniform electron gas' Hartree-Fock state.

special_operators module: Commonly used operators (mainly instances of SymbolicOperator).


class FermiHubbardModel: A general, parameterized Fermi-Hubbard model.

class HartreeFockFunctional: Implementation of the objective function code for Restricted Hartree-Fock


bose_hubbard(...): Return symbolic representation of a Bose-Hubbard Hamiltonian.

dual_basis_external_potential(...): Return the external potential in the dual basis of arXiv:1706.00023.

dual_basis_jellium_model(...): Return jellium Hamiltonian in the dual basis of arXiv:1706.00023

dual_basis_kinetic(...): Return the kinetic operator in the dual basis of arXiv:1706.00023.

dual_basis_potential(...): Return the potential operator in the dual basis of arXiv:1706.00023

fermi_hubbard(...): Return symbolic representation of a Fermi-Hubbard Hamiltonian.


get_matrix_of_eigs(...): Transform the eigenvalues into a matrix corresponding

hartree_fock_state_jellium(...): Give the Hartree-Fock state of jellium.

hypercube_grid_with_given_wigner_seitz_radius_and_filling(...): Return a Grid with the same number of orbitals along each dimension


jellium_model(...): Return jellium Hamiltonian as FermionOperator class.

jordan_wigner_dual_basis_hamiltonian(...): Return the dual basis Hamiltonian as QubitOperator.

jordan_wigner_dual_basis_jellium(...): Return the jellium Hamiltonian as QubitOperator in the dual basis.

lowest_single_particle_energy_states(...): Find the lowest single-particle states of the given Hamiltonian.

majorana_operator(...): Initialize a Majorana operator.

mean_field_dwave(...): Return symbolic representation of a BCS mean-field d-wave Hamiltonian.


number_operator(...): Return a fermionic or bosonic number operator.

plane_wave_external_potential(...): Return the external potential operator in plane wave basis.

plane_wave_hamiltonian(...): Returns Hamiltonian as FermionOperator class.

plane_wave_kinetic(...): Return the kinetic energy operator in the plane wave basis.

plane_wave_potential(...): Return the e-e potential operator in the plane wave basis.

rhf_func_generator(...): Generate the energy, gradient, and unitary functions

rhf_minimization(...): Perform Hartree-Fock energy minimization

rhf_params_to_matrix(...): For restricted Hartree-Fock we have nocc * nvirt parameters. These are

s_plus_operator(...): Return the s+ operator.

s_squared_operator(...): Return the s^{2} operator.

sx_operator(...): Return the sx operator.

sy_operator(...): Return the sy operator.

sz_operator(...): Return the sz operator.


wigner_seitz_length_scale(...): Function to give length_scale associated with Wigner-Seitz radius.