netket.sampler.MetropolisFermionHop

netket.sampler.MetropolisFermionHop#

netket.sampler.MetropolisFermionHop(hilbert, *, clusters=None, graph=None, d_max=1, spin_symmetric=True, dtype=<class 'numpy.int8'>, **kwargs)[source]#

This sampler moves (or hops) a random particle to a different but random empty mode. It works similar to MetropolisExchange, but only allows exchanges between occupied and unoccupied modes.

Parameters:
  • hilbert – The Hilbert space to sample.

  • d_max – The maximum graph distance allowed for exchanges.

  • spin_symmetric – (default True) If True, exchanges are only allowed between modes with the same spin projection.

  • n_chains – The total number of independent Markov chains across all JAX devices. Either specify this or n_chains_per_rank.

  • n_chains_per_rank – Number of independent chains on every JAX device (default = 16).

  • sweep_size – Number of sweeps for each step along the chain. Defaults to the number of sites in the Hilbert space. This is equivalent to subsampling the Markov chain.

  • reset_chains – If True, resets the chain state when reset is called on every new sampling (default = False).

  • machine_pow – The power to which the machine should be exponentiated to generate the pdf (default = 2).

  • dtype – The dtype of the states sampled (default = np.int8).

Return type:

MetropolisSampler