How to describe joint quantum systems? Introduction to the tensor product, computing basis states of composite systems, and visualizing two-qubit states.
So far we have studied a single quantum system β a single qubit. But what happens when two quantum systems interact, or are studied together? We need a way to describe a joint system.
Imagine Alice has a quantum system with state space SA, and Bob has one with state space SB. Their combined (composite) system lives in a new, larger state space SAB.
Key idea: Measuring one qubit of a composite system narrows down the possibilities for the other qubit. If the two qubits are correlated, Alice's measurement result gives us information about what Bob is likely to measure next.
Product States
Suppose Alice and Bob prepare their qubits independently:
The spooky part: Alice and Bob may be light-years apart. The moment Alice measures, Bob's qubit "knows" the result β not because of any signal, but because the two qubits were never truly independent. Einstein called this "spooky action at a distance." Note that this cannot be used to transmit information faster than light, because Alice can't control which outcome she gets.
Click "Measure Alice" to see how the entangled state collapses.
The CHSH Game β Entanglement Beats Classical Correlation
The CHSH game is a clever thought experiment that demonstrates β in a concrete, game-theoretic way β that quantum entanglement is fundamentally stronger than any classical correlation.
The Setup
CHSH Game Rules
A referee sends random bit X β {0,1} to Alice and random bit Y β {0,1} to Bob.
Alice outputs bit A β {0,1}; Bob outputs bit B β {0,1}.
Alice and Bob win if: X Β· Y = A β B
Rule: Alice and Bob may agree on a strategy beforehand, but cannot communicate once the game starts.
Win condition decoded: XΒ·Y = AβB means: "if both inputs are 1, output different bits; otherwise output the same bit." When X=Y=1, AβB must be 1 (Aβ B). In all other cases, AβB must be 0 (A=B).
Classical Strategy: Maximum 75%
Alice and Bob preshare correlated bits (pulled from a shared box). The best simple strategy: always output A=B=0.
X
Y
XΒ·Y
A
B
AβB
Win?
0
0
0
0
0
0
β
0
1
0
0
0
0
β
1
0
0
0
0
0
β
1
1
1
0
0
0
β
75% is optimal classically. No matter what classical strategy Alice and Bob use (even probabilistic, shared randomness), they cannot win more than 75% of the time. This is the CHSH inequality: any local hidden variable theory is bounded by 3/4.
Key insight: In an EPR pair, Alice's and Bob's measurement outcomes are correlated in a way that depends on the angle between their measurement bases. By cleverly choosing which angle to use for each input, they can make their outputs satisfy the win condition AβB = XΒ·Y more often than any classical strategy allows.
Step 1 β Agree on measurement bases before the game
Alice and Bob pre-agree on the following angles on the Bloch sphere equator (think of the qubit state as a direction in a 2D plane, parameterized by an angle ΞΈ):
Picture Alice's and Bob's bases as arrows on a compass. The angle between the two arrows determines how correlated their outcomes will be β closer together means more correlated.
The four measurement bases on the unit circle. The angle between Alice's and Bob's chosen bases determines P(same outcome).
where Ξ΄ = angle between the two measurement bases. When Ξ΄=0 (same basis) β P=1 (always agree). When Ξ΄=Ο/2 (orthogonal) β P=1/2 (random).
Translation to the game: "Same outcome" means A=B, so AβB=0. "Different outcome" means Aβ B, so AβB=1.
P(AβB=0)
= P(same) = cosΒ²(Ξ΄/2)
P(AβB=1)
= P(different) = sinΒ²(Ξ΄/2)
Step 3 β Work out the angle for each of the 4 input cases
The win condition is AβB = XΒ·Y. Let's compute the angle Ξ΄ between Alice's and Bob's bases in each case, and check whether the win condition is "same" (AβB=0) or "different" (AβB=1):
X=0, Y=0:
Alice at 0, Bob at Ο/8 β Ξ΄ = Ο/8
Win condition: XΒ·Y = 0Β·0 = 0 β need AβB = 0 (same outcome)
P(win) = P(same) = cosΒ²(Ο/16) β¦ wait β let's be careful. The angle between the bases is Ο/8, so Ξ΄ = Ο/8. P(same) = cosΒ²(Ο/8Β·Β½) = cosΒ²(Ο/16)? No!
The magic of the angles: For cases (0,0), (0,1), (1,0), Alice and Bob need to agree (same outcome). Their bases are always Ο/8 apart, giving cosΒ²(Ο/8) β 85.4%. For the hard case (1,1), they need to disagree. Their bases are 3Ο/8 apart β and sinΒ²(3Ο/8) = cosΒ²(Ο/8) by the identity sin(x)=cos(Ο/2βx). All four cases give the same win probability!
Aspect's Experiment (1982): This quantum advantage was confirmed experimentally by Alain Aspect, who measured violations of the CHSH inequality with entangled photons. This experimentally ruled out local hidden variable theories, confirming that quantum mechanics is genuinely non-local in this sense.
Interactive: Play the CHSH Game
Referee assigns:
X = ? Y = ?
Alice outputs A:
Bob outputs B:
Exercise 4.1Classical bound
Alice and Bob decide to use the strategy: Alice always outputs A=1, Bob always outputs B=1. How many of the 4 possible input combinations (X,Y) β {00,01,10,11} do they win?
Number of wins:
With A=B=1, AβB=0 always. Win condition: XΒ·Y=AβB=0. This fails when X=Y=1 (since XΒ·Y=1β 0). So they win for (0,0),(0,1),(1,0) but lose for (1,1). That's 3 wins out of 4.
Exercise 4.2Quantum win probability
The quantum win probability is P(win) = cosΒ²(Ο/8). Use the identity cos(Ο/8) = cos(22.5Β°) β 0.9239 to compute P(win) to 3 decimal places.
P(win) β
P(win) = (0.9239)Β² β 0.8536. Rounded to 3 decimals: 0.854.
Section 05
Multi-Qubit Gates β Complete Catalogue
When we have multiple qubits, we need multi-qubit gates. Each gate is presented with its matrix, its action on basis states, and how it appears in circuits. Some gates act independently on each qubit; others create entanglement by coupling two qubits together.
Independent Transformations (Tensor product of single-qubit gates)
If we apply gate Uβ on qubit 1 and Uβ on qubit 0 independently, the combined unitary is their tensor product U = Uβ β Uβ. This gate cannot create entanglement.
Uβ β UβIndependent gates β "each qubit on its own"
Each qubit is transformed independently.
β’ No information passes between the two wires
β’ Cannot create or destroy entanglement
β’ Probabilities on each qubit change as if the other doesn't exist Think of two parallel single-qubit operations happening simultaneously.
Cannot be written as UββUβ β genuinely 2-qubit.
In circuits & key use
qβqβ
qββqββqβ
Used to generate Bell states (H then CNOT), implement quantum teleportation, and build any multi-qubit circuit. Together with single-qubit gates, CNOT is universal.
Unlike CNOT, CZ is symmetric: either qubit can be the "control."
In circuits & key use
qβ
qβ
Both endpoints shown as dots (symmetric). Naturally related to CNOT via Hadamard: CZ = (IβH)Β·CNOTΒ·(IβH). Common in superconducting quantum processors.
SWAPSwap gate β "exchange two qubits"
Matrix
1
0
0
0
0
0
1
0
0
1
0
0
0
0
0
1
SWAPΒ² = I SWAP = 3Γ CNOT
Action on basis states
Swaps the entire quantum states of the two qubits:
β This is the CNOT used in these notes (ctrl=qβ)
Convention matters! The I/0/0/U block form produces a clean matrix only when the MSB (first letter, qβ) is the control. When the LSB (qβ) is the control β as used in these notes β the ctrl=0 and ctrl=1 rows are interleaved in the standard basis order, so the matrix looks different even though the gate does the same thing. Both are valid CNOTs; they just label which qubit is "in charge."
The general recipe: C-H? Put H in the bottom-right block (ctrl=qβ). C-Rz(ΞΈ)? Put Rz(ΞΈ) there. The block form always works cleanly when the MSB is the control. Together with single-qubit gates, any C-U is sufficient for universal quantum computation.
Compute tr(ΟΒ²): ΟΒ² has diagonal entries (3/4)Β²=9/16 and (1/4)Β²=1/16. tr(ΟΒ²) = 9/16+1/16 = 10/16 = 5/8 < 1. Since tr(ΟΒ²) < 1, it is a mixed state.
β Circuit Lab 6.1Pure vs Mixed β What measurements can and cannot tell you
Both a pure superposition and an entangled state can give identical measurement probabilities. Build both circuits and compare the outcomes β then read why they are physically different.