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

Returns a generator sampling chain_length elements along the chains.

  • 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.

Return type