netket.graph.ChainΒΆ
-
class
netket.graph.
Chain
(length, *, pbc=True, **kwargs)ΒΆ 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.
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