netket.graph.Chain

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

Constructs a chain of length sites. Periodic boundary conditions can also be imposed

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

  • pbc (bool) – Whether the chain should have periodic boundary conditions

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

Lattice