PolarisationCarrier
Polarisation encoding: misalignment from a frame rotation, not a knob
6/6 passed in 2ms
| Test | What it does | Result |
|---|---|---|
test_carrier_reduces | An undescribed frame has contrast exactly 1.0, pol_error returns the misalignment, and the polarisation link equals the plain one in rate, qber and gain. | ✅ pass |
test_contrast_composes | pol_error composes misalignment and frame rotation as contrasts, 1 - 2e = (1 - 2e_miss) C to 1e-14, not as summed error rates. | ✅ pass |
test_drift_link | Through q.Link a 50 mrad drift lifts the qber from 3.31% to 3.545% and keeps 0.898 of the key rate, reporting tracking, optics misalignment, derived misalignment and contrast as separate rows. | ✅ pass |
test_frame_guards | q.ReferenceFrame refuses an unknown model, a field the chosen tracking model does not consume, a free frame with no rate, and dispersion without a width. | ✅ pass |
test_pmd_link | PMD contrast is the field overlap sqrt(mode_overlap), not the intensity overlap, and the link scales DGD by sqrt(length) to 0.5 ps at 25 km and refuses PMD with no span. | ✅ pass |
test_tracking_matters | A 5 mrad tracked frame and a 0.1 rad/sqrt(s) free walk over 1 s differ over 100x in error rate, and free-walk contrast decays from 1 to 0 with the interval. | ✅ pass |