ONLINE COURSE

Sample Intermediate Lab and Assignment Showcase

Welcome Quantum Dawn Commander, to your Intermediate Level. Here, you’ll move from single-qubit effects to protocol analysis: BB84/decoy-state reasoning, error budgets, hypothesis tests, parameter estimation, and basic finite-key intuition. You’ll complete 20 labs, each with the same structure—problem → stepwise solution → matching Jupyter lab—now with more open code sections and emphasis on defensible claims (confidence intervals, model checks, plots). The sample lab below previews the format and level of rigor. Remember, this is not a certificate mill—mastery is demonstrated through mathematically sound reasoning and working code.

SpecterAi Quantum Security Manuals

Edition

Instructor Edition - All Levels (eBook)
Student Edition - All Levels (eBook)

Format

Kindle eBook
Kindle eBook

Mission Brief

Educational Takeaway

This lab demonstrates how quantum cryptographic security can be distilled into simple, measurable metrics. By analyzing QBER, comparing it to policy thresholds, and understanding statistical uncertainty, you learn how to convert raw experimental data into operational decisions that protect secure communications in real-world settings.

Problem

Glassmaker Mirage: DV/CV Drift vs. Spoof

Glassmaker Mirage: DV/CV Drift vs. Spoof

Mission Brief (Scenario)

03:13 local, 13 September 2031. The ops floor has that bone‑quiet hush you only hear after midnight—fans breathing, status LEDs ticking like little stars. You’re the on‑call analyst for a multinational’s quantum backbone when the triage daemon, Lighthouse, pings amber: ALERT — TIME‑BIN/NOISE ANOMALY. The alert packet is small by design: one short watch window (about two minutes), just enough evidence to decide whether to keep keys flowing or freeze the spur. The map on your left highlights the South China Sea segment; your event console on the right opens the snapshot. You take one slow breath and triage.

You are not here to prove a theorem. You are here to make a minutes‑scale, auditable call that a sleepy manager can understand at 03:13. The packet gives you two complementary lenses. DV time‑bin balance: for each basis, Z and X, Lighthouse tallied early and late detections and the total counts. A healthy link wobbles occasionally, but that wobble pushes both bases the same way; the troubling signature is an opposite‑sign skew (one basis leans early while the other leans late), which hints at basis‑selective manipulation such as a time‑shift. CV shot‑noise audit: a brief check of the noise yardstick compares the “with‑signal” shot‑noise estimate to the “signal‑blocked” estimate; in a healthy system their ratio sits near unity and does not co‑move with phase‑noise or pilot‑tone SNR spikes. If the yardstick itself is biased—say by bright‑light tricks—the ratio lifts and the traces misbehave.

Policy removes improvisation. Tonight’s guardrails are pinned in the commissioning doc and are not to be tuned mid‑incident: a DV magnitude tolerance ρtol ~ 1.12 and a CV yardstick tolerance Rtol ~ 1.05. Your steps are therefore simple and linear: compute per‑basis early fractions and asymmetry ratios; check whether Z and X share the same sign or flip; audit the CV ratio and look for correlated phase/SNR spikes; compare to thresholds; then decide PASS (re‑sync/re‑gating + monitor) or QUARANTINE (halt generation, capture diagnostics, raise posture). The entire choreography fits on a notepad line because real alerts arrive amid paging storms and coffee that’s gone cold.

Outside the glass, forklifts ping a loading dock; inside, your HUD ticks through the counts. You’ve seen nights like this in other spurs—gusts, HVAC steps, subtle clock drift—and you’ve also seen the mirage attackers try to paint: patterns that pretend to be weather but tilt opposite across bases or quietly skew the noise yardstick. The discipline that keeps you honest is the one baked into your training problem sets: clear denominators, explicit thresholds, one‑paragraph briefs. The mission brief you’re reading mirrors that same tone—tight, narrative, and operational—used in earlier QKD triage exercises so analysts can move smoothly from context to computation without re‑learning the dance at 3 a.m.

You scroll once more: early/late counts for Z and X, totals that are comfortably large, a shot‑noise audit line with “on” and “off” values, and a note: “no correlated phase/SNR spikes observed.” The decision is still yours, but the tools have trimmed the problem to its bones. If the pattern is same‑sign, within ρtol, and the CV ratio rides ≤ Rtol without pathology, you’ll reset gates, PASS, and keep the session alive; if not—if signs flip or the ratio lifts—you’ll QUARANTINE, seal logs, and escalate. The sea doesn’t pause while you think. Neither should you. Make the call.


Background

1) Two regimes you will check: DV and CV (in one breath)

DV time‑bin balance. For each basis b in {Z, X}, the system tallies early and late detections, Eb and Lb, and totals them as Nb = Eb + Lb. Healthy links wobble a little (temperature, alignment, load), but that wobble tends to push both bases in the same direction. A classic time‑shift manipulation tilts detection windows so one basis favors early while the other favors late. Your first qualitative test is therefore a cross‑basis sign comparison: is the skew same‑sign (global drift) or opposite‑sign (suspect)?

CV shot‑noise audit. In CV links, the local oscillator (LO) sets the noise yardstick. A quick audit blocks the quantum signal to re‑estimate shot noise, N0(off), and compares it to the with‑signal estimate, N0(on). In a healthy system the ratio R ≡ N0(on)/N0(off) rides near unity; bright‑light tricks or other biasing move R upward and often co‑move with phase‑noise or pilot‑tone SNR spikes. Your job is not to hunt every wrinkle—just to ask: “Is the yardstick honest?”

2) What active manipulation vs. benign drift looks like

  • Manipulation signature (DV): opposite‑sign skew across bases (e.g., EZ > LZ but EX < LX) and/or large magnitude imbalance.
  • Manipulation signature (CV): shot‑noise ratio far from unity (R ≫ 1) and/or phase/SNR anomalies co‑moving with LO power.
  • Benign drift: same‑sign skew across bases (global timing skew) with modest magnitude; CV yardstick stable near unity.

Pattern outranks drama: a small opposite‑sign skew is more suspicious than a larger same‑sign skew. Likewise, a calm CV ratio supports a benign interpretation, while even a modest excess coupled to phase/SNR spikes earns caution.

3) Your knobs (policy guardrails)

Thresholds are pinned in a commissioning document—operators do not move gates mid‑incident. For this environment, use these example tolerances:

  • DV magnitude guardrail: ρtol ≈ 1.12, where ρb = max(Eb, Lb) / min(Eb, Lb).
  • CV yardstick guardrail: Rtol ≈ 1.05.

The numbers are conservative for noisy maritime spurs and can be retuned in the next policy review—not during an active alert.

4) Tiny math you can do on a napkin

  • DV early fraction (per basis): pb = Eb / Nb.
  • DV asymmetry (magnitude): ρb = max(Eb, Lb) / min(Eb, Lb) (≥ 1 by definition).
  • DV sign test (pattern): compare Eb vs. Lb in Z and X; opposite signs → suspect; same signs → likely drift.
  • CV shot‑noise ratio: R = N0(on) / N0(off) (≈ 1 in healthy conditions).

