netket.graph.Hypercube¶

netket.graph.Hypercube(length, n_dim=1, *, pbc=True)[source]¶

A hypercube lattice of side L in d dimensions. Periodic boundary conditions can also be imposed.

Constructs a new Hypercube given its side length and dimension.

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

  • n_dim (int) – Dimension of the hypercube; must be at least 1.

  • pbc (bool) – If True then the constructed hypercube will have periodic boundary conditions, otherwise open boundary conditions are imposed.

Return type

netket.graph.grid.Grid

Examples

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

>>> import netket
>>> g = netket.graph.Hypercube(10, n_dim=3, pbc=True)
>>> print(g.n_nodes)
1000
Return type

Grid

Parameters
  • length (int) –

  • n_dim (int) –

  • pbc (bool) –