netket.experimental.sampler.MetropolisLocalPt¶

class netket.experimental.sampler.MetropolisLocalPt(hilbert, *args, **kwargs)

Sampler acting on one local degree of freedom.

This sampler acts locally only on one local degree of freedom $$s_i$$, and proposes a new state: $$s_1 \dots s^\prime_i \dots s_N$$, where $$s^\prime_i \neq s_i$$.

The transition probability associated to this sampler can be decomposed into two steps:

1. One of the site indices $$i = 1\dots N$$ is chosen with uniform probability.

2. Among all the possible ($$m$$) values that $$s_i$$ can take, one of them is chosen with uniform probability.

For example, in the case of spin $$1/2$$ particles, $$m=2$$ and the possible local values are $$s_i = -1,+1$$. In this case then MetropolisLocal is equivalent to flipping a random spin.

In the case of bosons, with occupation numbers $$s_i = 0, 1, \dots n_{\mathrm{max}}$$, MetropolisLocal would pick a random local occupation number uniformly between $$0$$ and $$n_{\mathrm{max}}$$.

Parameters
• hilbert – The hilbert space to sample

• n_chains – The number of Markov Chain to be run in parallel on a single process.

• n_sweeps – The number of exchanges that compose a single sweep. If None, sweep_size is equal to the number of degrees of freedom being sampled (the size of the input vector s to the machine).

• n_chains – The number of batches of the states to sample (default = 8)

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

• dtype – The dtype of the statees sampled (default = np.float32).