Skip to content

Two qubits and entanglement

One qubit is two amplitudes. You might guess that two qubits are four amplitudes, and you would be right, but the way those four numbers are organised has a surprise in it.

Two classical bits have four possible values: 00, 01, 10, 11. Two qubits have a basis state for each, and a general state is a superposition of all four:

∣ψ⟩=a∣00⟩+b∣01⟩+c∣10⟩+d∣11⟩,∣a∣2+∣b∣2+∣c∣2+∣d∣2=1.\ket{\psi} = a\ket{00} + b\ket{01} + c\ket{10} + d\ket{11}, \qquad |a|^2 + |b|^2 + |c|^2 + |d|^2 = 1.

The Born rule works as before. Measuring both qubits gives 00 with probability ∣a∣2|a|^2, and so on.

The pattern continues: nn qubits need 2n2^n amplitudes. Thirty qubits already need about a billion. This growth is why quantum systems are hard to simulate on ordinary computers, and it is the first hint of where quantum computers might get their power.

On this site the first qubit in a ket is the top wire of a circuit. So ∣01⟩\ket{01} means the top qubit is 0 and the bottom qubit is 1.

If the first qubit is in the state α∣0⟩+β∣1⟩\alpha\ket{0} + \beta\ket{1} and the second is in γ∣0⟩+δ∣1⟩\gamma\ket{0} + \delta\ket{1}, the pair is in the state you get by multiplying out the brackets:

(α∣0⟩+β∣1⟩)(γ∣0⟩+δ∣1⟩)=αγ∣00⟩+αδ∣01⟩+βγ∣10⟩+βδ∣11⟩.\bigl(\alpha\ket{0} + \beta\ket{1}\bigr)\bigl(\gamma\ket{0} + \delta\ket{1}\bigr) = \alpha\gamma\ket{00} + \alpha\delta\ket{01} + \beta\gamma\ket{10} + \beta\delta\ket{11}.

This multiplication is called the tensor product, and a state that can be written this way is a product state. In a product state, each qubit has a state of its own.

The most important two-qubit gate is CNOT, the controlled-NOT. It has a control qubit and a target qubit, and it flips the target exactly when the control is 1:

∣00⟩→∣00⟩,∣01⟩→∣01⟩,∣10⟩→∣11⟩,∣11⟩→∣10⟩.\ket{00}\to\ket{00}, \quad \ket{01}\to\ket{01}, \quad \ket{10}\to\ket{11}, \quad \ket{11}\to\ket{10}.

In a circuit the control is drawn as a dot and the target as ⊕\oplus. On basis states CNOT is an ordinary classical operation. It becomes interesting when the control is in a superposition.

PuzzleMake a Bell state

Starting from ∣00⟩\ket{00}, make the state 12(∣00⟩+∣11⟩)\tfrac{1}{\sqrt2}\bigl(\ket{00} + \ket{11}\bigr). To place a CNOT, select it, click the control wire, then click the target wire in the same column.

This puzzle needs JavaScript.

Hint

Put the top qubit into ∣+⟩\ket{+} first. Then CNOT acts on both parts of the superposition.

Here is what happened. After HH the state is 12(∣00⟩+∣10⟩)\tfrac{1}{\sqrt2}(\ket{00} + \ket{10}). CNOT is linear, so it acts on each term separately: it leaves ∣00⟩\ket{00} alone and turns ∣10⟩\ket{10} into ∣11⟩\ket{11}.

The state you just made is called a Bell state:

∣Φ+⟩=12(∣00⟩+∣11⟩).\ket{\Phi^+} = \frac{1}{\sqrt2}\bigl(\ket{00} + \ket{11}\bigr).

Can it be written as a product of a state for each qubit? Compare with the product formula above. We would need

αγ=12,αδ=0,βγ=0,βδ=12.\alpha\gamma = \tfrac{1}{\sqrt2}, \qquad \alpha\delta = 0, \qquad \beta\gamma = 0, \qquad \beta\delta = \tfrac{1}{\sqrt2}.

The second equation says α\alpha or δ\delta is zero. But the first needs α≠0\alpha \neq 0 and the fourth needs δ≠0\delta \neq 0. There is no solution.

So in a Bell state the pair has a definite state, yet neither qubit has a state of its own. A state like this, one that is not a product, is called entangled.

Check

Is the state 12(∣00⟩+∣01⟩+∣10⟩+∣11⟩)\tfrac12\bigl(\ket{00} + \ket{01} + \ket{10} + \ket{11}\bigr) entangled?

What entanglement looks like in measurements

Section titled “What entanglement looks like in measurements”

Measure both qubits of ∣Φ+⟩\ket{\Phi^+}. The Born rule gives 00 half the time and 11 half the time, and never 01 or 10. Each qubit on its own looks like a fair coin, but the two coins always agree. Go back to the puzzle and press Measure ×100 to see it.

Two cautions, because this is the most over-interpreted fact in physics.

First, correlation alone is not special. Two sealed envelopes holding the same random bit would also always agree. What makes entanglement different shows up only when the qubits are measured in several different bases, where the correlations are stronger than any envelope scheme can produce. That result is Bell’s theorem.

Second, entanglement does not send messages. Whoever measures first sees a random bit and has no control over which one. Nothing either person does to their qubit changes the statistics the other person sees.

There are four Bell states. This one has a relative minus sign and opposite bits.

PuzzleThe singlet

Starting from ∣00⟩\ket{00}, make 12(∣01⟩−∣10⟩)\tfrac{1}{\sqrt2}\bigl(\ket{01} - \ket{10}\bigr).

This puzzle needs JavaScript.

Hint

One route: make 12(∣00⟩+∣11⟩)\tfrac{1}{\sqrt2}(\ket{00} + \ket{11}), flip the bottom qubit, then use ZZ to change a sign.

PuzzleThree-way entanglement

Starting from ∣000⟩\ket{000}, make the GHZ state 12(∣000⟩+∣111⟩)\tfrac{1}{\sqrt2}\bigl(\ket{000} + \ket{111}\bigr).

This puzzle needs JavaScript.

The last one asks for a gate, so your circuit must be right on every input.

PuzzleSwap with CNOTs

Build a circuit that swaps the two qubits, so that ∣01⟩→∣10⟩\ket{01} \to \ket{10} and ∣10⟩→∣01⟩\ket{10} \to \ket{01}, using only CNOT gates.

This puzzle needs JavaScript.

Hint

Alternate the direction: control on top, then control on the bottom, then control on top again.

RecallAnswer from memory, then check
LessonFinish this lesson