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 >=1pbc (
bool
) – Whether the chain should have periodic boundary conditionskwargs – Additional keyword arguments are passed on to the constructor of netket.graph.Lattice.
- Return type:
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