Home▸Quantum Computing▸Toffoli Gate (CCNOT) Circuit & Hypercube Simulator (2D)

Toffoli Gate (CCNOT) Circuit & Hypercube Simulator

Interactive 2D Toffoli (CCNOT) gate simulator: toggle two control bits and a target bit on a live circuit diagram and a pannable, zoomable 3-qubit hypercube graph of all 8 basis states, and see exactly why the gate is reversible and classically universal.

Quantum Computing2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-quantum-gates-basics ↗ Open standalone

The Toffoli gate — also called CCNOT, the doubly-controlled NOT — is the workhorse of reversible and universal quantum computation. This 2D simulator draws the real 3-wire quantum circuit (two control dots and a ⊕ target symbol, with a pulse that travels down the wires on every application) directly above a pannable, zoomable graph of all 8 three-qubit basis states |000⟩ through |111⟩ laid out as the classic flattened 3-cube: an inner square for q₀=0, an outer square for q₀=1, and spoke edges between them, so every edge in the picture is a genuine one-bit flip. Toggle the two control bits and the target bit by hand, or click any vertex to jump straight to that register value, then apply the real Toffoli permutation and watch the highlighted vertex jump to its paired corner and back — 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 graph is never empty on load.

⚙ Under the hood

Interactive 2D Toffoli (CCNOT) gate simulator: toggle two control bits and a target bit on a real quantum circuit diagram with a traveling gate pulse, and on a pannable, zoomable 2D graph of all 8 three-qubit basis states drawn as the classic flattened hypercube, then watch why the gate is reversible and classically universal.

quantum gatestoffoliccnotreversible computingqubitsquantum circuitshypercube graph2D

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)