Skip to content

ClickOptics ​

Phase 5b: threshold-detector and delay-interferometer closed forms

5/5 passed in 1ms

TestWhat it doesResult
test_rejects_nonsenseEfficiency, dark probability, visibility and interferometer delay are each refused by name.✅ pass
test_stencil_fluxOne slot's ports sum to half the two pulses' photons at any visibility or phase, where the /sqrt(2) two-mode form would double every count rate.✅ pass
test_stencil_overflowinterfere raises once |α|2/4 leaves f64 range rather than return an (inf, nan) that NaN comparisons would hide, while click_prob saturates.✅ pass
test_stencil_portsIn-phase pulses fill the constructive port and anti-phase the destructive one.✅ pass
test_stencil_visibilityImperfect contrast scales the interference term alone, so an in-phase slot reproduces V=(Imax−Imin)/(Imax+Imin).✅ pass