netket.sampler.rules.FermionHopRule

netket.sampler.rules.FermionHopRule#

class netket.sampler.rules.FermionHopRule[source]#

Hopping rule for particles on a lattice.

Works similarly to netket.sampler.rules.ExchangeRule, but takes into account that only occupied orbitals can be exchanged with unoccupied ones.

This sampler conserves the number of particles.

__init__(hilbert, *, clusters=None, graph=None, d_max=1, spin_symmetric=True)[source]#

Constructs the FermionHopRule.

Particles are only exchanged between modes where the particle number is different. For fermions, only occupied orbitals can be exchanged with unoccupied ones.

You can pass either a list of clusters or a netket graph object to determine the clusters to exchange.

Parameters:
  • hilbert – The hilbert space to be sampled.

  • clusters (list[tuple[int, int]] | None) – The list of clusters that can be exchanged. This should be a list of 2-tuples containing two integers. Every tuple is an edge, or cluster of sites to be exchanged.

  • graph (AbstractGraph | None) – A graph, from which the edges determine the clusters that can be exchanged.

  • d_max (int) – Only valid if a graph is passed in. The maximum distance between two sites

  • spin_symmetric (bool) – (default True) If spin_symmetric, the graph must encode the connectivity between the first N physical sites having same spin, and it is replicated using netket.graph.disjoint_union() other every spin subsector. This option conserves the number of fermions per spin subsector. If the graph does not have a number of sites equal to the number of orbitals in the hilbert space, this flag has no effect.