betaFeedback

WorksPhysics and Astronomy

Q-TRACE: Physics-based zero-day attack detection for decoy-state quantum key distribution

Abstract

Practical quantum key distribution (QKD) is secure only while its devices match the assumptions of the security proof, and implementation attacks exploit mismatches while keeping the quantum bit error rate (QBER) low. We formulate attack detection in decoy-state BB84 as a sequential test against the honest-device manifold, the set of receiver statistics an attack-free link can produce under arbitrary channel loss. The resulting monitor, Q-TRACE (Quantum Telemetry Residuals Against Calibrated Expectations), calibrates a physical model of each link on commissioning data, profiles out the transmittance, and combines omnibus residual, physics score and setting-allocation tests with drift-robust references; no attack data are used. The formulation also yields a detectability exponent D* that lower-bounds the delay of any telemetry monitor and vanishes for a Trojan-horse probe with filtered back-reflection. On a count-level twin with model mismatch, over five held-out seeds and at a per-window false-alarm rate of 10^-3, Q-TRACE detects 63.6% of links under known attacks, 28.0% under unseen attack families and 65.3% under composite attacks, versus at most 51.2%, 6.7% and 42.3% for industry monitors, unsupervised and quantum-kernel detectors and a supervised classifier. Its delay attains the bound for strongly detectable attacks. On 33 parallel BB84 links of the IBM Heron processor ibm_marrakesh with physically executed entangling and amplitude-damping eavesdroppers, the measured information-disturbance relations agree with theory; a commissioning reference acquired under different operating conditions triggers alarms in every monitor tested, while a condition-matched reference detects a probe with 0.3% ideal QBER increase on 14 of 14 link-epochs with no false alarm on 66 honest ones.

Introduction

Quantum key distribution allows two parties to establish a shared secret whose security rests on quantum mechanics rather than on computational assumptions [1, 2, 3]. Two decades of work have turned the protocols into deployed systems, including metropolitan networks and satellite links [4, 5], and the security of realistic implementations with attenuated laser sources is now well understood [6, 7, 8, 9, 10, 11, 12, 13]. Decoy-state BB84 in particular has become the workhorse of practical QKD.

The security of a real system, however, is only as good as the match between its devices and the model used in the proof. Every implementation attack in the literature exploits a gap of this kind: photon-number splitting exploits multi-photon pulses [14, 15]; detector blinding turns single-photon avalanche diodes into classical threshold devices that the eavesdropper controls [16, 17, 18, 19]; time-shift and efficiency-mismatch attacks exploit detectors whose efficiencies differ in time [20, 21, 22]; Trojan-horse attacks read modulator settings through back-reflected light [23, 24, 25]; and calibration, phase-remapping, laser-damage and laser-seeding attacks manipulate the devices themselves [26, 27, 28, 29, 30]. Reviews of this landscape stress that the QBER, the quantity a system monitors by default, is precisely what a competent eavesdropper keeps low [31, 32, 33].

Three lines of defence exist. Device-independent and measurement-device-independent protocols remove whole classes of assumptions [34, 35] at a cost in rate and complexity. Hardware countermeasures close individual side channels [25, 36], but each closes only the channel it was designed for and may open others. Security proofs can be extended to cover characterised imperfections [37, 38, 39], which presupposes that the imperfection is known. A fourth, complementary line is monitoring: the legitimate parties already share rich statistics after sifting and error correction, and an attack that changes those statistics can, in principle, be noticed.

Monitoring has recently attracted machine-learning approaches. Supervised and semi-supervised neural networks have been trained to recognise attacks on continuous-variable systems [40, 41] and on discrete-variable systems [42, 43, 44]; one-class anomaly detectors have been applied to receiver attacks on an experimental system [45]; hybrid quantum–classical recurrent networks have been proposed for decoy-state BB84 telemetry [46]; and adversarial training against adaptive attackers has been explored [47]. These studies show that attacks leave learnable traces. They also share three limitations that matter for deployment. First, supervised detectors are trained on the attacks they are tested on, which is not the situation a system faces against an unknown attack. Second, the false-alarm rate is an empirical property of a particular test set rather than a controlled design parameter, although a false alarm discards key and a missed alarm compromises it. Third, none of these works asks which attacks are detectable at all from the available telemetry, so a poor result cannot be distinguished from a fundamentally invisible attack.

This paper addresses the three limitations with a single idea. Instead of learning what attacks look like, we characterise what an honest link can look like. Given the receiver statistics of a decoy-state link, the set of distributions consistent with some attack-free channel, with transmittance left free because loss is accounted for by the decoy-state bound, forms a low-dimensional manifold. Detection becomes a composite hypothesis test against that manifold, and the information divergence from an attacked distribution to the manifold measures how detectable the attack is for any monitor whatsoever.

Contributions. The work makes four contributions.

  1. An honest-manifold monitor. We derive a count-level model of a two-detector decoy-state receiver that is exact for threshold detectors and photon-number-dependent channels (§ 3), and build on it a sequential monitor, which we call Q-TRACE (Quantum Telemetry Residuals Against Calibrated Expectations), that calibrates each link on commissioning data and combines an omnibus residual test, a physics score test with an efficient treatment of the transmittance nuisance, and a setting-allocation test, each with a drift-robust moving reference (§ 5). The monitor is never shown an attack.

  1. Detectability limits. We define the detectability exponent D∗D^{*}, show that it lower-bounds the delay of every telemetry monitor at a given false-alarm rate, give its local form in terms of the efficient Fisher information, and prove that a Trojan-horse probe with filtered back-reflection is invisible to all telemetry monitors (§ 6).

  1. A benchmark with model mismatch. We construct six physically derived attacks and three compositions on a count-level twin that contains afterpulsing, intensity jitter, polarisation and temperature drift, none of which the monitor models, and compare Q-TRACE with industry monitors, four anomaly detectors including a quantum-kernel method, and a supervised classifier under matched false-alarm rates on held-out seeds (§ 7 and § 8).

  1. A hardware study. We run 33 BB84 links in parallel on an IBM Heron processor with eavesdroppers implemented as tunable two-qubit probes, measure the eavesdropper’s information on her ancillary, and report both a pre-registered analysis, in which every monitor raised alarms on honest links

because the commissioning reference had been acquired under different operating conditions, and a condition-matched analysis (§ 9).

The code, the raw hardware data and every number in this paper are available in the accompanying repository; each quantitative statement is generated from the result files by a script.

What this work does not claim. The monitor complements security proofs and device countermeasures; it does not replace them. Attacks with D∗=0D^{*}=0 cannot be detected from telemetry by any method, and we identify one. The simulation results depend on the stated parameter ranges of the twin, and the hardware study emulates the quantum channel with superconducting qubits rather than optical fibre.

Outline. § 2 reviews decoy-state BB84, implementation attacks and change detection. § 3 derives the receiver model and § 4 the attack models. § 5 constructs the monitor and § 6 develops the detectability theory. § 7 and § 8 describe the benchmark and its results, § 9 the hardware study, and § 10 discusses implications and limitations. Derivations, parameter tables and supplementary results are collected in the appendices.

Background

Decoy-state BB84

In BB84 [1] Alice encodes a random bit aa in one of two conjugate bases, α∈{Z,X}\alpha\in\{Z, X\}, and Bob measures in a basis β\beta chosen independently; rounds with α=β\alpha= \beta form the sifted key. With a phase-randomised weak coherent source the number of photons in a pulse of mean μ\mu is Poisson distributed, so a fraction 1−e−μ(1+μ)1-e^{-\mu}(1+\mu) of pulses carries two or more photons, and an eavesdropper able to split those photons learns their bits without disturbance [14, 15]. The GLLP analysis [6] shows that secure key can still be extracted from the single-photon component; the decoy-state method [7, 8, 9] estimates the single-photon yield Y1Y_{1} and error rate e1e_{1} by sending pulses of several intensities that the eavesdropper cannot distinguish. With a signal intensity μ\mu, a weak decoy ν<μ\nu< \mu and a vacuum decoy, the bounds of Ma et al. [10] read

Y1≥Y1L=μμν−ν2(Qνeν−Qμeμν2μ2−μ2−ν2μ2Y0),(1)Y_{1} \ge Y_{1}^{L} = \frac{\mu}{\mu\nu-\nu^{2}}\left(Q_{\nu}e^{\nu}-Q_{\mu}e^{\mu}\frac{\nu^{2}}{\mu^{2}}-\frac{\mu^{2}-\nu^{2}}{\mu^{2}}Y_{0}\right), \tag*{(1)}
e1≤e1U=EνQνeν−e0Y0Y1Lν,(2)e_{1} \le e_{1}^{U} = \frac{E_{\nu}Q_{\nu}e^{\nu}-e_{0}Y_{0}}{Y_{1}^{L}\nu}, \tag*{(2)}

where QkQ_{k} and EkE_{k} are the gain and QBER of intensity kk, Y0Y_{0} is the vacuum yield and e0=1/2e_{0}=1/2. The asymptotic key rate per signal pulse is

R=Q1[1−h2(e1U)]−fQμh2(Eμ),Q1=Y1Lμe−μ,(3)R = Q_{1}\left[1-h_{2}\left(e_{1}^{U}\right)\right]-fQ_{\mu}h_{2}(E_{\mu}), \qquad Q_{1}=Y_{1}^{L}\mu e^{-\mu}, \tag*{(3)}

with h2h_{2} the binary entropy and f≥1f \ge1 the error-correction inefficiency. We use the efficient variant in which key is distilled from ZZ-basis rounds and the phase error is bounded with XX-basis decoy statistics [48]. Finite-size corrections [49, 50] are not needed for the monitoring problem and are not used here.

The structure of Eqs. (1) to (3) is the key physical fact behind this paper: the decoy-state bound is valid for any channel transmittance, so a change of loss alone is not a security-relevant event. What an attack cannot avoid without restriction is a change in the relations between intensities, bases, bit values and detectors that an honest lossy channel would impose.

Implementation attacks

Table 1 summarises the attacks considered in this work and the telemetry signatures they produce. Intercept–resend raises the QBER by a quarter of the intercepted fraction. Photon-number splitting with a lossless channel [14] preserves the signal gain but breaks the decoy relation. Faked-state attacks on blinded detectors

FamilyRoleMechanismTelemetry signature
Intercept–resendknownMeasure in random basis, resend found stateSifted error e→e/2+1/4e \to e/2 + 1/4 on attacked pulses
Photon-number splittingknownKeep one photon of multi-photon pulses, lossless forwarding, suppress single photons to match gain [14]Decoy/signal gain relation, double-click rate
Detector blindingknownFaked states on blinded detectors, gain and QBER matched [16]No dark counts, no double clicks, unsifted balance →1/2\to1/2
Time-shiftzero-dayExploit efficiency mismatch; loss compensated [21, 22]Bit-dependent errors, double clicks
Trojan horsezero-dayProbe Alice’s modulators [23]; optional back-scatter to BobBackground counts only; none if filtered
RNG biaszero-dayBit generator modulated as 12+δsin⁡(2πt/T)\frac{1}{2} + \delta\sin(2\pi t/T)Setting allocation only

Table 1. Attack families used in this work, their physical mechanism and their signature in receiver telemetry. “Known” families are available to the supervised baseline during training; “zero-day” families are used only for testing and were never used in the design of Q-TRACE.

[16, 17] can reproduce the gain and even the QBER, but blinded detectors produce neither dark counts nor double clicks. Time-shift attacks [21, 22] exploit efficiency mismatch [20] and change the error structure in a bit-dependent way. Trojan-horse attacks [23, 25] act on Alice and need not affect Bob at all. A partially predictable random-number generator changes only the setting statistics. These six families span passive and active attacks, transmitter and receiver, and photon-number, timing, detector and randomness side channels.

Sequential change detection

A monitor observes a sequence of windows and must raise an alarm soon after a change of distribution while rarely alarming without one. For i.i.d. observations with known pre- and post-change laws PP and QQ, Page’s CUSUM [51] is optimal in Lorden’s minimax sense [52, 53], and every procedure whose average run length to false alarm is at least γ\gamma has a worst-case mean delay of at least (1+o(1))log⁡γ/DKL(Q∥P)(1 + o(1))\log\gamma/D_{\mathrm{KL}}(Q\mathbin{\|}P) as γ→∞\gamma\to\infty [52, 54]. When the pre-change law contains unknown parameters and the post-change law is unknown, generalised likelihood ratio (GLR) and score procedures are used [55, 56]. The score (Rao) test [57] and Neyman’s C(α)C(\alpha) construction [58] are locally most powerful against alternatives along chosen directions and handle nuisance parameters through the efficient score. These tools, standard in industrial process control, have not, to our knowledge, been used to build attack monitors for QKD from a physical model of the receiver.

A count-level model of the decoy-state receiver

Settings, outcomes and telemetry

Each transmitted pulse carries a setting s=(k,a,α,β)s=(k,a,\alpha,\beta): the intensity class k∈{s,d,v}k \in\{\mathrm{s},\mathrm{d},\mathrm{v}\} (signal, decoy, vacuum) with means μs>μd>μv=0\mu_{\mathrm{s}} > \mu_{\mathrm{d}} > \mu_{\mathrm{v}} = 0, Alice’s bit a∈{0,1}a \in\{0,1\}, Alice’s basis α\alpha and Bob’s basis β\beta. Settings are drawn independently with probabilities

πs=pkpapαpβ(4)\pi_s = p_k p_a p_\alpha p_\beta \tag*{(4)}

so there are 3×2×2×2=243 \times2 \times2 \times2 = 24 settings. Bob’s passive receiver has two threshold detectors, D0D_0 and D1D_1, encoding bit values; a pulse produces one of four outcomes o∈{∅,D0,D1,D0D1}o \in\{\varnothing,D_0,D_1,D_0D_1\} (no click, a click on one detector, or a double click). After sifting and error correction Alice and Bob know, for each telemetry window of NN pulses, the full table of counts ns,on_{s,o}, 96 numbers in total. The error count of the sifted key is revealed exactly by error correction, and the outcomes of decoy, vacuum and basis-mismatched rounds are discarded from the key anyway, so publishing them costs no key. Double clicks are assigned a uniformly random bit (squashing), which is the standard convention in security proofs.

Conditioned on the allocation Ns=∑ons,oN_s = \sum_o n_{s,o}, the outcome counts of setting ss are multinomial,

(ns,o)o∼Mult⁡(Ns;(po∣s)o),(Ns)s∼Mult⁡(N;(πs)s).(5)(n_{s,o})_o \sim\operatorname{Mult}(N_s; (p_{o|s})_o), \qquad(N_s)_s \sim\operatorname{Mult}(N; (\pi_s)_s). \tag*{(5)}

The log-likelihood of a window therefore separates into an outcome part and an allocation part,

ℓ=∑s,ons,olog⁡po∣s+∑sNslog⁡πs+const,(6)\ell= \sum_{s,o} n_{s,o} \log p_{o|s} + \sum_s N_s \log\pi_s + \text{const}, \tag*{(6)}

and the monitor of § 5 uses both.

Threshold detectors and photon-number-dependent channels

