netket.sampler.resetΒΆ

netket.sampler.reset(sampler, machine, parameters, state=None)ΒΆ

Resets the state of the sampler. To be used every time the parameters are changed.

Parameters
  • sampler (Sampler) – The Monte Carlo sampler.

  • machine (Union[Callable, Module]) – A Flax module or callable with the forward pass of the log-pdf. If it is a callable, it should have the signature f(parameters, Οƒ) -> jnp.ndarray.

  • parameters (Any) – The PyTree of parameters of the model.

  • state (Optional[SamplerState]) – The current state of the sampler. If not specified, it will be constructed by calling sampler.init_state(machine, parameters) with a random seed.

Return type

SamplerState

Returns

A valid sampler state.