DiracDirac

Part I · The Machinery of Quantum Information · Chapter 3

Entanglement as a Resource

Two qubits can be joined so tightly that neither has a state of its own — and yet nothing you do to one can send a signal to the other. That paradox is not a bug. It is a resource, and this chapter spends it: it teleports a qubit, and it doubles a channel.

Sources: Nielsen & Chuang 1.3, 2.4 · Wilde, Ch. 6 · Watrous, Ch. 6

A promise, inherited from Chapter 1 and kept here. Entanglement is the single most abused word in popular science, so we will treat it as an engineer treats a resource: define it precisely, measure how much of it a state holds, and then spend it on two concrete tasks. Everything is computable. By the end you will have, in Rust, a three-qubit simulator that teleports a long run of random states at fidelity 1, sends two classical bits down one qubit, confirms that a maximally entangled qubit looks like pure noise when you hold only half of it, and — the part most books only assert — computes the monogamy inequality instead of quoting it. Every one of those claims is gated by a referee whose achieved accuracy the panel in §3.6 prints live. Resist one temptation: do not imagine entanglement as a hidden wire. The no-signaling check will show there is no wire at all.

What this chapter covers

  • 3.1Product vs entangled. When a two-qubit state does — and does not — factor into a tensor product; the four Bell states.
  • 3.2The Schmidt decomposition. Every pure bipartite state as a single diagonal sum; Schmidt rank and the entanglement entropy, which is just Chapter 1's H.
  • 3.3Local randomness & monogamy. Why half of a Bell pair looks maximally random on its own; the concurrence, and the Coffman–Kundu–Wootters identity that makes monogamy computable.
  • 3.4Teleportation. Moving an unknown qubit with a Bell measurement, two classical bits, and conditional Pauli corrections.
  • 3.5Superdense coding. The mirror image: two classical bits through one qubit, using a shared Bell pair.
  • 3.6The Lab. A three-qubit simulator that runs both protocols, the entanglement measures, and the monogamy identity — every claim gated by a referee that can fail.

Two qubits live in the tensor-product space , spanned by the four computational states . Some states of this pair are simple: they factor. A state is a product state if it can be written as one qubit times another,

(3.1)

A state is entangled precisely when it is not a product — when no choice of and reproduces it. That is the whole definition, and it is a definition by negation, so we will want a positive test for it in §3.2. The canonical entangled states are the four Bell states,

(3.2)

an orthonormal basis of built entirely from maximally entangled states. To see that is not a product, suppose it were . Multiplying out gives , so matching coefficients against demands

The right-hand pair forces all four numbers to be nonzero: needs and , and needs and . But then , contradicting the left-hand pair. No factorization exists — the qubits are genuinely joined.

3.2The Schmidt decomposition

F · FormalismC · Concepts

The positive test we wanted is a theorem of remarkable economy. Any pure state of a bipartite system can be written, in specially chosen orthonormal bases for and for , as a single diagonal sum — the Schmidt decomposition:

(3.3)

The nonnegative numbers are the Schmidt coefficients, and the number of nonzero ones is the Schmidt rank. This single expression decides everything: a state is a product state exactly when its Schmidt rank is 1 (one term), and entangled exactly when its rank exceeds 1. There is no need to hunt for a factorization by hand — the rank answers §3.1's question by counting.

How much entanglement? Read it off the coefficients. The entanglement entropy is the Shannon entropy of the squared Schmidt coefficients — the very same from Chapter 1, now fed the distribution :

(3.4)

For a product state one and the rest vanish, so — no entanglement, as it must be. For a Bell state the two coefficients are equal, , giving bit (equivalently nats) — the maximum for two qubits. Steer the one-parameter family and watch the entropy rise from 0 to 1 bit and back:

0.51.00.500cos²θ0.500sin²θreduced-state eigenvalues (Schmidt populations)
|ψ⟩ = 0.707 |00⟩ + 0.707 |11⟩

1.000

entanglement entropy (bits)

2

Schmidt rank

At θ = 45° the two populations are equal (½, ½): the state is the Bell state, maximally entangled at exactly one bit, and each qubit alone looks totally random. At θ = 0 one population is 1 and the other 0: a product state, Schmidt rank 1, zero entanglement.