For context only (not the lever), you can compute a binomial z‑score per basis: zb = (2Eb − Nb) / √Nb. Large N makes even small offsets look “significant,” which is why policy relies on pattern + guardrails, not p‑values.

5) The rule you’ll implement (do this in order)

  1. Aggregate & sanity‑check (DV): compute pb, ρb, and record the sign (is Eb greater than Lb, or vice‑versa?).
  2. Cross‑basis test (DV) / Yardstick audit (CV): DV → same‑sign vs. opposite‑sign; CV → compute R and look for phase/SNR spikes.
  3. Apply guardrails: PASS requires same‑sign DV skew and max ρb ≤ ρtol and R ≤ Rtol with no correlated spikes. Any violation or an opposite‑sign DV pattern ⇒ QUARANTINE.
  4. Decide & act: PASS → re‑gating/re‑sync + monitor; QUARANTINE → freeze keys, capture diagnostics, escalate posture.

This mirrors the instructive style of the sample problems: short formulas, crisp steps, explicit thresholds, and a one‑line outcome.

6) What your data looks like

Lighthouse hands you a compact packet for a single alert window (≈120 s):

  • DV per basis: early/late counts (Eb, Lb) and totals Nb for b ∈ {Z, X}.
  • CV audit: shot‑noise estimates N0(on) and N0(off), plus notes on phase‑noise and pilot‑tone SNR.

The format echoes the Intro sample’s “Problem → Tasks → Deliverables” block so your workflow stays familiar even as the physics deepens.


Problem (what the student sees & does)

Spur: Offshore trunk, South China Sea segment
Window size: ≈120 seconds (single alert window)
Guardrails (policy setpoints): ρtol = 1.12 (DV magnitude), Rtol = 1.05 (CV yardstick).
Decision logic: QUARANTINE if DV is opposite‑sign across bases, or if any ρb > ρtol, or if R > Rtol with phase/SNR anomalies. PASS otherwise (re‑sync/re‑gating + monitor).

Data (alert window)

DV — time‑bin balance (per basis)
Z basis: EZ = 26,350, LZ = 23,650 → NZ = 50,000
X basis: EX = 25,500, LX = 24,500 → NX = 50,000

CV — shot‑noise audit
With signal present: N0(on) = 1.002 SNU
With signal blocked: N0(off) = 0.998 SNU
Phase‑noise & pilot‑tone SNR: no correlated spikes observed during the audit.
(Values mirror the alert packet used in the Glassmaker Mirage solution.)


Tasks

  1. Compute DV early fractions pZ, pX. Report each as a reduced fraction and a decimal (three places).
  2. Compute DV asymmetry magnitudes ρZ, ρX. State whether each basis leans early or late.
  3. Assess the DV sign pattern. Are Z and X the same‑sign or opposite‑sign? Say it unambiguously.
  4. Compute the CV yardstick ratio R = N0(on) / N0(off). Note any phase/SNR anomalies if present.
  5. Apply guardrails. Compare max{ρZ, ρX} to ρtol and R to Rtol. Combine with the DV sign pattern.
  6. Make the operational call (PASS or QUARANTINE) and write a one‑sentence console brief that a manager can read without your notebook (cite denominators, thresholds, and the pattern that mattered).

Optional drill (confidence context)

If you want to add context, compute binomial z‑scores zZ and zX. Treat early/late as Binom(Nb, 0.5) under the null. This is for color, not as a hard lever.


Deliverables

  • A compact DV table with (Eb, Lb, Nb, pb, ρb, sign) for b ∈ {Z, X}.
  • A one‑line CV summary with N0(on), N0(off), R, and any phase/SNR remark.
  • A one‑sentence brief with the decision and rationale tied to guardrails and pattern logic.

Worked Reading Prompts (to guide your write‑up)

  • Explain why same‑sign DV skew across bases points toward global drift, whereas opposite‑sign suggests basis‑selective nudging.
  • Describe what the CV ratio R “means” in plain language—why is R ≈ 1 the expectation and R ≫ 1 a red flag?
  • Comment on why policy uses both a pattern test (sign) and magnitude guards (ρ and R), and why adjusting thresholds mid‑alert is banned.
  • List one plausible benign driver (e.g., small clock offset) and one adversarial tactic (e.g., time‑shift or bright‑LO bias) that match the observables.

Notation Cheatsheet

  • Eb, Lb — early/late DV counts in basis b; Nb = Eb + Lb.
  • pb — early fraction in basis b (Eb/Nb).
  • ρb — early/late asymmetry ratio in basis b (max/min).
  • N0(on), N0(off) — CV shot‑noise with signal on vs. blocked.
  • R — shot‑noise yardstick ratio N0(on) / N0(off).
  • ρtol, Rtol — policy guardrails for DV magnitude and CV yardstick, respectively.
  • zb — binomial context score (optional), (2Eb − Nb)/√Nb.

From SpecterAI Quantum Security Manual, Student Edition (see above for link)

Intermediate — Glassmaker Mirage: DV/CV Drift vs. Spoof

Intermediate — Glassmaker Mirage: DV/CV Drift vs. Spoof

1.0 Mission Brief (Scenario)

03:13 local, 13 September 2031. The ops floor is the kind of quiet that amplifies tiny sounds: HVAC breath, the faint chirp of optics alarms two rows over, status LEDs pulsing in a slow constellation. You are the on‑call analyst for a multinational’s quantum backbone when the triage daemon Lighthouse blinks amber: ALERT — TIME‑BIN/NOISE ANOMALY DETECTED. The alert packet is intentionally compact—one short watch window (about two minutes), just enough to decide whether to keep keys flowing or freeze the spur. The map overlay highlights the South China Sea segment; the event console unfurls the snapshot. You take one slow breath and triage.

Your job is not to prove a theorem. It is to make a minutes‑scale, auditable call that an on‑call manager can understand at 03:13. The packet gives you two complementary lenses. First, discrete‑variable (DV) time‑bin balance: for each basis (Z and X) the system counted early and late detections in a detection gate; totals are large enough to steady the fractions. Healthy links wobble with temperature, pointing, and load, but that wobble tends to nudge both bases in the same direction. The troubling signature is an opposite‑sign skew—say, Z leans early while X leans late—which hints at basis‑selective manipulation such as a time‑shift tactic.

Second, a quick continuous‑variable (CV) shot‑noise audit: the system estimates shot noise with the quantum signal present and again with the signal blocked. In a healthy configuration, the ratio of these estimates rides near unity and does not co‑move with phase‑noise or pilot‑tone SNR spikes. If the yardstick itself is biased—say by bright‑light tricks or LO drift—the ratio lifts and traces misbehave. The pair of checks (DV pattern and CV yardstick) is deliberately simple: each can be computed on a napkin but together they are surprisingly discriminative in noisy field conditions.

