- class netket.graph.Square#
Constructs a square lattice of side length Periodic boundary conditions can also be imposed
int) – Side length of the square; must always be >=1
bool) – Whether the square should have periodic boundary conditions (in both directions)
kwargs – Additional keyword arguments are passed on to the constructor of netket.graph.Lattice.
- Return type:
A 10x10 square lattice with periodic boundary conditions can be constructed as follows:
>>> import netket >>> g=netket.graph.Square(10, pbc=True) >>> print(g.n_nodes) 100