Skip to content

DspRecovery ​

Phase 2 gate: pilot phase recovery and the xi it leaves behind

18/18 passed in 5460ms

TestWhat it doesResult
test_bracket_placementA described DAC raises ξphase over the channel-only term by row(ev−1), 3.2286e-06 SNU at 8 bits and v_err = 0.05, an Alice-plane row sitting inside budget.phase's (VA+ξ) bracket.✅ pass
test_estimator_domain_warnsThe default form is silent at PHASE_LIMIT, at v_err = 1.5 and at 12, and budget has no WRAP_LIMIT.✅ pass
test_estimator_form_gateThe default form tracks xi_hat - xi_ideal to 2% at v_err = 0.054, 0.27, 0.60 and 2.81, where the literature form sits 6%, 24%, 58% and 944% below.✅ pass
test_estimator_recovers_variance−2ln⁡E[cos⁡φ] returns a wrapped normal's variance within five deviations of its sampling law at 4e6 draws from σ2=0.05 to 12 rad^2, while the wrapped second moment saturates at π2/3=3.2899: 3% low at 1.5, 22% at 3.13, 48% at 6, 73% at 12.✅ pass
test_estimator_slope_ratioThe excess over the oracle run matches (VA+ξ)(1/κ2−1) at the run's own slope ratio κ to 0.2% over v_err = 0.0025 to 0.60 -- Kish, Quantum 8, 1382 (2024), Eqs. (80)-(82).✅ pass
test_link_names_the_formexplain() names the ξphase form, estimator on every q.Link run, derived, pinned or dry.✅ pass
test_link_wiringThe derived path's xi_input is the pinned channel ξ plus budget.phase(v_err) on (VA+ξ) and nothing else, a trusted vel staying in χdet.✅ pass
test_phase_domain_edgeThe literature form, lacking Kish Eq. (82)'s renormalisation, misses the measured excess by the closed ratio (ev+ev/2)/2 -- 5.5% at v_err = 0.054, 23% at 0.27, 58% at 0.60, 940% at 2.81 -- and holds to 10% only inside budget.PHASE_LIMIT, a range Marie-Alleaume Eqs. (10)-(11) do not state.✅ pass
test_phase_domain_warnsPast PHASE_LIMIT the literature form warns naming v_err and still returns the closed form, inside it is quiet, and assemble() inherits the warning.✅ pass
test_phase_noise_costs_keyThe derived path's key rate lands strictly below the same link with v_err pinned at 0.✅ pass
test_pinned_costs_rateCharging the noise half against an unattenuated T over-claims the metro rate by 0.34% at v_err = 2e-3, 0.88% at 0.005, 1.89% at 0.01 and 4.98% at 0.02.✅ pass
test_pinned_short_circuitsA pinned q.PilotPhase(v_err=...) returns the closed-form ξphase for 108 symbols in under 0.1 s, simulating none.✅ pass
test_pinned_transmittanceA pinned v_err charges both halves of Kish App. E Eq. (78): T_claimed and res.budget.inferred equal budget.infer(T, v_err), and Tclaimed(VA+ξtotal)=T(VA+ξchannel) at every variance.✅ pass
test_sampled_not_twiceThe fitted slope already carries κ, so the sampled path's T_claimed is the clamped res.est.T with no second budget.infer, within 1% of budget.infer(T, v_err) at 200k symbols.✅ pass
test_v_err_grows_with_linewidthv_err rises with linewidth at fixed block size, 100 kHz reaching over 10x the noiseless run.✅ pass
test_v_wrap_falls_with_pilotWith the lasers noiseless, 12 dB buys 101.2 in v_wrap once the block phase estimate is linear, 20 to 32 dB, and 5% more across 0 to 12 dB, where it is not.✅ pass
test_wrapped_is_not_the_budget_inputv_err and v_wrap agree to 0.1% while narrow, and at 10 MHz, 2.81 against 2.34, only v_err reproduces the measured 78.76 SNU, to 1.0%, where v_wrap gives 46.77.✅ pass
test_xi_from_phase_noiseMeasured excess noise matches Marie-Alleaume's 2VA(1−e−verr/2), form="literature", to 25% at 1, 10 and 100 kHz, inside PHASE_LIMIT.✅ pass