Every node in the grid is a quantum repeater. Each edge to a neighbour represents an elementary entangled (Bell) pair, generated independently with probability p — the heralded success rate of the photon source and channel. To connect two nodes that are not neighbours, the repeaters in between perform an entanglement-swapping Bell-state measurement (BSM), splicing two short pairs into one longer one. Each swap succeeds with efficiency q, so an edge only survives as a usable quantum channel with effective probability:
p_eff = p · q
An N×N lattice is "bond percolated" at density p_eff: every
edge is independently ON with probability p_eff.
Two nodes can share entanglement ⇔ they sit in the same
connected component of ON edges (Acín, Cirac & Lewenstein,
"Entanglement percolation in quantum networks", Nat. Phys. 2007).
For an infinite 2D square lattice, bond percolation has an exact critical threshold p_c = 1/2 (Kesten's theorem): below it every connected cluster stays finite, above it a single "giant cluster" spans the whole lattice with probability 1. That giant cluster is exactly the set of node pairs that can be handed a long-distance entangled pair through the network — the rest are cut off no matter how many swap attempts you allow.
- p slider — elementary link generation success rate per edge.
- q slider — swapping/BSM efficiency at each relay node (loss and detector inefficiency lower this below 1).
- N slider — lattice size; a bigger lattice makes the threshold at p_eff = 0.5 sharper and easier to see.
- Resample — draws a fresh random realization of which links succeeded this round; Auto-resample repeats this every round, as a real network re-attempts entanglement generation continuously.
The 3D view highlights the giant connected cluster in green and dims everything outside it in grey — nodes inside the green cluster can, in principle, share end-to-end entanglement with any other green node; the "spans top ↔ bottom" flag reports whether this round's network is percolating.