\documentclass[11pt]{article}
\usepackage{xr-hyper}
\input{preamble}
\externaldocument[][nocite]{main}
\renewcommand{\thesection}{S\arabic{section}}
\renewcommand{\theequation}{S\arabic{equation}}
\renewcommand{\thefigure}{S\arabic{figure}}
\renewcommand{\thetable}{S\arabic{table}}
\title{Additional file 1: Supplemental Material to\par Sensing cost of calibrated marginal decoding in quantum error correction}
\author{}
\date{\today}
\begin{document}
\maketitle
\noindent This supplement describes numerical checks, surface-memory
calculations, and geometry bounds. Complete proofs of the core repetition
results are in Appendices A--D of the article. The notation
\(E_{\mathrm w}(e)\) denotes the main-text function \(F(e)\).
All logarithms are natural unless otherwise stated. Parameters describe
synthetic models, and no device calibration is asserted.

\section{Computational checks of the repetition and calibration results}
\label{sec:independent}
The main count implementation groups physical strings by their two regional
Hamming weights and evaluates all positive masses in logarithmic arithmetic.
For joint Bayes inference, a sorted decision spectrum represents the minimum
of the two affine logical-class masses as a function of report likelihood
ratio. Prefix and suffix sums evaluate this function without a Cartesian
product of all data counts and report counts. A separate direct count
implementation serves as a reference. Complement-pair duplication and
the equal mode prior give the factor \(1/4\) in Eq.~\eqref{eq:exactrisk}.

The principal checks use the following separately written implementations. Small-instance rational
calculations enumerate physical error bits, modes, and individual report
bits, without relying on count multiplicities. A second implementation of
the product decoder conditions on the true mode and sums the positive
weighted failure tail over report counts, using neither a logical-pair
normalization nor the sorted decision spectrum. A separately written theory
implementation imports no scientific module from either calculation branch.
Its weighted-tail exponent is checked by both a Legendre optimization and a
constrained relative-entropy minimization.

\begin{table}[ht]
\centering\small
\begin{tabular}{p{0.36\linewidth}p{0.55\linewidth}}
\toprule
Executed calculation & Coverage \\
\midrule
Primary rational physical enumeration & Seven calibration/report cases at
\(d=2,4,6\), using exact fractions. \\
Primary count and overlap reference & Twenty direct-count/spectrum comparisons
and effective-calibration-overlap checks. \\
Primary finite family grid & 64 sensing/calibration points and 45 one-report
parameter/distance points, through \(d=1024\). \\
Fixed-budget and clipping grid & 45 points, \(N=1,2,4,8,16\), through
\(d=1024\). \\
Positive-tail density calculation & Twenty direct-count crosschecks and
42 density points, \(d=16\) to 1024, \(\rho=0.25\) to 1.5. \\
Separately written theory enumeration & Sixteen rational physical/count checks,
49 calibration identities, 100 arbitrary-loss minorization checks, and
60 strict-harm parameter cases. \\
Separately written budget calculation & Seven additional rational raw-bit cases,
nine positive-density cases, fixed-budget curves, and a clipping
counterexample. \\
\bottomrule
\end{tabular}
\caption{Executed deterministic verification. The groups overlap in purpose
but use different representations where stated. Counts are not statistical
sample sizes or a substitute for the proofs.}
\end{table}

At \(p_h=0.2,p_c=0.01,\epsilon=0.1\), separately written numerical evaluations give
\begin{align*}
E_{\mathrm b}&=0.6265832837703265,&
E_{\mathrm o}&=0.9188033158375304,\\
E_{\mathrm w}(0.1)&=0.3000890598493281,&
E_{\mathrm w}(0)&=0.2351250149641247.
\end{align*}
The two oracle-saturation densities are 0.572054373296415 and
1.3383790261598136. For one report at distance 1024, direct summation gives
\(\log R_{\mathrm{blind}}=-645.6133935111999\),
\(\log R_{\mathrm{marg}}=-313.7210770103498\), and
\(\log R_{\mathrm{Bayes}}=-646.8997554512083\).
The very large relative marginal penalty here coexists with very small
absolute risks and is not a measured hardware failure rate.