This is already in Schmidt form — the bases are the computational ones, and , . The entropy peaks at , where the state is the Bell state , and the two populations are an even coin. The lab in §3.6 diagonalizes the reduced state numerically and gates the agreement with (3.4) below . One subtlety in how it does that is worth flagging now, because it is the difference between a check and a ritual: the obvious way to test (3.4) is to compute from the diagonalized eigenvalues and compare it with — but both calls go through the same entropy routine, so the comparison only re-tests the eigenvalues, and a corrupted would sail through. The lab therefore evaluates the same entropy a second way, by the logarithm-free power series

which shares no code with the first route and so can genuinely disagree with it. (The series converges slowly as , so the referee grades it on the interior of the sweep; the product-state endpoints get their own referee.)

3.3Local randomness and monogamy

F · FormalismC · Concepts

Here is the strangest consequence of (3.3), and the one the protocols exploit. Ask what qubit looks like on its own — ignore entirely. Its measurement statistics are governed by the squared Schmidt coefficients: outcome in the Schmidt basis appears with probability . For a Bell state those are along every axis, so the local Bloch vector shrinks to zero:

(3.5)

A maximally entangled qubit, looked at alone, is indistinguishable from pure noise — a coin that is fair in every basis. All the structure lives in the correlations between the halves, not in either half. This is exactly why teleportation leaks no signal (§3.4): whatever Alice does to her half, Bob's half stays maximally random until a classical message arrives. We compute directly from the global state as an expectation value — no density-matrix machinery, which waits for Chapter 4 — and the lab gates it below , not only after Alice's particular gates but after an arbitrary random operation on her side and after averaging over her four measurement outcomes.

One more structural fact: entanglement is monogamous. If qubit is maximally entangled with , it has nothing left over to share with a third qubit . Making that quantitative needs a second entanglement measure, because the entropy of (3.4) is defined only for pure states and the pair inside a three-qubit state is generally mixed. The measure is the concurrence. For a pure two-qubit state it is a single determinant,