Policy removes improvisation. Tonight’s guardrails are pinned in the commissioning doc and are not to be tuned mid‑incident: a DV magnitude tolerance of ρtol ≈ 1.12 (max‑over‑min time‑bin asymmetry) and a CV yardstick tolerance of Rtol ≈ 1.05 (shot‑noise ratio with‑signal vs. blocked). Your steps are therefore linear and testable: compute per‑basis early fractions and asymmetry ratios; check whether Z and X share the same sign or flip; audit the CV ratio and scan for correlated phase/SNR spikes; compare to thresholds; then decide PASS (re‑sync and continue) or QUARANTINE (halt generation, capture diagnostics, raise posture). The entire choreography fits on a single line of your scratchpad because real alerts arrive amid paging storms and coffee that has gone cold.

Outside the glass, forklifts ping a loading dock. Inside, your HUD ticks through counts. You have seen nights like this—gusts, HVAC steps, subtle clock drift—and you have also seen the mirage that attackers try to paint: patterns that masquerade as weather but tilt opposite across bases or quietly skew the noise yardstick. The discipline that keeps you honest is the one baked into your training: clear denominators, explicit thresholds, one‑paragraph briefs. You scroll again: early/late counts for Z and X, totals comfortably large, a shot‑noise audit line with “on” and “off,” and a note: “no correlated phase/SNR spikes observed.” The decision is yours, but the tools have pared the problem to its bones. If the pattern is same‑sign, within ρtol, and the CV ratio rides ≤ Rtol without pathology, you will reset gates, PASS, and keep the session alive; if not—if signs flip or the ratio lifts—you will QUARANTINE, seal logs, and escalate. The sea does not pause while you think. Neither should you. Make the call.

2.0 Historical & Conceptual Background

Quantum key distribution—two families, one operational goal. Since the earliest BB84 proposals, production QKD has bifurcated into DV schemes (with discrete detection events in gates) and CV schemes (with analog quadrature samples measured against a noise yardstick). In both, secrecy rests on disturbance: an adversary trying to glean information inevitably leaves a statistical fingerprint. Practical deployments, however, rarely resemble textbook, noiseless channels. Temperature gradients move alignment; ferries or cranes at a harbor nudge poles; a bright LO drifts; polarization rotates slowly in fiber. Operators therefore lean on patterns rather than ornate proofs in the heat of an incident. If the pattern “fits benign drift” and stays within guardrails, production continues. If not—if it looks basis‑selective or the yardstick is dubious—the line gets quarantined while deeper forensics run offline.

Why time‑bin balance is such a good canary. DV receivers carve time into narrow gates aligned to expected arrival. A small global offset—say a few picoseconds of clock skew—shifts both Z and X in the same direction (earlier or later). A manipulator seeking advantage, by contrast, pushes the two bases in opposite directions: one detector window is favored while its conjugate suffers. The sign of the skew across bases thus carries more meaning than its raw magnitude. A mildly imbalanced, same‑sign pattern is almost certainly drift; a modest but opposite‑sign pattern merits suspicion even before p‑values are invoked. That is Glassmaker’s first lesson: pattern outranks drama.

Shot‑noise as a yardstick—and how it can lie. In CV, all secrecy accounting flows through the shot‑noise unit (SNU). If an adversary can inflate the measured shot noise during “signal‑present” moments—by adding classical light or nudging phase—then subsequent reconciliation and parameter estimation think the channel is cleaner than it is. A robust audit blocks the signal briefly, re‑measures, and compares the yardsticks. The expected ratio is unity within a small tolerance. Persistent elevation of the ratio or correlated spikes in phase/SNR traces point to mis‑calibration or spoofing. This is Glassmaker’s second lesson: always check the yardstick before you trust the ruler.

Guardrails over free‑hand thresholds. Production environments pick tolerances before the night gets weird. Tighter values catch more subtle issues at the cost of frequent false alarms; looser values keep wheels turning but increase risk. The commissioning document for this theater pegs DV magnitude at ρtol ≈ 1.12 and CV ratio at Rtol ≈ 1.05—settings that assume maritime vibration and daily thermal cycles. These are policy choices: a junior analyst at 03:13 doesn’t edit them; they merely apply them and leave a crisp audit trail.

Humility about “significance.” With tens of thousands of counts per basis, almost any nonzero offset can look statistically significant. That is why Glassmaker pairs the binomial z‑score with pattern and guardrails. A large |z| on a same‑sign pattern is still drift‑colored; a moderate |z| on an opposite‑sign pattern is worrisome. Put differently, “significant” is not the same as “suspicious.” Operational judgment depends on what is deviant, not merely how many sigma away it sits.

3.0 Technical Foundations

3.1 Discrete‑Variable (DV) Time‑Bin Balance

For each basis b ∈ {Z, X} the receiver reports early and late counts (Eb, Lb). We use totals Nb = Eb + Lb, the early fraction pb, and an asymmetry magnitude ρb (max‑over‑min) together with a sign check across bases.

p_b = EN
Early fraction in basis b: counts falling in the early gate divided by total counts.
ρ_b = max(E,L) min(E,L)
Asymmetry magnitude in basis b: the larger time‑bin count divided by the smaller (always ≥ 1).

A light‑weight context score treats early/late as a Binomial(Nb, 0.5). The z‑score below rises with both imbalance and sample size; we use it for color, not as a binary switch.

z_b = 2EN N
Binomial context score: deviations of early counts from half the total, scaled by √N.

Pattern test. Compare the signs (Eb − Lb) across Z and X. If both are positive or both negative, we say the skews are same‑sign (drift‑colored). If one is positive and the other negative, they are opposite‑sign (suspect). The numerical guardrail then asks whether any ρb exceeds ρtol.

3.2 Continuous‑Variable (CV) Shot‑Noise Audit

Let N0(on) and N0(off) denote shot‑noise estimates with signal present vs. blocked. The ratio is our yardstick integrity check:

R = N0(on) N0(off)
Shot‑noise yardstick ratio: unity (within tolerance) indicates an honest yardstick.

Interpretation. If R sits within tolerance—here, ≤ Rtol ≈ 1.05—and phase/SNR traces are calm, we treat the CV yardstick as sound. If R lifts beyond tolerance or co‑moves with traces, suspect bright‑light mis‑calibration or LO abuse. Combine this with the DV pattern to make the call.

Decision rule (operational): QUARANTINE if DV skews are opposite‑sign across bases, or if any ρb > ρtol, or if R > Rtol with phase/SNR anomalies. Otherwise PASS (re‑sync/re‑gating + monitor).

4.0 Problem Setup & Data

Spur: Offshore trunk, South China Sea segment. Window size: ≈120 seconds (single alert window). Policy guardrails: ρtol = 1.12 (DV magnitude), Rtol = 1.05 (CV yardstick). Decision logic: as stated in the callout above.

4.1 DV — Time‑Bin Balance (per basis)

Z basis: EZ = 26,350, LZ = 23,650 ⇒ NZ = 50,000.

X basis: EX = 25,500, LX = 24,500 ⇒ NX = 50,000.

