ClickDps
Phase 5b: DPS QBER derived from hardware, not pinned
20/20 passed in 4963ms
| Test | What it does | Result |
|---|---|---|
test_afterpulsing | A 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_invariance | Every draw is a pure function of (seed, stage, slot index), so chunk sizes two orders apart give identical records and scalars. | ✅ pass |
test_curve_discards | A 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_reduces | A one-entry afterpulse curve at zero hold-off reproduces the flat coin's record digest, counts and QBER. | ✅ pass |
test_curve_rejects | An 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_floor | As | ✅ pass |
test_dead_time | Raising dead time strictly lowers the click rate and cannot lower the QBER. | ✅ pass |
test_delay_scales_walk | A two-period delay line doubles the integrated phase variance, and the QBER follows the closed form with the longer arm. | ✅ pass |
test_doubles_carry_blinding | Dark counts push the receiver toward doubles, as blinding does, and under squashing the QBER climbs with them. | ✅ pass |
test_doubles_squashed | Under 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_reaches | The 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_qber | QBER rises with linewidth and tracks the finite-flux form from 0 to 50 MHz, a walk | ✅ pass |
test_memory_exact | An 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_variance | The differential phase variance is the quadrature pipeline's Wiener walk | ✅ pass |
test_recovery_refused | A 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_decorrelates | A second seed reproduces the same physics while differing bitwise. | ✅ pass |
test_split_memory | Hold-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_invariance | The stateful dead-time and afterpulse scan runs in index order, so 1 and 8 workers agree bitwise. | ✅ pass |
test_visibility_law | With no dark counts and a noiseless laser the QBER over a visibility sweep lands on | ✅ pass |
test_zero_noise | With no dark counts, linewidth or dead time the dim port is empty: QBER is exactly 0.0 at sift rate | ✅ pass |