Experimental API

In this page we present some experimental interfaces of NetKet. Those are not guaranteed to be API-stable, and might change without notice (other than the changelog) among minor releases. The netket.experimental modules mirrors the standard netket module structure, and we suggest to use it as follows:

import netket as nk
import netket.experimental as nkx


This module contains the Metropolis Parallel Tempered sampler. This sampler is experimental because we believe it to be correct, but our tests fail. We believe it to be a false negative: possibly the implementation of the sampler is correct, but the test is too tight. Until we will have verified this hypotesis and updated the tests in order not to fail, we provide the current implementation as-is, in the hope that some contributor might take up that work.

The other experimental sampler is MetropolisSamplerPmap, which makes use of jax.pmap to use different GPUs/CPUs without having to use MPI. It should scale much better over several CPUs, but you have to start jax with a specific environment variable.


Metropolis-Hastings with Parallel Tempering sampler.


Sampler acting on one local degree of freedom.


This sampler acts locally only on two local degree of freedom \(s_i\) and \(s_j\), and proposes a new state: \(s_1 \dots s^\prime_i \dots s^\prime_j \dots s_N\), where in general \(s^\prime_i \neq s_i\) and \(s^\prime_j \neq s_j\).


Metropolis-Hastings sampler for an Hilbert space according to a specific transition rule where chains are split among the available devices (jax.devices()).

Variational State Interface


Loads the variables of a variational state from a .mpack file.


Loads the variables of a variational state from the i-th element of a .tar archive.