The controlled-NOT (CNOT) gate is the workhorse two-qubit gate of quantum computing. This simulator lets you choose the control and target qubit states, apply CNOT, and see both its classical-looking behavior on definite inputs and its entanglement-creating behavior on a superposed control.
• Selectable control qubit: |0>, |1>, or the superposition |+>. • Selectable target qubit: |0> or |1>. • A two-qubit circuit diagram showing the control dot and target XOR symbol. • Live four-outcome probability bars for |00>, |01>, |10> and |11>. • Automatic detection and labeling of the entangled Bell-pair result. • The full CNOT truth table for reference.
• Control |0>, target |0>: apply CNOT and confirm nothing changes — |00> stays |00>. • Control |1>, target |0>: apply CNOT and confirm the target flips — the result is |11>. • Control |+>, target |0>: apply CNOT and confirm the result is the entangled state (|00>+|11>)/sqrt(2), with |01> and |10> both at 0%.
With a definite control value, CNOT is indistinguishable from an ordinary if-then flip — nothing quantum is really happening yet. The moment the control is placed in superposition, the same gate produces a state that cannot be described as two independent qubits at all; measuring one instantly determines the other. This exact circuit — Hadamard on the control, then CNOT — is the standard recipe used in the Bell-State-Preparation lab to build a maximally entangled pair on purpose.
It flips the target qubit if and only if the control qubit is |1>, and leaves the target unchanged if the control is |0>. On definite classical-looking inputs it behaves exactly like a classical conditional-flip circuit.
If the control qubit is in a superposition such as |+>, CNOT links the "flip happened" branch to the control being |1> and the "no flip" branch to the control being |0>, producing a state like (|00>+|11>)/sqrt(2) that cannot be factored into two separate single-qubit states — the defining feature of entanglement.
Because the two branches of the superposition, control=0/target=0 and control=1/target=1-after-flip, are exactly |00> and |11>. The gate never produces |01> or |10> in this case since a flip only ever happens together with the control being |1>.
CNOT together with arbitrary single-qubit gates (such as Hadamard and phase rotations) forms a universal gate set, meaning any quantum computation can in principle be built from just these ingredients — which is why CNOT appears in essentially every multi-qubit quantum algorithm.