openfermion.utils.HubbardLattice

Base class for a Hubbard model lattice.

Subclasses must define the following properties: n_dofs (int): The number of degrees of freedom per site (and spin if applicable). n_sites (int): The number of sites in the lattice. spinless (bool): Whether or not the fermion has spin (False if so). edge_types (Tuple[Hashable, ...]): The types of edges that a term could correspond to. Examples include 'onsite', 'neighbor', 'diagonal_neighbor', etc. onsite_edge_types (Sequence[Hashable]): The edge types that connect sites to themselves.

And the following methods: site_pairs_iter(edge_type: Hashable)
-> Iterable[Tuple[int, int]]: Iterable over pairs of sites corresponding to the given edge type.

For 'spinful' lattices, the spin_indices 0 and 1 correspond to 'up' and 'down', respectively.

dof_indices

edge_types The types of edges that a term could correspond to.

Examples include 'onsite', 'neighbor', 'diagonal_neighbor', etc.

n_dofs The number of degrees of freedom per site (and spin if applicable).
n_sites The number of sites in the lattice.
n_spin_orbitals

n_spin_orbitals_per_site

n_spin_values

onsite_edge_types The edge types that connect sites to themselves.
site_indices

spin_indices

spinless Whether or not the fermion has spin (False if so).

Methods

dof_index_offset

View source

dof_pairs_iter

View source

from_spin_orbital_index

View source

site_index_offset

View source

site_pairs_iter

View source

Iterable over pairs of sites corresponding to the given edge type.

spin_pairs_iter

View source

to_spin_orbital_index

View source

The index of the spin orbital.

validate_dof

View source

validate_dofs

View source

validate_edge_type

View source