Skip to content

RelayGuards ​

Out-of-domain relay inputs raise rather than returning a wrong number

6/6 passed in 0ms

TestWhat it doesResult
test_guard_armsTransmissivities outside (0, 1] and a chi where the noise term vanishes raise, while chi below the PURE-LOSS value 8 is legal and better.✅ pass
test_guard_environmentSub-vacuum environment variances and correlations past the positivity cap or the symplectic bound raise.✅ pass
test_guard_estimatedA v_q or v_p past the per-quadrature edge, a NaN, a non-positive sample, a zero confidence coefficient and a block with no key rounds each raise.✅ pass
test_guard_limitsA nearly dead arm and a large modulation stay finite, and a saturated relay detector reads 0.5.✅ pass
test_guard_omegarelay_omega(1.0, 0.01) raises on a lossless arm, relay_omega(1.0, 0.0) is 1.0, and a negative xi raises.✅ pass
test_guard_opticsOverlaps, contrasts, efficiencies, pulse widths and a dark rate of 1 each raise naming the offender.✅ pass