|q⟩ Bad Qubits

beginner · Programming · Entanglement & Bell States

All Four Bell States

The four canonical maximally entangled two-qubit states are collectively called the Bell basis. You already built the first one, ∣Φ+⟩|\Phi^+\rangle. The complete set is:

∣Φ+⟩=12(∣00⟩+∣11⟩),∣Φ−⟩=12(∣00⟩−∣11⟩),|\Phi^+\rangle = \tfrac{1}{\sqrt{2}}\bigl(|00\rangle + |11\rangle\bigr), \qquad |\Phi^-\rangle = \tfrac{1}{\sqrt{2}}\bigl(|00\rangle - |11\rangle\bigr), ∣Ψ+⟩=12(∣01⟩+∣10⟩),∣Ψ−⟩=12(∣01⟩−∣10⟩).|\Psi^+\rangle = \tfrac{1}{\sqrt{2}}\bigl(|01\rangle + |10\rangle\bigr), \qquad |\Psi^-\rangle = \tfrac{1}{\sqrt{2}}\bigl(|01\rangle - |10\rangle\bigr).

These four states are orthonormal and span the entire two-qubit space, so they form a basis — the Bell basis. Any two-qubit state can be expressed as a linear combination of them; they do not, however, exhaust all maximally entangled two-qubit states, which form a continuous family.

Building all four from scratch

A single template circuit produces any Bell state. Begin in a computational basis state ∣xy⟩|xy\rangle (where x,y∈{0,1}x, y \in \{0,1\}), apply a Hadamard to qubit 0, then a CNOT from qubit 0 to qubit 1:

CNOT0→1 (H⊗I) ∣xy⟩.\text{CNOT}_{0\to1}\,(H \otimes I)\,|xy\rangle.

Working out each case:

| Input ∣xy⟩|xy\rangle | After H⊗IH\otimes I | After CNOT | Result | |---|---|---|---| | ∣00⟩|00\rangle | 12(∣00⟩+∣10⟩)\tfrac{1}{\sqrt2}(|00\rangle+|10\rangle) | 12(∣00⟩+∣11⟩)\tfrac{1}{\sqrt2}(|00\rangle+|11\rangle) | ∣Φ+⟩|\Phi^+\rangle | | ∣10⟩|10\rangle | 12(∣00⟩−∣10⟩)\tfrac{1}{\sqrt2}(|00\rangle-|10\rangle) | 12(∣00⟩−∣11⟩)\tfrac{1}{\sqrt2}(|00\rangle-|11\rangle) | ∣Φ−⟩|\Phi^-\rangle | | ∣01⟩|01\rangle | 12(∣01⟩+∣11⟩)\tfrac{1}{\sqrt2}(|01\rangle+|11\rangle) | 12(∣01⟩+∣10⟩)\tfrac{1}{\sqrt2}(|01\rangle+|10\rangle) | ∣Ψ+⟩|\Psi^+\rangle | | ∣11⟩|11\rangle | 12(∣01⟩−∣11⟩)\tfrac{1}{\sqrt2}(|01\rangle-|11\rangle) | 12(∣01⟩−∣10⟩)\tfrac{1}{\sqrt2}(|01\rangle-|10\rangle) | ∣Ψ−⟩|\Psi^-\rangle |

The xx bit controls the relative phase (0 gives ++, 1 gives −-), while the yy bit controls which pair of basis states appears (0 gives the Φ\Phi family, 1 gives the Ψ\Psi family). Starting from ∣00⟩|00\rangle, you can reach any of the four by pre-applying XX gates before the Hadamard and CNOT.

Try it

Prepare ∣Ψ+⟩=12(∣01⟩+∣10⟩)|\Psi^+\rangle = \tfrac{1}{\sqrt{2}}(|01\rangle + |10\rangle). You need to engineer the right input to the template circuit, starting from ∣00⟩|00\rangle. The grader checks the full state vector.

Run your code to see the quantum state.

Once you pass, try changing the starting X gates to reach the other three Bell states and observe how the amplitudes shift in the simulator.

Sign in on the full site to ask questions and join the discussion.