4.2 CV — Shot‑Noise Audit

With signal present: N0(on) = 1.002 SNU. With signal blocked: N0(off) = 0.998 SNU. Traces note: no correlated phase/SNR spikes observed during the audit.

All values above are the alert packet for this exercise. Your outputs will not be raw code; they will be a short table, a one‑line CV summary, and a one‑sentence operational brief suitable for a manager.

5.0 Student Tasks & Expected Outputs

  1. Compute DV early fractions pZ, pX. Report each as both a reduced fraction and a decimal to three places.
  2. Compute DV asymmetry magnitudes ρZ, ρX. State whether each basis leans early or late.
  3. Determine the DV sign pattern across bases. Are the skews same‑sign or opposite‑sign?
  4. Compute the CV yardstick ratio R = N0(on) / N0(off). Note any phase/SNR anomalies if present.
  5. Apply guardrails. Compare max{ρZ, ρX} to ρtol and R to Rtol. Combine with the DV sign pattern to make the call.
  6. Write a one‑sentence console brief that a manager can read without your notebook. It must cite denominators, thresholds, and the pattern that mattered (e.g., “same‑sign DV within ρtol, R ≤ Rtol”).
Deliverables: (a) A compact DV table with (Eb, Lb, Nb, pb, ρb, sign) for b ∈ {Z, X}; (b) a one‑line CV summary; (c) the single‑sentence brief (PASS or QUARANTINE + reason).

6.0 Step‑By‑Step Guidance (Non‑Solution Scaffolding)

6.1 Read the Packet Once, End‑to‑End

Before computing, read the entire alert block like a weather map. Confirm that the DV section lists counts for Z and X and that the CV section lists N0(on), N0(off), and any qualitative notes about phase/SNR. Verify that the window duration is what you expect (≈120 s) and that the totals are plausibly large (tens of thousands per basis). If anything looks malformed, you are allowed to say “insufficient packet” and request a fresh pull—triage prefers clean inputs to heroic inference.

6.2 Start with Fractions, Not z‑Scores

Compute pZ and pX. Your first description of the skew should be in plain language: “Z skews early, X also skews early,” or “Z early, X late.” If you open with a statistic (“zZ = 3.1”), you risk substituting a number for a concept. Pattern first; numbers second.

6.3 Add Magnitude with ρ

Compute ρZ and ρX. Values slightly larger than 1 are routine; the guardrail ρtol = 1.12 is deliberately tolerant for this spur. Do not conflate “bigger than you expected” with “beyond policy.” If both bases are same‑sign and each ρ ≤ ρtol, you are already leaning toward a PASS—unless the CV yardstick misbehaves.

6.4 Sanity‑Check with z

Compute the optional z scores if you want color. With N = 50,000, even a 1% offset produces a noticeable |z|, so treat these as supporting actors. If you do compute them, record the sign: a positive z implies early gating has the edge.

6.5 Audit the Yardstick

Calculate R. If it sits inside tolerance (≤ 1.05) and the traces are calm, you have no evidence of LO spoofing or calibration drift in this short window. If R lifts beyond tolerance or the traces jump in lockstep, call that out explicitly. Students sometimes forget that a clean CV yardstick can exonerate a scary‑looking DV magnitude when signs are same‑direction.

6.6 State the Pattern & Decide

Now synthesize: is the DV pattern same‑sign or opposite‑sign? Is the magnitude within tolerance? Is the CV yardstick honest? You should be able to produce the one‑sentence brief in under a minute. Triage is not a courtroom; it is a gate on a live system.

7.0 Worked Reading Prompts

7.1 Why same‑sign implies drift

Imagine two synchronized scoreboards for two courts that ought to behave alike. A global clock running fast nudges both boards in the same direction; one might log points a sliver before whistles, the other likewise. That is the same‑sign signature of benign timing skew. An attacker who can touch one court differently from the other leaves a tell more reminiscent of mirrors: one scoreboard leans early while the other leans late. This is the essence of Glassmaker’s qualitative test.

7.2 Why R ≈ 1 is comforting

Shot noise is the whisper of light itself. If the microphone (LO) and room (detector chain) are stable, measured noise with or without a performer onstage should be the same. A bright‑light trick that floods the stage would make the “with performer” measurement noisier, shifting R upward; a saggy calibration might do the same. When R is close to 1 and other traces are calm, you are justified in treating the yardstick as honest.

7.3 Why not tune guardrails mid‑alert

Thresholds are policy. If analysts tune them mid‑alert, two bad things happen: first, the audit trail becomes ambiguous (“why did you move the bar?”); second, the system incentivizes optimism during busy nights. The discipline of fixed guardrails protects you from both hindsight bias and incident drift.

8.0 Real‑World Variations & What‑Ifs

8.1 What if totals are small?

If Nb dips into a few thousand, ρ becomes jittery and z becomes tiny. You should still check signs, but lean more on repeated windows or a short re‑calibration run. Small samples magnify randomness; your narrative should say so.

8.2 What if signs are same‑sign but ρ is large?

That can happen if a global drift grows big enough. A sustained same‑sign skew beyond ρtol is a policy quarantine even if it is not an adversary. Keys minted during large drifts are often lower quality, and safing the system lets ops re‑gate calmly.

8.3 What if R is slightly high but traces are clean?

Corroboration matters. An R of 1.052 with pristine traces on a bouncy spur could be a measurement hiccup. A modest re‑audit may be justified. But do not hand‑wave a high R when phase/SNR are also dancing; that combination is the yardstick screaming.

8.4 What if signs flip across consecutive windows?

Rapid flips often indicate marginal gate alignment plus gusty conditions. Re‑sync and monitor for stability rather than escalate immediately. Attackers prefer persistence; weather prefers whimsy.

8.5 What if only one basis has very low counts?

If NZ or NX collapses, your sign test still holds but you must treat ρ with caution. A starving detector can produce extreme ratios for trivial reasons. In such cases, your brief should lead with count health before pattern.

9.0 Assessment Rubric & Self‑Check

  • Correctness (40%). Fractions and ratios computed accurately; pattern classification correct; guardrails applied without modification; decision aligns with policy.
  • Clarity (25%). Outputs are compact: a two‑row DV table, a one‑line CV summary, and a one‑sentence brief. No meandering, no hidden assumptions.
  • Defensibility (20%). The brief names denominators and thresholds; a peer could re‑create the decision with only your outputs.
  • Discipline (15%). No threshold tuning; optional statistics flagged as “context only”; language distinguishes drift vs. spoof.

10.0 Frequently Asked Questions

10.1 Do I need to compute confidence intervals?

No. You may compute them for personal comfort, but the decision rests on the sign pattern, ρ vs. ρtol, and R vs. Rtol, with trace context. Intervals are fine as long as they do not delay the call.

10.2 Why use max‑over‑min instead of a difference?

Ratios present a scale‑free magnitude and are less sensitive to total counts. Ops can compare ρ across links with different rates without mentally rescaling differences.

