Home▸Quantum Physics▸SPSA Optimizer: 2D Cost-Landscape Map

SPSA Optimizer: 2D Cost-Landscape Map

Interactive 2D top-down heatmap of a rugged, shot-noise-corrupted quantum cost landscape: watch Simultaneous Perturbation Stochastic Approximation (SPSA) descend it using only two circuit evaluations per step, then pan and zoom the map to inspect the trail and the global minimum.

Quantum Physics2DAdvanced60 FPS📱 Mobile-adapted⇄ 3D version
2d-qe-topic-43 ↗ Open standalone

Real quantum computers never hand a variational algorithm an exact gradient — every circuit run is a noisy, finite-shot measurement. This simulator renders a rugged two-parameter cost landscape (as you'd get from a small VQE or QAOA ansatz) as a top-down 2D heatmap, then runs the Simultaneous Perturbation Stochastic Approximation algorithm on it: SPSA perturbs both parameters at once along a single random direction and needs only two noisy circuit evaluations per step, regardless of how many parameters the ansatz has. Dial up the shot noise to see the trail wobble and stall, tune the step-size and perturbation gain sequences to see it recover, reshuffle the landscape's ruggedness to watch the optimizer either find the gold global minimum or get trapped near a shallower local one, and drag/scroll the map to zoom in on exactly how the walk unfolded.

⚙ Under the hood

Interactive 2D top-down heatmap of a rugged, shot-noise-corrupted quantum cost landscape: watch Simultaneous Perturbation Stochastic Approximation (SPSA) descend it using only two noisy circuit evaluations per step, then drag to pan and scroll to zoom in on the trail and the global minimum.

SPSAVQEquantum optimizationshot noisegradient-freeQAOA

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)