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.
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.
Detectability limits. We define the detectability exponent , 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).
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).
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 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 in one of two conjugate bases, , and Bob measures in a basis chosen independently; rounds with form the sifted key. With a phase-randomised weak coherent source the number of photons in a pulse of mean is Poisson distributed, so a fraction 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 and error rate by sending pulses of several intensities that the eavesdropper cannot distinguish. With a signal intensity , a weak decoy and a vacuum decoy, the bounds of Ma et al. [10] read
where and are the gain and QBER of intensity , is the vacuum yield and . The asymptotic key rate per signal pulse is
with the binary entropy and the error-correction inefficiency. We use the efficient variant in which key is distilled from -basis rounds and the phase error is bounded with -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
| Family | Role | Mechanism | Telemetry signature |
| Intercept–resend | known | Measure in random basis, resend found state | Sifted error on attacked pulses |
| Photon-number splitting | known | Keep one photon of multi-photon pulses, lossless forwarding, suppress single photons to match gain [14] | Decoy/signal gain relation, double-click rate |
| Detector blinding | known | Faked states on blinded detectors, gain and QBER matched [16] | No dark counts, no double clicks, unsifted balance |
| Time-shift | zero-day | Exploit efficiency mismatch; loss compensated [21, 22] | Bit-dependent errors, double clicks |
| Trojan horse | zero-day | Probe Alice’s modulators [23]; optional back-scatter to Bob | Background counts only; none if filtered |
| RNG bias | zero-day | Bit generator modulated as | 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 and , 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 has a worst-case mean delay of at least as [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 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 : the intensity class (signal, decoy, vacuum) with means , Alice’s bit , Alice’s basis and Bob’s basis . Settings are drawn independently with probabilities
so there are settings. Bob’s passive receiver has two threshold detectors, and , encoding bit values; a pulse produces one of four outcomes (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 pulses, the full table of counts , 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 , the outcome counts of setting are multinomial,
The log-likelihood of a window therefore separates into an outcome part and an allocation part,
and the monitor of § 5 uses both.
Threshold detectors and photon-number-dependent channels
Let denote the probability that detector stays silent and the probability that both stay silent. Inclusion–exclusion gives the four outcome probabilities
To compute the silence probabilities, suppose that photons leave Alice and of them reach Bob. Each arriving photon is routed to detector and fires it with probability , independently of the others, where
with the receiver efficiency, the optical misalignment of basis , and the efficiency of relative to . Firing events of different photons at the same detector are not mutually exclusive, but routing of a single photon is; hence, given arriving photons,
Background clicks (dark counts) occur independently with probability per gate. Averaging over the channel with the arrival generating function and over the photon-number distribution of the source yields the exact expressions
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 , , and a memoryless channel of transmittance , , and
with ; in particular the two detectors fire independently.
Proof. . Substituting gives , and 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 and afterpulse probability , the extra click probability is , and the silence probabilities become and . We verified numerically that the generating-function route of Eq. (10) and the closed form of Eq. (11) agree to .
The honest-device family
For an attack-free link, Eqs. (7), (8) and (11) define the outcome probabilities as a function of
where is the decoy-to-signal intensity ratio. The signal intensity is read from the transmitter’s power monitor and is in any case degenerate with ; the afterpulse probability is taken from the detector specification. We write for the resulting distribution over settings and outcomes. For a link whose device parameters have been calibrated, the honest-device manifold is the one-parameter family
Treating 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 of the pulses from its onset window onwards, so that the attacked distribution is for the outcome part and analogously for the allocation part. We derive 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 when Eve chose Alice’s basis and otherwise, so
The sifted QBER of attacked pulses rises by , 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,
where is the transmitted fraction of single-photon pulses and the blocked fraction of multi-photon pulses. Eve chooses so that the signal click probability equals its honest value : if forwarding all multi-photon pulses already exceeds she sets and solves for , otherwise and she solves for . 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 , chooses a basis uniformly, and resends a bright trigger encoding her result. A blinded detector clicks deterministically when Bob’s basis equals and not at all otherwise; it produces neither dark counts nor double clicks. With and Eve’s own error rate , the attacked outcome probabilities are
with and . A stealthy Eve matches the signal gain, , and the honest QBER, . For small 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 irrespective of .
Time-shift attack. Each attacked pulse is shifted to a time at which one detector’s efficiency is reduced by a factor [21, 22]; with equal probability the favoured detector is or . Eve compensates the loss of gain by lowering the channel loss by a factor . The attacked distribution is the even mixture of two honest-form distributions with transmittance and relative efficiencies and respectively, and the QBER of bit 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 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 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 , 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, , 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.

Figure 1. Structure of the Q-TRACE monitor. Commissioning windows (top) fix the device parameters 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 of attack-free windows, , datasheet , setting probabilities
moment estimates from vacuum, sifted and unsifted counts
▷ quasi-Newton outside, Eq. (18) inside
for do
; Freeman–Tukey residuals (19)
efficient scores and informations (23)
end for
; , floored at ▷ residual bias and spread
; shrunk covariance of , eigenvalues floored at 1 ▷ Eq. (25)
return and the commissioning statistics (for the moving reference)
Calibration and profiling
Let be the log-likelihood (6) of window . On commissioning windows the device parameters are estimated by maximising the profile likelihood
We parametrise on unconstrained scales (logit for , , logarithm for the others), start from closed-form moment estimates (vacuum click rates for , sifted signal QBER for , unsifted detector ratio for , ratio of log-gains for ) and use a quasi-Newton optimiser. The inner maximisation over is one-dimensional and smooth and is solved for all windows simultaneously by Newton iterations,
with steps clipped to 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 , the closest honest explanation of window 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 under the profiled honest model, we form the Freeman–Tukey residual [59]
For Poisson or binomial counts has mean close to zero and variance close to one even when is of order unity (Section A.1), which matters for vacuum double clicks with and for signal no-click cells with 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, , where and are the per-component commissioning mean and shrunk standard deviation.
Two statistics accumulate the whitened residuals over a trailing horizon of windows. The persistent-shift statistic
detects deviations of fixed sign; the factor accounts for the variance added by subtracting the estimated bias (Section A.2). The energy statistic detects deviations whose sign changes in time, such as the modulated RNG attack. Both are centred and scaled by their chi-square references, with for the energy statistic and 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 collect nine probe directions and the nuisance:
where the last three components vanish on honest links: lets the misalignment of decoy pulses differ from that of signal pulses, rescales the double-click probability, and makes the receiver efficiency depend on Bob’s basis. The score of window at the calibrated point is
and its Fisher information is ; the identity makes the multinomial correction term vanish (Section A.3). Because is unknown, the scores along are replaced by their efficient versions, the residuals of their projection onto the nuisance score,
which is Neyman’s construction [58]: a small error in then has no first-order effect on the statistic. Over a horizon of windows with and , the score statistic is
Under the honest hypothesis with Poissonian fluctuations, and is asymptotically [57, 60]; under a local alternative it is noncentral with noncentrality , 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,
where is a shrinkage weight in the spirit of Ledoit and Wolf [61] and 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 defines the setting test , 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 with the immediately preceding windows,
and uses in place of in Eqs. (20) and (24). Static mismatch cancels exactly in , and drift that is slow on the scale of windows contributes only through its change across the two blocks, whereas an abrupt change is fully visible during the first 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 , fixed-reference horizons and moving-reference horizons .
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 is standardised by its median and upper spread on attack-free training links,
which equalises the contribution of each channel to the false-alarm rate. The alarm threshold is the quantile of over attack-free validation links, half of which contain benign loss faults, so that 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 windows, the apparent displacement of the device parameters is and its standardised value is ; 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 be the per-pulse distribution over settings and outcomes produced by an attack on a link with device parameters , and the honest manifold (13). The detectability exponent of the attack is
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 pulses that are i.i.d. given the link state, and let be the alarm time of any monitor whose average run length to false alarm is at least under every honest state , . Let attain the infimum in (28). If the link is honest at before the change, the worst-case mean detection delay satisfies
where is the change time and the history before it.
Proof. A monitor that controls false alarms under every honest state controls them in particular under , the law of one window at . The change from to is then a simple change between two known distributions whose per-window divergence is 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 rather than the run length and plot the delay against , which plays the role of the bound with . 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). if and only if lies in the closure of . In particular, a Trojan-horse probe whose back-reflection does not reach Bob ( in § 4) has , 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 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 at the true transmittance, so 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 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 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 be smooth in with Fisher information per pulse, and let the attack act locally along the device directions, with . Then
Proof. For nearby members of a smooth family, . Minimising over the nuisance component with is a weighted least-squares problem whose solution 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 windows is , and the score test attains the delay bound up to the multiple-testing cost of the nine directions. Attacks outside the span still have 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 , . Since nats and the period average of is ,
For the numerical evaluation of Eq. (28) on the full model gives nats per pulse, in agreement with ; with pulses per window and the delay bound is windows.
Interpretation for an adaptive adversary. An eavesdropper who knows that Q-TRACE is in place wants to maximise her information subject to keeping small. Proposition 2 turns this into a quantitative trade-off: she can remain undetected for about 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 , which the monitor knows only through a datasheet value carrying a error;
(b) window-to-window jitter of each intensity class with relative standard deviation up to , independent between signal and decoy, which the honest model cannot represent with its single ratio ;
(c) polarisation drift of the misalignments, an autoregressive process with per-window innovation up to ;
(d) temperature-driven modulation of the dark-count probabilities with amplitude up to ;
(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 to 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 pulses (one second at 10 MHz), of which the first 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.
| Quantity | Range | Note |
| Signal mean photon number | 0.40–0.60 | |
| Decoy ratio | 0.15–0.30 | vacuum |
| Intensity probabilities | (0.70, 0.20, 0.10) | bases and bits uniform |
| Fibre length | 5–60 km (long links: 60–120 km) | attenuation 0.18–0.22 dB/km |
| Receiver efficiency | 0.10–0.50 (long links: 0.05–0.20) | |
| Optical misalignment | 0.5–2 %, basis factor 0.8–1.25 | |
| Dark-count probability | – per gate | log-uniform, per detector |
| Relative efficiency | 0.85–1.15 | |
| Afterpulse probability | 0–3 % | datasheet value known to ±10 % |
| Intensity jitter† | 0.2–1 % per window | independent per intensity |
| Transmittance random walk | innovation 0.1–0.6 % per window | AR(1), coefficient 0.995 |
| Periodic transmittance modulation | amplitude 0–4 %, period 150–600 windows | |
| Polarisation drift† | innovation 0– per window | AR(1), coefficient 0.98 |
| Dark-count temperature modulation† | amplitude 0–10 % | same period as above |
| Pulses per window | 1 s at 10 MHz | |
| Windows per link | 200, 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 to per gate, and RNG bias amplitudes of to with periods of 10 to 80 windows. For every attacked run we also compute at the run’s mean physical state, which allows each delay to be compared with its own bound.
| Attack | Strength parameter | Range |
| Intercept–resend | intercepted fraction | 0.002–0.2 |
| Photon-number splitting | attacked fraction | 0.01–1 |
| Detector blinding | blinded fraction | 0.01–1 |
| Time-shift | shifted fraction ; mismatch | 0.02–1; uniform 0.1–0.5 |
| Trojan horse | back-scatter probability per gate | – |
| RNG bias | amplitude ; period ; phase | –; uniform 10–80; 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, , 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 , 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 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 ( 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- 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 , 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.
| Method | Known | Zero-day | Composite | Long links | FA honest | FA loss | FA long |
| Q-TRACE | 63.6 ± 6.6 | 28.0 ± 2.5 | 65.3 ± 9.1 | 32.0 ± 7.5 | 5.2 ± 3.8 | 0.0 ± 0.0 | 3.2 ± 2.2 |
| XGBoost (sup.) | 51.2 ± 8.5 | 0.6 ± 0.6 | 42.3 ± 10.8 | 24.4 ± 9.2 | 0.8 ± 1.4 | 8.8 ± 6.5 | 0.0 ± 0.0 |
| QBER CUSUM | 27.2 ± 5.3 | 1.3 ± 2.5 | 21.0 ± 3.8 | 9.8 ± 3.7 | 1.2 ± 2.2 | 1.6 ± 2.7 | 0.0 ± 0.0 |
| Decoy CUSUM | 2.5 ± 2.8 | 0.0 ± 0.0 | 0.3 ± 0.9 | 0.0 ± 0.0 | 0.0 ± 0.0 | 3.2 ± 2.2 | 0.0 ± 0.0 |
| QBER static | 13.1 ± 6.0 | 1.7 ± 1.3 | 11.7 ± 7.3 | 50.7 ± 7.4 | 2.8 ± 2.8 | 0.8 ± 2.2 | 45.6 ± 16.7 |
| Autoencoder | 3.0 ± 2.7 | 0.0 ± 0.0 | 1.3 ± 1.7 | 0.9 ± 1.5 | 0.0 ± 0.0 | 4.0 ± 8.6 | 0.0 ± 0.0 |
| Isolation forest | 3.6 ± 4.6 | 0.4 ± 1.1 | 5.0 ± 8.5 | 0.0 ± 0.0 | 0.0 ± 0.0 | 12.0 ± 8.6 | 0.0 ± 0.0 |
| One-class SVM | 0.0 ± 0.0 | 0.0 ± 0.0 | 0.0 ± 0.0 | 0.0 ± 0.0 | 0.0 ± 0.0 | 0.0 ± 0.0 | 0.0 ± 0.0 |
| QK one-class SVM | 5.7 ± 2.5 | 6.7 ± 2.4 | 4.3 ± 2.8 | 8.9 ± 6.2 | 10.4 ± 3.2 | 12.8 ± 4.2 | 7.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 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 , by attack group. Error bars are 95 % confidence intervals over held-out seeds.
| Method | Known | Zero-day | Composite | Long links |
| Q-TRACE | 0.859 ± 0.033 | 0.636 ± 0.032 | 0.858 ± 0.034 | 0.699 ± 0.032 |
| XGBoost (sup.) | 0.848 ± 0.026 | 0.499 ± 0.043 | 0.771 ± 0.041 | 0.718 ± 0.041 |
| QBER CUSUM | 0.664 ± 0.043 | 0.533 ± 0.045 | 0.664 ± 0.034 | 0.624 ± 0.019 |
| Decoy CUSUM | 0.746 ± 0.022 | 0.546 ± 0.031 | 0.724 ± 0.067 | 0.660 ± 0.036 |
| QBER static | 0.567 ± 0.064 | 0.487 ± 0.072 | 0.545 ± 0.065 | 0.571 ± 0.075 |
| Autoencoder | 0.800 ± 0.036 | 0.573 ± 0.017 | 0.766 ± 0.020 | 0.663 ± 0.036 |
| Isolation forest | 0.767 ± 0.033 | 0.554 ± 0.014 | 0.745 ± 0.049 | 0.677 ± 0.033 |
| One-class SVM | 0.814 ± 0.021 | 0.571 ± 0.027 | 0.775 ± 0.029 | 0.677 ± 0.026 |
| QK one-class SVM | 0.523 ± 0.018 | 0.498 ± 0.013 | 0.521 ± 0.014 | 0.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 against attack strength, in quintile bins of strength. Pooled over held-out seeds.
| Family | Q-TRACE | XGBoost (sup.) | QBER CUSUM | Decoy CUSUM | QBER static | Autoencoder | Isolation forest | One-class SVM | QK one-class SVM |
| Intercept-resend | 80.6 | 80.6 | 78.3 | 2.9 | 36.6 | 6.3 | 9.1 | 0.0 | 7.4 |
| PNS | 62.9 | 46.9 | 1.7 | 4.6 | 1.7 | 2.9 | 1.7 | 0.0 | 3.4 |
| Blinding | 47.4 | 26.3 | 1.7 | 0.0 | 1.1 | 0.0 | 0.0 | 0.0 | 6.3 |
| Time-shift | 24.0 | 0.6 | 0.6 | 0.0 | 2.9 | 0.0 | 0.6 | 0.0 | 6.9 |
| Trojan horse | 2.9 | 0.6 | 1.1 | 0.0 | 1.1 | 0.0 | 0.6 | 0.0 | 5.7 |
| RNG bias | 57.1 | 0.6 | 2.3 | 0.0 | 1.1 | 0.0 | 0.0 | 0.0 | 7.4 |
| PNS + blinding | 81.0 | 57.0 | 1.0 | 1.0 | 2.0 | 2.0 | 6.0 | 0.0 | 3.0 |
| Time-shift + Trojan | 29.0 | 3.0 | 0.0 | 0.0 | 1.0 | 0.0 | 0.0 | 0.0 | 6.0 |
| IR + RNG bias | 86.0 | 67.0 | 62.0 | 0.0 | 32.0 | 2.0 | 9.0 | 0.0 | 4.0 |
Table 3. Percentage of attacked test links detected, per attack family, at a per-window false-alarm rate of (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 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 . The bound constrains the mean delay, so individual runs can fall below it.
| Method | bound < 1 | bound 1–10 | bound 10–100 | bound > 100 |
| Q-TRACE | 93.7 | 25.4 | 7.8 | 2.6 |
| XGBoost (sup.) | 62.0 | 6.4 | 1.8 | 0.3 |
| QBER CUSUM | 31.7 | 3.4 | 1.8 | 1.0 |
| Decoy CUSUM | 2.6 | 0.0 | 0.0 | 0.0 |
| QBER static | 19.9 | 13.6 | 11.5 | 10.9 |
| Autoencoder | 3.7 | 0.0 | 0.0 | 0.0 |
| Isolation forest | 4.1 | 0.0 | 0.0 | 0.3 |
| One-class SVM | 0.0 | 0.0 | 0.0 | 0.0 |
| QK one-class SVM | 6.7 | 6.1 | 4.6 | 8.6 |
| Attack runs | 492 | 264 | 217 | 302 |
Table 4. Percentage of attacked links detected, grouped by the delay bound of each run in windows, at . 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 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 : 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 per gate, a rise of the intrinsic dark-count probability from 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 rotate in a Latin-square pattern, link in circuit using setting , so that every circuit contains every setting and every link sees every setting once per pass of eight circuits.

Figure 8. One BB84 link. Alice prepares in basis ; Eve applies ; Bob measures in basis . 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.
| Quantity | Median | Min | Max |
| CZ error (link pair) (%) | 0.26 | 0.12 | 0.60 |
| Readout error, data qubit (%) | 0.74 | 0.29 | 3.31 |
| Readout error, ancilla (%) | 2.00 | 0.59 | 4.77 |
| , data qubit (s) | 164 | 68 | 364 |
| , data qubit (s) | 76 | 18 | 375 |
| , ancilla (s) | 170 | 98 | 440 |
| , ancilla (s) | 113 | 26 | 366 |
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 , which learns the -basis bit, or with , which learns the -basis bit. For a data qubit in an eigenstate of the coupled Pauli operator with eigenvalue , the ancilla evolves to
A data qubit prepared in the conjugate basis becomes entangled with the ancilla, and its coherence is multiplied by , so that Bob’s error probability in the conjugate basis is
Eve’s optimal guess of the bit in the coupled basis is the Helstrom measurement [71] discriminating from , whose error probability is
attained by a -basis measurement. Her information per bit in the coupled basis is . Eliminating with gives
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 the ancilla states are orthogonal and the probe is an intercept–resend attack in the coupled basis. Eve’s choice between and 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 . A purely random choice per circuit would leave a probability of 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 transfers the excitation of the data qubit to the ancilla with probability . It produces bit-asymmetric errors, for and none for in the basis and in the basis, the qubit analogue of an efficiency-mismatch attack. Eve’s ancilla is only after a decay, so her information about -basis bits is .
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 - and -basis error rates, ), an asymmetry channel (change of per basis, ) and an omnibus channel (two-sample likelihood-ratio test over all eight settings, ), 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 ( for the omnibus channel, 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 (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 basis, on all 33 links, and of only 0.32 % in the basis. The two commissioning passes agree to , 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 . Every test flags most honest link-epochs; see § 9.3.
| Probe | (%) | Q-TRACE | QBER/basis | QBER pooled | |
| Honest (no probe) | 66 | 1.09 | 0.92 | 0.95 | 0.92 |
| 14 | 1.48 | 1.00 | 1.00 | 1.00 | |
| 13 | 2.06 | 1.00 | 0.92 | 1.00 | |
| 14 | 3.10 | 1.00 | 1.00 | 1.00 | |
| 14 | 5.53 | 1.00 | 1.00 | 1.00 | |
| 13 | 10.13 | 1.00 | 1.00 | 1.00 | |
| 13 | 24.17 | 1.00 | 1.00 | 1.00 | |
| 13 | 4.06 | 1.00 | 1.00 | 1.00 | |
| 12 | 4.47 | 1.00 | 1.00 | 1.00 | |
| 12 | 7.15 | 1.00 | 1.00 | 1.00 | |
| 14 | 11.06 | 1.00 | 1.00 | 1.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 -values are, if anything, conservative: 3 % fall below 0.05. The measured QBER increase of every entangling probe agrees with across two decades (Figure 10a); for example gives 4.34 % against 4.37 % predicted and gives 9.05 % against 9.46 %. The damping probe raises the QBER above its ideal value at small , because its three two-qubit gates add their own error, an honest feature of a physical eavesdropper whose apparatus is imperfect.
| Probe | (%) | (%) | Q-TRACE | QBER/basis | QBER pooled | Omnibus | |
| Honest (no probe) | 66 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 |
| 14 | 0.28 | 0.49 | 1.00 | 0.93 | 0.64 | 1.00 | |
| 13 | 0.78 | 0.87 | 0.92 | 0.85 | 0.85 | 0.92 | |
| 14 | 1.97 | 2.11 | 1.00 | 1.00 | 1.00 | 1.00 | |
| 14 | 4.37 | 4.34 | 1.00 | 1.00 | 1.00 | 1.00 | |
| 13 | 9.46 | 9.05 | 1.00 | 1.00 | 1.00 | 1.00 | |
| 13 | 25.00 | 23.10 | 1.00 | 1.00 | 1.00 | 1.00 | |
| 13 | 1.13 | 2.82 | 1.00 | 1.00 | 1.00 | 1.00 | |
| 12 | 2.26 | 3.49 | 1.00 | 1.00 | 1.00 | 1.00 | |
| 12 | 4.55 | 5.99 | 1.00 | 1.00 | 1.00 | 1.00 | |
| 14 | 9.60 | 10.05 | 1.00 | 1.00 | 1.00 | 1.00 |
Table 5. Hardware detection with the condition-matched reference: fraction of link-epochs flagged at ; is the number of link-epochs, the ideal and 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 % are detected on every link-epoch by every test. The informative case is the weakest probe, , with %: 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 , 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 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 (left; 50 is the smallest value tested), and information gathered by Eve before that point, in bits of sifted key (right).
| Probe | Shots per circuit to detection — Q-TRACE | Shots per circuit to detection — QBER/basis | Shots per circuit to detection — QBER pooled | Bits leaked before alarm — Q-TRACE | Bits leaked before alarm — QBER/basis | Bits leaked before alarm — QBER pooled |
| 511 | 432 | 2851 | 14.9 | 12.6 | 83.0 | |
| 340 | 369 | 694 | 19.7 | 21.3 | 40.1 | |
| 73 | 69 | 88 | 13.2 | 12.5 | 15.8 | |
| 50 | 50 | 50 | 18.2 | 18.2 | 18.2 | |
| 50 | 50 | 50 | 39.0 | 39.0 | 39.0 | |
| 50 | 50 | 50 | 69.9 | 69.9 | 69.9 | |
| 60 | 50 | 76 | 0.4 | 0.4 | 0.5 | |
| 50 | 50 | 50 | 1.1 | 1.1 | 1.1 | |
| 50 | 50 | 50 | 1.9 | 1.9 | 1.9 | |
| 50 | 50 | 50 | 8.3 | 8.3 | 8.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 it is 0.090 bit against 0.112 ideally, and for the intercept–resend limit 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 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. : mutual information per sifted round in which her probe basis matched Alice’s basis (Miller–Madow corrected [73]); : her guessing error on those rounds; : information per sifted round averaged over all sifted rounds.
| Probe | (meas.) | (ideal) | (meas.) | |
| 0.015 | 0.016 | 0.424 | 0.007 | |
| 0.029 | 0.045 | 0.399 | 0.014 | |
| 0.090 | 0.112 | 0.324 | 0.045 | |
| 0.182 | 0.244 | 0.255 | 0.091 | |
| 0.390 | 0.505 | 0.148 | 0.195 | |
| 0.699 | 1.000 | 0.053 | 0.349 | |
| 0.004 | 0.015 | 0.484 | 0.002 | |
| 0.011 | 0.031 | 0.471 | 0.006 | |
| 0.019 | 0.063 | 0.450 | 0.010 | |
| 0.083 | 0.138 | 0.386 | 0.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 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 , or of the delay bound , 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 , 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 , 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 . Freeman and Tukey [59] showed that has variance and mean , so the residual of Eq. (19) is approximately standard normal for moderate and remains well behaved, with mean and variance close to their limits, down to of order one. For a cell with the residual tends to , which is zero with probability ; 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 with independent of unit variance per component, and let be estimated on commissioning windows independent of the monitoring windows. Then
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 in place of the commissioning windows, variance .
Fisher information of the multinomial outcome model
For one setting with pulses and outcome probabilities , the score is . Since for all , , so the score equals , which is the form (22). Its covariance under the model is
with , because the second term vanishes by the same identity. Summing over settings gives the information of § 5.3. The derivatives are evaluated by central finite differences with step in the transformed coordinates of Eq. (21).
Efficient score and the nuisance parameter
Partition the score as and the information accordingly. The efficient score is the residual of the projection of onto and is therefore uncorrelated with . A first-order error in the nuisance changes by and by to first order, so the efficient score is unchanged to first order; this is why profiling per window does not bias the statistic. The covariance of the efficient score is the Schur complement [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
| Method | Known | Zero-day | Composite | Long links | FA honest | FA loss | FA long |
| Q-TRACE | |||||||
| XGBoost (sup.) | 61.7 12.5 | 3.0 3.7 | 50.0 8.4 | 31.6 12.4 | 4.4 3.2 | 29.6 11.4 | 0.8 2.2 |
| QBER CUSUM | 31.2 4.0 | 4.0 3.3 | 23.7 6.3 | 12.9 4.9 | 4.8 5.7 | 4.8 5.4 | 0.0 0.0 |
| Decoy CUSUM | 5.0 1.0 | 0.0 0.0 | 2.0 2.3 | 0.9 1.5 | 0.0 0.0 | 17.6 5.7 | 0.0 0.0 |
| QBER static | 15.4 4.8 | 3.6 3.3 | 15.7 9.3 | 56.0 3.6 | 5.6 2.1 | 3.2 6.5 | 48.0 14.5 |
| Autoencoder | 6.3 3.6 | 0.0 0.0 | 4.0 3.1 | 1.8 3.0 | 0.0 0.0 | 20.8 16.2 | 0.0 0.0 |
| Isolation forest | 7.0 6.6 | 1.1 1.9 | 7.3 10.4 | 0.9 1.5 | 0.8 2.2 | 40.0 12.7 | 0.0 0.0 |
| One-class SVM | 0.0 0.0 | 0.0 0.0 | 0.0 0.0 | 0.0 0.0 | 0.0 0.0 | 0.0 0.0 | 0.0 0.0 |
| QK one-class SVM | 47.6 11.4 | 50.9 4.1 | 44.7 9.8 | 50.7 11.3 | 73.2 5.7 | 72.8 12.4 | 71.2 5.4 |
Table 9. As Table 2, at a per-window false-alarm rate of .
| Method | Runs detected (%) | Median delay (windows) | Key exposed (Mbit) |
| Q-TRACE | 50.1 | 0 | 6.10 |
| XGBoost (sup.) | 29.6 | 5 | 9.70 |
| QBER CUSUM | 15.8 | 14 | 11.07 |
| Decoy CUSUM | 1.0 | 74 | 12.13 |
| QBER static | 8.4 | 0 | 11.70 |
| Autoencoder | 1.5 | 0 | 12.10 |
| Isolation forest | 2.7 | 38 | 11.88 |
| One-class SVM | 0.0 | – | 12.14 |
| QK one-class SVM | 5.8 | 44 | 11.81 |
Table 10. Test-split attacks at a per-window false-alarm rate of : 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]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]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]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]Sheng-Kai Liao et al. Satellite-to-ground quantum key distribution. Nature, 549:43–47, 2017. doi: 10.1038/nature23655.DOI
- [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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]E. S. Page. Continuous inspection schemes. Biometrika, 41:100–115, 1954. doi: 10.1093/biomet/41.1-2.100.DOI
- [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]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]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]Michèle Basseville and Igor V. Nikiforov. Detection of Abrupt Changes: Theory and Application. Prentice Hall, Englewood Cliffs, NJ, 1993.
- [56]Alexander Tartakovsky, Igor Nikiforov, and Michèle Basseville. Sequential Analysis: Hypothesis Testing and Changepoint Detection. CRC Press, Boca Raton, FL, 2014.
- [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]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]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]Erich L. Lehmann and Joseph P. Romano. Testing Statistical Hypotheses. Springer, New York, 3rd edition, 2005.
- [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]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]Thomas M. Cover and Joy A. Thomas. Elements of Information Theory. Wiley-Interscience, Hoboken, NJ, 2nd edition, 2006.
- [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]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]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]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]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]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]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]Carl W. Helstrom. Quantum Detection and Estimation Theory. Academic Press, New York, 1976.
- [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]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.