which is exactly when the state factors (§3.1's condition, now a formula) and for a Bell state. The second and third forms say the same thing through the Schmidt picture: , so the concurrence is another reading of the same two numbers the entropy uses. For a mixed two-qubit state Wootters' formula extends it: with the spin-flipped and ,

(3.6)

With that in hand the Coffman–Kundu–Wootters inequality reads

(3.7)

where the left side treats as one four-level system, so it is the pure-state concurrence , while the two terms on the right are Wootters concurrences of mixed pairs. Strong entanglement forces entanglement down. What CKW actually proved is sharper than the inequality — it is an identity,

in which the leftover — the three-tangle — is the modulus of a degree-four polynomial in the eight amplitudes. Because a modulus cannot be negative, the identity implies (3.7). That is why the lab refereeing it is not a formality: it computes both sides by routes that share no code (eigenvalues of on one side, a polynomial that diagonalizes nothing on the other) and so proves the inequality rather than asserting it. Two states show the extremes. The W state spreads its entanglement pairwise and saturates (3.7) at with ; the GHZ state has no pairwise concurrence at all and puts everything into . Monogamy is not a curiosity: it is the reason quantum key distribution is secure — an eavesdropper who entangles with the key necessarily weakens the legitimate correlation, and the weakening is detectable.

3.4Teleportation

F · FormalismC · Concepts

Now spend the resource. Alice holds an unknown qubit and wants Bob to have it. She cannot clone it (Chapter 2), cannot measure it without destroying it, and there is no quantum channel between them. What they do share is one Bell pair, , and a telephone line for classical bits. That turns out to be enough. The circuit:

|ψ⟩|0⟩|0⟩Hshared Bell pairHALICEBOBm₁m₀XZ|ψ⟩conditional corrections
Figure 3.1. Quantum teleportation. At the left, H followed by CNOT prepares the shared Bell pair whose halves go to Alice (middle wire) and Bob (bottom). Alice then entangles her unknown qubit |ψ⟩ into her half (CNOT), rotates with H, and measures both her qubits — a Bell measurement yielding two classical bits m₀, m₁ (double lines, rust). Bob applies X on m₁ first and then Z on m₀ — the operator Z^{m₀}X^{m₁} — and recovers |ψ⟩ exactly. The unknown state moved without any qubit crossing the gap.

The algebra is worth doing once. Write the three-qubit state and regroup Alice's two qubits in the Bell basis. A short expansion gives

(3.8)

Each of Alice's four equally likely Bell outcomes leaves Bob's qubit in up to a known Pauli: or respectively, and her Bell measurement labels those four outcomes . So Alice sends the two-bit label, and Bob undoes the Pauli. Undoing means inverting, and , so the correction Bob applies is

The order is not cosmetic. On the branch the reversed product gives — a global sign, harmless on its own but fatal if that branch is later superposed with another. The figure's gates and the lab's if m1 {X}; if m0 {Z} are in this order. Two facts deserve emphasis. First, no cloning is violated: Alice's copy is destroyed by her measurement the instant Bob's appears. Second, and crucially, nothing travels faster than light. Before Alice's two classical bits arrive, Bob's qubit is maximally random (§3.3) — his marginal is no matter what Alice did or found. Only the classical message, capped at light speed, turns his noise into .

3.5Superdense coding

F · FormalismC · Concepts

Teleportation sends one qubit using entanglement plus two classical bits. Superdense coding is its exact mirror: it sends two classical bits using entanglement plus one qubit. Again Alice and Bob share . To send the two-bit message , Alice applies one local Pauli to her half,

(3.9)

which rotates the shared pair into one of the four orthogonal Bell states. She sends her single qubit to Bob, who now holds both halves and performs a Bell measurement (CNOT, then , then read out) — deterministically recovering both bits. One transmitted qubit, two bits delivered: the shared entanglement doubled the channel. It does not break the Holevo bound of Chapter 1 — that bound governs a qubit sent without pre-shared entanglement. Here the second bit of capacity was pre-positioned in the Bell pair, and superdense coding simply cashes it in. The lab confirms all four messages recovered exactly, with the correct Bell outcome carrying probability 1.

Everything above becomes a small three-qubit simulator, written from scratch: a state is complex amplitudes, a gate rewrites the pairs it touches, a measurement is a Born-rule marginal and a collapse. Teleportation, with genuinely random outcomes and the matching corrections — and the no-signaling number computed as Bob's Bloch vector before the classical bits:

ch03-entangle/src/main.rs — the teleportation protocol
1/// One full teleportation run of the single-qubit state `msg = (alpha, beta)`.
2/// Returns (infidelity of Bob's output vs the input, no-signaling deviation:
3/// the largest component of Bob's Bloch vector BEFORE the classical bits, which
4/// must be 0). Uses genuinely random measurement outcomes and the matching
5/// corrections: X first, then Z, i.e. the operator Z^{m0} X^{m1}.
6fn teleport_once(msg: [C; 2], rng: &mut StdRng) -> (f64, f64) {
7 let inv2 = 1.0 / 2.0_f64.sqrt();
8 // qubit 0 = Alice's message; qubits 1,2 = shared Bell pair (|00>+|11>)/sqrt2.
9 // Build |msg> (x) (|00>+|11>)/sqrt2 directly as the 8-amplitude vector.
10 let mut reg = Reg::zero(3);
11 for m in 0..2 {
12 reg.amps[m * 4] = msg[m] * inv2; // qubits (1,2) = 00
13 reg.amps[m * 4 + 3] = msg[m] * inv2; // qubits (1,2) = 11
14 }
15
16 // Alice's gates: entangle the message into the Bell pair, then rotate.
17 reg.cnot(0, 1);
18 reg.apply1(&g_h(), 0);
19
20 // NO-SIGNALING: before any measurement, Bob (qubit 2) is maximally random.
21 let (bx, by, bz) = reg.bloch(2);
22 let no_sig = bx.abs().max(by.abs()).max(bz.abs());
23
24 // Alice measures her two qubits; genuinely random outcomes.
25 let m0 = reg.measure(0, rng);
26 let m1 = reg.measure(1, rng);
27
28 // Bob's conditional Pauli corrections (the 2 classical bits, applied): X on
29 // m1 first, then Z on m0. The order matters on the (1,1) branch — the other
30 // order lands on -|msg>.
31 if m1 == 1 {
32 reg.apply1(&g_x(), 2);
33 }
34 if m0 == 1 {
35 reg.apply1(&g_z(), 2);
36 }
37
38 // Extract Bob's qubit (the only surviving branch has q0=m0, q1=m1).
39 let base = (m0 as usize) * 4 + (m1 as usize) * 2;
40 let bob0 = reg.amps[base];
41 let bob1 = reg.amps[base + 1];
42
43 // Fidelity to the original |msg>.
44 let overlap = msg[0].conj() * bob0 + msg[1].conj() * bob1;
45 let fidelity = overlap.norm_sqr();
46 ((1.0 - fidelity).abs(), no_sig)
47}

The entanglement measures come from the Schmidt picture: form the reduced state of one qubit as a Hermitian matrix, diagonalize it, and feed its eigenvalues to Chapter 1's :

ch03-entangle/src/main.rs — the Schmidt / entropy engine
1/// Eigenvalues of a 2x2 Hermitian matrix [[a, b],[conj(b), d]] (a, d real),
2/// returned as (larger, smaller). This diagonalizes a one-qubit reduced state.
3fn herm2_eigs(a: f64, d: f64, b: C) -> (f64, f64) {
4 let tr = a + d;
5 let diff = a - d;
6 let disc = ((diff * 0.5).powi(2) + b.norm_sqr()).sqrt();
7 (tr * 0.5 + disc, tr * 0.5 - disc)
8}
9
10/// The reduced state of qubit A of a 2-qubit pure state, as the 2x2 Hermitian
11/// rho_A = M M^dagger where M[i][j] is the amplitude of |i>_A |j>_B. Returns
12/// its two eigenvalues (the squared Schmidt coefficients), largest first.
13fn reduced_a_eigs(amps: &[C; 4]) -> (f64, f64) {
14 // rho_A[0][0] = |a00|^2 + |a01|^2, rho_A[1][1] = |a10|^2 + |a11|^2
15 let a = amps[0].norm_sqr() + amps[1].norm_sqr();
16 let d = amps[2].norm_sqr() + amps[3].norm_sqr();
17 // rho_A[0][1] = a00 conj(a10) + a01 conj(a11)
18 let b = amps[0] * amps[2].conj() + amps[1] * amps[3].conj();
19 herm2_eigs(a, d, b)
20}

Monogamy costs a little more machinery, because it needs the mixed two-qubit concurrence of (3.6), which needs a Hermitian square root and a eigendecomposition. Both are written from scratch — a cyclic-Jacobi eigensolver in src/lin.rs — so that the physics below stands on nothing borrowed. The two sides of the CKW identity then come from deliberately unrelated code:

ch03-entangle/src/main.rs — concurrence, the three-tangle, and the CKW terms
1/// Concurrence of a PURE two-qubit state directly from its amplitudes:
2/// C = 2|alpha delta - beta gamma| for alpha|00> + beta|01> + gamma|10> +
3/// delta|11>. Zero exactly when the state factors, 1 for a Bell state.
4fn concurrence_pure(amps: &[C; 4]) -> f64 {
5 2.0 * (amps[0] * amps[3] - amps[1] * amps[2]).norm()
6}
7
8// …
9
10/// The residual (three-)tangle of a 3-qubit pure state from the Coffman-Kundu-
11/// Wootters polynomial invariant: tau = 4|d1 - 2 d2 + 4 d3|, a degree-4
12/// expression in the amplitudes that diagonalizes nothing. It is the whole point
13/// of referee 10 that this shares no code with the concurrences it is compared
14/// against — and because tau is a modulus, tau >= 0 IS the monogamy inequality.
15fn three_tangle(psi: &[C; 8]) -> f64 {
16 let (a000, a001, a010, a011) = (psi[0], psi[1], psi[2], psi[3]);
17 let (a100, a101, a110, a111) = (psi[4], psi[5], psi[6], psi[7]);
18 let d1 = a000 * a000 * a111 * a111
19 + a001 * a001 * a110 * a110
20 + a010 * a010 * a101 * a101
21 + a100 * a100 * a011 * a011;
22 let d2 = a000 * a111 * a011 * a100
23 + a000 * a111 * a101 * a010
24 + a000 * a111 * a110 * a001
25 + a011 * a100 * a101 * a010
26 + a011 * a100 * a110 * a001
27 + a101 * a010 * a110 * a001;
28 let d3 = a000 * a110 * a101 * a011 + a111 * a001 * a010 * a100;
29 4.0 * (d1 - d2 * 2.0 + d3 * 4.0).norm()
30}
31
32/// The four numbers in the CKW identity for one 3-qubit pure state:
33/// (C^2_{A|BC}, C^2_AB, C^2_AC, tau_ABC). The first comes from det rho_A, the
34/// middle two from Wootters' formula, the last from the polynomial invariant.
35fn ckw_terms(psi: &[C; 8]) -> (f64, f64, f64, f64) {
36 let (p00, p11, p01) = rho_a_of3(psi);
37 let c2_abc = 4.0 * (p00 * p11 - p01.norm_sqr()).max(0.0);
38 let c_ab = concurrence_wootters(&rho_ab_of3(psi));
39 let c_ac = concurrence_wootters(&rho_ac_of3(psi));
40 (c2_abc, c_ab * c_ab, c_ac * c_ac, three_tangle(psi))
41}

The lab then reports every referee to JSON, which the panel below reads live — the count, the achieved values and the tolerances are whatever your last cargo run --release produced, so nothing in this section is a number typed by hand. Read the table with two questions in mind. First: could this check fail? Every row is designed so that it can, which is why the entropy is graded against a logarithm-free series rather than against itself, why no-signaling is probed with random Alice operations rather than the protocol's own CNOT and (whose eight amplitudes cancel to the bit, an arithmetic accident that would survive a broken Bloch routine), and why the superdense row compares the bits Bob measured against the bits Alice meant. Second: what is the achieved accuracy against the tolerance? The two are within a small factor everywhere, which is the only honest place for a tolerance to sit.

Loading /data/ch03/entangle.json… (run cargo run --release in Rust-QML/ch03-entangle)

Run it yourself with cargo run --release in Rust-QML/ch03-entangle. This simulator is the same workhorse that carries the rest of Part I — next it will be taught to be honest about the fact that real machines are noisy.

3.7Exercises

1. (F) Show directly that is entangled by assuming it factors as and deriving a contradiction. Then give its Schmidt rank and entanglement entropy.

2. (C) Using the Schmidt explorer, find the angle at which the entanglement entropy equals exactly bit. Is there more than one such in ? Explain using the shape of .

3. (C) Two ways for Bob to get §3.4 wrong. (a) He applies the same two gates in the reverse order, . Show that only the branch changes, and that it changes by exactly ; explain why no measurement on Bob's qubit alone can detect this, and name a situation in which it would nevertheless matter. (b) He routes the bits to the wrong gates, applying . For which of the four outcomes does he still recover , and what does he get otherwise?

4. (P) Add a fifth superdense referee to the lab: verify that Alice's four encodings map to four mutually orthogonal Bell states (inner products to ).

5. (P, hard) Extend the simulator to entanglement swapping: prepare two independent Bell pairs, on qubits (0,1) and (2,3). Perform a Bell measurement on qubits (1,2) — the inner halves — and show that qubits (0,3), which never interacted, are left in a Bell state (up to a Pauli fixed by the two measured bits). Referee the resulting entanglement entropy of the (0,3) pair to .

6. (F, hard) Verify the CKW identity by hand for the W state. Compute and show . Then show and evaluate (3.6) on it — the block of is the same as that of , which makes rank one — to get . Finally show the three-tangle polynomial vanishes, and confirm : the W state saturates monogamy. Contrast GHZ, where every pairwise term is 0 and .

The bridgeChapter 4: Quantum Channels and Noise

Where you stand. You can factor a two-qubit state or diagnose it as entangled with the Schmidt rank, measure its entanglement two ways — as Chapter 1's H and as the concurrence — and spend that entanglement to teleport an unknown qubit and to double a classical channel. You have also seen monogamy computed rather than quoted: the Coffman–Kundu–Wootters identity, with both sides built by unrelated code, and the W state saturating it at 8/9. Every one of those claims is gated by a referee whose tolerance sits within a small factor of its achieved accuracy, and all of them respect no-signaling.

The open question. Every state so far has been pure — a single clean vector. But a real device leaks: a qubit couples to its environment, a gate misfires, a Bell pair decoheres before Alice can measure it. What is the honest mathematics of a qubit that is partly random not because it is entangled, but because we have lost track of it?

What comes next. We introduce the density matrix — the object that describes a state we know only statistically — and the quantum channel: completely positive maps and their Kraus operators. We build a noise simulator for depolarizing and dephasing channels and measure how teleportation fidelity degrades, turning this chapter's perfect protocols into the imperfect ones a real machine actually runs.

Continue to Chapter 4