netket.errors.InitializePeriodicLatticeOnSmallLatticeWarning#
- exception netket.errors.InitializePeriodicLatticeOnSmallLatticeWarning[source]#
Warning thrown when attempting to create a periodic lattice on a lattice with less than two sites in one direction.
In a periodic lattice with two sites (a, b) in one direction, the expected behavior is to have an edge connecting both a->b and b->a
However, as the lattice uses an undirected graph to represent the lattice, it does not support this behavior. Hence, only one edge a->b is created, which makes the behavior equivalent to an open boundary condition in this direction.
This may cause unexpected behavior if you intend to loop over the edges to create a Hamiltonian, for example.
To avoid this warning, consider either using a lattice with more than two sites in the direction you want to be periodic, or define the graph using
Graph
by adding the edges manually.