Skip to content

Bb84Wcp ​

Tier A: GLLP + decoy BB84 with weak coherent pulses vs the GYS parameter set

9/9 passed in 88ms

TestWhat it doesResult
test_bb84_guardsbb84_rate raises a ValueError naming the slot for an error rate outside [0, 1/2], a gain outside [0, 1], q_sift outside (0, 1], NaN anywhere, and q1 > q_mu.✅ pass
test_gys_linear_scalingThe GYS decoy BB84 rate's log-log slope against eta over 25-75 km is 1.0 within 0.05.✅ pass
test_gys_nondecoy_deficitGLLP with no decoys reaches 40 km optimised and no key at GYS's mu = 0.1, a different theorem from the 49.0 km Brassard-Lutkenhaus-Mor-Sanders condition of test_gys_pns_reading.✅ pass
test_gys_optimal_muThe 25 km optimum intensity is within 0.02 of Ma et al.'s mu_optimal = 0.48 at f(e) = 1.22.✅ pass
test_gys_rate_scaleAt mu = 0.48 the GYS rate is 2.55e-3 bit/pulse at 0 km and 1.72e-5 at 100 km.✅ pass
test_gys_secure_distanceMa, Qi, Zhao & Lo 2005's "over 140 km of Telecom fibers" on the GYS parameters: the rate is positive at 140 km and zero at 145 km.✅ pass
test_rate_falls_distanceThe rate falls monotonically with fibre length and is exactly 0.0 from 150 to 400 km.✅ pass
test_recon_floorbb84_rate and cow_rate refuse an inefficiency f_ec < 1, which beats Shannon, and the rate falls from f_ec = 1 to 1.22.✅ pass
test_zero_error_closed_formAt zero error bb84_rate is q*Q1 exactly.✅ pass