10.3 Could an attacker fake same‑sign skews?

Yes, but it is harder: they must tilt both bases in the same direction without inflating other signals. That kind of manipulation typically damages throughput or leaves CV fingerprints. The pairing of DV pattern with CV audit reduces risk.

10.4 What if I disagree with the policy thresholds?

Capture your rationale in the ticket and propose an update at the next review. In the middle of the night, follow policy. The artifact’s purpose is crisp, repeatable action, not threshold debates during an incident.

11.0 Notation & Math Glossary

  • Eb, Lb — early/late counts in basis b.
  • Nb — total counts in basis b (Eb + Lb).
  • pb — early fraction (Eb/Nb).
  • ρb — asymmetry magnitude (max/min).
  • zb — binomial context score ((2EN)/√N).
  • N0(on), N0(off) — shot‑noise estimates with signal present vs. blocked.
  • R — shot‑noise yardstick ratio N0(on)/N0(off).
  • ρtol, Rtol — policy guardrails for DV magnitude and CV yardstick.

References

Bennett, C. H., & Brassard, G. (1984). Quantum cryptography: Public key distribution and coin tossing. In Proceedings of IEEE International Conference on Computers, Systems and Signal Processing (pp. 175–179). Bangalore, India. https://arxiv.org/abs/2003.06557

Hwang, W.-Y. (2003). Quantum key distribution with high loss: Toward global secure communication. Physical Review Letters, 91(5), 057901. https://doi.org/10.1103/PhysRevLett.91.057901

Lo, H.-K., Ma, X., & Chen, K. (2005). Decoy state quantum key distribution. Physical Review Letters, 94(23), 230504. https://doi.org/10.1103/PhysRevLett.94.230504

Wang, X.-B. (2005). Beating the photon‑number‑splitting attack in practical quantum cryptography. Physical Review Letters, 94(23), 230503. https://doi.org/10.1103/PhysRevLett.94.230503

Qi, B., Fung, C.-H. F., Lo, H.-K., & Ma, X. (2007). Time‑shift attack in practical quantum cryptosystems. Quantum Information & Computation, 7(1), 73–82. https://arxiv.org/abs/quant-ph/0512080

Grosshans, F., & Grangier, P. (2002). Continuous variable quantum cryptography using coherent states. Physical Review Letters, 88(5), 057902. https://doi.org/10.1103/PhysRevLett.88.057902

Jouguet, P., Kunz‑Jacques, S., & Diamanti, E. (2013). Preventing calibration attacks on the local oscillator in continuous‑variable quantum key distribution. Physical Review A, 87(6), 062313. https://doi.org/10.1103/PhysRevA.87.062313

Sajeed, S., Huang, A., Sun, S.-H., Makarov, V., Chaiwongkhot, P., Gisin, N., & Curty, M. (2015). Insecurity of detector‑device‑independent quantum key distribution. Physical Review A, 91(6), 062301. (Background on detector attacks and calibration pitfalls relevant to practical triage.) https://doi.org/10.1103/PhysRevA.91.062301

Pirandola, S., Andersen, U. L., Banchi, L., et al. (2020). Advances in quantum cryptography: Security of quantum key distribution. Advances in Optics and Photonics, 12(4), 1012–1236. (Survey with DV/CV operational considerations.) https://doi.org/10.1364/AOP.361502

Solution

Intermediate — Glassmaker Mirage — Solution (South China Sea 2031)

Intermediate — Glassmaker Mirage — Solution

Triage playbook for a 03:13 local alert from a quantum link during a South China Sea watch window (Sep 13, 2031). You are the on‑call analyst; this is the “how to decide in minutes” guide.

Situation recap. A QKD span reports unusual statistics over a short interval (Δt ≈ 120 s). Your task is to decide whether to PASS (re‑sync and continue) or QUARANTINE (halt generation / raise readiness).

Quick Model Recap (what the system should look like)

  • Signals and observables. Two common regimes: Discrete‑variable (DV) QKD (e.g., BB84/decoy) gives you counts per time bin and basis. We denote early/late bins in basis \(b\in\{Z,X\}\) by \(E_b, L_b\) with \(N_b = E_b + L_b\). Continuous‑variable (CV) QKD gives you quadrature samples \((x, p)\) measured by homodyne/heterodyne; you monitor the shot‑noise level \(N_0\) and the total measured variance \(V_{\text{meas}}\). In both cases, a healthy link looks “balanced”: no persistent time‑bin bias in DV; stable \(N_0\) and phase in CV.
  • What an active manipulation looks like. Adversaries exploit hardware asymmetries. In DV, a classic time‑shift attack nudges detection windows so one detector is subtly favored in one basis and disfavored in the orthogonal basis. The hallmark pattern: opposite signs of skew across bases (e.g., \(E_Z > L_Z\) but \(E_X < L_X\)). In CV, a local‑oscillator (LO) spoof adds bright classical light or phase‑drifts to bias your shot‑noise calibration so the channel appears cleaner than it is. Tell‑tales include inflated “shot‑noise with signal present,” phase wander, and excess‑noise under‑reporting.
  • What normal drift looks like. Production links do wobble. Clock offsets, temperature drifts, and slow polarization rotation can produce mild, same‑sign skews across both bases (DV) or gentle \(N_0\) breathing and correlated phase noise (CV). Normal drift tends to be global and consistent, not basis‑dependent or mode‑selective.
  • Your control knobs. You can (1) re‑center detection gates / re‑sync clocks; (2) tighten/loosen per‑window tolerances; (3) run an on‑the‑fly shot‑noise audit (CV), i.e., block the quantum signal and re‑estimate \(N_0\); and (4) flip to conservative sifting (e.g., discard suspect windows) while you decide. Your decision is a function of simple statistics + pattern tests + these knobs.

Step‑by‑Step Triage (do this in order)

  1. Aggregate and sanity‑check the window. For DV, compute early/late fractions \(p_b = E_b/N_b\) and asymmetry ratios \[ \rho_b = \frac{\max(E_b, L_b)}{\min(E_b, L_b)}. \] Compute a binomial z‑score \[ z_b = \frac{2E_b - N_b}{\sqrt{N_b}}, \] under \(H_0: p_b = 0.5\). Expect nonzero \(z_b\) at large \(N_b\)—significance alone isn’t the decision lever; the pattern is. For CV, log \(V_{\text{meas}}\), the current shot‑noise estimate \(N_0\), instantaneous phase‑error, and the pilot tone SNR.
  2. Run the cross‑basis sign‑pattern test (DV) or the shot‑noise audit (CV).
    • DV: Check whether \(\operatorname{sign}(E_Z - L_Z)\) and \(\operatorname{sign}(E_X - L_X)\) are opposite. Opposite signs → basis‑dependent skew → suspect. Same sign → global drift → likely benign.
    • CV: Temporarily block the signal and re‑estimate shot noise: \(N_0^{(\text{off})}\). Compare with the “with‑signal” estimate \(N_0^{(\text{on})}\) via \[ R \equiv \frac{N_0^{(\text{on})}}{N_0^{(\text{off})}}. \] In a healthy system you expect \(R \approx 1\pm \epsilon\). A bright‑LO spoof often yields \(R \gg 1\) or phase‑noise spikes co‑moving with LO power.
  3. Apply guardrails and thresholds. Example tolerances that work well in noisy environments: DV: \(\rho_{\text{tol}} \approx 1.12\) and opposite‑sign skew to flag; CV: \(R_{\text{tol}} \approx 1.05\) with corroborating phase‑noise or pilot SNR dips. These are policy setpoints—operators can tighten for crisis ops.
  4. Decide and act.
    • PASS (re‑sync & continue): DV skews are same‑sign across bases and \(\max \rho_b \le \rho_{\text{tol}}\); CV shot‑noise ratio \(R \le R_{\text{tol}}\) with no excess‑noise spike. Perform a quick re‑gating/re‑sync and keep the session alive.
    • QUARANTINE (halt & escalate): DV shows opposite‑sign skew and \(\rho_b\) beyond tolerance, or CV’s \(R \gg R_{\text{tol}}\) with phase/SNR anomalies. Freeze keys, capture diagnostics, and raise posture.

