Skip to content

BudgetOptics ​

Itemised coupling, splice and connector losses, and where they sit

9/9 passed in 1ms

TestWhat it doesResult
test_born_in_spanRaman photons are born inside the span: Bob's 1.5 dB leaves their input-referred noise unchanged, while Alice's inflates it and costs key.✅ pass
test_link_budgetres.budget totals the xi the rate used, one row per source, and answers .at() over the run's chain; a click family reports None.✅ pass
test_link_chainA Link folds the declared chain into T: 7.12 dB of link costs key against 5.0 dB of fibre, and res.budget names every optic.✅ pass
test_loss_asymmetry1.5 dB at Alice's output and at Bob's input give one T and one detector-plane referral but different channel-output and span-born input referrals.✅ pass
test_loss_multipliesEvery declared optic multiplies into T and the decibels add: two 0.25 dB connectors, six 0.02 dB splices and a 1.5 dB coupling take 5.0 dB to 7.12.✅ pass
test_loss_optionalA budget declaring no optics keeps its T, rows and totals, prints no loss section, and collapses the channel-output and detector planes.✅ pass
test_loss_pinnedItemised losses on a pinned q.Channel are refused by run() and explain().✅ pass
test_loss_refusesA duplicate descriptor at one site, a non-loss component, a negative loss and an unknown site are refused, and splices at two sites keep two lines.✅ pass
test_raman_spanassemble()'s Raman row refers in by launch*span where every other row uses the total T, as a q.Link run does.✅ pass