SPSA Optimizer: Noisy Quantum Landscapes
Watch Simultaneous Perturbation Stochastic Approximation (SPSA) descend a rugged, shot-noise-corrupted quantum cost landscape using only two circuit evaluations per step, and compare its resilience against measurement noise in 3D.
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 3D surface, 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, and reshuffle the landscape's ruggedness to watch the optimizer either find the gold global minimum or get trapped near a shallower local one.
Watch Simultaneous Perturbation Stochastic Approximation (SPSA) descend a rugged, shot-noise-corrupted quantum cost landscape using only two circuit evaluations per step, and see how noise and gain-sequence tuning change whether it finds the true global minimum.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install