Current state |q₀q₁q₂⟩ Other basis states
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

Toffoli Gate (CCNOT) Simulator

The Toffoli gate — also called CCNOT, the doubly-controlled NOT — is the workhorse of reversible and universal quantum computation. This simulator lays out all 8 three-qubit basis states |000⟩ through |111⟩ as the corners of a cube, lets you toggle two control bits and a target bit by hand, and applies the real Toffoli permutation on demand: the target flips only when both controls are 1. Live readouts track the current state index, how many times the gate has been applied, and whether the gate would flip the target from the current register, while a randomize button seeds a fresh starting state so the cube is never empty on load.