cuqi.experimental.mcmc.Direct.get_state#
- Direct.get_state()#
Return the state of the sampler.
The state is used when checkpointing the sampler.
The state of the sampler is a dictionary with keys ‘metadata’ and ‘state’. The ‘metadata’ key contains information about the sampler type. The ‘state’ key contains the state of the sampler.
For example, the state of a “MH” sampler could be:
- state = {
- ‘metadata’: {
‘sampler_type’: ‘MH’
}, ‘state’: {
‘current_point’: np.array([…]), ‘current_target_logd’: -123.45, ‘scale’: 1.0, …
}
}