netket.sampler.sample_next

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

Samples the next state in the markov chain.

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.reset(machine, parameters) with a random seed.

Returns

The new state of the sampler σ: The next batch of samples.

Return type

state