netket.sampler.MetropolisSamplerState#

class netket.sampler.MetropolisSamplerState[source]#

Bases: SamplerState

State for a Metropolis sampler.

Contains the current configuration, the RNG state and the (optional) state of the transition rule.

Inheritance
Inheritance diagram of netket.sampler.MetropolisSamplerState
Attributes
acceptance#

The fraction of accepted moves across all chains and MPI processes.

The rate is computed since the last reset of the sampler. Will return None if no sampling has been performed since then.

n_accepted#

Total number of moves accepted across all processes since the last reset.

n_steps#

Total number of moves performed across all processes since the last reset.

σ: Array#

Current batch of configurations in the Markov chain.

rng: Array#

State of the random number generator (key, in jax terms).

rule_state: Optional[Any]#

Optional state of the transition rule.

n_steps_proc: int#

Number of moves performed along the chains in this process since the last reset.

n_accepted_proc: Array#

Number of accepted transitions among the chains in this process since the last reset.

Methods
replace(**kwargs)#

Replace the values of the fields of the object with the values of the keyword arguments. If the object is a dataclass, dataclasses.replace will be used. Otherwise, a new object will be created with the same type as the original object.

Return type:

TypeVar(P, bound= Pytree)

Parameters:
  • self (P)

  • kwargs (Any)