Home▸Quantum Computing▸Swap Test: Estimating State Overlap from Ancilla Readout and the Shot Budget

Swap Test: Estimating State Overlap from Ancilla Readout and the Shot Budget

Compare two quantum states without learning either one. An ancilla qubit controls a swap of two data qubits, and the chance of reading 0 is one half plus half the squared overlap. Set both states on the Bloch sphere and watch shots accumulate into an overlap estimate with a shrinking error bar. Change the angles, readout error and shots per experiment to see the estimator distribution and the shot budget. A Blender-built circuit board, gates, dial and Bloch spheres, with a real three-qubit state-vector check built in.

Quantum Computing3DModerate60 FPS📱 Mobile-adapted🟠 Blender⇄ 2D version
Swap Test: Estimating State Overlap from Ancilla Readout and the Shot Budget ↗ Open standalone

Compare two quantum states without learning either one. An ancilla qubit controls a swap of two data qubits, and the chance of reading 0 is one half plus half the squared overlap. Set both states on the Bloch sphere and watch shots accumulate into an overlap estimate with a shrinking error bar. Change the angles, readout error and shots per experiment to see the estimator distribution and the shot budget. A Blender-built circuit board, gates, dial and Bloch spheres, with a real three-qubit state-vector check built in.

⚙ Under the hood

Compare two quantum states without learning either one. An ancilla qubit controls a swap of two data qubits, and the chance of reading 0 is one half plus half the squared overlap. Set both states on the Bloch sphere and watch shots accumulate into an overlap estimate with a shrinking error bar. Change the angles, readout error and shots per experiment to see the estimator distribution and the shot budget. A Blender-built circuit board, gates, dial and Bloch spheres, with a real three-qubit state-vector check built in.

Quantum AtlasAlgorithm VisualizationQuantum ComputingSwap TestState OverlapQuantum AlgorithmBloch SphereShot Noise

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)