qemcmc.spectralgap ================== .. py:module:: qemcmc.spectralgap Classes ------- .. autoapisummary:: qemcmc.spectralgap.SpectralGap Module Contents --------------- .. py:class:: SpectralGap(proposal: qemcmc.sampler.Proposal, model: qemcmc.model.energy_model.EnergyModel, temp: float = 1.0) Bases: :py:obj:`qemcmc.sampler.runners.Runner` Class that finds the spectral gap, and the acceptance and proposal matrices for a given mcmc. .. py:attribute:: proposal .. py:attribute:: model .. py:attribute:: temp :value: 1.0 .. py:method:: find_acceptance_matrix() Function to find the acceptance matrix for a given model instance. :returns: The acceptance matrix for the mcmc :rtype: A (np.ndarray) .. py:method:: find_proposal_matrix_local() Function to find the proposal matrix for a given local chain. :returns: The Q matrix for local proposal :rtype: Q (np.ndarray) .. py:method:: find_proposal_matrix_uniform() Function to find the proposal matrix for a given uniform chain. :returns: The Q matrix for uniform proposal :rtype: Q (np.ndarray) .. py:method:: find_proposal_matrix_quantum() Function to find the proposal matrix for a given QeMCMCChain object. :returns: The Q matrix for quantum proposal :rtype: Q (np.ndarray) .. py:method:: find_proposal_matrix_brute_force(multiple=100) .. py:method:: find_proposal_matrix() Function to find the proposal matrix for a given mcmc. This is not done by brute force .. py:method:: find_spectral_gap(A=None, Q=None) Function to find the spectral gap of a given mcmc. :param A (np.ndarray): The acceptance matrix for the mcmc (optional, if not given, will be calculated) :param Q (np.ndarray): The proposal matrix for the mcmc (optional, if not given, will be calculated)