cuqi.experimental.mcmc.PCN.get_state#

PCN.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, …

}

}