netket.sampler.sample_nextΒΆ

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

Samples the next state in the Markov chain.

Parameters
  • sampler (MetropolisSampler) – The Metropolis 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, then initialize and reset it.

Returns

The new state of the sampler. Οƒ: The next batch of samples.

Return type

state