qib.lattice.brick_lattice.BrickLattice¶
- class qib.lattice.brick_lattice.BrickLattice(shape: Sequence[int], pbc=False, delete=False, convention: ShiftedLatticeConvention = ShiftedLatticeConvention.COLS_SHIFTED_UP)[source]¶
Bases:
AbstractLatticeBrick lattice. The lattice has n full rectangles per row and m full rectangles per column.
Methods
Construct the adjacency matrix, indicating nearest neighbors. Brick lattice embedded in a square grid::.
Map lattice coordinate to the equivalent square lattice coordinate.
Map linear index to the equivalent square lattice coordinate.
Attributes
Number of spatial dimensions.
Number of lattice sites.
- adjacency_matrix()[source]¶
Construct the adjacency matrix, indicating nearest neighbors. Brick lattice embedded in a square grid:
_ _ _ | |_| |_| | |_| |_| |_| . |_| |_| .
If delete == True, the 2 extra points are eliminated from the adjacency matrix. Otherwise, they are just disconnected (corresponding rows and columns are 0)
- coord_to_index(c) int[source]¶
Map lattice coordinate to the equivalent square lattice coordinate. If delete=True the two extra points of the equivalent square lattice are not counted in.