Visualization
August 29, 2026 · View on GitHub
qqa.visualization offers consistent plotting helpers that accept a
backend="matplotlib" | "plotly" argument. Plotly requires the optional
extra pip install qqa[plotly]; missing plotly automatically falls back to
matplotlib with a warning.
Catalog
from qqa import visualization as viz
viz.plot_history(result) # loss / penalty / diversity
viz.plot_best_trajectory(result) # best objective over epochs
viz.plot_schedule(schedule, num_epochs) # bg annealing schedule
viz.plot_run_comparison(results, labels=[...])
viz.plot_parallel_coordinates(df, objective="best_obj", backend="plotly")
viz.plot_solution_heatmap(result, problem)
viz.plot_result_dashboard(result, problem) # four-panel diagnosis
viz.plot_variable_solution(result, problem) # values vs declared bounds
viz.plot_constraint_diagnostics(result, problem) # violation vs tolerance
# Offline-ready interactive HTML + embedded JSON.
qqa.save_html_report(result, problem, "report.html")
The advanced dashboard implementation lives in the responsibility-separated
qqa.visuals package; the stable public functions remain available from
qqa.visualization.
Example: compare multiple runs
import qqa
from qqa import visualization as viz
problem = qqa.SherringtonKirkpatrick(N=80, seed=0)
runs = [
qqa.anneal(problem, num_epochs=600, min_bg=-3, verbose=False),
qqa.anneal(problem, num_epochs=600, min_bg=-1, verbose=False),
]
viz.plot_run_comparison(runs, labels=["min_bg=-3", "min_bg=-1"])
Integration with dashboards
All Plotly figures are raw plotly.graph_objects.Figure instances, so
they drop straight into st.plotly_chart(fig).
Gallery
Figures below are regenerated deterministically by
scripts/make_gallery.py. The full set (eight problems × four plot kinds
plus the annealing schedule) lives under docs/assets/gallery/, alongside
the documentation that consumes it.
Schedule

Per-problem dynamics
| Problem | History | Solution | Population |
|---|---|---|---|
| MIS | ![]() | ![]() | ![]() |
| Max-Cut | ![]() | ![]() | ![]() |
| Coloring | ![]() | — | ![]() |
| Ising 1D | ![]() | ![]() | ![]() |
| EA 3D | ![]() | ![]() | ![]() |
| SK | ![]() | ![]() | ![]() |
| Perceptron | ![]() | ![]() | ![]() |
| Hopfield | ![]() | ![]() | ![]() |
Regenerate with uv run python scripts/make_gallery.py.






















