qib.lattice.fully_connected_lattice.FullyConnectedLattice

class qib.lattice.fully_connected_lattice.FullyConnectedLattice(shape: int | Sequence[int])[source]

Bases: AbstractLattice

Fully connected lattice of n elements. Can be used to represent orbitals in a molecule

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.