Skip to content

ClickDps ​

Phase 5b: DPS QBER derived from hardware, not pinned

20/20 passed in 4963ms

TestWhat it doesResult
test_afterpulsingA 5% afterpulse, landing on either detector equally, lifts the click rate and drags the QBER toward 1/2 without destroying the key.✅ pass
test_chunk_invarianceEvery draw is a pure function of (seed, stage, slot index), so chunk sizes two orders apart give identical records and scalars.✅ pass
test_curve_discardsA carrier released during hold-off is lost, not deferred: a two-gate curve under a 50 ns hold-off reproduces the afterpulse-free digest, while the flat coin charges its whole probability at any hold-off.✅ pass
test_curve_reducesA one-entry afterpulse curve at zero hold-off reproduces the flat coin's record digest, counts and QBER.✅ pass
test_curve_rejectsAn empty curve, an entry outside [0, 1) and a curve summing to 1 or more are refused by name on either detector.✅ pass
test_dark_count_floorAs ημ falls at nonzero dark probability the QBER climbs to 1/2, the 1e-2 dark probability exaggerated to reach the floor, so the shape is the anchor, not the number.✅ pass
test_dead_timeRaising dead time strictly lowers the click rate and cannot lower the QBER.✅ pass
test_delay_scales_walkA two-period delay line doubles the integrated phase variance, and the QBER follows the closed form with the longer arm.✅ pass
test_doubles_carry_blindingDark counts push the receiver toward doubles, as blinding does, and under squashing the QBER climbs with them.✅ pass
test_doubles_squashedUnder squashing, doubles are a strict subset of the sifted key, the click total counts each twice, and the QBER lands on the squashing closed form.✅ pass
test_holdoff_reachesThe flat coin's QBER ignores hold-off where a 20-gate curve of the same 3% decays to the bare floor, so the shipped QBER is pessimistic, 57% relative at 160 ns.✅ pass
test_linewidth_raises_qberQBER rises with linewidth and tracks the finite-flux form from 0 to 50 MHz, a walk σ2=2πΔνd/R from 0 to 0.31 rad^2.✅ pass
test_memory_exactAn independent serial reference on the engine's Threefry stages agrees on all seven counters to the integer across five hold-off, afterpulse and curve configurations.✅ pass
test_phase_walk_varianceThe differential phase variance is the quadrature pipeline's Wiener walk 2πΔνd/R, leaving visibility Ve−σ2/2.✅ pass
test_recovery_refusedA partial-efficiency recovery ramp is refused naming bias current, kinetic inductance, the eta/dark/response split and latching, while zero and None run as the gated detector.✅ pass
test_seed_decorrelatesA second seed reproduces the same physics while differing bitwise.✅ pass
test_split_memoryHold-off and afterpulse rate split per detector as eta and dark do: equal values reproduce the pooled run bit for bit, and either on the pi-phase detector alone moves only its count.✅ pass
test_thread_invarianceThe stateful dead-time and afterpulse scan runs in index order, so 1 and 8 workers agree bitwise.✅ pass
test_visibility_lawWith no dark counts and a noiseless laser the QBER over a visibility sweep lands on e=(1−V)/2 and on the finite-flux form.✅ pass
test_zero_noiseWith no dark counts, linewidth or dead time the dim port is empty: QBER is exactly 0.0 at sift rate 1−e−ημ.✅ pass