Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Why earliest swapping is optimal

The short links in a quantum communication chain do not all become ready together. Once two neighboring links are ready, they can be joined. The earlier link must wait, and waiting damages the stored quantum information. Does always joining the neighboring pair that can be joined earliest minimize the total damage? For deterministic, instantaneous swaps with fixed readiness times, Haobo Ma and Wenlin Zhang answer yes: every chain length and every nonnegative real readiness vector is covered, with any choice among ties. A formula gives the minimum cost and measures exactly how much other merge orders waste.

The question comes from L. Kamin, E. Shchukin, F. Schmidt and P. van Loock’s 2023 paper, Section IV D 1, Eq. (41). We will first turn it into a problem about a list of numbers, then see why a local choice gives a global optimum. Precise results contains the full statements and proofs; Sources and further exploration credits the literature and explains the formal evidence.

Four numbers make a chain

Write four links in order as . Each number is the time its link becomes ready, in a common unit. The order matters: only neighboring links may merge. A pair ready at times can first merge at , incurs waiting cost , and becomes one link ready at . Thus merging replaces it by and costs .

This is the paper’s normalization of dephasing cost. The optimization below needs only waiting differences; no knowledge of quantum states or measurement theory is required. The physical model assumes that swaps succeed deterministically and take no time. It does not add failed-swap retries, memory cutoffs or extra scheduling costs.

“Earliest” compares the larger readiness time of each neighboring pair. It does not mean the smallest difference or the two smallest numbers anywhere in the list. For , the three pair readiness times are , so the earliest rule first merges the left pair.

Current listPair mergedStep costCost so far

In the second row both pairs can merge at time . Choosing instead gives subsequent costs , again totaling . This explains what arbitrary tie choices mean; it is not yet a general proof.

Suppose instead that the first merge is the middle pair . We pay and obtain . Merging and then costs another , for a total of . Why did we waste ? We can answer without listing every possible order.

A ledger for future cost

For a nonempty list , let and define

This is called a potential. Think of it initially as a ledger of the cost that still has to be paid. The paper proves that the minimum total cost is exactly . In our example, the largest time is , the neighboring maxima sum to , and the entries also sum to . Thus .

Watch the ledger along the earliest order:

Current listCost already paid plus

A single remaining link needs no further merge, so its ledger is zero. Each earliest merge removes precisely its own cost from the future ledger. The final total therefore equals the initial .

For the worse first move, , while we have already paid . Paid cost plus future cost jumps from to . That move creates an excess that cannot be undone.

Why no move can make the ledger cheaper

Merge into . The global maximum stays fixed. In the sum of neighboring maxima, only the merged pair and its immediate neighbors can change. Removing the central term and accounting for the change in the sum of entries gives

Here is the sum of increases contributed by the left and right neighbors. For a left neighbor , its contribution is . Since , this difference cannot be negative. The right side works in the same way; an absent endpoint neighbor contributes nothing.

Thus cost already paid plus remaining potential can never decrease, whatever pair we choose. For the worse first move above, the left contribution is , and the right contribution is zero. This explains exactly the extra .

Why does the earliest rule create no excess? If there is a left neighbor , earliest readiness gives : otherwise that neighboring pair could have merged earlier. Replacing by therefore leaves the left maximum unchanged. The right maximum is unchanged for the same reason. Hence an earliest step has . Only weak inequalities were used, so ties cause no exception.

Add the one-step equations. Each intermediate potential occurs once with each sign and cancels. This cancellation is the whole mechanism: every complete order costs , while every earliest order has all . There are finitely many merges; no limit or guess from short chains is needed.

The film follows the same example and its cost ledger.

Film 001 · Earliest swapping: no wasted cost · 2:57

From waiting in a four-link chain to the potential and the zero-excess earliest rule, with English narration and aligned Chinese/English subtitles.

An optimum need not be unique

The earliest rule is sufficient for optimality, but it is not necessary. Merge the last pair of first: this costs and leaves . The remaining costs can be , again totaling . That first move was not earliest, but it created no excess. In general, a complete order is optimal if and only if every step has zero slack .

These are comparisons of contraction orders in the recurrence. Earliest orders themselves can also be implemented chronologically. After a merge at time , unchanged pair readiness times are at least , and newly formed pairs contain , so they too cannot be ready earlier. Successive earliest times never go backwards; tied times allow consecutive instantaneous swaps.

Another useful check is a list of monotonically ordered times. Its neighboring absolute differences add up to the largest time minus the smallest, and the optimum is exactly that range. A singleton costs zero, as does any list whose times are all equal.

