Playground
The stage shows a quantum network at one moment in time: nodes hold qubits, each edge is one noisy entangled pair labelled by its fidelity, and parallel edges are separate pairs between the same nodes. Every pair can be used once.
- Build: pick a preset, or use the tools. Drag nodes, click an edge to set its fidelity, double-click to add a node.
- Route: mark a source and a target, press R. The heuristic chooses which pairs to spend and in which order.
- Replay: N applies the next operation. Pulsing edges are about to be consumed; consumed edges fade; the new pair appears in red (swap) or blue dashed (distillation). Dotted edges are never used.
- Compare: C runs the reference strategies and the exact optimum on the same graph.
On a phone the same order applies top to bottom: buttons, stage, result, controls. Deep link: ?preset=bridge&run=1&step=3.
The problem
A quantum network distributes entangled pairs between distant nodes; applications such as teleportation consume them, and the pair's fidelity to a perfect Bell state sets how well the application runs. Most routing work assumes repeaters keep replenishing links and optimizes a rate of good pairs.
The paper fixes the resources instead: at a given moment the network holds a finite set of noisy pairs, each usable once and gone once its memory decoheres. Given those pairs, which should be combined, by which operations and in what order, to hand two users the single best pair? That one-shot question is what the playground solves.
Fidelity 1 is a perfect pair, 1/4 is pure noise, and only pairs above 1/2 are entangled at all. Every pair here is a Werner state, described by its fidelity alone.
The two operations
Swapping (red) joins pairs A–C and C–B into A–B by a Bell measurement at C. It buys distance and always pays in fidelity:
Fswap = f1f2 + (1 − f1)(1 − f2)3
Distillation (blue) turns two parallel pairs A–B into one better pair, succeeding with probability psucc (the BBPSSW protocol):
Fpur = f1f2 + ⅑(1 − f1)(1 − f2)f1f2 + ⅓(f1 + f2 − 2f1f2) + ⅝(1 − f1)(1 − f2)
Both accept the outputs of earlier operations as inputs, so they compose into a schedule that collapses a whole graph into one source–target pair.
For the distillation procedure itself, qubit by qubit, see the visualization by Iftach Yakar: Entanglement Purification Protocol simulator.
The purifiable region
Distillation spends two pairs to make one, so it is worth doing only when the output beats both inputs. Those input pairs form the purifiable region, outlined in red on the map.
It is a narrow band around f1 = f2: the largest gap between two inputs that still improves both is about 0.076. So a router should not distill wherever the topology allows it. On two nodes joined by five random pairs, a single pair alone is optimal about half of the time.
Reading the map: f1 runs left to right and f2 bottom to top, both from 1/4 to 1. Colour is the distilled fidelity, the dashed diagonal is f1 = f2, and the faint straight lines mark fidelity 1/2. Click anywhere to send that pair of fidelities to the sliders.
The heuristic
- Compute the kmax shortest paths. A chain of swaps makes fidelity an additive weight, so “shortest” means highest-fidelity.
- Take the best path as the running solution.
- For each further path, find where it diverges from the running solution between two shared nodes. The detour and the segment it bypasses are two routes between the same anchors.
- If their fidelities lie in the purifiable region, merge them: distill hop by hop when the routes are hop-aligned (purify-then-swap), otherwise swap each down and distill the results (swap-then-purify). Keep the merge only if the end-to-end fidelity improves.
- Swap the running solution down to one source–target pair.
The ordering of operations is therefore chosen per segment, not fixed network-wide. Runtime is polynomial, against the super-exponential exact solver.
More candidate paths (kmax) means more detours to try merging, at more work: past a handful the extra paths are usually too poor to help. The “Heuristic log” under the result lists every decision — each candidate path considered, each merge accepted or rejected, and why.
Reading the result
End-to-end fidelity is the fidelity of the one pair the schedule finally hands the source and the target. Everything else in the network is spent or left over on the way.
- Step: how far the replay has advanced through the schedule, out of the total number of operations.
- Pairs spent: how many of the network's pairs the schedule consumes. Dotted edges on the stage are the unspent ones — leaving a pair unused is often the right call.
- Ordering: whether the schedule distills before swapping (purify-then-swap), swaps before distilling (swap-then-purify), or interleaves the two. The paper's point is that the best schedule often interleaves, so no fixed ordering can reach it.
- Heuristic log: one line per decision the algorithm made, including the merges it tried and rejected.
Fidelities are shown to four digits here and three on the stage. Distillation is probabilistic: the fidelity quoted is the one obtained when it succeeds, which happens with probability psucc.
Strategies compared
- Shortest path (SP): best single path, swapped down, no distillation.
- Link-purify routing (LPR): distill every bundle of parallel pairs, then shortest path.
- Two-path: swap the two best disjoint paths down, distill them once.
- Recursive reduction: fold bundles and collapse degree-two relays until stuck, then shortest path.
- Heuristic: the paper's algorithm.
- Best PtS / StP: the best schedule that only distills before swapping / only swaps before distilling, read off the exact enumeration.
- Optimum: the best of every valid schedule (graphs of at most 10 edges).
On the bridge preset the two canonical orderings reach 0.814 and 0.835, the heuristic 0.845 and the optimum 0.850. The optimum interleaves swaps and distillations; no fixed ordering reaches it, and the heuristic comes within one unspent edge.
“Show” replays any row on the stage, so you can watch where two strategies part ways.
About
Companion to One-shot Routing in Quantum Networks by Nadav Lavi, Nir Gutman, Ido Kaminer and Ariel Orda, Technion – Israel Institute of Technology.
Everything runs in the browser: the fidelity relations, the heuristic and the exact solver are small JavaScript re-implementations of the algorithms in the paper, written for clarity rather than speed. The research code is on GitHub.
Cite as: N. Lavi, N. Gutman, I. Kaminer and A. Orda, “One-shot Routing in Quantum Networks”, 2026. Paper.
Keyboard: R run · N next · P play · A run all · 0 reset · C compare · ? help · Esc close.