spectralgap
qemcmc.spectralgap ¶
SpectralGap ¶
Bases: Runner
Class that finds the spectral gap, and the acceptance and proposal matrices for a given mcmc.
Source code in src/qemcmc/spectralgap.py
find_acceptance_matrix ¶
Function to find the acceptance matrix for a given model instance.
Returns: A (np.ndarray): The acceptance matrix for the mcmc
Source code in src/qemcmc/spectralgap.py
find_proposal_matrix_local ¶
Function to find the proposal matrix for a given local chain.
Returns: Q (np.ndarray): The Q matrix for local proposal
Source code in src/qemcmc/spectralgap.py
find_proposal_matrix_uniform ¶
Function to find the proposal matrix for a given uniform chain.
Returns: Q (np.ndarray): The Q matrix for uniform proposal
Source code in src/qemcmc/spectralgap.py
find_proposal_matrix_quantum ¶
Function to find the proposal matrix for a given QeMCMCChain object.
Returns: Q (np.ndarray): The Q matrix for quantum proposal
Source code in src/qemcmc/spectralgap.py
find_proposal_matrix ¶
Function to find the proposal matrix for a given mcmc. This is not done by brute force
Source code in src/qemcmc/spectralgap.py
find_spectral_gap ¶
Function to find the spectral gap of a given mcmc.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
A
|
The acceptance matrix for the mcmc (optional, if not given, will be calculated) |
None
|
|
Q
|
The proposal matrix for the mcmc (optional, if not given, will be calculated) |
None
|