Desktop dashboard and simulation workflow for studying QAOA-based annealing on RBM-inspired Ising models.
The project lets you sweep delta_t, compare estimated kappa against KL-divergence, and generate plots and result files for different visible/hidden-node configurations.
This repository contains two main usage paths:
-
beta_kl_dashboard.pyOpens a Tkinter desktop dashboard for interactive parameter sweeps and live plotting. -
QAOAAnnealing_Modified.pyRuns the simulation directly from the command line for scripted experiments.
Supporting modules:
plot_beta_vs_kl.pyLoads saved results and exports a styledKappa vs KL-Divergencefigure.rbm_config.pyBuilds RBM parameter configurations shared across the workflow.rbm_kl_curve.pyGenerates the analytical KL-vs-kappa reference curve.
- Python 3
- Qiskit
- Qiskit Aer
- Qiskit Optimization
- NumPy
- SciPy
- Matplotlib
Install everything with:
python -m venv .venv
.\.venv\Scripts\activate
pip install -r requirements.txtIf you want a one-step launcher on Windows, use:
.\run_dashboard.ps1Or the double-clickable wrapper:
.\run_dashboard.bat.\.venv\Scripts\python.exe .\beta_kl_dashboard.pyThe launcher is the safer option on a fresh checkout because it creates the virtual environment automatically when needed. If it reports that Tkinter could not initialize, repair or reinstall your local Python with Tcl/Tk support and rerun the launcher.
The dashboard supports:
delta_tsweep ranges- number of sweep points
- circuit depth and shots
- number of visible and hidden nodes
- annealing schedule selection
- Hamiltonian normalization selection
- optional sampled-count threshold filtering
- saved plots and JSON outputs for each run
Example:
.\.venv\Scripts\python.exe .\QAOAAnnealing_Modified.py --delta-t-values 0.01 0.02 0.03 --reps 100 --shots 1000000 --num-visible-nodes 7 --num-hidden-nodes 2 --hamiltonian-normalization largest-eigenvalueUseful options include:
--delta-t-values--delta-t-file--reps--shots--num-visible-nodes--num-hidden-nodes--annealing-schedule--enable-count-threshold-filter--rbm-seed--hamiltonian-normalization--kappa-estimator--execution-mode--aer-device
linearUsesgamma(u) = uandbeta(u) = 1 - u.dwave-likeUses the smooth D-Wave-inspired cubic schedule present in the project.linear-to-dwaveBlends from the linear schedule toward the D-Wave-like schedule around the normalized midpoint, nearkappa ~= 0.5.
max-coefficientDivides the Ising Hamiltonian by the largest absolute Pauli coefficient.largest-eigenvalueDivides the Ising Hamiltonian by its spectral radius,max(|lambda_max|, |lambda_min|).
Typical runs can generate:
- results JSON files with
delta_t,kappa_hat,kl_divergence, RBM sizes, seed, and normalization metadata - a final
Kappa vs KL-Divergenceplot - an optional minimum-KL diagnostic plot
Hidden nodesrefers to the size of a single hidden RBM layer.- If
--rbm-seedis omitted, a fresh random seed is generated and saved with the results. - The analytical reference curve reuses the same saved RBM seed so the comparison stays consistent with the sampled run.
- On this Windows setup, Aer currently reports CPU-only availability.