KeyrateFinite
Finite-size worst-case bounds, entropy penalty and clamping
6/6 passed in 0ms
| Test | What it does | Result |
|---|---|---|
test_asymptotic_limit | At n = 1e18 the finite-size rate is the asymptotic rate times 1 - pe_fraction. | ✅ pass |
test_bounds_tighten | T_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_fiber | At n = 50 the interval reaches T = 0: T_min exactly 0, xi_max and chi_BE infinite, rate 0. | ✅ pass |
test_delta_shrinks | The smooth min-entropy penalty is strictly positive and falls like 1/sqrt(n). | ✅ pass |
test_finite_detection | Both 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_domain | Block size, estimation fraction and the three epsilons are validated: n positive, the fractions strictly inside (0, 1). | ✅ pass |