GPU Simulator
Pick a circuit and a size, run it on your CPU in float64 and on your GPU in float32, and see the wall time, the most probable states, the largest statevector each can hold under a stated budget, and exactly how far the two answers drift apart. Chrome, Edge and Safari 17+; Firefox behind a flag; CPU-only everywhere else.
Results
This machine
Asking the browser for a WebGPU adapter…
CPU · float64
GPU · float32
Not available in this browser.
What this measures
Both columns run the identical circuit through the same gate list — one 2×2 matrix per single-qubit gate, a control mask for CX and Toffoli, an index swap for SWAP. Runs of single-qubit gates on one qubit are multiplied into a single matrix first (that is the “passes” number: fewer passes than gates), because on a GPU every pass is a full sweep over the statevector.
The CPU column is the float64 engine every other page on this site uses. The GPU column is the same arithmetic in float32 inside a WebGPU compute shader: 2^N complex amplitudes in one storage buffer, one shader invocation per amplitude pair, and a dynamic-offset uniform holding the matrix.
Memory is the wall, not time
This is a statevector simulator: it stores every amplitude. That is 2^N × 8 bytes of float32 on the GPU and 2^N × 16 bytes of float64 on the CPU — 8 MB at 20 qubits, 2 GB at 28. No amount of compute changes that, which is why the probe reports the largest N that fits a memory budget as well as a time budget, and why it stops when your GPU’s maximum storage-buffer size says so.
Watch the ladder: the GPU’s time per rung barely moves until the state is a few million amplitudes, then doubles per qubit like the CPU’s does. Below that, a fixed cost per pass — command encoding, the readback of a few kilobytes of results — dominates, and the CPU wins.
float32 is not float64
A float32 amplitude carries about seven significant digits; a float64 one about sixteen. Each gate rounds once, and the rounding errors random-walk, so after a few hundred gates the GPU state differs from the CPU state by a few parts in ten million. “Max |Δ amplitude|” above is that gap, measured — not estimated — by reading both statevectors back and comparing every entry. For sampling measurement outcomes it is invisible; for computing a phase to twelve digits it is not.
Where it runs
WebGPU ships in Chrome and Edge 113+, and Safari 17+ on macOS, iOS and iPadOS. Firefox has it behind dom.webgpu.enabled in about:config. Anywhere else, and on any machine whose GPU the browser blocklists, this page falls back to the CPU column and says so — it never invents a GPU result.