netket.graph.Chain

netket.graph.Chain(length, *, pbc=True)[source]

A chain of L sites. Periodic boundary conditions can also be imposed

Constructs a new Chain given its length.

Parameters
  • length (int) – Length of the chain. It must always be >=1

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

Return type

netket.graph.grid.Grid

Examples

A 10 site chain with periodic boundary conditions can be constructed as follows:

>>> import netket
>>> g = netket.graph.Chain(10, pbc=True)
>>> print(g.n_nodes)
10
Return type

Grid

Parameters