View source on GitHub |
A square lattice for a Hubbard model.
Inherits From: HubbardLattice
openfermion.utils.HubbardSquareLattice(
x_dimension, y_dimension, n_dofs=1, spinless=False, periodic=True
)
Valid edge types are | |
---|---|
|
Methods
delta_mag
delta_mag(
X, Y, by_index=False
)
The distance between sites X and Y in each dimension.
diagonal_neighbors_iter
diagonal_neighbors_iter(
ordered=True
)
dof_index_offset
dof_index_offset(
dof_index
)
dof_pairs_iter
dof_pairs_iter(
exclude_same=False
)
from_site_index
from_site_index(
site_index
)
from_spin_orbital_index
from_spin_orbital_index(
spin_orbital_index
)
horizontal_neighbors_iter
horizontal_neighbors_iter(
ordered=True
)
manhattan_distance
manhattan_distance(
X, Y, by_index=False
)
n_horizontal_neighbor_pairs
n_horizontal_neighbor_pairs(
ordered=True
)
Number of horizontally neighboring (unordered) pairs of sites.
n_neighbor_pairs
n_neighbor_pairs(
ordered=True
)
Number of neighboring (unordered) pairs of sites.
n_vertical_neighbor_pairs
n_vertical_neighbor_pairs(
ordered=True
)
Number of vertically neighboring (unordered) pairs of sites.
neighbors_iter
neighbors_iter(
ordered=True
)
site_index_offset
site_index_offset(
site_index
)
site_pairs_iter
site_pairs_iter(
edge_type, ordered=True
)
Iterable over pairs of sites corresponding to the given edge type.
spin_pairs_iter
spin_pairs_iter(
spin_pairs=openfermion.utils.SpinPairs.ALL
,
ordered=True
)
to_site_index
to_site_index(
site
)
The index of a site.
to_spin_orbital_index
to_spin_orbital_index(
site_index, dof_index, spin_index
)
The index of the spin orbital.
validate_dof
validate_dof(
dof, length=None
)
validate_dofs
validate_dofs(
dofs, length=None
)
validate_edge_type
validate_edge_type(
edge_type
)
vertical_neighbors_iter
vertical_neighbors_iter(
ordered=True
)