Skip to content

FlawGeometry ​

Tier A: Alice's flawed states on the Bloch sphere and the triangle they must form

4/4 passed in 0ms

TestWhat it doesResult
test_fidelity_closedflaw_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_rectangleflaw_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_openflaw_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_pairThe 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