ApiComponents
Component validation paths and frozen-dataclass immutability
16/16 passed in 2ms
| Test | What it does | Result |
|---|---|---|
test_channel_bounds | Channel rejects | ✅ pass |
test_channel_ref | A nonzero ref is refused, and ref must name one of the two planes, case-sensitively. | ✅ pass |
test_click_optics | The click-family receivers validate on construction: a delay of at least one symbol, a contrast in [0, 1], a misalignment no worse than chance, a split that leaves a data line. | ✅ pass |
test_click_security | The per-family security components bound their own inputs: a phase error in [0, 1/2] and every f at or above the Shannon limit. | ✅ pass |
test_dark_rate | ClickDetector.gated takes the dark floor as a free-running count rate over a gate width and converts it to the per-gate probability the field holds, | ✅ pass |
test_dark_refusals | gated() refuses a dark floor stated twice and a gate of zero width, and leaves the per-gate constructor and its published default untouched. | ✅ pass |
test_decoy_ordering | Decoy refuses anything but three positive decreasing intensities with the decoys together weaker than the signal. | ✅ pass |
test_detector_bounds | All three detectors reject | ✅ pass |
test_fiber_exclusive | Fiber takes the hardware description or the derived | ✅ pass |
test_frozen_components | Components are frozen dataclasses: rebinding a field raises. | ✅ pass |
test_frozen_result | LinkResult is frozen, and on a pinned channel its oracle is the result itself. | ✅ pass |
test_hardware_bounds | The front-end hardware components validate on construction: bit depths, tones, linewidths, symbol rate and Bob's mandatory detector. | ✅ pass |
test_modulation_bounds | GaussianModulation rejects DifferentialPhase rejects ValueError naming the parameter. | ✅ pass |
test_nonfinite_f | A non-finite f is refused on every public path that charges one, by the Rust f_ec guard, the components' comparison against 1.0 admitting NaN and +inf. | ✅ pass |
test_qber_domain | q.IndividualAttack refuses a QBER outside [0, 1/2) and an f below the Shannon limit. | ✅ pass |
test_security_bounds | Asymptotic and FiniteSize reject FiniteSize also bounds pe_fraction. | ✅ pass |