1. Worked problem §
If Bob applies X before Z measurement, what changes?
Hint 1
Apply X to the second ket.
Worked solution
The pair becomes (|01⟩+|10⟩)/√2 and Z outcomes are anticorrelated.
Quantum Cryptography · Chapter 03
How can a virtual entanglement protocol explain prepare-and-measure security?
Starting point: Chapters 1–2 of this course.
Anchor example: A Bell pair compared with a classically correlated mixture.
Method: Trace the protocol, calculate an example, and identify the security assumptions.
Watch for: Agreement in one basis does not bound phase errors.
This lesson includes explanations, worked examples, and problems with solutions. Advanced results whose proofs are outside the chapter are identified explicitly.
Chapters 1 and 2 treated BB84 as an experiment Alice performs and Bob measures. Security, though, is a statement about what Eve could know, and the cleanest way to bound that is to describe the same experiment differently: as a source that hands Alice and Bob an entangled pair which they each measure. If the pair is pure, Eve is provably uncorrelated; if the pair is noisy, the noise splits into two measurable kinds—bit errors and phase errors—each of which costs key material. This chapter builds that description, keeps its assumptions visible, and derives the asymptotic rate that Chapters 4 and 5 will refine.
Everything in this chapter rests on one equivalence: a prepare-and-measure protocol can be rewritten as a measurement on a shared entangled state without changing any statistic either Bob or Eve can observe. This section establishes the equivalence and then asks when the resulting pair is clean enough to imply secrecy.
The Bell state \(|\Phi^+\rangle=(|00\rangle+|11\rangle)/\sqrt2\) gives identical random outcomes when both parties measure Z. Rewriting it in the X basis,
\[|\Phi^+\rangle=\frac{|++\rangle+|--\rangle}{\sqrt2},\]shows the same property in the complementary basis. The two expansions are the same vector written differently, so no measurement can prefer one. Each party alone holds the reduced state
\[\rho_A=\operatorname{tr}_B|\Phi^+\rangle\langle\Phi^+|=I/2,\]and likewise for Bob. Perfect correlation between the parties is therefore fully compatible with a local bit that is uniform and unpredictable—the same \(I/2\) state met in Section 1.2.2.
The four Bell states organise these correlations, and it pays to keep their two axes separate from the start.
| State | Expansion | Z outcomes | X outcomes |
|---|---|---|---|
| \(|\Phi^+\rangle\) | \((|00\rangle+|11\rangle)/\sqrt2\) | agree | agree |
| \(|\Phi^-\rangle\) | \((|00\rangle-|11\rangle)/\sqrt2\) | agree | differ |
| \(|\Psi^+\rangle\) | \((|01\rangle+|10\rangle)/\sqrt2\) | differ | agree |
| \(|\Psi^-\rangle\) | \((|01\rangle-|10\rangle)/\sqrt2\) | differ | differ |
Alice can measure her half first and thereby prepare a definite state for Bob. That observation is not a communication channel—Bob's unconditional state stays \(I/2\) and Alice cannot steer her own random outcome—but it does give a virtual description of BB84 for ideal sources. The description earns its place because entanglement purification connects noise correction to secrecy, as Section 3.3 makes quantitative.
It also needs the correct source model. A real emitter that leaks basis information into another optical mode does not automatically match this virtual experiment. A source outside the laboratories may even be distrusted, but only if the security proof is written for that arrangement; an argument that assumes a pure, isolated pair cannot be applied to a device that does not provide one.
What are the joint Z probabilities for \(|\Phi^+\rangle\), and what is Alice's reduced state?
\(P(00)=P(11)=1/2\) and \(P(01)=P(10)=0\). Tracing out Bob removes the cross terms \(|00\rangle\langle11|\) and \(|11\rangle\langle00|\), leaving \(I/2\). Note that the reduced state is maximally mixed even though the joint state is pure: local randomness and perfect correlation are two features of one vector.
Start from \(|\Phi^+\rangle_{AB}=(|00\rangle+|11\rangle)/\sqrt2\) and let Alice measure Z, obtaining \(a\). The unnormalised conditional state on Bob is
\[\langle a|\Phi^+\rangle=|a\rangle/\sqrt2,\]whose squared norm is \(1/2\); dividing by that norm leaves \(|a\rangle\). Repeating the calculation for a real X-basis vector produces \(|+\rangle\) or \(|-\rangle\) with equal probability. So Alice's outcome, although random, fixes Bob's conditional state exactly.
For a general complex vector \(|u\rangle\) the rule is
\[(\langle u|\otimes I)|\Phi^+\rangle=|u^*\rangle/\sqrt2,\]with the complex conjugate appearing because \(|\Phi^+\rangle=\sum_j|j\rangle|j\rangle\) pairs matching indices. This is why one should check the chosen basis rather than assume every entangled preparation carries identical labels. BB84's Z and X states are real, so the conjugation leaves the protocol unchanged; a protocol using \(Y\)-basis states would not be so forgiving.
The equivalence itself rests on commutation. Alice's measurement acts on \(A\), while Eve's channel and Bob's measurement act on \(B\) and its environment. Operations on different subsystems commute, so Alice's measurement may be delayed, even until after Bob's, without changing any joint probability. That is the source-replacement argument: a convenient virtual experiment reproduces the actual observable one.
Apply the rule to \(|u\rangle=(|0\rangle+i|1\rangle)/\sqrt2\). Which state is prepared on Bob's side, and what goes wrong if one ignores the conjugation?
The rule gives \(|u^*\rangle=(|0\rangle-i|1\rangle)/\sqrt2\), the opposite relative phase. Ignoring the conjugation would predict the original state and therefore the wrong probabilities for any later measurement that reads that phase, for instance a Y-basis measurement. For the real BB84 states \(u^*=u\), which is exactly why the protocol is insensitive to this subtlety—and why a careless generalisation to complex bases can fail silently.
Suppose \(AB\) is exactly pure and in a Bell state, and Eve holds any extension whatsoever, possibly entangled with both halves. Because the reduced state on \(AB\) is pure, it has rank one. Purify the full state and expand in a Schmidt decomposition across \(AB\) versus everything else: a rank-one reduced state admits exactly one nonzero Schmidt coefficient, so the extension factors as
\[\rho_{ABE}=|\Phi^+\rangle\langle\Phi^+|_{AB}\otimes\rho_E.\]The product form is the whole argument. Because the state factorises across the \(AB\)–\(E\) split, Eve's marginal is the same no matter which outcome Alice records, so no measurement of hers can reveal anything about it. A correlated record would have required a second nonzero Schmidt term, and a rank-one reduced state has none to offer.
This is the connection between entanglement and secrecy. Measuring a perfect Bell pair in Z gives uniform bits that are equal on both sides and independent of Eve. Approximate Bell pairs need a quantitative continuity argument: a state close in trace distance to a pure pair yields a key close to ideal, with the distance supplying the error term. That is the shape of an entanglement-based proof—distil nearly pure pairs, then measure—even when the implemented protocol only prepares, measures, and processes classical data.
Worked derivation. Compare a Bell pair with the apparently similar state \(\rho_{AB}=(|00\rangle\langle00|+|11\rangle\langle11|)/2\).
Both give identical uniform Z bits. The pure pair has \(\langle X\otimes X\rangle=1\), whereas the mixture gives zero X correlation, because each product state \(|00\rangle\) or \(|11\rangle\) produces independent fair X outcomes. The mixture can also be extended by Eve holding the common Z label, so its Z agreement says nothing about secrecy. Purity is not visible in the basis you happen to test; the complementary correlation is what distinguishes coherence from a classical record.
A real pair is not pure, and Bob's measured string will disagree with Alice's somewhere. This section separates that noise into two kinds, gives each kind a label, and shows why correcting only the visible one is not enough.
Apply \(Z\) to Bob's half of \(|\Phi^+\rangle\) and the state becomes \(|\Phi^-\rangle=(|00\rangle-|11\rangle)/\sqrt2\). Its Z outcomes still agree, but its X outcomes now differ, as the table in Section 3.1.1 records. A phase error is therefore invisible to a Z-only agreement test: the two states are indistinguishable unless you look in the complementary basis.
For a Z-basis raw key, complementary-basis observations are what constrain the phase errors entering a security proof. In a simplified Bell-diagonal picture the rule is easy to remember:
| Error on one half | Effect on Z correlation | Effect on X correlation | Seen as |
|---|---|---|---|
| \(I\) | unchanged | unchanged | no error |
| \(X\) | flipped | unchanged | bit error |
| \(Z\) | unchanged | flipped | phase error |
| \(Y=iXZ\) | flipped | flipped | both |
Two lessons follow. Correcting bit disagreement alone does not erase Eve's knowledge, because a Z error leaves the key bits intact while destroying the coherence a proof relies on; the conceptual role of virtual phase correction is precisely to explain why privacy amplification is also required. And the correspondence cannot be assumed for free. Translating observed X errors into a bound on Z-key phase errors requires random sampling and a stated source model—it cannot be done by declaring the two error rates equal (Section 2.3.3).
A Bell-diagonal channel applies \(I,X,Z,Y\) with probabilities \(0.90,0.03,0.05,0.02\). Find the two error rates.
The Z-basis bit error is \(p_X+p_Y=0.03+0.02=0.05\), because either error flips the Z correlation. The X-basis error is \(p_Z+p_Y=0.05+0.02=0.07\), which is the phase-error rate in this model. The two rates differ, so a protocol that reported only one of them would misdescribe the channel.
Define \(|\beta_{uv}\rangle=(I\otimes X^uZ^v)|\Phi^+\rangle\) for binary \(u\) and \(v\). The stabilisers \(Z\otimes Z\) and \(X\otimes X\) have eigenvalues \((-1)^u\) and \((-1)^v\) respectively, so \(u\) records a bit disagreement and \(v\) a phase disagreement. A Bell-diagonal state is then a classical mixture of these four labels,
\[\rho_{AB}=\sum_{u,v}p_{uv}|\beta_{uv}\rangle\langle\beta_{uv}|,\]and the two measured rates read off its weights:
\[e_b=p_{10}+p_{11},\qquad e_p=p_{01}+p_{11}.\]| Label \((u,v)\) | State | \(Z\otimes Z\) | \(X\otimes X\) | Counting |
|---|---|---|---|---|
| \((0,0)\) | \(|\Phi^+\rangle\) | \(+1\) | \(+1\) | clean |
| \((1,0)\) | \(|\Psi^+\rangle\) | \(-1\) | \(+1\) | bit error \(e_b\) |
| \((0,1)\) | \(|\Phi^-\rangle\) | \(+1\) | \(-1\) | phase error \(e_p\) |
| \((1,1)\) | \(|\Psi^-\rangle\) | \(-1\) | \(-1\) | both |
The two measured rates do not determine all four probabilities, and that gap is where careless proofs fail. Given \(e_b=e_p=q\), the value of \(p_{11}\) can range over
\[\max(0,2q-1)\le p_{11}\le q,\]with \(p_{10}=p_{01}=q-p_{11}\) and \(p_{00}=1-2q+p_{11}\). Every admissible \(p_{11}\) reproduces the same two observed rates while correlating the two error types differently, so a security argument must hold for the whole family rather than for one convenient member. The Bell-diagonal form itself is a modelling choice: it is justified in appropriately symmetrised analyses, and must not be assumed to describe every laboratory state without argument.
The labels also explain the algebra. A single Z error changes the relative sign of \(|00\rangle-|11\rangle\), which alters interference in the X basis while leaving Z probabilities untouched. For \(Y\), use \(Y=iXZ\): the global phase is immaterial to probabilities, and both labels flip. This bookkeeping lets a proof track virtual corrections without ever suggesting that Bob measures one qubit in two incompatible bases during a single run.
The observed rates are \(e_b=e_p=0.55\). What is the admissible range of \(p_{11}\), and why is it not \(0\le p_{11}\le q\)?
Here \(2q-1=0.1\), so \(0.1\le p_{11}\le0.55\). The lower bound is not zero because \(p_{00}=1-2q+p_{11}=p_{11}-0.1\) must stay nonnegative: a Bell-diagonal mixture cannot carry more than half its weight in errors and still reproduce these two rates without some weight on the clean state. At \(p_{11}=0.1\) the clean weight vanishes; at \(p_{11}=0.55\) the mixed-error weight does, leaving \(p_{00}=0.45\) and \(p_{10}=p_{01}=0\). Two entirely different joint distributions, one pair of measurements.
Suppose a block of \(n\) bits carries independent errors at rate \(q\). A typical string has about \(nq\) errors, and the number of ways to place them is \(\binom n{nq}\). Stirling's approximation gives
\[\log_2\binom n{nq}\approx n\,h_2(q)\]to leading order in \(n\), where
\[h_2(q)=-q\log_2q-(1-q)\log_2(1-q)\]is the binary entropy in bits, with endpoint values set by continuity. Naming one of those patterns therefore costs roughly \(nh_2(q)\) bits: that is the origin of the entropy term in ideal asymptotic reconciliation, and it is a counting statement, not a property of any particular code.
A separate virtual phase-error correction is governed by \(nh_2(e_p)\). In a CSS-code proof, compatible families of bit and phase checks connect these two costs to the number of distillable logical Bell pairs. The commutation of the checks and the construction of the codes are essential to that argument; subtracting two counts is useful intuition, not a construction.
Translating the virtual protocol back into classical data processing identifies the operations: bit correction becomes reconciliation, and virtual phase correction becomes privacy amplification. Alice and Bob never store \(n\) physical qubits or perform both corrections in the laboratory. What the proof establishes is an equivalence between the operations that matter for the final classical key. Shor and Preskill give the full CSS-based argument; the counting above is why its rate has exactly two entropy terms.
For \(n=1000\) and \(q=0.05\), how many bits does a typical error pattern cost to name, and how does that compare with listing the positions explicitly?
\(h_2(0.05)\approx0.2864\), so there are about \(2^{286}\) typical patterns and naming one needs about 286 bits. Transcribing the 50 positions instead would cost \(50\log_2 1000\approx500\) bits—more than necessary, because a transcript ignores what the decoder already knows: roughly how many errors to expect. The entropy count is the target a good reconciliation protocol approaches, not a length every code attains at \(n=1000\).
With a bit-error cost and a phase-error cost in hand, the rate follows by subtraction. This section states the resulting bound, locates its zero, and then shows the second, entropy-based route that does not go through CSS codes at all.
For ideal single-photon BB84 with one-way processing, a familiar asymptotic lower bound per sifted key bit is
\[r\ge 1-h_2(e_b)-h_2(e_p),\]with \(h_2\) the binary entropy in bits. The formula is short only because it hides its assumptions.
| Assumption | Meaning here | Without it |
|---|---|---|
| Ideal single photons | No vacuum or multiphoton components in the source | Decoy-state or equivalent analysis is needed (Chapter 5) |
| Asymptotic block | Fluctuations and smoothing terms are negligible | Finite-key penalties are subtracted (Chapter 4) |
| One-way processing | Reconciliation and extraction run in one direction | Two-way schemes need a different proof and can tolerate more error |
| Ideal reconciliation | Leakage equals \(nh_2(e_b)\) exactly | Replace by \(f_{\rm EC}nh_2(e_b)\) with \(f_{\rm EC}\ge1\) |
| Valid error bounds | \(e_b,e_p\) bound the whole sifted block | Only estimates are available, so an abort rule is required |
| Authenticated channel | Classical messages cannot be forged | Eve can run separate exchanges (Section 1.3.1) |
Two common readings of the formula are wrong. It is not the number of secret bits per emitted pulse: detection and sifting factors must also enter that rate. And a negative lower bound supplies no positive key guarantee from this expression; it does not prove that every other protocol is impossible. In the symmetric case \(e_b=e_p=q\) the bound reduces to \(1-2h_2(q)\), which is the curve plotted by the explorer at the end of this section. The full proof machinery lies beyond this lesson; the linked Shor–Preskill paper carries the entanglement-purification argument.
Evaluate the symmetric lower bound at \(q=0.05\), and at \(q=0\).
\(h_2(0.05)\approx0.2864\), so \(r\ge1-2(0.2864)=0.4272\) secret bits per sifted bit in this asymptotic model. At \(q=0\) the entropy vanishes and the expression equals one—the ideal case where every sifted bit could survive, before finite-block and authentication costs.
The binary entropy vanishes at zero error, equals one at \(q=1/2\), and increases on \([0,1/2]\). Differentiation gives
\[h_2'(q)=\log_2\frac{1-q}{q},\]which is positive before \(q=1/2\). Hence \(1-2h_2(q)\) decreases continuously from one at \(q=0\) to minus one at \(q=1/2\) and crosses zero exactly once on that interval. Numerical bisection locates the crossing at
\[q^\ast\approx0.110028,\]about 11.0% for this ideal asymptotic, one-way formula. Note what has and has not been shown: the existence and uniqueness of the root follows from monotonicity, while the value 0.110028 is a numerical approximation to a transcendental equation.
The often-quoted threshold is not a universal law for every QKD protocol. Inefficient reconciliation, finite-size penalties, multiphoton emission, and different processing all move it. If reconciliation reveals \(f_{\rm EC}nh_2(e_b)\) bits with efficiency overhead \(f_{\rm EC}\ge1\), the bookkeeping expression becomes
\[r\gtrsim 1-f_{\rm EC}h_2(e_b)-h_2(e_p).\]At \(e_b=e_p=0.05\) and \(f_{\rm EC}=1.15\) this gives \(1-2.15(0.2864)=0.3842\), against \(0.4272\) for ideal reconciliation. At a sifted rate of 10,000 bits per second those correspond to about 3,842 and 4,272 bits per second before other costs, under the same model. The overhead does not merely scale the rate; it moves the zero, as the next figure shows.
Show that \(r=0.0002\) at \(q=0.11\) with ideal reconciliation, and find the overhead at which \(q=0.11\) would already give a nonpositive rate.
Since \(h_2(0.11)\approx0.49992\), the rate is \(1-2(0.49992)=0.00017\), essentially zero—the crossing is just below 11%. Requiring \(1-(1+f)h_2(0.11)\le0\) gives \(f\ge1/0.49992-1\approx1.0003\), so even a 0.03% reconciliation overhead pushes 11% error into the no-key regime. The crossing therefore belongs to a protocol specification—post-processing included—rather than to BB84 as a name.
A second route bounds Eve's uncertainty directly and does not pass through CSS codes. For two measurements with overlap
\[c=\max_{z,x}|\langle z|x\rangle|^2,\]a smooth-entropy uncertainty theorem relates the Z outcomes that are unpredictable to Eve to the hypothetical X outcomes that are unpredictable to Bob. For complementary \(n\)-qubit Z/X measurements, where \(c=1/2\), the relevant form is
\[H_{\min}^{\varepsilon}(Z_A^n|E)+H_{\max}^{\varepsilon}(X_A^n|B)\ge n.\]The first term measures how much uncertainty about the key survives in Eve's hands; the second measures how hard it is to predict Bob's complementary outcomes. Neither is the Shannon entropy of Alice's measured histogram. The inequality is a theorem, quoted here rather than proved; see Tomamichel and Renner.
A phase-error analysis bounding the second term by approximately \(nh_2(\bar e_p)\) then supplies a min-entropy lower bound near \(n[1-h_2(\bar e_p)]\). Subtracting reconciliation leakage and applying the quantum leftover-hash lemma yields a secret length. That chain—physical overlap, complementary predictability, Eve's conditional entropy, extraction—makes the logical dependencies visible.
For a finite block the conventions must match across steps: smoothing, conditioning on acceptance, parameter-estimation failure, and leakage each consume part of the same error budget, and a term counted twice produces an optimistic key length. Tight Finite-Key Analysis for Quantum Cryptography gives a protocol-specific treatment. Chapter 4 teaches the extraction and accounting steps without pretending that one asymptotic formula already covers those finite-size details.
These sources carry the constructions and theorems this chapter quotes.
These exercises draw on the whole chapter. Attempt each question before opening a hint, explain your reasoning, then compare it with the worked solution.
If Bob applies X before Z measurement, what changes?
Apply X to the second ket.
The pair becomes (|01⟩+|10⟩)/√2 and Z outcomes are anticorrelated.
Can Alice send a chosen bit by measuring her half?
Inspect Bob’s marginal.
No. Bob’s unconditioned state remains I/2; Alice cannot select her random outcome.
Which Pauli error changes both correlation tests?
Use Y=iXZ.
Y flips both, with its overall phase irrelevant to probabilities.
Can perfect Z agreement certify a secret key?
Consider a mixture of |00⟩ and |11⟩ known to Eve.
No. The outcomes may agree while Eve knows them; complementary tests are essential.
What is the expression at q=0?
Use h₂(0)=0.
It is one bit per sifted bit before finite-block and authentication costs.
What happens at q=0.5?
Use h₂(1/2)=1.
The expression is −1; the operational guaranteed rate is set to zero, rather than producing a negative key.
For the Bell-diagonal mixture p00=0.88, p10=0.04, p01=0.06, p11=0.02, calculate bit and phase errors and the ideal asymptotic lower fraction.
Use both syndrome labels, then substitute into binary entropy.
The bit error is 0.04+0.02=0.06 and the phase error 0.06+0.02=0.08. The expression is 1−h₂(0.06)−h₂(0.08)≈1−0.327445−0.402179=0.270376. This is per sifted bit under the stated ideal asymptotic model, not per emitted optical pulse.
For fixed eb=ep=q≤1/2, parameterize every Bell-diagonal probability distribution compatible with those errors.
Choose p11 as the free variable and enforce nonnegative probabilities.
Set p11=t, p10=p01=q−t, and p00=1−2q+t. Nonnegativity gives max(0,2q−1)≤t≤q; for q≤1/2 this is 0≤t≤q. Distinct joint error correlations produce the same two observed rates, so an analysis must handle the whole compatible family.
Prove that the symmetric one-way expression has exactly one zero on (0,1/2), and locate it numerically to three decimal places.
Differentiate binary entropy and use endpoint values, then bisect.
h₂′(q)=log₂((1−q)/q)>0 on (0,1/2). Thus 1−2h₂(q) decreases strictly from 1 to −1, so continuity gives exactly one root. Repeated bisection gives q≈0.110028, or 0.110 to three decimal places. This is a threshold of that expression, not a universal QKD limit.
A shared AB state is exactly pure. Prove that an arbitrary extension to Eve is a product, and explain why the proof does not apply to perfect Z agreement alone.
Purify the extension and inspect its Schmidt rank across AB and the remaining systems.
A pure reduced AB state has rank one, so the Schmidt decomposition of a purification has a single term. The purification factors, and tracing any extra environment preserves the product with Eve. Perfect Z agreement permits the mixed state (|00⟩⟨00|+|11⟩⟨11|)/2, whose rank is two and which can be correlated with an Eve record. Agreement does not imply purity.