|ψ⟩ register A
|φ⟩ register B
ancilla qubit
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.
Quantum machine learning algorithms need a way to measure "how similar" two data points are once they've been encoded as quantum states — that's exactly what the swap test provides. This simulator renders three qubits in 3D: two data registers, A and B, each an independently controllable point on its own Bloch sphere, and a third ancilla qubit wired through a Hadamard–controlled-SWAP–Hadamard circuit. Firing a batch of shots samples real Born-rule outcomes from the true fidelity between the two states, and the running measured statistics visibly converge toward the exact overlap as more shots accumulate — the same statistical process that underlies quantum k-means, quantum kNN and quantum kernel classifiers.