DeepPractise
DeepPractise

CNOT Gate

Track: Quantum Gates & Circuits · Difficulty: Beginner · Est: 14 min

CNOT Gate

Overview

Single-qubit gates can rotate and phase-shift individual qubits, but they cannot create correlations between qubits.

The CNOT gate (Controlled-NOT) is the simplest and most important two-qubit gate because it introduces a new capability:

  • conditional action: “do something to one qubit depending on the value of another.”

That conditional action is the doorway to entanglement, the kind of correlation that cannot be explained as “each qubit has its own independent state.”

Intuition

A two-qubit computational basis state looks like

abwherea,b{0,1}.|ab\rangle\quad\text{where}\quad a,b\in\{0,1\}.

Think of the first qubit as a condition and the second as the thing you act on.

  • The control qubit decides whether anything happens.
  • The target qubit is the one that gets changed.

CNOT follows a simple rule:

  • If the control is 0|0\rangle, do nothing to the target.
  • If the control is 1|1\rangle, apply X to the target (flip it).

So it is literally “NOT the target, controlled by the control.”

Why does this matter for entanglement?

Because it can turn a superposition in the control into correlation across both qubits. A gate that acts on only one qubit cannot do that—the second qubit would stay independent.

This ties directly back to Foundations:

  • You learned tensor products and that a general two-qubit state is ψ=α00+β01+γ10+δ11.|\psi\rangle = \alpha|00\rangle + \beta|01\rangle + \gamma|10\rangle + \delta|11\rangle.
  • You also learned that some states cannot be written as ϕχ|\phi\rangle\otimes|\chi\rangle. Those are entangled.

CNOT is a standard “entanglement maker.”

Formal Description

Action on computational basis states

Let the first qubit be the control and the second be the target. Then CNOT acts as:

CNOT00=00,\text{CNOT}|00\rangle = |00\rangle, CNOT01=01,\text{CNOT}|01\rangle = |01\rangle, CNOT10=11,\text{CNOT}|10\rangle = |11\rangle, CNOT11=10.\text{CNOT}|11\rangle = |10\rangle.

Read these as:

  • when the first bit is 0, the second bit is unchanged;
  • when the first bit is 1, the second bit is flipped.

What happens to amplitudes

Because quantum gates are linear, knowing the action on basis states determines the action on any superposition.

If

ψ=α00+β01+γ10+δ11,|\psi\rangle = \alpha|00\rangle + \beta|01\rangle + \gamma|10\rangle + \delta|11\rangle,

then applying CNOT gives

CNOTψ=α00+β01+γ11+δ10.\text{CNOT}|\psi\rangle = \alpha|00\rangle + \beta|01\rangle + \gamma|11\rangle + \delta|10\rangle.

Notice what changed:

  • the amplitudes on 10|10\rangle and 11|11\rangle are swapped, because those are the cases where the control is 1.

Matrix form exists (it’s a 4×4 unitary), but for intuition, the basis-action rule above is usually the clearest way to understand CNOT.

Worked Example

A canonical entanglement example starts with a product state:

+0=12(0+1)0.|+\rangle\otimes|0\rangle = \tfrac{1}{\sqrt{2}}(|0\rangle + |1\rangle)\otimes|0\rangle.

Expand it:

+0=12(00+10).|+0\rangle = \tfrac{1}{\sqrt{2}}(|00\rangle + |10\rangle).

Now apply CNOT (control = first qubit, target = second qubit):

  • CNOT00=00\text{CNOT}|00\rangle = |00\rangle
  • CNOT10=11\text{CNOT}|10\rangle = |11\rangle

So

CNOT+0=12(00+11)=Φ+.\text{CNOT}|+0\rangle = \tfrac{1}{\sqrt{2}}(|00\rangle + |11\rangle) = |\Phi^+\rangle.

This is a Bell state. Interpretation:

  • If you measure both qubits in the computational basis, you get perfectly correlated outcomes: 00 or 11 with probability 1/2 each.
  • The state is not a product state; it cannot be written as ϕχ|\phi\rangle\otimes|\chi\rangle.

This is entanglement in an operational sense: the joint outcomes have correlations that come from a single shared state, not from independent qubits.

Turtle Tip

Turtle Tip

To understand CNOT, memorize the four basis mappings. Then use linearity: apply the mapping term-by-term to any superposition.

Common Pitfalls

Common Pitfalls
  • Don’t mix up which qubit is control vs target. Swapping them changes the gate.
  • Don’t treat entanglement as “mystical.” Here it’s just: a gate created a state that cannot be written as a tensor product of two single-qubit states.

Quick Check

Quick Check
  1. What does CNOT do to 10|10\rangle and 11|11\rangle?
  2. Starting from +0|+0\rangle, why does CNOT produce an entangled state?

What’s Next

CNOT is one specific controlled operation: “apply X to the target when the control is 1.” Next we generalize the idea to controlled gates like CZ and controlled-UU (CU): the same conditional logic, but with different target operations—including phase-based entanglement.