BudgetEngine
Phase 3: xi assembled from hardware parameters
14/14 passed in 1ms
| Test | What it does | Result |
|---|---|---|
test_budget_inferred | Budget.inferred is infer(T, v_err) where a phase row was formed, T itself where none was, explain's T_claimed on a run, and a raise on a literature budget. | ✅ pass |
test_dac_reaches_link | DAC quantisation noise falls with bit depth, under 1e-3 SNU input-referred at 16 bits, and a q.Link charges budget.dac's own value. | ✅ pass |
test_omitted_hardware | Hardware left None omits its row rather than zeroing it, and assemble() takes no vel, trusted or detector term. | ✅ pass |
test_phase_default_form | assemble() emits the estimator form (V_A + xi)*(exp(V_err) - 1) and a plane_note naming Kish, Quantum 8, 1382 (2024), App. E (76)-(82), where it follows from Eqs. (80)-(82) by rearrangement, and Shen, Opt. Express 29, 30978 (2021), Eqs. (18)-(19). | ✅ pass |
test_phase_exact | Input-referred, the literature form is exactly 2V_A(1 - exp(-V_err/2)) and ignores T -- Marie & Alleaume, Phys. Rev. A 95, 012316 (2017), Eq. (10). | ✅ pass |
test_phase_refuses | Each refusal names its argument: the literature form refuses a channel xi and a transmittance half, and a negative variance or t above 1 is refused. | ✅ pass |
test_phase_transmittance | infer() is the transmittance half to phase()'s noise half, t*exp(-v_err) of Kish App. E Eq. (78), and the pair conserves the Bob-plane variance. | ✅ pass |
test_plane_rule | Every entry obeys at("bob") == T * at("input"). | ✅ pass |
test_raman_convention | Laudenbach Eq. (9.63) is twice Kumar 2015 (impairments.raman) on one density, Kumar keeping the polarising beamsplitter's half. | ✅ pass |
test_raman_density | Laudenbach Eq. (9.63) on a measured dBm/nm density: linear in the density, the filter width and the integration time, zero through a shut filter. | ✅ pass |
test_raman_refuses | A negative width or integration time, an infinite density, and a density or a rin with no bandwidth are all refused. | ✅ pass |
test_raman_width | The matched filter width is Laudenbach's 8 pm at 1 GHz on 193.4 THz, and B cancels out of the assembled Raman row. | ✅ pass |
test_rin_rows | assemble() emits budget.rin_rows verbatim, values and plane notes alike. | ✅ pass |
test_total_ungated | xi_total sums every assembled row, charged or not. | ✅ pass |