netket.graph.Chain

Contents

netket.graph.Chain#

class netket.graph.Chain[source]#

Bases:

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

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

Return type:

Lattice

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