Skip to content

KeyrateFinite ​

Finite-size worst-case bounds, entropy penalty and clamping

6/6 passed in 0ms

TestWhat it doesResult
test_asymptotic_limitAt n = 1e18 the finite-size rate is the asymptotic rate times 1 - pe_fraction.✅ pass
test_bounds_tightenT_min climbs towards T and xi_max falls towards xi as the block grows, converging to 0.3 and 0.02 at n = 1e14.✅ pass
test_dead_fiberAt n = 50 the interval reaches T = 0: T_min exactly 0, xi_max and chi_BE infinite, rate 0.✅ pass
test_delta_shrinksThe smooth min-entropy penalty is strictly positive and falls like 1/sqrt(n).✅ pass
test_finite_detectionBoth trust models share t_min and xi_max, heterodyne's interval is wider than homodyne's, and untrusted detection costs finite key.✅ pass
test_finite_domainBlock size, estimation fraction and the three epsilons are validated: n positive, the fractions strictly inside (0, 1).✅ pass