netket.sampler.sampleΒΆ

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

Samples chain_length elements along the chains.

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

  • machine (Union[Callable, Module]) – The model or Callable to sample from (if it’s a function it should have the signature f(parameters, Οƒ) -> jnp.ndarray).

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

  • state (Optional[SamplerState]) – current state of the sampler. If None, then initialises it.

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

Returns

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

Return type

Οƒ