qemcmc.sampler.proposal

Classes

Proposal

Abstract base class for producing proposals for Markov Chain Monte Carlo algorithms.

Module Contents

class qemcmc.sampler.proposal.Proposal(model: qemcmc.model.EnergyModel)[source]

Bases: abc.ABC

Abstract base class for producing proposals for Markov Chain Monte Carlo algorithms.

Subclasses implement the proposal mechanism by defining an update(state) method that generates a candidate state from the current one (e.g. single-spin flips, block updates, or quantum proposals).

Parameters:

model (EnergyModel) – Energy model defining the target distribution over spin configurations.

model[source]
n_spins[source]
abstractmethod update(state: qemcmc.utils.MCMCState) qemcmc.utils.MCMCState[source]

Generate a candidate state from the current state using the proposal mechanism.

This method should be implemented by subclasses to define the specific proposal strategy (e.g., single-spin flips, block updates, or quantum proposals).

Parameters:

state (MCMCState) – The current state of the Markov chain.

Returns:

A new candidate state.

Return type:

MCMCState