# 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 module mirrors the standard netket module structure, and we suggest to use it as follows:

import netket as nk
import netket.experimental as nkx


## Samplers#

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 hypothesis 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.

 sampler.MetropolisPtSampler Metropolis-Hastings with Parallel Tempering sampler. sampler.MetropolisLocalPt Sampler acting on one local degree of freedom. sampler.MetropolisExchangePt 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$$. sampler.MetropolisSamplerPmap Metropolis-Hastings sampler for an Hilbert space according to a specific transition rule where chains are split among the available devices (jax.devices()).

## Logging#

This module contains experimental loggers that can be used with the optimization drivers.

 logging.HDF5Log HDF5 Logger, that can be passed with keyword argument logger to Monte Carlo drivers in order to serialize the output data of the simulation.

## Variational State Interface#

 vqs.variables_from_file Loads the variables of a variational state from a .mpack file. vqs.variables_from_tar Loads the variables of a variational state from the i-th element of a .tar archive.

## Time Evolution Driver#

Apple ARM (M1) processors

Those drivers are automatically jitted with jax.jit. To disable jitting set

netket.config.netket_disable_ode_jit = True


or set the equivalent environment variable.

 TDVP Variational time evolution based on the time-dependent variational principle which, when used with Monte Carlo sampling via netket.vqs.MCState, is the time-dependent VMC (t-VMC) method. driver.TDVPSchmitt Variational time evolution based on the time-dependent variational principle which, when used with Monte Carlo sampling via netket.vqs.MCState, is the time-dependent VMC (t-VMC) method.

## ODE Integrators#

This is a collection of ODE integrators that can be used with the TDVP driver above.

Apple ARM (M1) processors

Those drivers are automatically jitted with jax.jit. To disable jitting set

netket.config.netket_disable_ode_jit = True


or set the equivalent environment variable.

 dynamics.Euler The canonical first-order forward Euler method. dynamics.Heun The second order Heun's method. dynamics.Midpoint The second order midpoint method. dynamics.RK12 The second order Heun's method. dynamics.RK23 2nd order adaptive solver with 3rd order error control, using the Bogacki–Shampine coefficients dynamics.RK4 The canonical Runge-Kutta Order 4 method. dynamics.RK45 Dormand-Prince's 5/4 Runge-Kutta method.

## Fermions#

This modules contains hilbert space and operator implementations of fermions in second quantization. It is experimental until it has been thoroughly tested by the community, meaning feedback is welcome.

 hilbert.SpinOrbitalFermions Hilbert space for 2nd quantization fermions with spin s distributed among n_orbital orbitals.
 operator.FermionOperator2nd A fermionic operator in $$2^{nd}$$ quantization. operator.fermion.create Builds the fermion creation operator $$\hat{a}^\dagger$$ acting on the site-th of the Hilbert space hilbert. operator.fermion.destroy Builds the fermion destruction operator $$\hat{a}$$ acting on the site-th of the Hilbert space hilbert. operator.fermion.number Builds the number operator $$\hat{a}^\dagger\hat{a}$$ acting on the site-th of the Hilbert space hilbert.