Why random readiness times benefit too

Readiness times are often random. Fix all times in one trial. The earliest rule is already no more expensive than any complete competing order in that trial. We can therefore compare trial by trial and then average, even if different links’ times are correlated.

A smaller dephasing cost corresponds to a larger retention factor , where . This function decreases with , so the trial-by-trial cost inequality also compares average retention factors. A smaller average cost alone would not usually settle such a nonlinear comparison; the strength here is optimality for each realization. Retention factors lie in , so this expectation comparison needs no finite mean-cost assumption.

If each link independently succeeds in each round with probability , its readiness round has a geometric distribution on . The paper also gives a finite-sum formula for the mean optimum. It follows by computing the tail probabilities of the largest time and the mean maximum of two neighbors; Geometric readiness times gives the full calculation.

These conclusions compare the same realized times under the same deterministic instantaneous-swap model. Changing the distribution scheme, storage convention, swap success probability or secret-key-rate objective changes the optimization problem. The result does not directly optimize secret-key rates across all repeater schemes.

The seminar follows the same argument, with precise formulas and proof details in its appendix.

Precise results and complete proofs

This chapter follows the manuscript’s Theorem 1, Corollary 2 and Corollary 3. The natural-number result is listed separately as the restriction of the greedy-optimality clause of Theorem 1 that has matching formal evidence. It does not replace the full real-time theorem. The original theorem and corollaries share one numbering counter.

Model and potential

Let and . A valid merge and its cost are

A complete history makes valid merges; is their total cost. Set , with value zero on a singleton. The set of histories is finite and nonempty, so this minimum exists. An earliest, or greedy, history chooses at each step a valid minimizing , with arbitrary ties.

Write and

The identity gives

In particular, , and a singleton has potential zero.

Every chain length and exact excess cost

Theorem 2.1 (Real-time optimality and exact slack)WRITTEN PROOF

For every and , , and every complete greedy history attains this value, independently of all tie choices. More generally, let , describe any complete history. Then

For the current list, put , and . When present, write the left neighbor as and the right neighbor as . The slack is

when , and when . Similarly,

when , and when .

A complete history is optimal if and only if every one of its merge slacks is zero. For the sum is empty and the statement still holds.

Proof

This is Ma and Zhang’s proof of Theorem 1 in Section 2 of the manuscript. A merge preserves the global maximum. The sum of neighboring maxima loses the central term and gains the neighboring increments , for a total change . The sum of entries changes by . Subtracting gives

Since , both neighboring increments are nonnegative. If is greedy and a left neighbor exists, comparison with that pair gives . Together with , this implies . The right comparison likewise makes its two maxima equal. Thus a greedy step has zero slack. These weak inequalities include zero times and ties; absent endpoint terms are defined to be zero.

Sum the one-step identity along a complete history. Intermediate potentials cancel and the final singleton has potential zero, giving the exact excess-cost identity. Every history therefore costs at least . Every finite list of length greater than one has a pair with smallest maximum, and each merge reduces the length by one, so a complete greedy history exists. Its slacks are all zero, and its cost is , proving optimality. Finally, a finite sum of nonnegative numbers is zero exactly when each summand is zero, establishing the characterization of all optimal histories.

Formal evidence for natural readiness times

Theorem 2.2 (Earliest swapping on natural-number lists)LEAN ✓

For every finite list of natural numbers, including the empty list, and every complete greedy merge history , the total history cost equals the Bellman optimum for the same merge and cost definitions. The Bellman recurrence is zero for lists of length at most one; otherwise it takes the minimum, over valid first merges, of step cost plus the remaining optimum. All greedy tie choices are allowed.

Proof

The pinned formal source gives a kernel proof of this natural-number statement. It identifies both the Bellman value and each complete greedy history’s cost with an integer-valued potential, then equates them. Each valid merge shortens the list by one, so length-many Bellman iterations starting from the zero function suffice. Natural numbers include zero; empty and singleton lists both have cost zero.

On nonempty natural-number lists, this environment is precisely the restriction of the preceding theorem’s greedy-optimality clause. The preceding environment additionally includes the real domain, explicit slack and the characterization of all optimal histories. The probability results below add further statements, with their written proofs supplied separately.

Random readiness and retention factors

Corollary 2.3 (Pathwise optimality and expected retention)WRITTEN PROOF

Fix . Let have any joint distribution on . Compare complete histories using the same realized readiness vector, allowing a competing policy extra randomness; policies and their costs are selected measurably. For every ,

When costs are integrable, also . The exponential comparison needs no cost integrability, independence or identical distribution assumption.

