This repository provides three self-contained folders—fig4/, fig5/, and fig6/—for reproducing the figures from Operator-Level Quantum Acceleration of Non-Logconcave Sampling (PDF).
fig4/ — MALA vs. Quantum-accelerated LD (with Gibbs) on Müller–Brown potential and panel visualization
Contents
-
QSVT_filter_construction/Helper routines used by the quantum-accelerated pipeline:smoothStep.mchebyshev_coeffs_fft.mfilter_total.m
-
Q_accelerated_LD.mRuns the quantum-accelerated Langevin dynamics (QSVT-based pipeline). Saves todata/:beta04QSVT.mat,beta06QSVT.mat,beta08QSVT.mat(variable:probability_final)gibbs_04.mat,gibbs_06.mat,gibbs_08.mat(variable: true distributiongibbs_state)All_Overlap_QSVT.mat(variable:All_Overlap, 1×3)
-
MALA.mRuns MALA sampling for β ∈ {0.4, 0.6, 0.8}. Saves todata/:beta04MALA.mat,beta06MALA.mat,beta08MALA.mat(variable:density_storage)All_Overlap_MALA.mat(variable:All_Overlap, 1×3)
-
draw_fig4.mLoads the above.matfiles and draws the 3×3 panel (MALA / QSVT / Gibbs). -
data/Created automatically after you run the MATLAB scripts.
How to run (order)
-
Open MATLAB and
cdintofig4/. -
Run
Q_accelerated_LD.m(this creates the QSVT and Gibbs files indata/). -
Run
MALA.m(this creates the MALA files andAll_Overlap_MALA.mat). -
Run
draw_fig4.mto generate the figure.- Tip: If
parforis unavailable, change it toforin the scripts.
- Tip: If
Contents
-
main_fig_5.m(MATLAB) Computes spectral gaps for a range of β and stores results only (no plotting). Saves todata/(each file also contains the vectorbeta):spectral_gap.mat(variable:spectral_gap)spectral_gap_cla.mat(variable:spectral_gap_cla)spectral_gap_witten_lap.mat(variable:spectral_gap_witten_lap)spectral_gap_Lx_witten.mat(variable:spectral_gap_Lx_witten)
-
draw_fig5.py(Python) Reads the.matfiles underdata/and plots1/Gapon a semilog-y axis, writinglog-beta-gap.pdf.- Requires:
numpy,matplotlib,scipy(and optionally LaTeX ifusetex=True).
- Requires:
-
log-beta-gap.pdfProduced bydraw_fig5.py. -
data/Output folder created bymain_fig_5.m.
How to run (order)
-
Open MATLAB and
cdintofig5/, then run:main_fig_5This will populate
fig5/data/with the four.matfiles. -
Run the Python plotter:
# From the same folder (or anywhere): python draw_fig5.pyThe script saves
log-beta-gap.pdfnext to itself.
This folder contains scripts to (i) run the Lindblad dynamics for chosen inverse temperatures β and save the time–overlap data, and (ii) generate the final figure from the saved outputs.
Contents
-
main1_fig6.py(Python)
Runs the simulation for a specified β, saves overlap data and (optionally) a quick diagnostic plot.
You typically run this script multiple times, changing β each time. -
figure_beta_git.py(Python)
Reads the saved results produced bymain1_fig6.py(for multiple β values) and generates the final figure for the paper / GitHub. -
*.pdf(outputs)
Final figure produced byfigure_beta_git.py(filename depends on the script settings).
Install dependencies (recommended: use a virtual environment):
pip install numpy scipy matplotlib h5py