Worked Example (numbers from the alert window)

DV check — time‑bin balance

Counts in the window (per basis):

Z-basis: EZ = 26,350,  LZ = 23,650,  NZ = 50,000
X-basis: EX = 25,500,  LX = 24,500,  NX = 50,000
  

Fractions and ratios:

  • \(p_Z = E_Z/N_Z = 0.527\), \(\rho_Z = 26{,}350/23{,}650 \approx 1.115\).
  • \(p_X = E_X/N_X = 0.510\), \(\rho_X = 25{,}500/24{,}500 \approx 1.041\).

Both skews are statistically non‑zero at this \(N\) (for context): \[ z_Z = \frac{2E_Z - N_Z}{\sqrt{N_Z}} \approx \frac{700}{223.61} \approx 3.13,\quad z_X \approx 4.47. \] Importantly, the signs match (\(E_b > L_b\) in both \(Z\) and \(X\)), which is the signature of a global timing skew, not a basis‑dependent manipulation.

CV check — shot‑noise audit (if applicable to this link)

Audit results over the same window (illustrative values):

  • With signal: estimated shot noise \(N_0^{(\text{on})} = 1.002\,\mathrm{SNU}\).
  • Signal blocked: \(N_0^{(\text{off})} = 0.998\,\mathrm{SNU}\).

Ratio \(R = N_0^{(\text{on})}/N_0^{(\text{off})} \approx 1.004 \le R_{\text{tol}} = 1.05\). Pilot tone SNR and phase error show no correlated spikes. That’s consistent with no LO spoof.

Decision

  • DV: \(\rho_Z \approx 1.115\), \(\rho_X \approx 1.041\), both \(\le \rho_{\text{tol}} = 1.12\); signs are the same across bases → global drift.
  • CV: \(R \approx 1.004 \le 1.05\); no phase/SNR pathology → no LO spoof.
  • Outcome: PASS. Perform re‑sync/re‑gating, continue session, and schedule a follow‑up calibration window.

Why this is the right call

Imagine two basketball scoreboards (the \(Z\) and \(X\) bases) that should stay roughly tied. An attacker who can tilt the floor only when you switch courts would make one scoreboard favor “early” while the other favors “late.” That’s the opposite‑sign pattern we hunt. Here, both scoreboards lean the same way by a small margin—like a single gym clock running a tad fast. In CV terms, your “microphone hiss” (shot noise) is the same whether the singer is on stage (signal on) or not (signal off). If a fake LO flooded the mic, the hiss measurement would be off when the singer stands there. It isn’t.

The pass decision isn’t “shrug and move on.” You act: slide detection windows by a few picoseconds, re‑center the phase‑tracker, and keep auditing. If the pattern ever flips to the tell‑tale of targeted tampering (opposite signs, big \(\rho\), or \(R\) spikes), you already know the QUARANTINE play: freeze keys, capture diagnostics, and escalate readiness for the theater.

Operator Checklist (fast path)

  • ✅ Compute \(p_b, \rho_b, z_b\) for DV; log \(N_0^{(\text{on})}, N_0^{(\text{off})}, R\) for CV.
  • ✅ Check sign pattern (DV) or \(R\) and phase/SNR (CV).
  • ✅ Compare to policy thresholds (\(\rho_{\text{tol}}\), \(R_{\text{tol}}\)).
  • ✅ PASS → re‑gating/re‑sync + monitor; QUARANTINE → halt, seal logs, escalate.

Notes: numeric tolerances shown (e.g., \(\rho_{\text{tol}}=1.12\), \(R_{\text{tol}}=1.05\)) are representative and can be tuned by your ops policy. All math is rendered client‑side via MathJax.

From SpecterAI Quantum Security Manual, Instructor Edition (see above for link)

Glassmaker Mirage

Glassmaker Mirage

1.0 Historical Background & Conceptual Deep Dive

Operations teams who live with production quantum links learn quickly that the most useful playbooks are those you can run at 03:13 on a Tuesday. The physics is profound; the decision must be simple. Glassmaker Mirage sits in that philosophy: take two families of practical signals seen in the field—discrete‑variable (DV) time‑bin counts and continuous‑variable (CV) shot‑noise measurements—and convert them into a short, auditable decision tree. The “mirage” in the title hints at a known adversarial trick: create patterns that resemble benign drift (e.g., global timing skew) so that a tired operator shrugs and passes. Your task is to build a chapter that makes that shrug unlikely by pairing simple statistics with pattern logic and a small number of guardrails that can be tuned in policy.

In DV QKD deployments, a widely used health indicator is the balance of early/late detections within a time‑bin basis. A well‑behaved link can tolerate small imbalances—temperature drift, clock wander, and stress on fibers will do that. But basis‑selective imbalances, where one basis leans early while the orthogonal basis leans late, are operationally suspicious. They suggest a time‑shift or related manipulation that nudges detection windows unevenly across bases. That is the first lens taught in this lab: a sign pattern across bases is as important as the magnitude.

In CV QKD, the local oscillator (LO) provides phase reference and sets the yardstick for noise. If an adversary biases your shot‑noise calibration—say by bright‑light tricks co‑moving with LO power—the “with‑signal” shot‑noise estimate is no longer commensurate with the genuine vacuum noise. The fix is to perform a short shot‑noise audit that re‑estimates the noise with the quantum signal blocked, then compare the two. The audit collapses a potentially complex story into a single ratio that is easy to track under pressure.

The point of pairing DV and CV views is not to multiply work; it is to reduce ambiguity. DV tells you whether the link shows a basis‑dependent skew; CV tells you whether your noise yardstick is honest. Together they support a conservative, documented call: PASS (re‑sync and continue) or QUARANTINE (halt generation and raise posture). The remainder of this chapter turns that philosophy into an instructor‑ready, fully auditable path using minute‑scale windows, display‑quality fractions, clear thresholds, and short English glosses after every display equation so that students see mathematics as words, not incantations.