Proof

This is Corollary 2 in Section 3 of the manuscript. Fix the readiness vector and any extra policy random choices. Theorem 1 applies to every complete history so selected. For , the function is nonincreasing; applying it reverses the cost inequality, after which we take expectations. Costs are nonnegative, so exponential factors lie in and their expectations exist. When costs are integrable, taking expectations directly in the cost inequality gives the final comparison. At both factors equal one; at both costs are zero.

Geometric readiness times

Corollary 2.4 (Mean optimum for independent geometric times)WRITTEN PROOF

Let , and let be independent geometric variables on with common success probability . Put . Then

Proof

This is the calculation in Corollary 3, Section 3 of the manuscript. Use , including when . For integers , , and independence gives . The mean of a nonnegative integer variable is the sum of its tail probabilities, so

Expand by the binomial theorem. Only occur, and every geometric series converges because . Interchanging a finite sum with these convergent series gives

Also . For two independent coordinates, , hence

Take expectations in the potential: the maximum contributes , the neighboring pairs contribute the last expression, and the coordinates contribute . Simplification gives the formula. Integrability follows from and finitely many integrable terms. For there is no neighboring-pair term and the answer is zero; at all times equal one and the formula again gives zero.

Normalization and limits of the model

The variation expression shows that the roughness and endpoint waiting term in Goodenough, Coopmans and Towsley’s Section 3.1 sum to . Keeping roughness alone changes the objective. For example, on a monotone list both roughness and endpoint contribution equal the largest time minus the smallest, so equals that range.

Within the same fixed-readiness recurrence, these deductions answer the mean-dephasing versus exponential-retention question in Kamin et al., Section IV D 5. Optimal secret-key rates across distribution or measurement schemes, memory cutoffs and probabilistic swaps change the readiness law, storage convention or objective and do not follow from these results.

Sources and further exploration

This note and the original question

This explanation concerns Haobo Ma and Wenlin Zhang, Earliest swapping for every chain length: Kamin et al. (2023), Section IV D 1, Eq. (41), version 1 (2026). Version DOI: 10.5281/zenodo.23904476. Licence: CC BY 4.0. Haobo Ma is affiliated with Chrono AI, Singapore; Wenlin Zhang with the National University of Singapore and Chrono AI, Singapore. Authors’ recorded names are retained.

The original question is in L. Kamin, E. Shchukin, F. Schmidt and P. van Loock, Exact rate analysis for quantum repeaters with imperfect memories and entanglement swapping as soon as possible, Physical Review Research 5, 023086 (2023), DOI, arXiv version. Section IV D 1, Eqs. (38)–(39), defines the recurrences; Eq. (41), p. 023086-13, asks the all-length question. Section IV D 5, p. 023086-16, discusses mean cost and exponential attenuation.

Related noise formulas appear in K. Goodenough, T. Coopmans and D. Towsley, On noise in swap ASAP repeater chains: exact analytics, distributions and tight approximations, Quantum 9, 1744 (2025), DOI, arXiv version, Section 3.1. Their roughness plus endpoint term corresponds to here.

What can be checked, and what comes next

The Lean source for natural readiness times proves that every complete earliest history achieves the Bellman optimum, including arbitrary ties, zero times and the empty list. The full real-time potential and exact-slack statement, and the two probability corollaries, are supported by the manuscript’s written proofs reproduced in this explanation.

The remaining formalizations are registered in the shared public coordination queue:

To contribute a formalization, coordinate its precise scope on the matching request, develop a focused branch in your own fork and submit directly to upstream dev under the upstream contribution rules. The requests link the exact public manuscript and existing prerequisites.

For a pencil-and-paper exploration, compute the left and right slack for every possible first move of . Which first moves can lead to an optimum even though they are not earliest? The characterization in Precise results checks your answer.

Verification ledger

Lean-verified results correspond to frozen declarations in trureturing. Written proofs and open items are listed separately below. The table lists the Lean correspondence; links are fixed to the pinned commit, so they do not drift with upstream changes.

Formal basis: trureturing commit 8a24ea4e79de · the-omega-institute/trureturing

ItemTitleLean declarationFrozen state
Theorem 2.2Earliest swapping on natural-number listsD5.S3.Quantum.Optimization.SwapEarliestDephasingOptimality.resultc16720c4f1

Written proofs

These results cite DOI sources, book proofs and registered formalization requests. They are not kernel-verified and are excluded from LEAN ✓ counts.

Open problems and conjectures

The following items are explicitly marked open; the book does not treat them as proved.

(none)