# Hamiltonian Moves

## MetropolisHamiltonian

NetKet implements sampling based on the off-diagonal elements of the Hamiltonian. In this case, the transition matrix is taken to be:

where $\theta(x)$ is the Heaviside step function, and $\mathcal{N}(\mathbf{s})$ is a state-dependent normalization. The effect of this transition probability is then to connect (with uniform probability) a given state $\mathbf{s}$ to all those states $\mathbf{s}^\prime$ for which the Hamiltonian has finite matrix elements. Notice that this sampler preserves by construction all the symmetries of the Hamiltonian. This is in general not true for the local samplers.

Parameter Possible values Description Default value
None None None None

### Example

pars['Sampler']={
'Name'           : 'MetropolisHamiltonian',
}


## MetropolisHamiltonianPt

This sampler performs parallel-tempering moves in addition to the local moves implemented in MetropolisHamiltonian. The number of replicas can be $N_{\mathrm{rep}}$ chosen by the user.

Parameter Possible values Description Default value
Nreplicas Integer The number of effective temperatures for parallel tempering, $N_{\mathrm{rep}}$ None

### Example

pars['Sampler']={
'Name'           : 'MetropolisHamiltonianPt',
'Nreplicas'           : 64,
}