For a finite clipping counterexample to Bayes optimality, use
\(d=6,N=1,p_h=1/5,p_c=1/100,\epsilon=1/500\).
Complete rational enumeration yields
\[
R_{\mathrm{Bayes}}=\frac{5026263}{12500000000}=0.00040210104,
\qquad
R_{\mathrm{clip}}=\frac{126351}{250000000}=0.000505404.
\]
In this six-bit example, clipping changes 28 of the 128
physical-string/report scores but no marginal-decoder decisions.
At $(p_h,p_c,\epsilon)=(0.2,0.01,0.1)$ and $d=1024$, the clipped and
joint-Bayes decision signs agree numerically for all pairs of hot and cold fault counts at
$N=1,2,4,8,16$, using a score tie tolerance of $10^{-10}$. Their
computed log risks differ by at most $1.14\times10^{-13}$.
Such finite numerical agreement does not imply Bayes optimality,
as the exact six-bit counterexample shows.
A separate 80-case search found no clipping-worse-than-blind example.
That finite search is not a general finite-risk no-harm theorem.

Exact fractions establish the listed small finite identities. Large count sums,
tail probabilities, optimizations, the floating-point surface
convolutions, and plots use floating-point arithmetic. The $d=5$
surface risks are instead rational quantities, as specified below, and
the floating-point evaluations are not outward-rounded interval certificates.
The limiting results follow from the analytic proofs and not from
fitted numerical slopes.

\subsection{Finite-distance calculations}
The deterministic grid covers three rate pairs and
\(N=1,2,4,8,16\). A separately written rational count evaluator checked
242 cases, including every even distance through 32 for the 15 parameter
pairs, the first crossover at distance 38, and the \(d=64,N=16\) record
sum. The 15 crossovers, the sufficient distances, and the 45 risk ratios
are given in the article's Appendix D and in the supplied CSV files.
The sufficient-distance inequalities also have 60-digit
outward-interval checks, whereas the larger floating-point risk grids are not
interval certificates.

For \((p_h,p_c,\epsilon)=(0.2,0.01,0.1)\), \(N=16\), and \(d=64\),
the marginal risk is approximately \(6.532\times10^{-14}\).
The two global report-imbalance classes \(\pm2\) each contribute
approximately \(2.65\times10^{-14}\), and each all-equal global record
contributes approximately \(1.36\times10^{-24}\).
The data files give both global-record and true-mode-conditional conventions.
At finite distance, the all-wrong record used in the asymptotic proof
need not dominate the risk. The same decomposition is supplied for
\(d=256\) and 1024.

\input{sections/r4_geometry}

\begin{figure}[t]
\centering\includegraphics[width=\linewidth]{r4_geometry_scope.pdf}
\caption{Scope of the surface-probe bound.
(a) The bound on relative sensing value uses the finite-sum probe mode-error
probability and a repetition-path genie denominator, with
\(p_h=0.08,p_c=0.005,m=0.002\) and one round. Values are capped at one.
The cold-path denominator is valid in both bases. The mixed path uses
\((d-1)/2\) hot and \((d+1)/2\) cold sites for X-memory, and the hot path
is a wholly hot minimum Z-memory support in the specified convention.
The first informative odd distances are respectively 113, 73, and 37,
with all odd distances through 257 evaluated.
(b) The Bernoulli probe information scales linearly in the data-noise scale
when readout is zero or scaled, but quadratically with a fixed positive
readout floor. Both panels show information bounds, not observed improvements of
a practical decoder. \figureSoftwareNote}
\label{fig:surface_probe_bound}
\end{figure}

\input{sections/r4_surface_methods}

\section{Software}
The simulator uses Stim and matching uses PyMatching
\cite{gidney2021stim,higgott2025pymatching}.
The matrix-product-state comparison uses qecsim's existing
contraction~\cite{qecsim,tuckett2020thesis,bravyi2014efficient,tuckett2019tailoring},
with only the local input probabilities and convention mapping adapted.
Certified decoding is a distinct inference/certification approach~\cite{krishnamoorthy2026certified},
and no implementation comparison with that method was performed.

\bibliographystyle{unsrtnat}
\bibliography{references}
\end{document}
