qib.lattice.abstract_lattice.AbstractLattice

class qib.lattice.abstract_lattice.AbstractLattice[source]

Bases: ABC

Parent class for lattices.

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.

abstract adjacency_matrix()[source]

Construct the adjacency matrix, indicating nearest neighbors.

abstract coord_to_index(c) int[source]

Map lattice coordinate to linear index.

abstract index_to_coord(i: int) tuple[source]

Map linear index to lattice coordinate.

abstract property ndim: int

Number of spatial dimensions.

abstract property nsites: int

Number of lattice sites.