netket.sampler.sampleΒΆ

netket.sampler.sample(sampler, machine, parameters, *, state=None, chain_length=1)ΒΆ

Samples chain_length batches of samples along the chains.

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, then initialize and reset it.

  • chain_length (int) – The length of the chains (default = 1).

Returns

The generated batches of samples. state: The new state of the sampler.

Return type

Οƒ