2.0 Executive Summary

We triage a short alert window using two complementary checks. DV check: compute early/late fractions per basis and an asymmetry ratio; evaluate the sign pattern across bases (opposite‑sign skew ⇒ suspect; same‑sign ⇒ likely global drift). CV check: if applicable to the link, temporarily block the quantum signal, re‑estimate shot noise, and compare to the with‑signal estimate via a ratio. Guardrails: a policy tolerance on the DV asymmetry (example: ρtol ≈ 1.12) and on the CV ratio (example: Rtol ≈ 1.05) bound acceptable drift. A runbook then translates outcomes into PASS or QUARANTINE, with immediate next steps (re‑gating/re‑sync vs. freeze keys, capture diagnostics, escalate). Worked numbers below mirror the alert window pictured in the solution PDF for this intermediate splash lab.

3.0 Learning Objectives

  1. Compute DV time‑bin balance metrics per basis and interpret the sign pattern across orthogonal bases.
  2. Perform a CV shot‑noise audit and summarize it with a single ratio that is easy to brief.
  3. Apply guardrails consistently via fixed thresholds carried in policy, not ad‑hoc adjustments.
  4. Write a one‑paragraph, audit‑ready brief that a non‑specialist can read without the notebook.
  5. Explain why the decision is conservative, how it fails safe, and what next actions follow immediately.

4.0 What “Healthy” Looks Like (and What Manipulation Looks Like)

4.1 Signals & observables

DV regime. For each basis b ∈ {Z, X} we record counts in early/late bins: Eb, Lb, with Nb = Eb + Lb. A healthy link has no persistent, basis‑dependent sign flip in early‑minus‑late, and asymmetry magnitudes that live within policy tolerances.

CV regime. We log the shot‑noise level N0 and the total measured variance Vmeas under homodyne/heterodyne. A healthy link keeps N0 stable and free of correlations with LO power in the audit; phase and pilot‑tone SNR should show no co‑moving spikes.

4.2 Manipulation signatures vs. benign drift

  • Time‑shift style manipulation (DV): opposite‑sign skew across bases (EZ > LZ but EX < LX, or vice‑versa) with large asymmetry.
  • Bright‑LO or yardstick bias (CV): shot‑noise ratio far from unity (with‑signal vs. blocked‑signal), and anomalies co‑moving with LO power.
  • Benign drift: same‑sign skew across bases (global timing skew), small asymmetries, stable noise yardstick.

5.0 Givens & Notation (per one alert window)

The solution packet provides a worked alert window with counts (per basis) and a CV audit. We adopt the notation below and refer back to those numbers in §9.0.

SymbolMeaningRemarks
Eb, LbDV early and late counts (basis b)Per basis b ∈ {Z, X}.
NbTotal DV counts (basis b)Nb = Eb + Lb.
pbEarly fractionpb = Eb/Nb.
ρbAsymmetry ratioρb = max(Eb, Lb)/min(Eb, Lb).
zbBinomial z‑score (context only)zb = (2Eb − Nb)/√Nb.
N0(on), N0(off)CV shot‑noise with signal on / blockedRe‑estimate “yardstick” with signal blocked.
RCV shot‑noise ratioR ≡ N0(on)/N0(off).
ρtol, RtolPolicy tolerancesExample bands: ρtol ≈ 1.12; Rtol ≈ 1.05 (tunable).

6.0 Estimators & Tests (with English Gloss)

6.1 DV early fraction

pb = EbNb .
English gloss: within a basis, the early fraction is early counts divided by the total counts.

6.2 DV asymmetry (magnitude) via ratio

ρb = max(Eb,Lb) min(Eb,Lb) .
English gloss: ρ measures how unbalanced early vs. late are, regardless of which side is bigger.

6.3 DV sign pattern (across bases)

Define the sign per basis by comparing Eb and Lb. Opposite signs across Z and X suggest basis‑selective manipulation; same signs suggest global drift. Always report the pattern explicitly in your brief.

6.4 DV z‑score (context only)

zb = 2EbNb Nb .
English gloss: the z‑score quantifies how far the early fraction is from 50% at this denominator.

6.5 CV shot‑noise audit ratio

R = N(on) N(off) .
English gloss: compare the shot‑noise yardstick with signal present to the yardstick with signal blocked; unity means the yardstick is honest.

7.0 Guardrails & Policy Thresholds

Your commissioning document pins numeric tolerances for the environment. For noisy maritime links, a useful starting point is ρtol ≈ 1.12 (DV asymmetry) and Rtol ≈ 1.05 (CV ratio). Teams can tighten or loosen these with experience. The essential rule is consistency: do not adjust thresholds mid‑incident. Document a revision later if seasonality or hardware revisions warrant new bands.

8.0 Step‑by‑Step Triage (Run This in Order)

  1. Aggregate & sanity‑check the window (DV): compute pb, ρb, and zb per basis; verify denominators are plausible.
  2. Check the cross‑basis sign pattern (DV): are the signs opposite (suspect) or the same (likely drift)?
  3. Run the shot‑noise audit (CV, if applicable): block the signal briefly; estimate N0(off); compute R.
  4. Apply guardrails: ensure max ρb ≤ ρtol and R ≤ Rtol for a PASS; any violation or opposite‑sign pattern → QUARANTINE.
  5. Decide & act: PASS → re‑gating/re‑sync + monitor; QUARANTINE → freeze keys, capture diagnostics, escalate posture.

9.0 Worked Example (Alert Window Numbers)

The solution packet displays a DV time‑bin balance table and a CV audit over the same window. The DV counts (per basis) read approximately: Z basis: EZ = 26,350; LZ = 23,650; NZ = 50,000. X basis: EX = 25,500; LX = 24,500; NX = 50,000. From these we compute:

  • Early fractions: pZ = 26,350/50,000 ≈ 0.527; pX = 25,500/50,000 = 0.510.
  • Asymmetry ratios: ρZ = 26,350/23,650 ≈ 1.115; ρX = 25,500/24,500 ≈ 1.041.
  • Sign pattern: E>L in both bases → same‑signglobal drift signature.
  • Contextual z‑scores (not a guardrail): zZ ≈ (2·26,350 − 50,000)/√50,000 ≈ 2,700/223.61 ≈ 12.1; zX ≈ 1,000/223.61 ≈ 4.47.

The CV audit shows N0(on) ≈ 1.002 SNU and N0(off) ≈ 0.998 SNU over the same window, giving R = N0(on)/N0(off) ≈ 1.004, with no phase‑noise or pilot‑tone SNR anomalies. These values sit safely at or below the example tolerance Rtol ≈ 1.05.

10.0 Decision & Rationale

DV: ρZ ≈ 1.115, ρX ≈ 1.041, both ≤ ρtol = 1.12; signs are the same across bases → global drift. CV: R ≈ 1.004 ≤ Rtol = 1.05; no phase/SNR pathology → no LO spoof. Outcome: PASS. Perform re‑sync/re‑gating, continue the session, and schedule a follow‑up calibration window. Capture counts, ratios, and thresholds in the ticket for audit.

