Skip to content

BasisSymbols ​

Symbol-level BB84: gains and error rates counted rather than integrated

13/13 passed in 8745ms

TestWhat it doesResult
test_basis_defaultedNaming bases = 2 and the key basis's own monitor rate reproduces every count of the unnamed call at three grains.✅ pass
test_basis_guardsrun_basis refuses a basis count other than 2 or 3, a second monitor rate in a two-basis run, a monitor rate past 1/2, and a rate triple no Pauli channel has.✅ pass
test_counts_consistentrun_basis counts nest errors in sifted in clicks in sent, sent sums to the pulses, the three bases partition sifted and errors, and a two-basis run puts every test count in X and none in Y.✅ pass
test_dark_conventionClickDetector.dark is one detector's per-gate probability and the report derives Y0 = 1 - (1 - dark)^2 from it; at 1% the sample sits below the closed form by the coincidence cross term, over eight sigma, and above the detector-dark reading, 0.0678 against 0.0537.✅ pass
test_dark_free_agreementAt zero dark count over 2e6 pulses at T*eta = 0.5 the qber lands in a four-sigma binomial band of the 0.033 misalignment and the gains in theirs, with no double clicks.✅ pass
test_sampled_guardsThe sampled path refuses a laser, and q.Decoy and run_basis refuse probabilities not summing to 1 and intensities violating nu1 + nu2 < mu.✅ pass
test_sampled_linkA sampled q.Link on GYS hardware at 25 km and 1.5e8 pulses matches the closed-form gain and qber in their bands and the rate within 12%, and labels its stages.✅ pass
test_sampled_wiringThe sampled link's y1, e1, q1 and rate equal decoy_bounds on run_basis's (gain, error) pairs interleaved per intensity, then bb84_rate, bit for bit.✅ pass
test_seed_and_grainrun_basis reproduces every count at one seed and at grains 1, 997 and 65536, and differs at another seed.✅ pass
test_sift_thinningThe sifted-per-click rate converges on the sift factor at 0.5 and 0.9 within a binomial band.✅ pass
test_spectrum_recoveredAt (e_x, e_y, e_z) = (0.05, 0.07, 0.03) over 6e6 pulses the rates read back in their binomial bands, sixstate_bell resolves weights 0.0448, 0.0243, 0.0051 beyond four propagated sigma, and the tomographic Holevo term is 0.2814 against the depolarising 0.2148.✅ pass
test_symmetric_noiseOne rate in every basis samples one number: sixstate_bell refuses seed 7's 5, 6 and 14 errors at 4e5 pulses, and at 1e6 pulses the three depolarising weights Q/2 = 5.00e-4 spread over more than a fifth of it, each inside its four-sigma band.✅ pass
test_three_sharesrun_basis's three-basis key share inverts sixstate_sift to 3e-16 over six biases, and at the uniform bias X and Y counts sit within 0.6% of the key basis against a 2.5% four-sigma band.✅ pass