FlawGeometry
Tier A: Alice's flawed states on the Bloch sphere and the triangle they must form
4/4 passed in 0ms
| Test | What it does | Result |
|---|---|---|
test_fidelity_closed | flaw_fidelity matches sqrt(1 - [sin^2(delta/2) + sin^3(delta/2)]/2) to 1e-15 and is exactly 1 at zero flaw. | ✅ pass |
test_ideal_rectangle | flaw_angles(0) is the ideal BB84 set and at any flaw the four deviations over delta are 0, 1, 1/2 and 3/2. | ✅ pass |
test_triangle_open | flaw_triangle is 2 at zero flaw, peaks at 3*sqrt(3)/2 at delta = pi/3 and stays positive out to 3.14. | ✅ pass |
test_virtual_pair | The two virtual X states stay antipodal, both rotate by delta/2, and their priors sum to 1 and split by sin(delta/2)/2. | ✅ pass |