sampler_state(sampler, machine, parameters)¶
Creates the structure holding the state of the sampler.
If you want reproducible samples, you should specify seed, otherwise the state will be initialised randomly.
If running across several MPI processes, all sampler_states are guaranteed to be in a different (but deterministic) state.
This is achieved by first reducing (summing) the seed provided to every MPI rank, then generating n_rank seeds starting from the reduced one, and every rank is initialized with one of those seeds.
- Return type
The structure holding the state of the sampler. In general you should not expect it to be in a valid state, and should reset it before use.