qib.lattice.customized_lattice.CustomizedLattice

class qib.lattice.customized_lattice.CustomizedLattice(shape: Sequence[int], adj=typing.Sequence[int])[source]

Bases: AbstractLattice

Lattice built from the adjacency matrix.

Methods

adjacency_matrix

Construct the adjacency matrix, indicating nearest neighbors.

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.

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.