netket.sampler.reset¶

netket.sampler.reset(sampler, machine, parameters, state=None)[source]¶

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.

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

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

Return type

SamplerState

Returns

A valid sampler state.