qib.lattice.integer_lattice.IntegerLattice

class qib.lattice.integer_lattice.IntegerLattice(shape: Sequence[int], pbc=False)[source]

Bases: AbstractLattice

n-dimensional integer lattice.

Methods

adjacency_matrix

Construct the adjacency matrix, indicating nearest neighbors.

adjacency_matrix_axis_shift

Construct the adjacency matrix along axis d and shift s.

coord_to_index

Map lattice coordinate to linear index.

index_to_coord

Map linear index to lattice coordinate.

Attributes

ndim

Number of spatial dimensions.

nsites

Number of lattice sites.

adjacency_matrix()[source]

Construct the adjacency matrix, indicating nearest neighbors.

adjacency_matrix_axis_shift(d: int, s: int)[source]

Construct the adjacency matrix along axis d and shift s.

coord_to_index(c) int[source]

Map lattice coordinate to linear index.

index_to_coord(i: int) tuple[source]

Map linear index to lattice coordinate.

property ndim: int

Number of spatial dimensions.

property nsites: int

Number of lattice sites.