netket.operator.Heisenberg

netket.operator.Heisenberg(hilbert, J=1, sign_rule=None)[source]

Constructs a new Heisenberg given a hilbert space.

Parameters
  • hilbert – Hilbert space the operator acts on.

  • J – The strength of the coupling. Default is 1.

  • sign_rule – If enabled, Marshal’s sign rule will be used. On a bipartite lattice, this corresponds to a basis change flipping the Sz direction at every odd site of the lattice. For non-bipartite lattices, the sign rule cannot be applied. Defaults to True if the lattice is bipartite, False otherwise.

Examples

Constructs a Heisenberg operator for a 1D system.

>>> import netket as nk
>>> g = nk.graph.Hypercube(length=20, n_dim=1, pbc=True)
>>> hi = nk.hilbert.Spin(s=0.5, total_sz=0, graph=g)
>>> op = nk.operator.Heisenberg(hilbert=hi)
>>> print(op.hilbert.size)
20