Let SjS_j denote the probability that detector jj stays silent and S01S_{01} the probability that both stay silent. Inclusion–exclusion gives the four outcome probabilities

p∅=S01,pD0=S1−S01,pD1=S0−S01,pD01=1−S0−S1+S01.(7)p_{\varnothing} = S_{01}, \qquad p_{D_0} = S_1 - S_{01}, \qquad p_{D_1} = S_0 - S_{01}, \qquad p_{D_{01}} = 1 - S_0 - S_1 + S_{01}. \tag*{(7)}

To compute the silence probabilities, suppose that nn photons leave Alice and n′n' of them reach Bob. Each arriving photon is routed to detector jj and fires it with probability ϖj\varpi_j, independently of the others, where

ϖj(a,α,β)=ηBwj(a,α,β)dj,wj={1−eβj=a, α=β,eβj≠a, α=β,1/2α≠β.(8)\varpi_j(a,\alpha,\beta) = \eta_B w_j(a,\alpha,\beta)d_j, \qquad w_j = \begin{cases} 1-e_\beta& j=a,\ \alpha=\beta,\\ e_\beta& j\ne a,\ \alpha=\beta,\\ 1/2 & \alpha\ne\beta. \end{cases} \tag*{(8)}

with ηB\eta_B the receiver efficiency, eβe_\beta the optical misalignment of basis β\beta, d0=1d_0=1 and d1=κd_1=\kappa the efficiency of D1D_1 relative to D0D_0. Firing events of different photons at the same detector are not mutually exclusive, but routing of a single photon is; hence, given n′n' arriving photons,

Pr⁡(Dj silent∣n′)=(1−ϖj)n′,Pr⁡(both silent∣n′)=(1−ϖ0−ϖ1)n′.(9)\Pr(D_j\ \text{silent}\mid n') = (1-\varpi_j)^{n'}, \qquad\Pr(\text{both silent}\mid n') = (1-\varpi_0-\varpi_1)^{n'}. \tag*{(9)}

Background clicks (dark counts) occur independently with probability pdjp_{dj} per gate. Averaging over the channel with the arrival generating function Gn(z)=E[zn′∣n]G_n(z)=\mathbb{E}[z^{n'}\mid n] and over the photon-number distribution P(n)P(n) of the source yields the exact expressions

Sj=(1−pdj)∑n≥0P(n)Gn(1−ϖj),S01=(1−pd0)(1−pd1)∑n≥0P(n)Gn(1−ϖ0−ϖ1).(10)S_j = (1-p_{dj})\sum_{n\ge0} P(n)G_n(1-\varpi_j), \qquad S_{01} = (1-p_{d0})(1-p_{d1})\sum_{n\ge0} P(n)G_n(1-\varpi_0-\varpi_1). \tag*{(10)}

Equations (7), (8) and (10) hold for any channel that acts on photon numbers, including the photon-number-splitting channel of § 4.

Proposition 1 (Poissonian source, lossy channel). For a phase-randomised coherent source of mean μ\mu, P(n)=e−μμn/n!P(n)=e^{-\mu}\mu^n/n!, and a memoryless channel of transmittance tt, Gn(z)=(1−t+tz)nG_n(z)=(1-t+tz)^n, and

Sj=(1−pdj)exp⁡(−μηwjdj),S01=S0S1,(11)S_j = (1-p_{dj})\exp(-\mu\eta w_jd_j), \qquad S_{01}=S_0S_1, \tag*{(11)}

with η=tηB\eta=t\eta_B; in particular the two detectors fire independently.

Proof. ∑ne−μμn(1−t+tz)n/n!=exp⁡[−μt(1−z)]\sum_n e^{-\mu}\mu^n(1-t+tz)^n/n! = \exp[-\mu t(1-z)]. Substituting z=1−ϖjz=1-\varpi_j gives exp⁡(−μtϖj)=exp⁡(−μηwjdj)\exp(-\mu t\varpi_j)=\exp(-\mu\eta w_jd_j), and z=1−ϖ0−ϖ1z=1-\varpi_0-\varpi_1 gives the product of the two single-detector factors. This is the binomial thinning property of the Poisson distribution.

The honest model is completed by detector afterpulsing, which adds to each detector a background proportional to its mean click probability. With rˉj=∑sπsPr⁡(Dj fires∣s)\bar r_j=\sum_s\pi_s\Pr(D_j\text{ fires}\mid s) and afterpulse probability papp_{\rm ap}, the extra click probability is qj=paprˉjq_j=p_{\rm ap}\bar r_j, and the silence probabilities become Sj→Sj(1−qj)S_j\to S_j(1-q_j) and S01→S01(1−q0)(1−q1)S_{01}\to S_{01}(1-q_0)(1-q_1). We verified numerically that the generating-function route of Eq. (10) and the closed form of Eq. (11) agree to 2×10−162\times10^{-16}.

The honest-device family

For an attack-free link, Eqs. (7), (8) and (11) define the outcome probabilities as a function of

ψ=(eZ,eX,pd0,pd1,κ,ρ)andη,(12)\psi= (e_Z, e_X, p_{d0}, p_{d1}, \kappa, \rho) \quad\text{and} \quad\eta, \tag*{(12)}

where ρ=μd/μs\rho= \mu_d/\mu_s is the decoy-to-signal intensity ratio. The signal intensity μs\mu_s is read from the transmitter’s power monitor and is in any case degenerate with η\eta; the afterpulse probability is taken from the detector specification. We write Pψ,ηP_{\psi,\eta} for the resulting distribution over settings and outcomes. For a link whose device parameters ψ\psi have been calibrated, the honest-device manifold is the one-parameter family

Mψ={Pψ,η:η∈(0,1]}.(13)\mathcal{M}_{\psi} = \{P_{\psi,\eta} : \eta\in(0,1]\}. \tag*{(13)}

Treating η\eta as free encodes the physics of § 2.1: changes of loss are absorbed by the decoy-state bound and should not be reported as attacks. Everything that no transmittance can explain, a broken decoy relation, a changed error structure, an anomaly of detector balance or double clicks, a biased setting allocation, is a candidate attack signature.

Physical models of the attacks

Each attack acts on a fraction ff of the pulses from its onset window onwards, so that the attacked distribution is Q=(1−f)Pψ,η+fPatkQ=(1-f)P_{\psi,\eta}+fP^{\mathrm{atk}} for the outcome part and analogously for the allocation part. We derive PatkP^{\mathrm{atk}} for each family from its physical mechanism; the derivations are written at the level of the per-setting outcome probabilities so that they enter the same likelihood as the honest model.

Intercept–resend. Eve measures in a basis chosen uniformly at random and resends the state she found, preserving the photon statistics. For matching bases Bob’s error is eβe_\beta when Eve chose Alice’s basis and 1/21/2 otherwise, so

eβ⟶eβ′=12eβ+14.(14)e_\beta\longrightarrow e'_\beta= \frac{1}{2}e_\beta+ \frac{1}{4}. \tag*{(14)}

The sifted QBER of attacked pulses rises by 14(1−2eβ)\frac{1}{4}(1-2e_\beta), which is the textbook signature.

Photon-number splitting. Eve replaces the channel by a lossless one, stores one photon of every multi-photon pulse and suppresses single photons so that Bob’s signal gain is unchanged [14]. In the generating-function language,

G0(z)=1,G1(z)=1−t1+t1z,Gn≥2(z)=(1−b)zn−1+b,(15)G_0(z)=1,\qquad G_1(z)=1-t_1+t_1z,\qquad G_{n\geq2}(z)=(1-b)z^{n-1}+b, \tag*{(15)}

where t1t_1 is the transmitted fraction of single-photon pulses and bb the blocked fraction of multi-photon pulses. Eve chooses (t1,b)(t_1,b) so that the signal click probability equals its honest value GsG_s: if forwarding all multi-photon pulses already exceeds GsG_s she sets t1=0t_1=0 and solves for bb, otherwise b=0b=0 and she solves for t1t_1. Both conditions are monotone and have a unique solution, found by bisection. Because the decoy intensity has a smaller multi-photon fraction, the decoy gain no longer obeys the honest relation; this is the effect the decoy method was designed to expose [7, 8].

Faked-state attack on blinded detectors. With Bob’s detectors blinded [16], Eve detects Alice’s pulse with efficiency ηE\eta_E, chooses a basis γ\gamma uniformly, and resends a bright trigger encoding her result. A blinded detector clicks deterministically when Bob’s basis equals γ\gamma and not at all otherwise; it produces neither dark counts nor double clicks. With PE(k)=1−e−μkηEP_E(k)=1-e^{-\mu_k\eta_E} and Eve’s own error rate eEe_E, the attacked outcome probabilities are

pDα∣a,satk=12PE(k)(1−eE),pD1−α∣a,satk=12PE(k)eE(α=β),pD0∣satk=pD1∣satk=14PE(k)(α≠β).(16)p^{\mathrm{atk}}_{D_\alpha|a,s}=\frac{1}{2}P_E(k)(1-e_E),\qquad p^{\mathrm{atk}}_{D_{1-\alpha}|a,s}=\frac{1}{2}P_E(k)e_E\quad(\alpha=\beta),\qquad p^{\mathrm{atk}}_{D_0|s}=p^{\mathrm{atk}}_{D_1|s}=\frac{1}{4}P_E(k)\quad(\alpha\ne\beta). \tag*{(16)}

with pD0∣satk=0p^{\mathrm{atk}}_{D0|s}=0 and p⊕∣satk=1−12PE(k)p^{\mathrm{atk}}_{\oplus|s}=1-\frac{1}{2}P_E(k). A stealthy Eve matches the signal gain, ηE=−ln⁡(1−2Gs)/μs\eta_E=-\ln(1-2G_s)/\mu_s, and the honest QBER, eE=Ese_E=E_s. For small μηE\mu\eta_E the gains of all intensities scale linearly, so the decoy relation is nearly preserved; the remaining signatures are a vanishing vacuum yield, the absence of double clicks and an unsifted detector balance of exactly 1/21/2 irrespective of κ\kappa.

Time-shift attack. Each attacked pulse is shifted to a time at which one detector’s efficiency is reduced by a factor r<1r<1 [21, 22]; with equal probability the favoured detector is D0D_0 or D1D_1. Eve compensates the loss of gain by lowering the channel loss by a factor g=min⁡{2/(1+r),1/t}g=\min\{2/(1+r),1/t\}. The attacked distribution is the even mixture of two honest-form distributions with transmittance gηg\eta and relative efficiencies (1,κr)(1,\kappa r) and (r,κ/r)(r,\kappa/r) respectively, and the QBER of bit aa becomes asymmetric because errors are routed to the disfavoured detector half the time.

Trojan horse. The probe reads Alice’s modulators [23, 25] and is invisible to Bob except through back-scattered light reaching his detectors, modelled as a background qbsq_{\mathrm{bs}} added to both detectors. Information leaked to Eve is priced into the key rate by the bounds of Lucamarini et al. [25]; for monitoring, the relevant fact is that with qbs=0q_{\mathrm{bs}}=0 the attacked receiver statistics are identical to the honest ones (Proposition 3).

Random-number-generator bias. A partially predictable bit generator at Alice is modelled as pa(1)=12+δsin⁡(2πt/T+ϕ)p_a(1)=\frac{1}{2}+\delta\sin(2\pi t/T+\phi), which changes the allocation part of Eq. (6) and nothing else. The sinusoidal form, whose time average is exactly balanced, deliberately defeats monitors that average the bit balance over long periods.

Compositions. Composite attacks superpose the first-order perturbations of their components, Q=P+∑ifi(Piatk−P)Q=P+\sum_i f_i(P_i^{\mathrm{atk}}-P), which is exact when the components act on disjoint subsets of pulses.

The Q-TRACE monitor

Figure 1 summarises the construction. The monitor is defined entirely by the honest model of § 3 and by the link’s own commissioning windows; thresholds are set on attack-free validation links. We describe its components in turn.

Structure of the Q-TRACE monitor

Figure 1. Structure of the Q-TRACE monitor. Commissioning windows (top) fix the device parameters ψ^\hat{\psi} and the static corrections; in every monitoring window the transmittance is profiled out and three families of statistics measure what no honest transmittance can explain. No attack data are used in any block.

Algorithm 1 Commissioning of one link

Require: counts ns,o(t)n_{s,o}^{(t)} of WW attack-free windows, μs\mu_s, datasheet papp_{\mathrm{ap}}, setting probabilities π\pi

  1. ψ(0)←\psi^{(0)} \leftarrow moment estimates from vacuum, sifted and unsifted counts

  2. ψ^←arg max⁡ψ∑tmax⁡ηtℓt(ψ,ηt)\hat{\psi} \leftarrow\mathop{\operatorname{arg\,max}}_{\psi} \sum_t \mathop{\operatorname{max}}_{\eta_t} \ell_t(\psi,\eta_t) ▷ quasi-Newton outside, Eq. (18) inside

  3. for t=1,…,Wt = 1,\ldots,W do

  4. η^t←arg max⁡ηℓt(ψ^,η)\hat{\eta}_t \leftarrow\mathop{\operatorname{arg\,max}}_{\eta} \ell_t(\hat{\psi},\eta); rt←r_t \leftarrow Freeman–Tukey residuals (19)

  5. (ut,It)←(u_t,I_t) \leftarrow efficient scores and informations (23)

  6. end for

  7. b←rˉb \leftarrow\bar{r}; s2←(Wσ^r2+λ)/(W+λ)s^2 \leftarrow(W\hat{\sigma}_r^2+\lambda)/(W+\lambda), floored at smin⁡2s_{\min}^2 ▷ residual bias and spread

  8. bu←uˉb_u \leftarrow\bar{u}; Φ←\Phi\leftarrow shrunk covariance of It−1/2(ut−bu)I_t^{-1/2}(u_t-b_u), eigenvalues floored at 1 ▷ Eq. (25)

  9. return ψ^,b,s,bu,Φ\hat{\psi},b,s,b_u,\Phi and the commissioning statistics (for the moving reference)

Calibration and profiling

Let ℓt(ψ,η)\ell_t(\psi,\eta) be the log-likelihood (6) of window tt. On WW commissioning windows the device parameters are estimated by maximising the profile likelihood

ψ^=arg max⁡ψ∑t=1Wmax⁡ηtℓt(ψ,ηt).(17)\hat{\psi} = \mathop{\operatorname{arg\,max}}_{\psi} \sum_{t=1}^{W} \mathop{\operatorname{max}}_{\eta_t} \ell_t(\psi,\eta_t). \tag*{(17)}

We parametrise ψ\psi on unconstrained scales (logit for eZe_Z, eXe_X, logarithm for the others), start from closed-form moment estimates (vacuum click rates for pdjp_{d_j}, sifted signal QBER for eβe_\beta, unsifted detector ratio for κ\kappa, ratio of log-gains for ρ\rho) and use a quasi-Newton optimiser. The inner maximisation over x=log⁡ηtx=\log\eta_t is one-dimensional and smooth and is solved for all windows simultaneously by Newton iterations,

x(i+1)=x(i)−∂xℓt∂x2ℓt∣x(i),(18)x^{(i+1)} = x^{(i)} - \left.\frac{\partial_x \ell_t}{\partial_x^2 \ell_t}\right|_{x^{(i)}} , \tag*{(18)}

with steps clipped to ±0.5\pm0.5 and finite-difference derivatives. On a single CPU core a calibration takes 0.3 to 0.5 s per link. In monitoring windows the same profiling gives η^t\hat{\eta}_t, the closest honest explanation of window tt in transmittance. Algorithm 1 lists the procedure.

Omnibus residual channel

For each of the 72 click cells (24 settings times three click outcomes) and each of the 24 allocation cells, with expected count EE under the profiled honest model, we form the Freeman–Tukey residual [59]

r=n+n+1−4E+1.(19)r = \sqrt{n}+\sqrt{n+1}-\sqrt{4E+1}. \tag*{(19)}

For Poisson or binomial counts rr has mean close to zero and variance close to one even when EE is of order unity (Section A.1), which matters for vacuum double clicks with E≪1E\ll1 and for signal no-click cells with E∼106E\sim10^6 alike. Static mismatch between the twin and the honest model (for instance a datasheet afterpulse probability in error by ten per cent) shifts the residuals by a constant; we therefore whiten them with the commissioning statistics, zt=(rt−b)/sz_t=(r_t-b)/s, where bb and ss are the per-component commissioning mean and shrunk standard deviation.

Two statistics accumulate the whitened residuals over a trailing horizon of MM windows. The persistent-shift statistic

SMsh(t)=1M(1+M/W)∥∑τ=t−M+1tzτ∥2(20)S_M^{\mathrm{sh}}(t)=\frac{1}{M(1+M/W)}\left\|\sum_{\tau=t-M+1}^{t}z_\tau\right\|^2 \tag*{(20)}

detects deviations of fixed sign; the factor 1+M/W1+M/W accounts for the variance added by subtracting the estimated bias bb (Section A.2). The energy statistic SMen(t)=∑τ∥zτ∥2S_M^{\mathrm{en}}(t)=\sum_\tau\lVert z_\tau\rVert^2 detects deviations whose sign changes in time, such as the modulated RNG attack. Both are centred and scaled by their chi-square references, (S−MD)/2MD(S-MD)/\sqrt{2MD} with D=96D=96 for the energy statistic and (S−D)/2D(S-D)/\sqrt{2D} for the shift statistic.

Physics score test

The omnibus channel is consistent against every alternative but spreads its power over 96 directions. Physically realisable deviations, however, move the outcome table along a small number of directions generated by perturbing device parameters. Let ϑ=(ϑψ,ϑη)\vartheta=(\vartheta_\psi,\vartheta_\eta) collect nine probe directions and the nuisance:

\vartheta_\psi=(\logit e_Z,\ \logit e_X,\ \log p_{d0},\ \log p_{d1},\ \log\kappa,\ \log\rho,\ \Delta e_{\mathrm{dec}},\ \log c_{\mathrm{dbl}},\ \log\epsilon_X),\qquad\vartheta_\eta=\log\eta, \tag*{(21)}

where the last three components vanish on honest links: Δedec\Delta e_{\mathrm{dec}} lets the misalignment of decoy pulses differ from that of signal pulses, cdblc_{\mathrm{dbl}} rescales the double-click probability, and ϵX\epsilon_X makes the receiver efficiency depend on Bob’s basis. The score of window tt at the calibrated point is

ut=∑s,o(ns,o−Es,o)∇ϑlog⁡po∣s,(22)u_t=\sum_{s,o}(n_{s,o}-E_{s,o})\nabla_\vartheta\log p_{o|s}, \tag*{(22)}

and its Fisher information is It=∑s,oEs,o∇ϑlog⁡po∣s∇ϑlog⁡po∣sTI_t=\sum_{s,o}E_{s,o}\nabla_\vartheta\log p_{o|s}\nabla_\vartheta\log p_{o|s}^{\mathsf T}; the identity ∑opo∣s∇log⁡po∣s=0\sum_o p_{o|s}\nabla\log p_{o|s}=0 makes the multinomial correction term vanish (Section A.3). Because η\eta is unknown, the scores along ϑψ\vartheta_\psi are replaced by their efficient versions, the residuals of their projection onto the nuisance score,

uteff=uψ,t−Iψη,tIηη,t−1uη,t,Iteff=Iψψ,t−Iψη,tIηη,t−1Iηψ,t,(23)u_t^{\mathrm{eff}}=u_{\psi,t}-I_{\psi\eta,t}I_{\eta\eta,t}^{-1}u_{\eta,t},\qquad I_t^{\mathrm{eff}}=I_{\psi\psi,t}-I_{\psi\eta,t}I_{\eta\eta,t}^{-1}I_{\eta\psi,t}, \tag*{(23)}

which is Neyman’s C(α)C(\alpha) construction [58]: a small error in η^t\hat{\eta}_t then has no first-order effect on the statistic. Over a horizon of MM windows with UM=∑τ(uτeff−bu)U_M=\sum_{\tau}(u_\tau^{\mathrm{eff}}-b_u) and IM=∑τIτeffI_M=\sum_\tau I_\tau^{\mathrm{eff}}, the score statistic is

SMph=11+M/WUMTIM−1/2Φ−1IM−1/2UM.(24)S_M^{\mathrm{ph}}=\frac{1}{1+M/W}U_M^{\mathsf T}I_M^{-1/2}\Phi^{-1}I_M^{-1/2}U_M. \tag*{(24)}

Under the honest hypothesis with Poissonian fluctuations, Φ=I\Phi=\mathbb{I} and SMphS_M^{\mathrm{ph}} is asymptotically χ92\chi^2_9 [57, 60]; under a local alternative ϑ=ϑ0+h/N\vartheta=\vartheta_0+h/\sqrt{N} it is noncentral χ92\chi^2_9 with noncentrality hTIeffhh^{\mathsf T}I^{\mathrm{eff}}h, and no test of the same level has higher local power against alternatives in the span of the probe directions.

Real links fluctuate more than shot noise: window-to-window intensity jitter moves the decoy-ratio direction and slow polarisation and temperature drift move the error and background directions. We absorb this excess noise into a dispersion matrix estimated on commissioning windows,

Φ=F[(1−λΦ)Cov⁡^(w)+λΦdiag⁡Cov⁡^(w)],wt=It−1/2(uteff−bu),(25)\Phi=\mathcal{F}\left[(1-\lambda_\Phi)\widehat{\operatorname{Cov}}(w)+\lambda_\Phi\operatorname{diag}\widehat{\operatorname{Cov}}(w)\right],\qquad w_t=I_t^{-1/2}(u_t^{\mathrm{eff}}-b_u), \tag*{(25)}

where λΦ=0.3\lambda_\Phi=0.3 is a shrinkage weight in the spirit of Ledoit and Wolf [61] and F\mathcal{F} floors the eigenvalues at one, so that the honest model is never assumed to be quieter than shot noise. The same construction with the five free setting probabilities (pa,pα,pβ,pd,pv)(p_a,p_\alpha,p_\beta,p_d,p_v) defines the setting test SMsetS_M^{\mathrm{set}}, which carries the signature of biased random-number generators.

Drift-robust moving reference

All statistics above compare a window with commissioning. Slow honest drift then accumulates into the long-horizon statistics and raises their honest quantiles, which costs power. For each channel we therefore also compute a window-limited GLR that compares the recent block (t−M,t](t-M,t] with the immediately preceding RR windows,

dt=U(t−M,t]−MRU(t−M−R,t−M],Var⁡(dt)≃(1+MR)Var⁡(U(t−M,t]),(26)d_t=U_{(t-M,t]}-\frac{M}{R}U_{(t-M-R,t-M]},\qquad\operatorname{Var}(d_t)\simeq\left(1+\frac{M}{R}\right)\operatorname{Var}(U_{(t-M,t]}), \tag*{(26)}

and uses dtd_t in place of UMU_M in Eqs. (20) and (24). Static mismatch cancels exactly in dtd_t, and drift that is slow on the scale of M+RM+R windows contributes only through its change across the two blocks, whereas an abrupt change is fully visible during the first MM windows after it. An attack that ramps up more slowly than the reference length can evade the moving-reference channels; the fixed-reference channels remain and catch it eventually. We use R=48R=48, fixed-reference horizons M∈{1,4,16}M\in\{1,4,16\} and moving-reference horizons M∈{4,16,32}M\in\{4,16,32\}.

Algorithm 2 Monitoring step for window $t$

Require: counts $n_{s,o}^{(t)}$; commissioning output of {xref}`Algorithm 1`; channel standardisation $(m_c,q_c)$; threshold $\tau_\alpha$

1: $\hat{\eta}_t \leftarrow \arg\max_\eta \ell_t(\hat{\psi},\eta)$ ▷ Newton, {xref}`Eq. (18)`
2: $z_t \leftarrow (r_t-b)/s$; $(u_t^{\mathrm{eff}},t_t^{\mathrm{eff}}) \leftarrow$ {xref}`Eq. (23)`; setting scores likewise
3: for each channel $c$ (statistic, horizon $M$, fixed or moving reference) do
4: update running sums; $S_c(t) \leftarrow$ {xref}`Eq. (20)`, energy, {xref}`Eq. (24)` or its moving version {xref}`(26)`
5: end for
6: $T_t \leftarrow \max_c(S_c(t)-m_c)/(q_c-m_c)$
7: if $T_t>\tau_\alpha$ then
8: raise alarm; report $\arg\max_j|\hat{\delta}_j|/\operatorname{se}(\hat{\delta}_j)$ ▷ physical attribution
9: end if

Combination, thresholds and attribution

The monitor computes 16 channels per window: omnibus shift and energy, physics score and setting test at the fixed-reference horizons, and the moving-reference versions. Their honest distributions differ, because slow drift inflates long horizons, so each channel cc is standardised by its median mcm_c and upper spread qcq_c on attack-free training links,

Tt=max⁡cSc(t)−mcqc−mc,qc=0.999 quantile on training links,(27)T_t=\max_c\frac{S_c(t)-m_c}{q_c-m_c},\qquad q_c=0.999\text{ quantile on training links}, \tag*{(27)}

which equalises the contribution of each channel to the false-alarm rate. The alarm threshold is the 1−α1-\alpha quantile of TtT_t over attack-free validation links, half of which contain benign loss faults, so that α\alpha is the per-window false-alarm rate. Training, validation and test links are disjoint.

At an alarm the monitor reports the physical constraint the anomaly violates. With the moving-reference sums over the last M=16M=16 windows, the apparent displacement of the device parameters is δ^=IM−1dt\hat{\delta}=I_M^{-1}d_t and its standardised value is δ^j/(IM−1)jj(1+M/R)Φjj\hat{\delta}_j/\sqrt{(I_M^{-1})_{jj}(1+M/R)\Phi_{jj}}; the parameter with the largest magnitude is reported. Attribution is defined over the nine device directions and does not apply to setting-test alarms. Algorithm 2 summarises one monitoring step.

Detectability limits

The honest-manifold formulation answers a question that a trained classifier cannot: how detectable is a given attack from telemetry, irrespective of the monitor?

Definition 1 (Detectability exponent). Let QQ be the per-pulse distribution over settings and outcomes produced by an attack on a link with device parameters ψ\psi, and Mψ\mathcal{M}_\psi the honest manifold (13). The detectability exponent of the attack is

D∗(Q)=inf⁡η∈(0,1]DKL(Q∥Pψ,η)nats per pulse.(28)D^*(Q)=\inf_{\eta\in(0,1]}D_{\mathrm{KL}}(Q\mathbin\Vert P_{\psi,\eta})\quad\text{nats per pulse}. \tag*{(28)}

D∗D^* is a property of the attack and the link alone. It measures the information per pulse that separates the attacked statistics from their closest honest explanation, where closeness is measured by the Kullback–Leibler divergence [62, 63]. For time-modulated attacks we average the divergence over one modulation period.

Proposition 2 (Universal delay bound). Consider windows of NN pulses that are i.i.d. given the link state, and let τ\tau be the alarm time of any monitor whose average run length to false alarm is at least γ\gamma under every honest state Pψ,ηP_{\psi,\eta}, η∈(0,1]\eta\in(0,1]. Let η∗\eta^* attain the infimum in (28). If the link is honest at η∗\eta^* before the change, the worst-case mean detection delay satisfies

sup⁡ν≥1ess sup⁡Eν[(τ−ν+1)+∣Fν−1]≥(1+o(1))log⁡γND∗(Q)(γ→∞),(29)\sup_{\nu\ge1}\operatorname*{ess\,sup}\mathbb{E}_{\nu}\left[(\tau-\nu+1)^+\mid\mathcal{F}_{\nu-1}\right]\ge(1+o(1))\frac{\log\gamma}{N D^*(Q)} \qquad(\gamma\to\infty), \tag*{(29)}

where ν\nu is the change time and Fν−1\mathcal{F}_{\nu-1} the history before it.

Proof. A monitor that controls false alarms under every honest state controls them in particular under Pψ,η∗(N)P_{\psi,\eta^*}^{(N)}, the law of one window at η∗\eta^*. The change from Pψ,η∗(N)P_{\psi,\eta^*}^{(N)} to Q(N)Q^{(N)} is then a simple change between two known distributions whose per-window divergence is DKL(Q(N)∥Pψ,η∗(N))=ND∗(Q)D_{\mathrm{KL}}(Q^{(N)}\Vert P_{\psi,\eta^*}^{(N)})=N D^*(Q) by additivity of the divergence over independent pulses. Lorden’s lower bound for simple changes [52], in the general form of Lai [54], gives (29). Additional uncertainty about the pre-change state can only increase the delay. □

In the benchmark we control the per-window false-alarm probability α\alpha rather than the run length and plot the delay against log⁡(1/α)/(ND∗)\log(1/\alpha)/(N D^*), which plays the role of the bound with γ≈1/α\gamma\approx1/\alpha. The bound is asymptotic and concerns the worst-case mean delay; individual runs can fall below it. Two consequences make it useful in practice. First, it separates the performance of a monitor from the intrinsic visibility of an attack: a monitor whose delay tracks the bound cannot be improved by any other representation of the same telemetry, classical or quantum. Second, it exposes attacks that no monitor can see.

Proposition 3 (Telemetry-blind attacks). D∗(Q)=0D^*(Q)=0 if and only if QQ lies in the closure of Mψ\mathcal{M}_{\psi}. In particular, a Trojan-horse probe whose back-reflection does not reach Bob (qbs=0q_{\mathrm{bs}}=0 in § 4) has D∗=0D^*=0, and for any monitor operating on the receiver telemetry of § 3.1 the probability of an alarm under this attack equals its false-alarm probability.

Proof. The divergence is non-negative and vanishes only for identical distributions; on the compact closure of {η∈(0,1]}\{\eta\in(0,1]\} the infimum is attained, which gives the equivalence. The filtered Trojan-horse probe acts only on Alice’s modulators: settings are drawn with the honest probabilities and Bob’s outcome probabilities are those of Pψ,ηP_{\psi,\eta} at the true transmittance, so Q=Pψ,ηQ=P_{\psi,\eta} exactly. The telemetry then has the same law with and without the attack, and any function of it, including any alarm rule, has the same law too. □

Proposition 3 is a statement about information, not about the shortcomings of a particular monitor. Attacks with D∗=0D^*=0 must be excluded by device measures such as optical isolation and power monitoring [25, 36], or priced into the key rate. We verified in the benchmark that the numerically computed D∗D^* of the filtered probe is zero to machine precision.

Local form and connection to the score test

For weak attacks the divergence has a geometric form that connects Definition 1 to the score test of § 5.3.

Proposition 4 (Local expansion). Let Pψ,ηP_{\psi,\eta} be smooth in ϑ=(ϑψ,log⁡η)\vartheta=(\vartheta_{\psi},\log\eta) with Fisher information JJ per pulse, and let the attack act locally along the device directions, Q=Pϑ0+ϵhQ=P_{\vartheta_0+\epsilon h} with h=(hψ,hη)h=(h_{\psi},h_{\eta}). Then

D∗(Q)=12ϵ2hψT(Jψψ−JψηJηη−1Jηψ)hψ+O(ϵ3).(30)D^*(Q)=\tfrac{1}{2}\epsilon^2 h_{\psi}^{\mathsf{T}}\left(J_{\psi\psi}-J_{\psi\eta}J_{\eta\eta}^{-1}J_{\eta\psi}\right)h_{\psi}+O(\epsilon^3). \tag*{(30)}

Proof. For nearby members of a smooth family, DKL(Pϑ0+ϵh∥Pϑ0+ϵh′)=12ϵ2(h−h′)TJ(h−h′)+O(ϵ3)D_{\mathrm{KL}}(P_{\vartheta_0+\epsilon h}\Vert P_{\vartheta_0+\epsilon h'})=\tfrac{1}{2}\epsilon^2(h-h')^{\mathsf{T}}J(h-h')+O(\epsilon^3). Minimising over the nuisance component hη′h'_{\eta} with hψ′=0h'_{\psi}=0 is a weighted least-squares problem whose solution hη′=hη+Jηη−1Jηψhψh'_{\eta}=h_{\eta}+J_{\eta\eta}^{-1}J_{\eta\psi}h_{\psi} leaves the Schur complement in (30). □

The matrix in Eq. (30) is the per-pulse efficient information (23). Hence, for attacks inside the span of the probe directions, the noncentrality of the score statistic after mm windows is 2mND∗2mN D^*, and the score test attains the delay bound up to the multiple-testing cost of the nine directions. Attacks outside the span still have D∗>0D^*>0 if they leave the manifold; they are caught by the omnibus channel, at the price of more degrees of freedom.

A closed-form check. For the RNG attack the outcome distribution is unchanged and the allocation of bit values is Bernoulli with parameter 12+x\frac{1}{2}+x, x=δsin⁡(2πt/T+ϕ)x=\delta\sin(2\pi t/T+\phi). Since DKL(Bern⁡(12+x)∥Bern⁡(12))=2x2+O(x4)D_{\mathrm{KL}}(\operatorname{Bern}(\frac{1}{2}+x)\mathbin\Vert\operatorname{Bern}(\frac{1}{2}))=2x^2+O(x^4) nats and the period average of sin⁡2\sin^2 is 1/21/2,

DRNG∗=δ2+O(δ4).(31)D_{\mathrm{RNG}}^{*}=\delta^2+O(\delta^4). \tag*{(31)}

For δ=3×10−4\delta=3\times10^{-4} the numerical evaluation of Eq. (28) on the full model gives 9.000×10−89.000\times10^{-8} nats per pulse, in agreement with δ2\delta^2; with N=107N=10^7 pulses per window and α=10−3\alpha=10^{-3} the delay bound is log⁡(103)/0.9≈7.7\log(10^3)/0.9\approx7.7 windows.

Interpretation for an adaptive adversary. An eavesdropper who knows that Q-TRACE is in place wants to maximise her information subject to keeping D∗D^{*} small. Proposition 2 turns this into a quantitative trade-off: she can remain undetected for about log⁡(1/α)/(ND∗)\log(1/\alpha)/(ND^{*}) windows, during which she learns a number of key bits proportional to that time. The exponent is therefore the natural currency in which attack strength should be reported; § 9.5 measures the corresponding quantity, information leaked before the first alarm, on hardware.

Benchmark design

A twin with deliberate model mismatch

A detector built on a physical model and evaluated on data generated by the same model would be tested against itself. The twin used here therefore contains effects that the honest model of § 3.3 does not describe, so that every result is obtained under model mismatch:

  • (a) afterpulsing with probability up to 3%3\%, which the monitor knows only through a datasheet value carrying a ±10%\pm10\% error;

  • (b) window-to-window jitter of each intensity class with relative standard deviation up to 1%1\%, independent between signal and decoy, which the honest model cannot represent with its single ratio ρ\rho;

  • (c) polarisation drift of the misalignments, an autoregressive process with per-window innovation up to 2×10−42\times10^{-4};

  • (d) temperature-driven modulation of the dark-count probabilities with amplitude up to 10%10\%;

  • (e) a random walk and a slow periodic modulation of the channel transmittance.

Links are drawn with lengths of 5 to 60 km at 0.18 to 0.22 dB/km, receiver efficiencies of 0.10 to 0.50, misalignments of 0.5 to 2%, dark-count probabilities of 2×10−72\times10^{-7} to 5×10−65\times10^{-6} per gate and detector efficiency ratios of 0.85 to 1.15; Table 6 in Section B lists all ranges. Each link is observed for 200 windows of N=107N=10^7 pulses (one second at 10 MHz), of which the first W=60W=60 are attack-free commissioning windows. Counts are sampled from the multinomial laws (5), so every cell, including vacuum double clicks, carries its own shot noise.

QuantityRangeNote
Signal mean photon number μs\mu_{\mathrm{s}}0.40–0.60
Decoy ratio μd/μs\mu_{\mathrm{d}}/\mu_{\mathrm{s}}0.15–0.30vacuum μv=0\mu_{\mathrm{v}} = 0
Intensity probabilities (ps,pd,pv)(p_{\mathrm{s}}, p_{\mathrm{d}}, p_{\mathrm{v}})(0.70, 0.20, 0.10)bases and bits uniform
Fibre length5–60 km (long links: 60–120 km)attenuation 0.18–0.22 dB/km
Receiver efficiency ηB\eta_{\mathrm{B}}0.10–0.50 (long links: 0.05–0.20)
Optical misalignment eZ,eXe_Z, e_X0.5–2 %, basis factor 0.8–1.25
Dark-count probability pdjp_{\mathrm{dj}}2×10−72 \times10^{-7}–5×10−65 \times10^{-6} per gatelog-uniform, per detector
Relative efficiency κ\kappa0.85–1.15
Afterpulse probability papp_{\mathrm{ap}}0–3 %datasheet value known to ±10 %
Intensity jitter†0.2–1 % per windowindependent per intensity
Transmittance random walkinnovation 0.1–0.6 % per windowAR(1), coefficient 0.995
Periodic transmittance modulationamplitude 0–4 %, period 150–600 windows
Polarisation drift†innovation 0–2×10−42 \times10^{-4} per windowAR(1), coefficient 0.98
Dark-count temperature modulation†amplitude 0–10 %same period as above
Pulses per window NN10710^71 s at 10 MHz
Windows per link200, of which 60 commissioning

Table 6. Sampling ranges of the twin. Ranges are uniform unless marked log-uniform. Effects marked † are not represented in the honest model of the monitor.

Splits, attacks and faults

Each seed generates disjoint populations of links. The training split (60 honest links, plus 30 links for each known attack used only by the supervised baseline) fixes the channel standardisation of Eq. (27) and trains the learned baselines. The validation split (50 honest links and 25 links with benign loss faults) fixes the thresholds of every method. The test split contains 50 honest links, 25 links with loss faults (steps or ramps of 0.5 to 3 dB), 15 links with a dark-count fault (a rise by a factor 1.5 to 5), 35 links for each of the six attack families and 20 for each of three compositions (PNS with blinding, time-shift with Trojan horse, intercept–resend with RNG bias). A long-link split of 60 to 120 km with receiver efficiencies of 0.05 to 0.20, a regime absent from training, contains 25 honest links and 15 links for each known attack.

Attacks start uniformly between 20 and 100 windows after commissioning, and windows are labelled positive only when an attack is active, so pre-onset windows of attacked links count as honest. Attack strengths are drawn log-uniformly over physically motivated ranges (Table 7 in Section B): intercepted fractions of 0.2 to 20 %, PNS and blinding fractions of 1 to 100 %, time-shift fractions of 2 to 100 % with mismatch factors of 0.1 to 0.5, back-scatter probabilities of 10−810^{-8} to 3×10−63 \times10^{-6} per gate, and RNG bias amplitudes of 5×10−55 \times10^{-5} to 2×10−32 \times10^{-3} with periods of 10 to 80 windows. For every attacked run we also compute D∗D^* at the run’s mean physical state, which allows each delay to be compared with its own bound.

AttackStrength parameterRange
Intercept–resendintercepted fraction ff0.002–0.2
Photon-number splittingattacked fraction ff0.01–1
Detector blindingblinded fraction ff0.01–1
Time-shiftshifted fraction ff; mismatch rr0.02–1; rr uniform 0.1–0.5
Trojan horseback-scatter probability qbsq_{\mathrm{bs}} per gate10−810^{-8}–3×10−63 \times10^{-6}
RNG biasamplitude δ\delta; period TT; phase ϕ\phi5×10−55 \times10^{-5}–2×10−32 \times10^{-3}; TT uniform 10–80; ϕ\phi uniform

Table 7. Attack strength ranges (log-uniform unless stated). Onsets are uniform between 20 and 100 windows after commissioning.

Comparison methods

All comparison methods receive the same information as Q-TRACE: the 19 scalar telemetry quantities a deployed node exports (gains and QBERs per intensity and basis, vacuum yield, decoy-to-signal gain ratio, double-click rates, unsifted detector balance, click rate, bit and basis balance, Y1LY^{L}_{1}, e1Ue^{U}_{1} and the key rate), standardised per link against the same commissioning windows, together with their trailing 16-window means. We compare

  • three industry monitors: the static 11 % QBER threshold, a one-sided CUSUM on the standardised signal QBER [51], and a two-sided CUSUM on the decoy-state estimates Y1LY^{L}_{1}, e1Ue^{U}_{1} and the gain ratio, i.e. the decoy consistency check of deployed systems made sequential;

  • four unsupervised detectors trained on honest data only: an isolation forest [64], a one-class SVM [65], a multilayer-perceptron autoencoder, and a one-class SVM on a fidelity quantum kernel [66, 67] with a six-qubit ZZ feature map on principal components, evaluated with exact statevectors that we verified against Qiskit [68] to unit fidelity;

  • a supervised gradient-boosted classifier (XGBoost [69]) trained on the three known attack families.

Standard implementations from scikit-learn [70] and XGBoost are used with fixed hyperparameters listed in the repository. Every method’s threshold is the 1−α1-\alpha quantile of its score on the same validation links, so all methods operate at the same per-window false-alarm rate.

Metrics and protocol

The primary metric is the fraction of attacked links on which a method raises an alarm after onset, at a per-window false-alarm rate of α=10−3\alpha= 10^{-3} (10−210^{-2} in Section C). We also report the window-level AUROC (attack-active windows against all windows of honest test links), the detection delay in windows, the key generated between onset and first alarm (key exposed), and the fraction of honest, loss-fault and long-link honest runs with at least one alarm. All design decisions, including the horizons, the reference length and the shrinkage constants, were fixed on development seeds 0 to 3. The reported results use seeds 101, 102, 103, 104, 105, which played no role in development; means are reported with 95 % Student-tt confidence intervals over seeds. In total the evaluation comprises 3,275 links and 655,000 telemetry windows; one seed takes about 13 minutes on a single CPU core.

Simulation results

Detection at a matched false-alarm rate

Table 2 and Figure 2 give the headline comparison. At a per-window false-alarm rate of 10−310^{-3}, Q-TRACE raised an alarm on 63.6 % of links under the known attack families, 28.0 % under the zero-day families and 65.3 % under composite attacks. The strongest comparison method in each group reached 51.2 % (supervised XGBoost), 6.7 % (quantum-kernel one-class SVM) and 42.3 % (supervised XGBoost). The zero-day figure of the quantum-kernel detector should not be read as detection: the same method alarms on 10.4 % of attack-free links, more often than it alarms on zero-day attacks. The supervised classifier, which was trained on exactly the known families, is the closest competitor on known attacks and falls to 0.6% on zero-day families, which is the behaviour one expects from a model that has learned what particular attacks look like rather than what honest links look like. The decoy-state CUSUM, which encodes the consistency check most deployed systems perform, detects only 2.5 % of known attacks: the decoy-state estimates are noisy functionals of the gains, and stealthy blinding and weak PNS move them by less than their window-to-window fluctuation. The window-level AUROC (Table 8) gives a similar picture, with Q-TRACE at 0.859, 0.636 and 0.858 for the three groups, with one exception: on long links the supervised classifier reaches 0.718 against 0.699 for Q-TRACE. AUROC weights all thresholds equally, whereas operation happens at a low false-alarm rate, where the detection rates of Table 2 are the relevant measure.

MethodKnownZero-dayCompositeLong linksFA honestFA lossFA long
Q-TRACE63.6 ± 6.628.0 ± 2.565.3 ± 9.132.0 ± 7.55.2 ± 3.80.0 ± 0.03.2 ± 2.2
XGBoost (sup.)51.2 ± 8.50.6 ± 0.642.3 ± 10.824.4 ± 9.20.8 ± 1.48.8 ± 6.50.0 ± 0.0
QBER CUSUM27.2 ± 5.31.3 ± 2.521.0 ± 3.89.8 ± 3.71.2 ± 2.21.6 ± 2.70.0 ± 0.0
Decoy CUSUM2.5 ± 2.80.0 ± 0.00.3 ± 0.90.0 ± 0.00.0 ± 0.03.2 ± 2.20.0 ± 0.0
QBER static13.1 ± 6.01.7 ± 1.311.7 ± 7.350.7 ± 7.42.8 ± 2.80.8 ± 2.245.6 ± 16.7
Autoencoder3.0 ± 2.70.0 ± 0.01.3 ± 1.70.9 ± 1.50.0 ± 0.04.0 ± 8.60.0 ± 0.0
Isolation forest3.6 ± 4.60.4 ± 1.15.0 ± 8.50.0 ± 0.00.0 ± 0.012.0 ± 8.60.0 ± 0.0
One-class SVM0.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.00.0 ± 0.0
QK one-class SVM5.7 ± 2.56.7 ± 2.44.3 ± 2.88.9 ± 6.210.4 ± 3.212.8 ± 4.27.2 ± 5.4

Table 2. Percentage of attacked links detected, by attack group, and percentage of attack-free test links with at least one alarm (FA), at a per-window false-alarm rate of 10−310^{-3} set on validation links. “Long links” is the 60 to 120 km regime absent from training. Mean ± 95 % confidence interval over 5 held-out seeds.

Figure 2. Fraction of attacked links detected at a per-window false-alarm rate of 10−310^{-3}, by attack group. Error bars are 95 % confidence intervals over held-out seeds.

MethodKnownZero-dayCompositeLong links
Q-TRACE0.859 ± 0.0330.636 ± 0.0320.858 ± 0.0340.699 ± 0.032
XGBoost (sup.)0.848 ± 0.0260.499 ± 0.0430.771 ± 0.0410.718 ± 0.041
QBER CUSUM0.664 ± 0.0430.533 ± 0.0450.664 ± 0.0340.624 ± 0.019
Decoy CUSUM0.746 ± 0.0220.546 ± 0.0310.724 ± 0.0670.660 ± 0.036
QBER static0.567 ± 0.0640.487 ± 0.0720.545 ± 0.0650.571 ± 0.075
Autoencoder0.800 ± 0.0360.573 ± 0.0170.766 ± 0.0200.663 ± 0.036
Isolation forest0.767 ± 0.0330.554 ± 0.0140.745 ± 0.0490.677 ± 0.033
One-class SVM0.814 ± 0.0210.571 ± 0.0270.775 ± 0.0290.677 ± 0.026
QK one-class SVM0.523 ± 0.0180.498 ± 0.0130.521 ± 0.0140.501 ± 0.025

Table 8. Window-level AUROC by attack group (attack-active windows against windows of attack-free test links). Mean ± 95 % confidence interval over held-out seeds.

Figure 3 shows what these numbers mean on individual links. For a PNS attack that leaves the gain and QBER unchanged, the Q-TRACE statistic crosses its threshold within a few windows of onset, while the QBER and decoy-state CUSUMs, scaled to their own thresholds, stay below one. For stealthy blinding, which reproduces gain and QBER by construction, the alarm is driven by the vanishing double clicks and vacuum clicks. For the modulated RNG attack the energy and setting channels respond, whereas monitors built on time-averaged balance do not.

Figure 3. Alarm statistics divided by their thresholds on three test links (shaded: attack active). Values above one are alarms. The vertical axis is linear below one and logarithmic above.

Attack families and strength

Figure 4 resolves detection by family and attack strength, and Table 3 lists the per-family detection rates of all methods. Intercept-resend is the one family for which a QBER monitor is close to optimal, because the attack does nothing except raise the QBER; the QBER CUSUM detects 78.3 % and Q-TRACE 80.6 %. For PNS (62.9 % against 46.9 % for the supervised classifier and 1.7 % for the QBER CUSUM) and blinding (47.4 % against 26.3 %) the advantage comes from constraints that the QBER does not see. Among the zero-day families, Q-TRACE detects 57.1 % of RNG-bias attacks, for which every comparison method stays near its false-alarm level, and 24.0 % of time-shift attacks. Detection of Trojan-horse probes with back-scatter is low for every method (Q-TRACE 2.9 %): the back-scattered background is small compared with the afterpulse background of most links, and the theory below shows that the information available is correspondingly small.

Figure 4. Detection probability at a per-window false-alarm rate of 10−310^{-3} against attack strength, in quintile bins of strength. Pooled over held-out seeds.

FamilyQ-TRACEXGBoost (sup.)QBER CUSUMDecoy CUSUMQBER staticAutoencoderIsolation forestOne-class SVMQK one-class SVM
Intercept-resend80.680.678.32.936.66.39.10.07.4
PNS62.946.91.74.61.72.91.70.03.4
Blinding47.426.31.70.01.10.00.00.06.3
Time-shift24.00.60.60.02.90.00.60.06.9
Trojan horse2.90.61.10.01.10.00.60.05.7
RNG bias57.10.62.30.01.10.00.00.07.4
PNS + blinding81.057.01.01.02.02.06.00.03.0
Time-shift + Trojan29.03.00.00.01.00.00.00.06.0
IR + RNG bias86.067.062.00.032.02.09.00.04.0

Table 3. Percentage of attacked test links detected, per attack family, at a per-window false-alarm rate of 10−310^{-3} (mean over seeds; best method per row in bold).

Delay against the information-theoretic bound

Figure 5 places every detected attack on the plane of its own delay bound log⁡(1/α)/(ND∗)\log(1/\alpha)/(ND^*) and its observed delay. The median delay of Q-TRACE lies on the bound for attacks with bounds below one window and stays within a small factor of it up to bounds of about ten windows. The QBER CUSUM and the supervised classifier detect fewer attacks, and those they detect require between one and two orders of magnitude more data than the bound. Table 4 quantifies the same effect as detection rates: for attacks whose bound is below one window, Q-TRACE detects 93.7 % (the supervised classifier 62.0 %, the QBER CUSUM 31.7 %); for bounds between one and ten windows the rates are 25.4 %, 6.4 % and 3.4 %.

Figure 5. Windows of post-onset data needed for the first alarm against the information-theoretic bound of Proposition 2 for each detected attack (points) and binned medians (lines). The dashed line is max⁡(1,bound)\max(1,\mathrm{bound}). The bound constrains the mean delay, so individual runs can fall below it.

Methodbound < 1bound 1–10bound 10–100bound > 100
Q-TRACE93.725.47.82.6
XGBoost (sup.)62.06.41.80.3
QBER CUSUM31.73.41.81.0
Decoy CUSUM2.60.00.00.0
QBER static19.913.611.510.9
Autoencoder3.70.00.00.0
Isolation forest4.10.00.00.3
One-class SVM0.00.00.00.0
QK one-class SVM6.76.14.68.6
Attack runs492264217302

Table 4. Percentage of attacked links detected, grouped by the delay bound log⁡(1/α)/(ND∗)\log(1/\alpha)/(ND^*) of each run in windows, at α=10−3\alpha= 10^{-3}. Runs are pooled over seeds; the last row gives the number of attack runs per bin.

The gap between Q-TRACE and the bound for bounds between one and a hundred windows has a clear origin. The bound assumes a stationary honest link, whereas the twin drifts. In a development run on seed 1 with all nuisance drift switched off, the first version of the monitor detected 74 % of attacked links and 93 % of those with bounds below 20 windows; with drift switched on the same monitor detected 39 %, and the moving-reference channels of § 5.4 raised this to 59 % before the configuration was frozen. Slow honest drift, not the statistical efficiency of the monitor, is therefore the binding limit in the realistic regime.

An extension of the bound to drifting pre-change laws is left for future work.

False alarms, benign faults and unseen regimes

Figure 6 and the last three columns of Table 2 show how often each method alarms on attack-free links. Over the 140 monitoring windows of a link the per-window rate of 10−310^{-3} corresponds to a run-level rate of roughly 13 % for independent windows; on nominal honest links all methods stay below this, Q-TRACE at 5.2 %. Q-TRACE raised an alarm on 0.0 % of links with benign loss faults, because a loss step changes only the nuisance parameter; the isolation forest (12.0 %), the quantum-kernel one-class SVM (12.8 %) and the autoencoder (4.0 %) treat the same steps as anomalies. On honest long links, the static QBER threshold alarms on 45.6 % of runs because the honest QBER of long links can exceed 11 %; its apparently high detection rate in the long-link regime (50.7 %) is an artefact of this and not evidence of detection.

Figure 6. Fraction of test links with at least one alarm at a per-window false-alarm rate of 10−310^{-3}: attack-free links, links with benign loss faults (steps or ramps of 0.5 to 3 dB) and links with a dark-count fault, where an alarm is desirable.

Q-TRACE alarms on 3.2 % of honest long links and detects 32.0 % of attacks there, lower than in the nominal regime because fewer clicks per window carry less information. Dark-count faults are detected by none of the methods with high probability: with afterpulse backgrounds of order 10−410^{-4} per gate, a rise of the intrinsic dark-count probability from 10−610^{-6} by a factor of a few changes the total background only marginally.

Physical attribution of alarms

Because the score channel is built from physical directions, an alarm comes with a statement of which constraint was violated. Figure 7 shows, for each attack family, the device parameter with the largest standardised displacement at the first alarm. Blinding and PNS alarms are most often attributed to the double-click direction (54 % and 50 % respectively), consistent with blinded detectors that never double-click and with the altered multi-photon statistics of a lossless PNS channel. Intercept–resend alarms are most often attributed to an optical-error direction (55 %), as Eq. (14) predicts. The attribution is a diagnostic aid, not a classifier: it was not tuned on attack data, and it does not apply to the RNG attack, whose alarms come from the setting channel.

Figure 7. Device parameter implicated at the first alarm of Q-TRACE, by attack family (share of detected runs; entries below 0.1 not printed). RNG bias is excluded because attribution is defined over device directions only.

The quantum-kernel baseline

The one-class SVM on a quantum fidelity kernel performs close to chance (AUROC 0.523 on known attacks) and has the highest false-alarm rate on loss faults. We do not read this as a statement about quantum machine learning in general. The kernel acts on a six-dimensional projection of standardised telemetry scalars, and Proposition 2 implies that no representation of those scalars, quantum or classical, can extract information that the scalars do not contain; much of the relevant information sits in cells, such as vacuum double clicks, that the scalars summarise poorly. The result does suggest that, for this problem, the choice of statistic matters more than the choice of model class.

A hardware study on an IBM Heron processor

The simulation study tests Q-TRACE against a twin whose honest noise we wrote ourselves. A hardware experiment tests the parts of the method that do not depend on optical physics, namely calibration against a device’s own commissioning data, false-alarm control under real noise and drift, the value of tests that use the full outcome table, and agreement with information-theoretic predictions, on a device whose noise is not generated by any model of ours. It also makes the eavesdropper physical: her interaction is a unitary acting on the transmitted qubit and her own ancilla, and her information can be measured.

Multiplexed BB84 links and physical eavesdroppers

Each BB84 link uses two neighbouring qubits: a data qubit that carries Alice’s state to Bob’s measurement and an ancilla owned by Eve. Pairs are ranked by two-qubit-gate error plus both readout errors, subject to cut-offs of 2 % and 5 % respectively, and are chosen mutually non-adjacent so that no coupler connects qubits of different links. On ibm_marrakesh this gave 33 links; Table 11 in Section D summarises their calibration. One circuit realises one BB84 round per link and per shot (Figure 8). The eight settings (a,α,β)(a,\alpha,\beta) rotate in a Latin-square pattern, link ii in circuit cc using setting (i+c) mod 8(i+c) \bmod8, so that every circuit contains every setting and every link sees every setting once per pass of eight circuits.

Circuit diagram of one BB84 link

Figure 8. One BB84 link. Alice prepares ∣a⟩|a\rangle in basis α\alpha; Eve applies UEve∈{1,RZX(θ),RXX(θ),UAD(γ)}U_{\mathrm{Eve}} \in\{\mathbb{1}, R_{ZX}(\theta), R_{XX}(\theta), U_{\mathrm{AD}}(\gamma)\}; Bob measures in basis β\beta. Eve’s ancilla is read in the Y basis (y = 1) for the entangling probes and in the Z basis for the damping probe. Barriers (dashed) align all links of a circuit.

QuantityMedianMinMax
CZ error (link pair) (%)0.260.120.60
Readout error, data qubit (%)0.740.293.31
Readout error, ancilla (%)2.000.594.77
T1T_1, data qubit (μ\mus)16468364
T2T_2, data qubit (μ\mus)7618375
T1T_1, ancilla (μ\mus)17098440
T2T_2, ancilla (μ\mus)11326366

Table 11. Calibration of the 33 links on ibm_marrakesh at the time of the run (backend-reported values).

The experiment comprises two commissioning passes, in which every link is honest, followed by six monitoring epochs of one pass each. In the monitoring epochs every link is honest in two epochs and attacked in four, with four distinct probes drawn from a balanced, seeded schedule. Ten probes are used.

Entangling probe. Eve couples her ancilla to the data qubit with RZX(θ)=exp⁡(−iθZ⊗X/2)R_{ZX}(\theta)=\exp(-i\theta Z\otimes X/2), which learns the ZZ-basis bit, or with RXX(θ)=exp⁡(−iθX⊗X/2)R_{XX}(\theta)=\exp(-i\theta X\otimes X/2), which learns the XX-basis bit. For a data qubit in an eigenstate of the coupled Pauli operator with eigenvalue (−1)a(-1)^a, the ancilla evolves to

∣e±⟩=cos⁡θ2∣0⟩∓isin⁡θ2∣1⟩,⟨e+∣e−⟩=cos⁡θ.(32)|e_{\pm}\rangle=\cos\frac{\theta}{2}|0\rangle\mp i\sin\frac{\theta}{2}|1\rangle,\qquad\langle e_{+}|e_{-}\rangle=\cos\theta. \tag*{(32)}

A data qubit prepared in the conjugate basis becomes entangled with the ancilla, and its coherence is multiplied by ⟨e+∣e−⟩\langle e_{+}|e_{-}\rangle, so that Bob’s error probability in the conjugate basis is

D(θ)=1−cos⁡θ2=sin⁡2θ2.(33)D(\theta)=\frac{1-\cos\theta}{2}=\sin^2\frac{\theta}{2}. \tag*{(33)}

Eve’s optimal guess of the bit in the coupled basis is the Helstrom measurement [71] discriminating ∣e+⟩|e_{+}\rangle from ∣e−⟩|e_{-}\rangle, whose error probability is

Perr(θ)=12(1−1−∣⟨e+∣e−⟩∣2)=1−sin⁡θ2,(34)P_{\mathrm{err}}(\theta)=\frac{1}{2}\left(1-\sqrt{1-\left|\langle e_{+}|e_{-}\rangle\right|^2}\right)=\frac{1-\sin\theta}{2}, \tag*{(34)}

attained by a YY-basis measurement. Her information per bit in the coupled basis is I(θ)=1−h2(Perr(θ))I(\theta)=1-h_2(P_{\mathrm{err}}(\theta)). Eliminating θ\theta with sin⁡θ=2D(1−D)\sin\theta=2\sqrt{D(1-D)} gives

I(D)=1−h2(12−D(1−D)),(35)I(D)=1-h_2\left(\frac{1}{2}-\sqrt{D(1-D)}\right), \tag*{(35)}

which has the same functional form as the optimal information–disturbance trade-off for individual attacks on BB84 derived by Fuchs et al. [72]. At θ=π/2\theta=\pi/2 the ancilla states are orthogonal and the probe is an intercept–resend attack in the coupled basis. Eve’s choice between RZXR_{ZX} and RXXR_{XX} is balanced so that, in every pass, she matches Alice’s basis on exactly half of the sifted settings; the average sifted QBER increase is then ΔQideal=12sin⁡2(θ/2)\Delta Q_{\mathrm{ideal}}=\frac{1}{2}\sin^2(\theta/2). A purely random choice per circuit would leave a probability of 1/161/16 that an epoch is never disturbed, which a noisy rehearsal of the experiment revealed and which the balanced schedule removes.

Amplitude-damping probe. The coupling UAD(γ)=CXe→d CRY(2arcsin⁡γ)d→eU_{\mathrm{AD}}(\gamma)=\mathrm{CX}_{e\to d}\,\mathrm{CRY}(2\arcsin\sqrt{\gamma})_{d\to e} transfers the excitation of the data qubit to the ancilla with probability γ\gamma. It produces bit-asymmetric errors, γ\gamma for a=1a=1 and none for a=0a=0 in the ZZ basis and (1−1−γ)/2(1-\sqrt{1-\gamma})/2 in the XX basis, the qubit analogue of an efficiency-mismatch attack. Eve’s ancilla is ∣1⟩|1\rangle only after a decay, so her information about ZZ-basis bits is h2(γ/2)−12h2(γ)h_2(\gamma/2)-\frac{1}{2}h_2(\gamma).

Execution. All circuits were transpiled with a fixed layout and no routing, executed with the Qiskit Runtime sampler [68] without error mitigation, twirling or dynamical decoupling (the monitor must work on raw device statistics), and with per-shot readout so that detection could later be studied as a function of the number of rounds. A pilot job of eight circuits with 400 shots measured the cost per shot (3 s); the main job of 64 circuits with 5,900 shots each used 104 s, a total of 107 s of processor time for 12.5 million link-rounds. Before any processor time was spent, the full pipeline was validated on a noisy simulation of the device.

Tests

For every link and monitoring epoch three tests compare the epoch with a reference. Q-TRACE transfers the structure of the simulation monitor to the qubit setting: an error channel (two-sided change of the ZZ- and XX-basis error rates, χ22\chi^2_2), an asymmetry channel (change of P(1∣a=0)−P(0∣a=1)P(1\mid a=0)-P(0\mid a=1) per basis, χ22\chi^2_2) and an omnibus channel (two-sample likelihood-ratio test over all eight settings, χ82\chi^2_8), combined with a Bonferroni correction. The pooled QBER test is the one-sided two-proportion test on the sifted QBER that deployed systems use; the per-basis QBER test applies one-sided tests to both bases with a Bonferroni correction. Dispersion factors for between-circuit fluctuations were estimated from the two commissioning passes and were close to one (ϕ=1.00\phi=1.00 for the omnibus channel, ϕ=1.014\phi=1.014 for the pooled QBER), confirming that circuits repeat at the shot-noise level.

Pre-registered analysis: the reference matters

The analysis plan fixed before the run used the two commissioning passes as reference. With this reference every test failed: Q-TRACE, the per-basis QBER test and the pooled QBER test flagged 92 %, 95 % and 92 % of the 66 honest link-epochs at α=10−3\alpha= 10^{-3} (Table 12 in Section D). The cause is physical and is shown in Figure 9. Relative to commissioning, the honest monitoring epochs show a QBER increase of 1.86 % in the XX basis, on all 33 links, and of only 0.32 % in the ZZ basis. The two commissioning passes agree to 1.1×10−41.1 \times10^{-4}, and the increase shows no trend over the six epochs, so slow drift is excluded. Commissioning circuits contain no probe gates, so their qubits are measured immediately after preparation; in monitoring circuits the barriers make every data qubit, including those of honest links, wait for the longest probe on the chip, while two-qubit gates act on other links. A dephasing-dominated error that appears only under these conditions is what one expects from the added idle time together with crosstalk from concurrent coupler activation. The present data cannot separate the two contributions.

Figure 9. Honest links on ibm_marrakesh: QBER in the commissioning passes against QBER in the honest monitoring epochs, per basis. The X basis shifts by 1.86 % on every link, the Z basis by 0.32 %: commissioning circuits did not reproduce the operating conditions of monitoring circuits.

Table 12. Pre-registered analysis (reference: commissioning passes). Fraction of link-epochs flagged at α=10−3\alpha= 10^{-3}. Every test flags most honest link-epochs; see § 9.3.

ProbennΔQmeas\Delta Q_{\mathrm{meas}} (%)Q-TRACEQBER/basisQBER pooled
Honest (no probe)661.090.920.950.92
θ=0.15\theta= 0.15141.481.001.001.00
θ=0.25\theta= 0.25132.061.000.921.00
θ=0.40\theta= 0.40143.101.001.001.00
θ=0.60\theta= 0.60145.531.001.001.00
θ=0.90\theta= 0.901310.131.001.001.00
θ=1.57\theta= 1.571324.171.001.001.00
γ=0.03\gamma= 0.03134.061.001.001.00
γ=0.06\gamma= 0.06124.471.001.001.00
γ=0.12\gamma= 0.12127.151.001.001.00
γ=0.25\gamma= 0.251411.061.001.001.00

The monitors were right. The operating conditions had changed, and a reference acquired under different conditions describes a different device. The same failure would occur in an optical system calibrated without traffic, with different detector gating, or at a different temperature. The practical lesson is that the commissioning data of any telemetry monitor, QBER-based or otherwise, must be acquired under the operating conditions of the monitored traffic; in the hardware setting this means inserting timing-matched delays and the same concurrent gate activity into the commissioning circuits.

Condition-matched analysis

Each link was honest in two monitoring epochs that ran under exactly the conditions of the attacked epochs. Using these epochs as reference, we test each attacked epoch against the link’s two honest epochs and estimate the false-alarm rate by testing each honest epoch against the link’s other honest epoch. This analysis was defined after the pre-registered one had failed and is reported as such.

With the condition-matched reference none of the 66 honest link-epochs was flagged by any test (Table 5). The honest pp-values are, if anything, conservative: 3 % fall below 0.05. The measured QBER increase of every entangling probe agrees with ΔQideal\Delta Q_{\mathrm{ideal}} across two decades (Figure 10a); for example θ=0.60\theta= 0.60 gives 4.34 % against 4.37 % predicted and θ=0.90\theta= 0.90 gives 9.05 % against 9.46 %. The damping probe raises the QBER above its ideal value at small γ\gamma, because its three two-qubit gates add their own error, an honest feature of a physical eavesdropper whose apparatus is imperfect.

ProbennΔQideal\Delta Q_{\mathrm{ideal}} (%)ΔQmeas\Delta Q_{\mathrm{meas}} (%)Q-TRACEQBER/basisQBER pooledOmnibus
Honest (no probe)660.000.000.000.000.000.00
θ=0.15\theta= 0.15140.280.491.000.930.641.00
θ=0.25\theta= 0.25130.780.870.920.850.850.92
θ=0.40\theta= 0.40141.972.111.001.001.001.00
θ=0.60\theta= 0.60144.374.341.001.001.001.00
θ=0.90\theta= 0.90139.469.051.001.001.001.00
θ=1.57\theta= 1.571325.0023.101.001.001.001.00
γ=0.03\gamma= 0.03131.132.821.001.001.001.00
γ=0.06\gamma= 0.06122.263.491.001.001.001.00
γ=0.12\gamma= 0.12124.555.991.001.001.001.00
γ=0.25\gamma= 0.25149.6010.051.001.001.001.00

Table 5. Hardware detection with the condition-matched reference: fraction of link-epochs flagged at α=10−3\alpha= 10^{-3}; nn is the number of link-epochs, ΔQideal\Delta Q_{\mathrm{ideal}} the ideal and ΔQmeas\Delta Q_{\mathrm{meas}} the measured increase of the sifted QBER.

Figure 10. Probe physics on ibm_marrakesh (condition-matched reference). (a) Measured against ideal increase of the sifted QBER; the dashed line is the ideal device. (b) Eve’s information per sifted bit, measured on her ancilla, against the measured QBER increase; open symbols are the ideal-device values of Eq. (35) and of the damping channel.

All probes with ΔQideal≥2\Delta Q_{\mathrm{ideal}} \ge2 % are detected on every link-epoch by every test. The informative case is the weakest probe, θ=0.15\theta= 0.15, with ΔQideal=0.28\Delta Q_{\mathrm{ideal}} = 0.28 %: Q-TRACE flags 14 of 14 link-epochs, the per-basis QBER test 13 and the pooled QBER test 9. The pooled test loses power because the probe disturbs one basis at a time and pooling dilutes the signal. The per-basis test is close to optimal here, since on qubits almost every disturbance is a change of an error rate; Q-TRACE matches it while retaining channels for asymmetric and unsifted deviations.

Rounds to detection and information leaked before the alarm

Because every shot was recorded, detection can be studied as a function of the number of rounds by subsampling the shots of the tested epoch. Figure 11 shows the detection probability against shots per circuit for the three weakest probes, and Table 13 the number of shots per circuit at which half of the attacked link-epochs are flagged. For θ=0.15\theta= 0.15, Q-TRACE needs 511 shots, the per-basis test 432 and the pooled QBER test 2851, a factor of 5.6 more. The omnibus channel alone would need 645.

Figure 11. Detection probability at α=10−3\alpha= 10^{-3} against the number of shots per circuit of the tested epoch, for the three weakest probes on ibm_marrakesh (condition-matched reference; mean over five random subsamples per point).

Table 13. Condition-matched reference: shots per circuit at which half of the attacked link-epochs are flagged at α=10−3\alpha= 10^{-3} (left; 50 is the smallest value tested), and information gathered by Eve before that point, in bits of sifted key (right).

ProbeShots per circuit to detection — Q-TRACEShots per circuit to detection — QBER/basisShots per circuit to detection — QBER pooledBits leaked before alarm — Q-TRACEBits leaked before alarm — QBER/basisBits leaked before alarm — QBER pooled
θ=0.15\theta= 0.15511432285114.912.683.0
θ=0.25\theta= 0.2534036969419.721.340.1
θ=0.40\theta= 0.4073698813.212.515.8
θ=0.60\theta= 0.6050505018.218.218.2
θ=0.90\theta= 0.9050505039.039.039.0
θ=1.57\theta= 1.5750505069.969.969.9
γ=0.03\gamma= 0.036050760.40.40.5
γ=0.06\gamma= 0.065050501.11.11.1
γ=0.12\gamma= 0.125050501.91.91.9
γ=0.25\gamma= 0.255050508.38.38.3

Eve’s ancilla measurements turn this into an operational quantity. On sifted rounds in which her probe basis matched Alice’s basis, her measured information agrees with Eq. (35) up to the effect of her own readout errors (Figure 10b and Table 14); for θ=0.40\theta= 0.40 it is 0.090 bit against 0.112 ideally, and for the intercept–resend limit θ=π/2\theta= \pi/2 it is 0.699 bit with a guessing error of 0.053. Multiplying the information per sifted bit by the number of sifted rounds needed for detection gives the information Eve gathers before the median first alarm: for θ=0.15\theta= 0.15 this is 14.9 bits under Q-TRACE, 12.6 bits under the per-basis QBER test and 83.0 bits under the pooled QBER monitor. These are small numbers in absolute terms; their ratio is what transfers to a deployed system, where the same reasoning applies per window.

Table 14. Eve’s information measured on her ancilla. ImatchI_{\mathrm{match}}: mutual information per sifted round in which her probe basis matched Alice’s basis (Miller–Madow corrected [73]); Pguess errP_{\mathrm{guess\ err}}: her guessing error on those rounds; IsiftI_{\mathrm{sift}}: information per sifted round averaged over all sifted rounds.

ProbeImatchI_{\mathrm{match}} (meas.)ImatchI_{\mathrm{match}} (ideal)Pguess errP_{\mathrm{guess\ err}}IsiftI_{\mathrm{sift}} (meas.)
θ=0.15\theta= 0.150.0150.0160.4240.007
θ=0.25\theta= 0.250.0290.0450.3990.014
θ=0.40\theta= 0.400.0900.1120.3240.045
θ=0.60\theta= 0.600.1820.2440.2550.091
θ=0.90\theta= 0.900.3900.5050.1480.195
θ=1.57\theta= 1.570.6991.0000.0530.349
γ=0.03\gamma= 0.030.0040.0150.4840.002
γ=0.06\gamma= 0.060.0110.0310.4710.006
γ=0.12\gamma= 0.120.0190.0630.4500.010
γ=0.25\gamma= 0.250.0830.1380.3860.041

Discussion

What the results establish

Three findings carry over beyond the particular twin and processor used here. The first is that a physical model of the receiver is a better basis for a monitor than a learned model of attacks. A monitor that knows what an honest link can produce needs no attack data, controls its false-alarm rate through validation on honest links, treats loss as a nuisance rather than an anomaly, and reports which physical constraint an alarm violates. On the benchmark it detected more attacks than every comparison method in every attack group except the long-link regime, where the only method with a higher nominal rate achieved it by alarming on 45.6 % of honest long links.

The second finding is that detectability is a property of the attack and the telemetry, and can be computed. The exponent D∗D^* separates three situations that a test-set accuracy conflates: an attack that a monitor misses although the information is there, an attack that no monitor can catch within the available time, and an attack that leaves no trace at all. Reporting attack strength in units of D∗D^*, or of the delay bound log⁡(1/α)/(ND∗)\log(1/\alpha)/(ND^*), would make results from different systems comparable.

The third finding concerns practice. On real hardware, every monitor tested, including the plain QBER monitors that systems run today, raised alarms on honest links because the reference statistics had been acquired under different operating conditions. Monitoring is only as good as its reference, and the reference must be acquired in operation.

Relation to QBER monitoring and to device-independent protocols

On the qubit hardware, where nearly every disturbance shows up as a change of an error rate, the per-basis QBER test was close to optimal and Q-TRACE matched it. On the optical twin the situation is different: loss, multi-photon pulses, two detectors and three intensities give the receiver statistics a structure that QBER summarises poorly, and the attacks that matter most in practice (PNS, blinding, time-shift, randomness failures) exploit exactly that structure. The advantage of the honest-manifold approach therefore grows with the physical richness of the telemetry. Measurement-device-independent protocols [35] remove detector side channels by construction; for the large installed base of prepare-and-measure systems, a monitor of the kind described here is a low-cost complement that needs no hardware change.

Deployment considerations

The computational cost is modest: calibration takes well under a second per link and one monitoring step requires a one-dimensional Newton iteration and a few small matrix operations per window. The commissioning windows must be attack-free, which is the same trust assumption made when a system is first calibrated. Re-commissioning after maintenance is necessary, and the moving-reference channels make the monitor tolerant to slow drift between commissionings. An alarm need not abort the protocol; it can be used to exclude the affected block from key distillation, as proposed in the operational framework of Mohamed and Al-Kuwari [47]. Finite-size key rates [49, 50] are computed from the same statistics and can be combined with the alarm decision.

Limitations

The study has limitations that bound its claims. (i) The simulation results depend on the twin and its parameter ranges, which we chose to be realistic but which cannot represent every system; the twin contains mismatch effects but is still a model. (ii) False-alarm control is empirical, through validation quantiles, rather than exact; windows within a link are not independent, and the run-level false-alarm rate depends on the monitoring horizon. (iii) The detectability bound assumes a stationary honest link and is asymptotic; under drift the achievable delay is larger. (iv) The attacks are physically motivated but not adaptive: an eavesdropper who knows the monitor would minimise D∗D^{*}, and the space of such attacks has not been explored. (v) The hardware study emulates the channel with superconducting qubits, used a single processor and a single run, has 12 to 16 link-epochs per probe, and its condition-matched analysis was defined after the pre-registered one failed. A follow-up run with timing-matched commissioning circuits is needed to confirm the matched results prospectively. (vi) The afterpulse probability is taken from a specification; in systems where it is unknown it must be calibrated jointly with the background, which is poorly identified without loss variation during commissioning.

Conclusion

We have shown that implementation attacks on decoy-state QKD can be detected without attack data by testing receiver telemetry against the manifold of statistics that an honest, lossy link can produce. The construction combines an exact count-level receiver model, an efficient treatment of the transmittance nuisance, physically structured score tests and drift-robust references. It comes with a detector-independent exponent that bounds what any telemetry monitor can achieve and that identifies attacks no monitor can see. On a benchmark with deliberate model mismatch the monitor detected substantially more attacks than industry monitors, unsupervised detectors and a supervised classifier at the same false-alarm rate, with delays close to the information-theoretic bound. A hardware study with physically executed eavesdroppers confirmed the probe physics, demonstrated low-rate attack detection with a condition-matched reference, and showed that a reference acquired under different operating conditions defeats every monitor, including the QBER monitors in use today. Natural next steps are an extension of the bound to drifting links, the study of adaptive attacks that minimise D∗D^{*}, finite-key integration, and validation on an optical testbed.

Declarations

Funding. No funding was received for this work.

Competing interests. The author declares no competing interests.

Data availability. The raw per-shot hardware data, all simulation results and the summary tables from which every number in this paper is generated (directories results/hardware, results/benchmark and results/summary) are available at https://github.com/Sumitchongder/Q-TRACE.

Code availability. The complete source code, configuration files, the hardware notebook and the scripts that regenerate all figures and tables are available at https://github.com/Sumitchongder/Q-TRACE under the MIT licence.

Author contributions. S.T.C. conceived the study, developed the methods and software, performed the simulations and the hardware experiment, analysed the data and wrote the manuscript.

Use of generative AI. A large language model (Claude, Anthropic) was used to assist with software development, data-analysis code and the drafting and editing of the manuscript. The author reviewed, verified and takes full responsibility for all content, including the methods, results and their interpretation.

Acknowledgements. We acknowledge the use of IBM Quantum services for this work. The views expressed are those of the author and do not reflect the official policy or position of IBM or the IBM Quantum team.

Derivations

Freeman–Tukey residuals

Let n∼Poisson⁡(E)n \sim\operatorname{Poisson}(E). Freeman and Tukey [59] showed that n+n+1\sqrt{n}+\sqrt{n+1} has variance 1+O(E−1)1+O(E^{-1}) and mean 4E+1+O(E−3/2)\sqrt{4E+1}+O(E^{-3/2}), so the residual r=n+n+1−4E+1r=\sqrt{n}+\sqrt{n+1}-\sqrt{4E+1} of Eq. (19) is approximately standard normal for moderate EE and remains well behaved, with mean and variance close to their limits, down to EE of order one. For a cell with E→0E\to0 the residual tends to r=n+n+1−1r=\sqrt{n}+\sqrt{n+1}-1, which is zero with probability 1−O(E)1-O(E); such cells contribute little to either statistic unless the attack populates them, which is exactly the situation for, for example, double clicks generated by back-scattered light. Multinomial cells with small cell probability behave like Poisson cells; for the no-click cells with probability close to one we do not form residuals, because they are determined by the click cells of the same setting.

Variance inflation from estimated bias

Let rτ=μ+ϵτr_\tau=\mu+\epsilon_\tau with independent ϵτ\epsilon_\tau of unit variance per component, and let b=W−1∑w=1Wrwb=W^{-1}\sum_{w=1}^{W}r_w be estimated on WW commissioning windows independent of the MM monitoring windows. Then

Var⁡(∑τ=1M(rτ−b))=M+M2W=M(1+MW)(36)\operatorname{Var}\left(\sum_{\tau=1}^{M}(r_\tau-b)\right)=M+\frac{M^2}{W}=M\left(1+\frac{M}{W}\right) \tag*{(36)}

per component, which is the normalisation in Eqs. (20) and (24). The moving-reference difference of Eq. (26) has, by the same argument with the reference block of length RR in place of the commissioning windows, variance M(1+M/R)M(1+M/R).

Fisher information of the multinomial outcome model

For one setting with NsN_s pulses and outcome probabilities po(ϑ)p_o(\vartheta), the score is ∑ono∇log⁡po\sum_o n_o\nabla\log p_o. Since ∑opo=1\sum_o p_o=1 for all ϑ\vartheta, ∑opo∇log⁡po=∇∑opo=0\sum_o p_o\nabla\log p_o=\nabla\sum_o p_o=0, so the score equals ∑o(no−Nspo)∇log⁡po\sum_o(n_o-N_sp_o)\nabla\log p_o, which is the form (22). Its covariance under the model is

Cov⁡(∑onogo)=Ns[∑opogogoT−(∑opogo)(∑opogo)T]=Ns∑opogogoT,(37)\operatorname{Cov}\left(\sum_o n_og_o\right)=N_s\left[\sum_o p_og_og_o^{\mathsf{T}}-\left(\sum_o p_og_o\right)\left(\sum_o p_og_o\right)^{\mathsf{T}}\right]=N_s\sum_o p_og_og_o^{\mathsf{T}}, \tag*{(37)}

with go=∇log⁡pog_o=\nabla\log p_o, because the second term vanishes by the same identity. Summing over settings gives the information ItI_t of § 5.3. The derivatives are evaluated by central finite differences with step 10−410^{-4} in the transformed coordinates of Eq. (21).

Efficient score and the nuisance parameter

Partition the score as (uψ,uη)(u_\psi,u_\eta) and the information accordingly. The efficient score uψ−IψηIηη−1uηu_\psi-I_{\psi\eta}I_{\eta\eta}^{-1}u_\eta is the residual of the L2L^2 projection of uψu_\psi onto uηu_\eta and is therefore uncorrelated with uηu_\eta. A first-order error δ\delta in the nuisance changes uψu_\psi by −Iψηδ-I_{\psi\eta}\delta and uηu_\eta by −Iηηδ-I_{\eta\eta}\delta to first order, so the efficient score is unchanged to first order; this is why profiling η\eta per window does not bias the statistic. The covariance of the efficient score is the Schur complement Iψψ−IψηIηη−1IηψI_{\psi\psi}-I_{\psi\eta}I_{\eta\eta}^{-1}I_{\eta\psi} [58, 60].

Twin and attack parameters

Table 6 lists the sampling ranges of every link parameter and nuisance process of the twin, and Table 7 the strength ranges of the six attack families.

Supplementary simulation results

MethodKnownZero-dayCompositeLong linksFA honestFA lossFA long
Q-TRACE73.7±7.8\mathbf{73.7 \pm7.8}42.3±4.0\mathbf{42.3 \pm4.0}74.7±5.9\mathbf{74.7 \pm5.9}49.3±9.6\mathbf{49.3 \pm9.6}33.2±20.5\mathbf{33.2 \pm20.5}16.8±11.3\mathbf{16.8 \pm11.3}20.8±18.4\mathbf{20.8 \pm18.4}
XGBoost (sup.)61.7 ±\pm 12.53.0 ±\pm 3.750.0 ±\pm 8.431.6 ±\pm 12.44.4 ±\pm 3.229.6 ±\pm 11.40.8 ±\pm 2.2
QBER CUSUM31.2 ±\pm 4.04.0 ±\pm 3.323.7 ±\pm 6.312.9 ±\pm 4.94.8 ±\pm 5.74.8 ±\pm 5.40.0 ±\pm 0.0
Decoy CUSUM5.0 ±\pm 1.00.0 ±\pm 0.02.0 ±\pm 2.30.9 ±\pm 1.50.0 ±\pm 0.017.6 ±\pm 5.70.0 ±\pm 0.0
QBER static15.4 ±\pm 4.83.6 ±\pm 3.315.7 ±\pm 9.356.0 ±\pm 3.65.6 ±\pm 2.13.2 ±\pm 6.548.0 ±\pm 14.5
Autoencoder6.3 ±\pm 3.60.0 ±\pm 0.04.0 ±\pm 3.11.8 ±\pm 3.00.0 ±\pm 0.020.8 ±\pm 16.20.0 ±\pm 0.0
Isolation forest7.0 ±\pm 6.61.1 ±\pm 1.97.3 ±\pm 10.40.9 ±\pm 1.50.8 ±\pm 2.240.0 ±\pm 12.70.0 ±\pm 0.0
One-class SVM0.0 ±\pm 0.00.0 ±\pm 0.00.0 ±\pm 0.00.0 ±\pm 0.00.0 ±\pm 0.00.0 ±\pm 0.00.0 ±\pm 0.0
QK one-class SVM47.6 ±\pm 11.450.9 ±\pm 4.144.7 ±\pm 9.850.7 ±\pm 11.373.2 ±\pm 5.772.8 ±\pm 12.471.2 ±\pm 5.4

Table 9. As Table 2, at a per-window false-alarm rate of 10−210^{-2}.

MethodRuns detected (%)Median delay (windows)Key exposed (Mbit)
Q-TRACE50.106.10
XGBoost (sup.)29.659.70
QBER CUSUM15.81411.07
Decoy CUSUM1.07412.13
QBER static8.4011.70
Autoencoder1.5012.10
Isolation forest2.73811.88
One-class SVM0.0–12.14
QK one-class SVM5.84411.81

Table 10. Test-split attacks at a per-window false-alarm rate of 10−310^{-3}: percentage of runs detected, median delay of detected runs, and mean key generated between onset and first alarm (or end of run).

The key exposed is the key that the decoy-state analysis of Eq. (3) would certify between the onset of an attack and the first alarm. It weights early detection of attacks on high-rate links, and it is the quantity that the security of a deployed system depends on when alarms are used to discard blocks.

Hardware details

The commissioning QBER of the links ranged from 0.27 % to 11.99 % with a median of 1.13 %. The highest value belongs to a link whose readout had degraded since the backend’s last calibration; it was retained, because a monitor calibrated per link must cope with such links.

Reproducibility

All results were produced with Python 3.12, NumPy 2.5, SciPy 1.18, pandas 3.0, scikit-learn 1.9, XGBoost 3.4, Qiskit 2.5.2, Qiskit Aer 0.17.2 and Qiskit IBM Runtime 0.49.0. The repository provides make benchmark (all held-out seeds), make rehearsal (noisy simulation of the hardware experiment), make figures (all tables and figures) and the notebook notebooks/01_qpu_hardware_run.ipynb used for the hardware run, including its budget control: a pilot job measures the cost per shot and the main job is sized to a user-set limit. Every random draw in the benchmark derives from the seed, so a seed reproduces its result files exactly with the pinned package versions. The numbers in this paper are generated from the result files by the script paper/build_numbers.py.

References

  1. [1]Charles H. Bennett and Gilles Brassard. Quantum cryptography: Public key distribution and coin tossing. In Proceedings of the IEEE International Conference on Computers, Systems and Signal Processing, pages 175–179, Bangalore, India, 1984.
  2. [2]Artur K. Ekert. Quantum cryptography based on Bell’s theorem. Physical Review Letters, 67:661–663, 1991. doi: 10.1103/PhysRevLett.67.661.DOI
  3. [3]Peter W. Shor and John Preskill. Simple proof of security of the BB84 quantum key distribution protocol. Physical Review Letters, 85:441–444, 2000. doi: 10.1103/PhysRevLett.85.441.DOI
  4. [4]Sheng-Kai Liao et al. Satellite-to-ground quantum key distribution. Nature, 549:43–47, 2017. doi: 10.1038/nature23655.DOI
  5. [5]Yu-Ao Chen et al. An integrated space-to-ground quantum communication network over 4,600 kilometres. Nature, 589:214–219, 2021. doi: 10.1038/s41586-020-03093-8.DOI
  6. [6]Daniel Gottesman, Hoi-Kwong Lo, Norbert Lütkenhaus, and John Preskill. Security of quantum key distribution with imperfect devices. Quantum Information and Computation, 4(5):325–360, 2004.
  7. [7]Won-Young Hwang. Quantum key distribution with high loss: Toward global secure communication. Physical Review Letters, 91:057901, 2003. doi: 10.1103/PhysRevLett.91.057901.DOI
  8. [8]Hoi-Kwong Lo, Xiongfeng Ma, and Kai Chen. Decoy state quantum key distribution. Physical Review Letters, 94:230504, 2005. doi: 10.1103/PhysRevLett.94.230504.DOI
  9. [9]Xiang-Bin Wang. Beating the photon-number-splitting attack in practical quantum cryptography. Physical Review Letters, 94:230503, 2005. doi: 10.1103/PhysRevLett.94.230503.DOI
  10. [10]Xiongfeng Ma, Bing Qi, Yi Zhao, and Hoi-Kwong Lo. Practical decoy state for quantum key distribution. Physical Review A, 72:012326, 2005. doi: 10.1103/PhysRevA.72.012326.DOI
  11. [11]Valerio Scarani, Helle Bechmann-Pasquinucci, Nicolas J. Cerf, Miloslav Dušek, Norbert Lütkenhaus, and Momtchil Peev. The security of practical quantum key distribution. Reviews of Modern Physics, 81:1301–1350, 2009. doi: 10.1103/RevModPhys.81.1301.DOI
  12. [12]Feihu Xu, Xiongfeng Ma, Qiang Zhang, Hoi-Kwong Lo, and Jian-Wei Pan. Secure quantum key distribution with realistic devices. Reviews of Modern Physics, 92:025002, 2020. doi: 10.1103/RevModPhys.92.025002.DOI
  13. [13]Stefano Pirandola, Ulrik L. Andersen, Leonardo Banchi, Mario Berta, Darius Bunandar, Roger Colbeck, Dirk Englund, Tobias Gehring, Cosmo Lupo, Carlo Ottaviani, Jason L. Pereira, Mohsen Razavi, Jesni Shamsul Shaari, Marco Tomamichel, Vladyslav C. Usenko, Giuseppe Vallone, Paolo Villoresi, and Petros Wallden. Advances in quantum cryptography. Advances in Optics and Photonics, 12(4):1012–1236, 2020. doi: 10.1364/AOP.361502.DOI
  14. [14]Gilles Brassard, Norbert Lütkenhaus, Tal Mor, and Barry C. Sanders. Limitations on practical quantum cryptography. Physical Review Letters, 85:1330–1333, 2000. doi: 10.1103/PhysRevLett.85.1330.DOI
  15. [15]Norbert Lütkenhaus. Security against individual attacks for realistic quantum key distribution. Physical Review A, 61:052304, 2000. doi: 10.1103/PhysRevA.61.052304.DOI
  16. [16]Lars Lydersen, Carlos Wiechers, Christoffer Wittmann, Dominique Elser, Johannes Skaar, and Vadim Makarov. Hacking commercial quantum cryptography systems by tailored bright illumination. Nature Photonics, 4:686–689, 2010. doi: 10.1038/nphoton.2010.214.DOI
  17. [17]Ilja Gerhardt, Qin Liu, Antía Lamas-Linares, Johannes Skaar, Christian Kurtsiefer, and Vadim Makarov. Full-field implementation of a perfect eavesdropper on a quantum cryptography system. Nature Communications, 2:349, 2011. doi: 10.1038/ncomms1348.DOI
  18. [18]Carlos Wiechers, Lars Lydersen, Christoffer Wittmann, Dominique Elser, Johannes Skaar, Christoph Marquardt, Vadim Makarov, and Gerd Leuchs. After-gate attack on a quantum cryptosystem. New Journal of Physics, 13:013043, 2011. doi: 10.1088/1367-2630/13/1/013043.DOI
  19. [19]Lars Lydersen, Nitin Jain, Christoffer Wittmann, Øystein Marøy, Johannes Skaar, Christoph Marquardt, Vadim Makarov, and Gerd Leuchs. Superlinear threshold detectors in quantum cryptography. Physical Review A, 84:032320, 2011. doi: 10.1103/PhysRevA.84.032320.DOI
  20. [20]Vadim Makarov, Andrey Anisimov, and Johannes Skaar. Effects of detector efficiency mismatch on security of quantum cryptosystems. Physical Review A, 74:022313, 2006. doi: 10.1103/PhysRevA.74.022313.DOI
  21. [21]Bing Qi, Chi-Hang Fred Fung, Hoi-Kwong Lo, and Xiongfeng Ma. Time-shift attack in practical quantum cryptosystems. Quantum Information and Computation, 7(1):73–82, 2007.arxiv.org/abs/quant-ph/0512080
  22. [22]Yi Zhao, Chi-Hang Fred Fung, Bing Qi, Christine Chen, and Hoi-Kwong Lo. Quantum hacking: Experimental demonstration of time-shift attack against practical quantum-key-distribution systems. Physical Review A, 78:042333, 2008. doi: 10.1103/PhysRevA.78.042333.DOI
  23. [23]Nicolas Gisin, Sylvain Fasel, Barbara Kraus, Hugo Zbinden, and Grégoire Ribordy. Trojan-horse attacks on quantum-key-distribution systems. Physical Review A, 73:022320, 2006. doi: 10.1103/PhysRevA.73.022320.DOI
  24. [24]Nitin Jain, Elena Anisimova, Imran Khan, Vadim Makarov, Christoph Marquardt, and Gerd Leuchs. Trojan-horse attacks threaten the security of practical quantum cryptography. New Journal of Physics, 16:123030, 2014. doi: 10.1088/1367-2630/16/12/123030.DOI
  25. [25]Marco Lucamarini, Iris Choi, Martin B. Ward, James F. Dynes, Zhiliang L. Yuan, and Andrew J. Shields. Practical security bounds against the Trojan-horse attack in quantum key distribution. Physical Review X, 5:031030, 2015. doi: 10.1103/PhysRevX.5.031030.DOI
  26. [26]Nitin Jain, Christoffer Wittmann, Lars Lydersen, Carlos Wiechers, Dominique Elser, Christoph Marquardt, Vadim Makarov, and Gerd Leuchs. Device calibration impacts security of quantum key distribution. Physical Review Letters, 107:110501, 2011. doi: 10.1103/PhysRevLett.107.110501.DOI
  27. [27]Feihu Xu, Bing Qi, and Hoi-Kwong Lo. Experimental demonstration of phase-remapping attack in a practical quantum key distribution system. New Journal of Physics, 12:113026, 2010. doi: 10.1088/1367-2630/12/11/113026.DOI
  28. [28]Audun Nystad Bugge, Sebastian Sauge, Aina Mardhiyah M. Ghazali, Johannes Skaar, Lars Lydersen, and Vadim Makarov. Laser damage helps the eavesdropper in quantum cryptography. Physical Review Letters, 112:070503, 2014. doi: 10.1103/PhysRevLett.112.070503.DOI
  29. [29]Vadim Makarov, Jean-Philippe Bourgoin, Poompong Chaiwongkhot, Mathieu Gagné, Thomas Jennewéin, Sarah Kaiser, Raman Kashyap, Matthieu Legré, Carter Minshull, and Shihan Sajee d. Creation of backdoors in quantum communications via laser damage. Physical Review A, 94:030302, 2016. doi: 10.1103/PhysRevA.94.030302.DOI
  30. [30]Anqi Huang, Álvaro Navarrete, Shi-Hai Sun, Poompong Chaiwongkhot, Marcos Curty, and Vadim Makarov. Laser-seeding attack in quantum key distribution. Physical Review Applied, 12:064043, 2019. doi: 10.1103/PhysRevApplied.12.064043.DOI
  31. [31]Nitin Jain, Birgit Stiller, Imran Khan, Dominique Elser, Christoph Marquardt, and Gerd Leuchs. Attacks on practical quantum key distribution systems (and how to prevent them). Contemporary Physics, 57(3):366–387, 2016.DOI
  32. [32]Shihai Sun and Anqi Huang. A review of security evaluation of practical quantum key distribution system. Entropy, 24:260, 2022. doi: 10.3390/e24020260.DOI
  33. [33]Eleni Diamanti, Hoi-Kwong Lo, Bing Qi, and Zhiliang Yuan. Practical challenges in quantum key distribution. npj Quantum Information, 2:16025, 2016. doi: 10.1038/npjqi.2016.25.DOI
  34. [34]Antonio Acín, Nicolas Brunner, Nicolas Gisin, Serge Massar, Stefano Pironio, and Valerio Scarani. Device-independent security of quantum cryptography against collective attacks. Physical Review Letters, 98:230501, 2007. doi: 10.1103/PhysRevLett.98.230501.DOI
  35. [35]Hoi-Kwong Lo, Marcos Curty, and Bing Qi. Measurement-device-independent quantum key distribution. Physical Review Letters, 108:130503, 2012. doi: 10.1103/PhysRevLett.108.130503.DOI
  36. [36]Anastasiya Ponosova, Daria Ruzhitskaya, Poompong Chaiwongkhot, Vladimir Egorov, Vadim Makarov, and Anqi Huang. Protecting fiber-optic quantum key distribution sources against light-injection attacks. PRX Quantum, 3:040307, 2022. doi: 10.1103/PRXQuantum.3.040307.DOI
  37. [37]Kiyoshi Tamaki, Marcos Curty, and Marco Lucamarini. Decoy-state quantum key distribution with a leaky source. New Journal of Physics, 18:065008, 2016. doi: 10.1088/1367-2630/18/6/065008.DOI
  38. [38]Margarida Pereira, Go Kato, Akihiro Mizutani, Marcos Curty, and Kiyoshi Tamaki. Quantum key distribution with correlated sources. Science Advances, 6:eaaz4487, 2020. doi: 10.1126/sciadv. aaz4487.DOI
  39. [39]Víctor Zapatero, Álvaro Navarrete, Kiyoshi Tamaki, and Marcos Curty. Security of quantum key distribution with intensity correlations. Quantum, 5:602, 2021. doi: 10.22331/q-2021-12-07-602.DOI
  40. [40]Yiyu Mao, Weiti Huang, Hai Zhong, Yijun Wang, Hao Qin, Ying Guo, and Duan Huang. Detecting quantum attacks: a machine learning based defense strategy for practical continuous-variable quantum key distribution. New Journal of Physics, 22:083073, 2020.DOI
  41. [41]Hao Luo, Ling Zhang, Hao Qin, Shihai Sun, Peng Huang, Yijun Wang, Zhengquan Wu, Ying Guo, and Duan Huang. Beyond universal attack detection for continuous-variable quantum key distribution via deep learning. Physical Review A, 105:042411, 2022. doi: 10.1103/PhysRevA.105.042411.DOI
  42. [42]Junxuan Xu, Xiao Ma, Jingyi Liu, Chunhui Zhang, Hongwei Li, Xingyu Zhou, and Qin Wang. Automatically identifying imperfections and attacks in practical quantum key distribution systems via machine learning. Science China Information Sciences, 67:202501, 2024.DOI
  43. [43]Hasan Abbas Al-Mohammed, Afnan Al-Ali, Elias Yaacoub, Uvais Qidwai, Khalid Aboulsaud, Stanisław Rzewuski, and Adam Flizikowski. Machine learning techniques for detecting attackers during quantum key distribution in IoT networks with application to railway scenarios. IEEE Access, 9:136994–137004, 2021.DOI
  44. [44]Zhi-Ang Ren, Yu-Peng Chen, Jing-Yang Liu, Hua-Jian Ding, and Qin Wang. Implementation of machine learning in quantum key distributions. IEEE Communications Letters, 25(3):940–944, 2021.
  45. [45]Junxuan Liu, Bingcheng Huang, Jialei Su, Qingquan Peng, and Anqi Huang. Deep anomaly detection for active attacks on the receiver in quantum key distribution. arXiv preprint, 2025. arXiv:2508.12749.arxiv.org/abs/2508.12749
  46. [46]Ali Al-Kuwari, Noureldin Mohamed, Saif Al-Kuwari, Ahmed Farouk, and Bikash K. Behera. Resisting quantum key distribution attacks using quantum machine learning. arXiv preprint, 2025. arXiv:2509.14282.DOI
  47. [47]Noureldin Mohamed and Saif Al-Kuwari. Adversarial learning game for intrusion detection in quantum key distribution. arXiv preprint, 2026. arXiv:2603.03502.arxiv.org/abs/2603.03502
  48. [48]Hoi-Kwong Lo, Hoi Fung Chau, and M. Ardehali. Efficient quantum key distribution scheme and a proof of its unconditional security. Journal of Cryptology, 18:133–165, 2005.
  49. [49]Marco Tomamichel, Charles Ci Wen Lim, Nicolas Gisin, and Renato Renner. Tight finite-key analysis for quantum cryptography. Nature Communications, 3:634, 2012. doi: 10.1038/ncomms1631.DOI
  50. [50]Charles Ci Wen Lim, Marcos Curty, Nino Walenta, Feihu Xu, and Hugo Zbinden. Concise security bounds for practical decoy-state quantum key distribution. Physical Review A, 89:022307, 2014. doi: 10.1103/PhysRevA.89.022307.DOI
  51. [51]E. S. Page. Continuous inspection schemes. Biometrika, 41:100–115, 1954. doi: 10.1093/biomet/41.1-2.100.DOI
  52. [52]Gary Lorden. Procedures for reacting to a change in distribution. The Annals of Mathematical Statistics, 42(6):1897–1908, 1971. doi: 10.1214/aoms/1177693055.DOI
  53. [53]George V. Moustakides. Optimal stopping times for detecting changes in distributions. The Annals of Statistics, 14(4):1379–1387, 1986. doi: 10.1214/aos/1176350164.DOI
  54. [54]Tze Leung Lai. Information bounds and quick detection of parameter changes in stochastic systems. IEEE Transactions on Information Theory, 44(7):2917–2929, 1998. doi: 10.1109/18.737522.
  55. [55]Michèle Basseville and Igor V. Nikiforov. Detection of Abrupt Changes: Theory and Application. Prentice Hall, Englewood Cliffs, NJ, 1993.
  56. [56]Alexander Tartakovsky, Igor Nikiforov, and Michèle Basseville. Sequential Analysis: Hypothesis Testing and Changepoint Detection. CRC Press, Boca Raton, FL, 2014.
  57. [57]C. Radhakrishna Rao. Large sample tests of statistical hypotheses concerning several parameters with applications to problems of estimation. Mathematical Proceedings of the Cambridge Philosophical Society, 44(1):50–57, 1948. doi: 10.1017/S0305004100023987.
  58. [58]Jerzy Neyman. Optimal asymptotic tests of composite statistical hypotheses. In Ulf Grenander, editor, Probability and Statistics: The Harald Cramér Volume, pages 213–234. Wiley, New York, 1959.
  59. [59]Murray F. Freeman and John W. Tukey. Transformations related to the angular and the square root. The Annals of Mathematical Statistics, 21(4):607–611, 1950. doi: 10.1214/aoms/1177729756.DOI
  60. [60]Erich L. Lehmann and Joseph P. Romano. Testing Statistical Hypotheses. Springer, New York, 3rd edition, 2005.
  61. [61]Olivier Ledoit and Michael Wolf. A well-conditioned estimator for large-dimensional covariance matrices. Journal of Multivariate Analysis, 88(2):365–411, 2004. doi: 10.1016/S0047-259X(03) 00096-4.
  62. [62]S. Kullback and R. A. Leibler. On information and sufficiency. The Annals of Mathematical Statistics, 22(1):79–86, 1951. doi: 10.1214/aoms/1177729694.DOI
  63. [63]Thomas M. Cover and Joy A. Thomas. Elements of Information Theory. Wiley-Interscience, Hoboken, NJ, 2nd edition, 2006.
  64. [64]Fei Tony Liu, Kai Ming Ting, and Zhi-Hua Zhou. Isolation forest. In Proceedings of the 8th IEEE International Conference on Data Mining, pages 413–422, 2008. doi: 10.1109/ICDM.2008.17.DOI
  65. [65]Bernhard Schölkopf, John C. Platt, John Shawe-Taylor, Alex J. Smola, and Robert C. Williamson. Estimating the support of a high-dimensional distribution. Neural Computation, 13(7):1443–1471, 2001. doi: 10.1162/089976601750264965.DOI
  66. [66]Vojtěch Havlíček, Antonio D. Córcoles, Kristan Temme, Aram W. Harrow, Abhinav Kandala, Jerry M. Chow, and Jay M. Gambetta. Supervised learning with quantum-enhanced feature spaces. Nature, 567:209–212, 2019. doi: 10.1038/s41586-019-0980-2.DOI
  67. [67]Maria Schuld and Nathan Killoran. Quantum machine learning in feature Hilbert spaces. Physical Review Letters, 122:040504, 2019. doi: 10.1103/PhysRevLett.122.040504.DOI
  68. [68]Ali Javadi-Abhari, Matthew Treinish, Kevin Krsulich, Christopher J. Wood, Jake Lishman, Julien Gacon, Simon Martiel, Paul D. Nation, Lev S. Bishop, Andrew W. Cross, Blake R. Johnson, and Jay M. Gambetta. Quantum computing with Qiskit. arXiv preprint, 2024. arXiv:2405.08810.
  69. [69]Tianqi Chen and Carlos Guestrin. XGBoost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 785–794, 2016. doi: 10.1145/2939672.2939785.DOI
  70. [70]Fabian Pedregosa et al. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011.arxiv.org/abs/1201.0490
  71. [71]Carl W. Helstrom. Quantum Detection and Estimation Theory. Academic Press, New York, 1976.
  72. [72]Christopher A. Fuchs, Nicolas Gisin, Robert B. Griffiths, Chi-Sheng Niu, and Asher Peres. Optimal eavesdropping in quantum cryptography. I. Information bound and optimal strategy. Physical Review A, 56:1163–1172, 1997. doi: 10.1103/PhysRevA.56.1163.DOI
  73. [73]George A. Miller. Note on the bias of information estimates. In Henry Quastler, editor, Information Theory in Psychology: Problems and Methods, pages 95–100. Free Press, Glencoe, IL, 1955.

Paper details

vlnc:W_sey9n299
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Claude, Anthropic

View statement
Looking for related papers…
Contents