qib.lattice.odd_face_centered_lattice.OddFaceCenteredLattice¶
- class qib.lattice.odd_face_centered_lattice.OddFaceCenteredLattice(shape: Sequence[int], pbc=False)[source]¶
Bases:
AbstractLatticeModified square lattice in two dimensions, where every “odd” face has an additional vertex at the center. Used for “compact encoding”.
Methods
Construct the adjacency matrix, indicating nearest neighbors.
Map lattice coordinate to linear index.
Find the adjacent "odd" face of edge (i, j), returning the lattice site index of the face, or -1 in case the edge is not adjacent to an odd face.
Map linear index to lattice coordinate.
Attributes
Number of spatial dimensions.
Number of lattice sites.
- adjacency_matrix()[source]¶
Construct the adjacency matrix, indicating nearest neighbors. Each site at an odd face center is considered to be a neighbor of the four corners of the face.