11.0 Why This Is the Right Call

In DV, imagine two scoreboards—one per basis—that should stay roughly tied. An attacker who can tilt the floor only when you switch courts would make one scoreboard favor “early” while the other favors “late.” That opposite‑sign pattern is the red flag we hunt. The alert window does not show it: both bases lean the same way by small margins within tolerance. That is what global drift looks like (e.g., slow timing skew).

In CV, the “microphone hiss” (shot noise) should measure the same whether the singer is on stage (signal present) or not (signal blocked). If a fake LO flooded the mic, the hiss measurement would swing. Here it does not; the ratio rides near unity, and phase/SNR traces are calm. Pairing these observations gives a defensible PASS that also comes with action: re‑center detection windows by a few picoseconds, re‑align clocks, and keep auditing the strip for any sign‑flip or ratio jump.

12.0 Operator Checklist (Fast Path)

  • Compute pb, ρb, zb for DV; log N0(on), N0(off), and R for CV.
  • Check sign pattern across bases (DV) or R and phase/SNR (CV).
  • Compare against policy thresholds (ρtol, Rtol).
  • PASS → re‑gating/re‑sync + monitor; QUARANTINE → halt, seal logs, escalate readiness.

13.0 Pitfalls, Edge Cases, and Seasonality

  • Denominator hygiene: Always publish Nb next to pb. The same asymmetry looks more/less alarming as counts change.
  • Basis mis‑mapping: Ensure the mapping of physical channels to logical bases is stable; swaps can mimic sign flips.
  • Maintenance pings: Documented scans can nudge timing; annotate the window and correlate with change records.
  • Phase wander (CV): Slow LO drift can broaden R slightly; look for co‑moving phase‑noise spikes before calling spoof.
  • HVAC/diurnal patterns: Repeating time‑of‑day signatures should be captured in policy notes so night shifts aren’t surprised.
  • Threshold drift: Never “nudge” thresholds mid‑incident. If you learn better bands, record the evidence and revise at the next review.

14.0 Audit‑Ready Math (Compact Derivations)

14.1 DV: early fraction and asymmetry

The early fraction pb is a binomial proportion with denominator Nb. For large Nb, the standard error of p̂ is

SE(p^) = p^ (1p^) Nb .
English gloss: sampling spread shrinks as counts grow and is largest near 50–50.

The asymmetry ratio ρb is a simple magnitude measure. We pair it with the cross‑basis sign test to avoid mis‑classifying benign global drift.

14.2 DV: z‑score for context

The z‑score compares early bias to the null of 50–50. We present zb in the instructor note for context; decisions do not rest on it alone.

14.3 CV: shot‑noise audit ratio

With the quantum signal present, the shot‑noise proxy is N0(on). With the signal blocked, it is N0(off). The audit ratio R should remain near unity in a healthy system. Values far above unity or co‑moving with LO power indicate a biased yardstick and trigger QUARANTINE.

15.0 Implementation Quality (Autograders & Dashboards)

  • Print an audit line per basis: {'basis': 'Z'|'X', 'E': ..., 'L': ..., 'N': ..., 'p_hat': ..., 'rho': ..., 'sign': 'E>L'|'L>E'}.
  • For CV links, add {'N0_on': ..., 'N0_off': ..., 'R': ...} and include phase/SNR markers in the same line.
  • Store thresholds and a configuration hash; emit the hash in the audit line so policy drift is detectable after the fact.
  • Plot p̂ per basis with shaded tolerance bands; add a panel for R; annotate maintenance markers.

16.0 What‑Ifs (Sensitivity & Scenario Variations)

ScenarioEffectLikely OutcomeInstructor Talking Point
Denominators drop by half SE doubles; ratio ρ unchanged DV confidence weakens; still check sign pattern Confidence and magnitude are distinct; publish both.
Opposite‑sign skew appears (same ρ) Basis‑selective signature QUARANTINE even if ρ close to ρtol Pattern outranks magnitude when consistent with attack.
R drifts to 1.06 without phase/SNR spikes Slight yardstick bias QUARANTINE per policy (R > Rtol) Do not “explain away” a ratio beyond tolerance mid‑incident.
R ≈ 1.02 but phase noise spikes with LO power Correlated anomaly Investigate aggressively; consider temporary quarantine Ratios summarize; auxiliary traces corroborate.
ρZ=1.14, ρX=1.01 (both E>L) Same‑sign with mild excess on Z Borderline; policy threshold decides Write the rationale either way; tie to denominators and history.

17.0 Instructor Prompts (For Discussion)

  • Ask students to explain why opposite signs across bases hint at targeted manipulation, while same signs suggest global drift.
  • Have them compute what ρtol they would choose for a calmer metro link vs. a windy harbor spur—and defend the choice.
  • Show a CV trace with subtle LO‑power co‑movement and let the class debate whether to quarantine.
  • Compare the DV z‑scores to the ratio‑based guardrail; discuss why z alone is not the decision lever.

References

Bennett, C. H., & Brassard, G. (1984). Quantum cryptography: Public key distribution and coin tossing. In Proceedings of IEEE International Conference on Computers, Systems and Signal Processing (pp. 175–179). IEEE. https://arxiv.org/abs/2003.06557

Scarani, V., Bechmann‑Pasquinucci, H., Cerf, N. J., Dušek, M., Lütkenhaus, N., & Peev, M. (2009). The security of practical quantum key distribution. Reviews of Modern Physics, 81(3), 1301–1350. https://doi.org/10.1103/RevModPhys.81.1301

Weedbrook, C., Pirandola, S., García‑Patrón, R., Cerf, N. J., Ralph, T. C., Shapiro, J. H., & Lloyd, S. (2012). Gaussian quantum information. Reviews of Modern Physics, 84(2), 621–669. https://doi.org/10.1103/RevModPhys.84.621

Jouguet, P., Kunz‑Jacques, S., Leverrier, A., Grangier, P., & Diamanti, E. (2013). Experimental demonstration of long‑distance CV‑QKD. Physical Review A, 87, 062313. https://doi.org/10.1103/PhysRevA.87.062313

Lydersen, L., Wiechers, C., Wittmann, C., Elser, D., Skaar, J., & Makarov, V. (2010). Hacking commercial QKD systems by bright illumination. Nature Photonics, 4, 686–689. https://doi.org/10.1038/nphoton.2010.214

Nielsen, M. A., & Chuang, I. L. (2010). Quantum computation and quantum information (10th anniversary ed.). Cambridge University Press. https://doi.org/10.1017/CBO9780511976663

Lab ​

Student Lab

Ready to Start Your Quantum Journey?

Don’t just preview—unlock the full SpecterAI experience. Enroll today and gain access to our complete Quantum Computing curriculum with guided labs, real-world projects, and AI-powered support.

👉 Join now and take the first step into the future of computing.