netket.graph.Cube

Contents

netket.graph.Cube#

class netket.graph.Cube[source]#

Bases:

Constructs a cubic lattice of side length Periodic boundary conditions can also be imposed

Parameters:
  • length (int) – Side length of the cube; must always be >=1

  • pbc (bool) – Whether the cube should have periodic boundary conditions (in all directions)

  • kwargs – Additional keyword arguments are passed on to the constructor of netket.graph.Lattice.

Return type:

Lattice

Examples

A 10×10×10 cubic lattice with periodic boundary conditions can be constructed as follows:

>>> import netket
>>> g=netket.graph.Cube(10, pbc=True)
>>> print(g.n_nodes)
1000