Curriculum / Quantum Gates Deep Dive / CNOT Gate & Entanglement
CNOT Gate & Entanglement
The primary 2-qubit gate. Build your first entangled pair.
CNOT Gate & Entanglement
The CNOT (Controlled-NOT) gate is the most important 2-qubit gate. It's the quantum equivalent of a classical XOR gate, but it can create entanglement.
How CNOT Works
CNOT has a control qubit and a target qubit:
- •If control = |0⟩: target is unchanged
- •If control = |1⟩: target is flipped (NOT applied)
In table form, written as |q1 q0⟩ with qubit 0 (the control) as the rightmost digit:
- •|00⟩ → |00⟩
- •|01⟩ → |11⟩
- •|10⟩ → |10⟩
- •|11⟩ → |01⟩
qc.cx(control, target)
Entanglement: When H Meets CNOT
Starting from |00⟩:
- 1.H on qubit 0: (|00⟩ + |01⟩)/√2
- 2.CNOT(0,1): (|00⟩ + |11⟩)/√2
This is the Bell state Φ⁺, maximum quantum entanglement!
Your Challenge
Build the Bell state and verify entanglement (only 00 and 11 outcomes).
How this lesson works
A hands-on coding challenge. You write Qiskit-compatible Python in the browser editor, run it instantly via WebAssembly, watch the circuit and Bloch sphere react, and pass automatic output checks. The AI tutor Qubitus gives Socratic hints if you get stuck.
Part of: Quantum Gates Deep Dive
Master single-qubit and multi-qubit gates. Understand rotations, phases, and the math behind every gate in Qiskit.
This lesson is part of Pro
Unlock Quantum Gates Deep Dive and all 10 tracks with Pro: $12.99/month, $79/year, or $97 lifetime. Start with the free track first if you are new.