%=====================================================================
% En02-D-v4.tex
%
% Compile:
%   pdflatex -interaction=nonstopmode -halt-on-error En02-D-v4.tex
%   pdflatex -interaction=nonstopmode -halt-on-error En02-D-v4.tex
%
% This file is self-contained for pdfLaTeX.
% The Python supplement is not a compilation dependency.
%
% IMPORTANT EVIDENCE BOUNDARY
% No Python, SDP solver, or pdfLaTeX execution was available during this
% revision. Accordingly, this document does not assert an executed study,
% a passing archive, compilation success, or numerical optimization results.
% It supplies analytical proofs and a computational implementation whose
% acceptance remains conditional on execution.
%
% The requested minimum standard for an EXECUTED v4 study is therefore
% explicitly pending, rather than represented by invented results.
%=====================================================================

\documentclass[11pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[margin=1in]{geometry}
\usepackage{microtype}
\usepackage{amsmath,amssymb,amsthm,mathtools}
\usepackage{array,booktabs,longtable}
\usepackage{enumitem}
\usepackage{fvextra}
\usepackage[hidelinks]{hyperref}

\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{2}
\numberwithin{equation}{section}
\allowdisplaybreaks
\setlength{\emergencystretch}{2em}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{assumption}[theorem]{Assumption}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{example}[theorem]{Example}

\DefineVerbatimEnvironment{CodeBlock}{Verbatim}{
  fontsize=\scriptsize,
  breaklines=true,
  breakanywhere=true,
  frame=single,
  framesep=3mm,
  numbers=left,
  numbersep=6pt
}
\DefineVerbatimEnvironment{ShellBlock}{Verbatim}{
  fontsize=\small,
  breaklines=true,
  breakanywhere=true,
  frame=single,
  framesep=3mm
}

\newcommand{\ket}[1]{\lvert #1\rangle}
\newcommand{\bra}[1]{\langle #1\rvert}
\newcommand{\ketbra}[2]{\lvert #1\rangle\!\langle #2\rvert}
\newcommand{\norm}[1]{\left\lVert #1\right\rVert}
\newcommand{\abs}[1]{\left\lvert #1\right\rvert}
\newcommand{\ceil}[1]{\left\lceil #1\right\rceil}
\newcommand{\code}[1]{\texttt{\detokenize{#1}}}
\newcommand{\HH}{\mathcal H}
\newcommand{\id}{\mathrm{id}}
\newcommand{\ddiam}{d_\diamond}
\newcommand{\TV}{d_{\mathrm{TV}}}
\newcommand{\Qpeak}{Q_{\mathrm{peak}}}
\newcommand{\Qtotal}{Q_{\mathrm{stored,total}}}
\newcommand{\epsIT}{\varepsilon_{\mathrm{IT}}}
\newcommand{\epsop}{\varepsilon_{\mathrm{op}}}
\newcommand{\Tdep}{\mathcal T}
\newcommand{\vac}{\mathrm{vac}}
\newcommand{\CX}[2]{\mathrm{CX}_{#1\to #2}}
\newcommand{\CZ}[2]{\mathrm{CZ}_{#1,#2}}
\newcommand{\hb}{h_2}
\newcommand{\Conf}{\mathcal S}
\newcommand{\Ch}{\mathsf J}

\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\Tr}{Tr}
\DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\Ad}{Ad}
\DeclareMathOperator{\Span}{span}

\title{\textbf{Energy-Resolved Radiation and Resource-Limited Recovery}\\[2mm]
\large Exact Memory Benchmarks, Loss-Closed Emission,
and Explicit Streaming Protocols}

\author{Ngo Cheung\\
Independent Researcher\\
Hong Kong SAR, China\\
\texttt{info@cheungngomedical.com}}

\date{8 October 2026}

\begin{document}

\maketitle

\begin{abstract}
We separate information availability from the resources needed to
execute recovery in specified finite quantum-radiation models.
An energy-labelled three-packet Clifford channel has unrestricted
optimal half-diamond recovery error \(3(1-p)/4\), where \(p\) is the
full-transmission probability.
Under atomic single-pass delivery of \(q\)-qubit packets, its
even-family optimum at capacity \(q\) is \(3/4-p/4\), whereas
capacity \(q+1\) attains unrestricted recovery.
A controlled-\(Z\) modification has a matching \(q\)-slot decoder.
The reference state is explicitly locally Clifford-equivalent to
the Smolin state; its unlocking mechanism is inherited.

We prove a sector-feasibility criterion for energy-preserving
isometries and its stronger counterpart for state-independent
prescribed probabilities.
A repeated emission model has a unique terminal core, coherent
vacuum opportunities, internal unitaries, and a loss-closed
multiparticle packet space.
Its absorption tail is bounded by a binomial tail, and its mean
absorption time is at most \(K/r_*\).
An explicit collect-and-invert protocol has a complete-channel
recovery bound with an event-wise memory ledger.
Five ordinary emissions give a prepared-state entropy sequence
\(0,1,2,2,1,0\), without a terminal drain.

A localized-message transport family gives exact unrestricted
recovery and analytically evaluated streaming channels.
For inter-emission entangling dynamics, we specify coherent
simulation, four complete decoder programmes, numerical
semidefinite-program validation, and failure-preserving archival
procedures.
This computational supplement is not reported as executed:
no numerical dynamics result, passing archive, solver certificate,
or compilation record is asserted.
The proved results are finite-model statements, not a derivation
of Hawking radiation, generic scrambling, or gravitational islands.
\end{abstract}

\tableofcontents

%=====================================================================
\section{Introduction and scope}
%=====================================================================

A spectrum does not specify a quantum channel.
Occupation statistics leave phases, temporal correlations, remnant
states, and logical encoding undetermined.
An entropy curve likewise does not determine a decoder or its
execution resources.

Hayden--Preskill retrieval assumes rapidly mixing unitary dynamics
and extensive access to radiation \cite{HP}.
Random-unitary evaporation models already distinguish internal and
environment-coupling timescales and investigate information retrieval
\cite{Piroli}.
Memory minimization is a global multistep optimization problem,
even when classical memory is free \cite{Bisio}.

Our mathematical contributions are:
\begin{enumerate}[label=\textup{(\roman*)},leftmargin=*]
\item exact transmission-dependent recovery and atomic-delivery
memory optima for a finite benchmark;
\item realizability constraints for prescribed emission probabilities;
\item loss-compatible repeated emission, quantitative absorption,
and explicit complete recovery programmes.
\end{enumerate}

The underlying benchmark state is locally Clifford-equivalent to
Smolin's unlockable state \cite{Smolin}.
We therefore claim neither a new unlockable state nor a new
joint-measurement unlocking mechanism.
Our additional statements concern complete-channel error,
propagation loss, and a declared delivery interface.

Operator-spreading diagnostics have a separate role
\cite{Nahum}; they are not recovery certificates.
Clifford components admit stabilizer simulation
\cite{AaronsonGottesman}, but arbitrary emission amplitudes and
non-Clifford internal gates do not make the complete process a
stabilizer circuit.
Pure-loss purification provides relevant propagation and
error-detection context \cite{Winnel}, without establishing the
finite deterministic recovery results proved here.

\subsection{Revision and execution status}

This revision repairs the computational specification by:
\begin{itemize}[leftmargin=*]
\item distinguishing S0's final direct return from earlier
measure-and-prepare paths;
\item testing the entire loss-closed scattering domain with
nonuniform constituent energies;
\item adding a coherent multiparticle collect-and-invert regression;
\item defining inter-emission entangling circuits and complete
streaming programmes with priced occupancy;
\item including recovery and independent channel-distance SDPs;
\item retaining running and failed archives instead of writing an
unearned passing manifest.
\end{itemize}

\paragraph{Evidence limitation.}
The supplement has not been executed in preparing this revision.
There is no supplied passing audit, executed dynamics dashboard,
SDP result, or compilation log.
Consequently the manuscript's analytical statements and its
unexecuted computational specification are explicitly separated.
The requested minimum standard for an \emph{executed} dynamics
study remains pending.

\subsection{Physical scope}

We use \(\hbar=c=k_B=1\), with base-two entropy.
Energy conservation refers to the displayed finite Hamiltonians.
Equal-energy rails are orthogonal scalar modes, not particle
polarizations.
Rotational covariance, an autonomous clock, apparatus work,
detector absorption, and a field-to-qubit transducer are not derived.

Reflections remain inaccessible and do not return to the core.
No companion manuscript is a proof premise.
The finite models do not establish semiclassical evaporation,
a typical Page curve, or a gravitational island formula.

%=====================================================================
\section{Channels and the observer interface}
\label{sec:interface}
%=====================================================================

All spaces are finite dimensional.
A channel is completely positive and trace preserving (CPTP).
We use
\[
\ddiam(\Phi,\Psi)=\frac12\norm{\Phi-\Psi}_\diamond,
\]
including external references \cite{WatrousBook}.

For the accessible radiation channel \(\mathcal N_t\), define
\[
\epsIT(t)=
\inf_{\mathcal D\ {\rm CPTP}}\ddiam(\mathcal D\mathcal N_t,\id_M),
\qquad
\epsop(N,t)=
\inf_{\pi\in\mathfrak P_N}\ddiam(\Phi_\pi\mathcal N_t,\id_M).
\]

\begin{assumption}[Atomic single-pass delivery]
\label{ass:interface}
For a declared horizon, packets arrive once, in order.
Each packet atomically occupies its entire declared binary width.

A passive supplier may buffer undelivered packets but may not
measure, demultiplex, select, or decode them.
The observer may pause delivery but may not revisit consumed packets,
return intermediate quantum data to the supplier, use uncounted
storage, share auxiliary entanglement, or export quantum output
before consuming every horizon packet.

Classical memory is unrestricted.
Every laboratory qubit is destructively measured or returned as
the final output.
\end{assumption}

The class \(\mathfrak P_N\) consists of finite deterministic protocols
satisfying this assumption and \(\Qpeak\le N\).
Lower bounds permit arbitrary instruments.
\(\Qpeak\) counts delivered inputs, work, quantum records,
retained data, and output.
\(\Qtotal\) additionally counts supplier buffers.
The inaccessible core, reflected environment, and correctness
reference are not observer storage.

A retained output is live memory.
The no-early-export rule can make operational error nonmonotone
in the mandatory delivery horizon.

The exact benchmark library contains
\(H,S,S^\dagger,X,Y,Z,\mathrm{CX},\mathrm{CZ}\), zero allocation,
destructive computational readout, classical control, and return.
A classically selected Pauli costs at most one gate.
Parallel register readout takes one instruction round.
Allocation, transfer, and return are instantaneous in this convention.

Preparing \(I_2/2\) uses one recyclable slot and at most two gates:
generate a random bit by \(H\) and destructive readout, then
reallocate and conditionally apply \(X\).

%=====================================================================
\section{The Clifford benchmark and its inherited unlocking state}
\label{sec:benchmark}
%=====================================================================

The message occupies \(Q_2\) among five qubits.
Let
\[
\ket{\Phi_2}_{ab}=(\ket{00}_{ab}+\ket{11}_{ab})/\sqrt2,
\]
and define, rightmost factor first,
\begin{align}
U&=Y_2\,\CX{3}{2}\CX{1}{2}
(H_1S_1^\dagger)(H_3S_3^\dagger)
\CZ{1}{2}\CZ{2}{3},\\
V\ket\psi
&=(U^\dagger_{123}\otimes I_{45})
\left(\ket\psi_2\otimes\ket{\Phi_2}_{14}
                     \otimes\ket{\Phi_2}_{35}\right).
\end{align}
There are thirteen preparation gates.
Put \(F=\CZ{1}{2}\) and \(V_L=F^LV\).
Only \(L\)'s parity matters.

For \(\mathcal A_L(A)=\Tr_{45}(V_LAV_L^\dagger)\),
\[
\mathcal A_0(A)=U^\dagger(I_1/2\otimes A_2\otimes I_3/2)U.
\]

\begin{lemma}[Signed logical representatives]
\label{lem:logical}
For \(\rho=(I+xX+yY+zZ)/2\),
\[
\mathcal A_L(\rho)=
\frac18(I+xP_X^{(L)}+yP_Y^{(L)}+zP_Z^{(L)}),
\]
where
\[
\begin{array}{c|ccc}
 &P_X^{(L)}&P_Y^{(L)}&P_Z^{(L)}\\ \hline
L\ {\rm even}&-Z_1X_2Z_3&-X_1Y_2X_3&-Y_1Z_2Y_3\\
L\ {\rm odd}&-X_2Z_3&+Y_1X_2X_3&-Y_1Y_3 .
\end{array}
\]
The linear extension replaces \(1,x,y,z\) by
\(\tr A,\tr(AX),\tr(AY),\tr(AZ)\).
\end{lemma}

\begin{proof}
Gate conjugation gives
\[
U^\dagger X_2U=-Z_1X_2Z_3,\qquad
U^\dagger Z_2U=-Y_1Z_2Y_3.
\]
The identity \(Y=iXZ\) gives the signed \(Y\) word.
Conjugating by \(F\), using
\(FX_1F=X_1Z_2\), \(FX_2F=Z_1X_2\), and \(FZ_iF=Z_i\),
gives the odd row.
The displayed channel normal form proves the expansion.
\end{proof}

Every proper even-family subset is constant.
The only nonconstant proper odd-family subsets are \(\{2,3\}\)
and \(\{1,3\}\), carrying \(X\) and \(Z\), respectively.
For example, the former is
\(\rho\mapsto(I-xX_2Z_3)/4\), an entanglement-breaking
measure-and-prepare channel.
Both chronological prefixes \(\{1\}\), \(\{1,2\}\) are constant.
Applying \(UF^L\) and discarding positions \(1,3\) recovers the
message from the full triple.

For even parity, the normalized Bell-input state is
\[
\omega_{R123}=\frac1{16}
(I-X_RZ_1X_2Z_3+Y_RX_1Y_2X_3-Z_RY_1Z_2Y_3).
\]

\begin{proposition}[Explicit Smolin identification]
\label{prop:smolin}
Let \(R_0=HS^\dagger\) and
\(T=Y_R\otimes R_{0,1}\otimes I_2\otimes R_{0,3}\).
Then
\[
T\omega_{R123}T^\dagger
=\frac14\sum_\beta
\ketbra\beta\beta_{R1}\otimes\ketbra\beta\beta_{23},
\]
where \(\beta\) runs over the four Bell states.
\end{proposition}

\begin{proof}
The right side is
\((I+X^{\otimes4}+Y^{\otimes4}+Z^{\otimes4})/16\).
Conjugation by \(R_0\) cycles \(X\mapsto Y\mapsto Z\mapsto X\).
The two rail rotations give signs \(-,+,-\).
Conjugation by \(Y_R\) reverses the first and third signs.
\end{proof}

%=====================================================================
\section{Benchmark energy, transmission, and optimal recovery}
\label{sec:benchmark-recovery}
%=====================================================================

Choose weights \(w_0,\ldots,w_s\) summing to one and
frequencies \(\omega_x>0\).
A raw packet has vacuum and occupied states \(\ket{x,a}\),
\(a\in\{0,1\}\), with energies \(0,\omega_x\).
Its declared representation has a label and one rail:
\[
h=\ceil{\log_2(s+1)},\qquad q=h+1.
\]

Fix \(E_{\rm in}>3\max_x\omega_x\).
Inject
\[
J_L\ket\psi=\sum_{x=0}^s\sqrt{w_x}\ket x\otimes V_L\ket\psi.
\]
Branch zero emits vacuum and retains all five qubits.
Branch \(x>0\) extracts \(Q_1,Q_2,Q_3\) in successive packets.
After \(j\) extractions its core energy is \(E_{\rm in}-j\omega_x\);
branch zero retains energy \(E_{\rm in}\).
These maps are isometries on their declared domains because
branches are orthogonal and extraction transfers a tensor factor.
Their output energies equal their input energies.

Propagation is the rail-independent isometry
\[
\ket{x,a}\mapsto
\sqrt{\Gamma_{jx}}\ket{x,a}_D\ket{\vac}_F+
e^{i\phi_{jx}}\sqrt{1-\Gamma_{jx}}
\ket{\vac}_D\ket{x,a}_F,
\]
with vacuum mapped to two vacua.
Thus \(H_C+H_D+H_F=E_{\rm in}I\) on the evolved input space.

For \(S\subseteq\{1,2,3\}\), set
\[
a_{xS}=w_x\prod_{j\in S}\Gamma_{jx}
             \prod_{j\notin S}(1-\Gamma_{jx}).
\]
Tracing the branch-labelled core and reflected positions gives
orthogonal accessible blocks \((x,S)\) for nonempty \(S\).
Their rail channels are the corresponding reductions of
\(\mathcal A_L\).
All empty surviving sets form one constant vacuum block.
In particular, all flag weights are message-independent.

Define
\[
p=\sum_xa_{x,\{1,2,3\}},\quad
q_X=\sum_xa_{x,\{2,3\}},\quad
q_Z=\sum_xa_{x,\{1,3\}},\quad
r=1-p-q_X-q_Z,
\]
and
\[
\Tdep(A)=\tr(A)I_2/2,\qquad
\Delta_P=(\id+\Ad_P)/2.
\]

\begin{lemma}[Recovery witnesses]
\label{lem:witness}
Decoded constant and entanglement-breaking qubit channels have
half-diamond error at least \(3/4\) and \(1/2\), respectively.
For a Pauli channel \(\Lambda=\sum_P\lambda_P\Ad_P\),
\[
\ddiam(\Lambda,\id)=1-\lambda_I.
\]
\end{lemma}

\begin{proof}
A constant channel's Bell-input output has Bell overlap \(1/4\).
A separable two-qubit state has Bell overlap at most \(1/2\).
Testing the Bell projector gives the lower bounds.
For a Pauli channel the Bell errors are orthogonal, giving
\(1-\lambda_I\); the triangle inequality gives the matching upper bound.
\end{proof}

\begin{theorem}[Benchmark unrestricted and memory optima]
\label{thm:benchmark}
For either parity, \(\epsIT(t)=3/4\) for \(t=0,1,2\).
At horizon three,
\[
\epsIT^{\rm even}=\frac34(1-p),\qquad
\epsIT^{\rm odd}=\frac12(q_X+q_Z)+\frac34r.
\]
Under Assumption~\ref{ass:interface},
\[
\epsop^{\rm even}(q,3)=\frac34-\frac p4,\qquad
\epsop^{\rm even}(q+1,3)=\frac34(1-p),
\]
and
\[
\epsop^{\rm odd}(q,3)=\frac12(q_X+q_Z)+\frac34r.
\]
\end{theorem}

\begin{proof}
Constant early prefixes give the first claim.
Flagwise Bell witnesses give the unrestricted lower bounds.
The complete channels
\[
p\id+(1-p)\Tdep,\qquad
p\id+q_X\Delta_X+q_Z\Delta_Z+r\Tdep
\]
attain them.

For the even \(q\)-slot lower bound, the first packet must leave
only classical information before the second atomic arrival.
A positive effect on its occupied rail has the form
\(E=(\tr E)(I+v_xX+v_yY+v_zZ)/2\), \(\abs{v}\le1\).
The conditional reference--future state is
\[
\frac18(I-v_zX_RA+v_xY_RB-v_yZ_RC),
\]
where \(A=X_2Z_3\), \(B=Y_2X_3\), \(C=Z_2Y_3\), and \(AB=-C\).
For joint projectors
\(P_{\alpha\beta}=(I+\alpha A)(I+\beta B)/4\), it equals
\[
\frac14\sum_{\alpha,\beta=\pm1}
\frac{I-\alpha v_zX_R+\beta v_xY_R+
\alpha\beta v_yZ_R}{2}\otimes P_{\alpha\beta}.
\]
This is separable. Subsequent operations preserve separability.
Label-mixing effects do not avoid the argument because spectral
blocks are already incoherent.
Decoded Bell overlap is therefore at most \(p/2+(1-p)/4\).

Measuring \(Z_1,X_2,Z_3\) and preparing the logical \(X\)
eigenstate of their negative parity on full transmission attains
\(p\Delta_X+(1-p)\Tdep\).
The remaining upper bounds follow from the compiled programmes below.
\end{proof}

\subsection{Compiled programmes and complete failure outputs}

Set
\[
B_{12}=H_1S_1^\dagger\CX{1}{2}H_2,\quad
R_3=H_3S_3^\dagger,\quad
C_{ts}=X_3^{1-t}Z_3^{1-s}.
\]
The even programme consumes packet labels, holds the first rail
until the second arrival, applies \(B_{12}\), and reads the early
pair as \(t,s\).
It consumes both early rails before the third arrival.
On full transmission it applies \(C_{ts}R_3\) and returns rail three;
otherwise it consumes the remaining inputs and prepares \(I/2\).

Indeed,
\[
B_{12}(Z_1X_2)B_{12}^\dagger=Z_2,\qquad
B_{12}(Y_1Z_2)B_{12}^\dagger=Z_1.
\]
The corrected path maps intertwine logical \(X,Z\) with output
\(X,Z\), hence have the form
\(\ket\psi\mapsto\ket\psi_3\otimes\ket{\chi_{ts}}_{45}\).
The early pair is \(I_4/4\), giving path probability \(1/4\).

For odd parity,
\[
B_{12}F=(H_1S_1^\dagger)H_2.
\]
Separate early \(Y_1\) and \(X_2\) measurements suffice.
The \(\{2,3\}\) and \(\{1,3\}\) failure flags use product
parity readouts and logical eigenstate preparation.

The ledgers are
\[
\begin{array}{c|cccc}
 &\Qpeak&G&D&C_{\rm cl}\\ \hline
\text{even}&q+1&7&12&3h+4\\
\text{odd}&q&6&12&3h+4 .
\end{array}
\]
They include failure preparation.
For a three-packet snapshot, \(\Qtotal=3q\).

Every destructive readout is part of a complete instrument.
If \(K_h\) are the full instruction-history maps, then
\(\sum_hK_h^\dagger K_h=I\).
Thus successful branches are never renormalized into a
deterministic claim.

%=====================================================================
\section{Entropy and complementary information}
\label{sec:entropy}
%=====================================================================

Entropy calculations use input \(\ket0\); recovery uses a Bell
reference with unchanged dynamics.

For \(t\le3\), define
\[
a^{(t)}_{xS}=
w_x\prod_{j\in S}\Gamma_{jx}
\prod_{j\in\{1,\ldots,t\}\setminus S}(1-\Gamma_{jx}),
\quad
v_t=w_0+\sum_xa^{(t)}_{x\varnothing}.
\]
Let \(\mathsf f_t\) contain \(v_t\) and the nonempty flag weights.
For even parity the rail entropy is one for a singleton and
two for a pair or triple.
For odd parity the exception is \(s_L(\{1,3\})=1\).
Then
\[
S(D_{\le t})=
H(\mathsf f_t)+\sum_{x,S\ne\varnothing}a^{(t)}_{xS}s_L(S).
\]
This follows from the orthogonal-block entropy identity.
For \(a=1-w_0\),
\[
S(D_{\le t}F_{\le t})=
\begin{cases}
0,&t=0,\\
H(w)+a,&t=1,\\
H(w)+2a,&t=2,3.
\end{cases}
\]
Propagation preserves entropy of the complete emitted region.

For the Bell experiment let \(K_t=C_tF_{\le t}\) and
\[
\delta_{\rm dec}(t)=
\frac12\norm{\rho_{RK_t}-\rho_R\otimes\rho_{K_t}}_1.
\]
A constant qubit channel has a complementary Bell state
isometric to \(\Phi_{RE}\otimes\tau\), so its distance is \(3/4\).
This follows from a dilation
\(\ket i\mapsto\sum_j\sqrt{\lambda_j}\ket j\ket{i,j}\)
of a fixed output \(\sum_j\lambda_j\ketbra j j\).

Consequently the even benchmark has
\[
\delta_{\rm dec}(0)=\delta_{\rm dec}(1)=
\delta_{\rm dec}(2)=\frac34,\qquad
\delta_{\rm dec}(3)=\frac34(1-p).
\]
Complementary full-transmission sectors are constant; failure
sectors complement constant accessible channels.
The vacuum sector is retained coherently as one sector.

This equality is special to this channel, not a general
identification of Bell-input decoupling with worst-case recovery.

%=====================================================================
\section{Sector feasibility}
\label{sec:feasibility}
%=====================================================================

Let \(C=\bigoplus_E C_E\).
Outcome \(\nu\) has radiation energy \(\epsilon_\nu\) and
degeneracy \(g_\nu\).
Write
\[
A_{\nu,E}:C_E\to C'_{E-\epsilon_\nu}\otimes d_\nu,\qquad
d_E=\dim C_E,\qquad
b_{\nu,E}=\dim C'_{E-\epsilon_\nu}\,g_\nu .
\]

\begin{theorem}[Feasibility and fixed probabilities]
\label{thm:feasibility}
An energy-preserving isometry exists if and only if
\[
d_E\le\sum_\nu b_{\nu,E}
\]
for every \(E\).
A specified map is isometric precisely when
\[
\sum_\nu A_{\nu,E}^\dagger A_{\nu,E}=I_{C_E}.
\]
Prescribed probabilities \(p_{\nu|E}\), independent of every
state in \(C_E\), are realizable precisely when they are
nonnegative, sum to one, and
\[
b_{\nu,E}\ge d_E\quad\text{whenever }p_{\nu|E}>0.
\]
Their branch effects must equal \(p_{\nu|E}I_{C_E}\).
\end{theorem}

\begin{proof}
The total-energy output subspace must contain \(d_E\)
orthogonal vectors, and this dimension condition is sufficient.
Different total energies are orthogonal.
Orthogonal radiation outcomes give the isometry equation.

State-independent expectations imply the scalar effect identity
by polarization. A positive scalar identity has rank \(d_E\).
Conversely, choose an isometry into each sufficiently large branch
and multiply it by \(\sqrt{p_{\nu|E}}\).
\end{proof}

Total dimension can suffice while individual branches are too
small for a fixed probability law.
A coarse count law and a law of individual rail configurations
are different requirements.

%=====================================================================
\section{Repeated emission and the loss-closed interface}
\label{sec:repeated}
%=====================================================================

Fix \(K\ge2\), \(1\le c\le K\), and
\[
0=E_0<E_1<\cdots<E_K,\qquad \Omega_n=E_n-E_{n-1}.
\]
The core is
\[
C=\bigoplus_{n=0}^K\ket n\otimes(\mathbb C^2)^{\otimes n},
\quad H_C|_n=E_nI,\quad \dim C=2^{K+1}-1.
\]
Sector zero is the unique endpoint.
Mode pair \(r\) has energy \(\Omega_r\).
There is at most one quantum per retained mode pair.

Emission of \(k\le\min(n,c)\) constituents occupies
\(I_{n,k}=\{n-k+1,\ldots,n\}\).
Its energy is \(E_n-E_{n-k}\).

Define the deduplicated occupation family
\[
\Conf_{K,c}=\{\varnothing\}\cup
\{S\ne\varnothing:\ S\subseteq\{1,\ldots,K\},
\ \max S-\min S+1\le c\}.
\]
The loss-closed packet space is
\[
\HH_{\rm loss}=
\bigoplus_{S\in\Conf_{K,c}}
\Span\{\ket{S,\mathbf a}:\mathbf a\in\{0,1\}^{|S|}\},
\]
with rail bits ordered by decreasing mode index and energy
\(\sum_{r\in S}\Omega_r\).
A configuration is identified once, regardless of its hidden origin.

The label count and physical dimension are
\[
M_{K,c}=1+K+\sum_{d=1}^{c-1}(K-d)2^{d-1},
\qquad
d_{\rm loss}=1+2K+\sum_{d=1}^{c-1}(K-d)4\,3^{d-1}.
\]
For a span of length \(d+1\), both endpoints are present;
interior indices have two occupation choices or three
physical choices. This proves the formulas.

The declared representation uses
\[
h_{\rm loss}=\ceil{\log_2M_{K,c}},\qquad
q_{\rm loss}=h_{\rm loss}+c.
\]
The label is the \emph{surviving} set; its actual rail bits
are followed by zero padding.
For stage A, \(c=1\),
\(q_A=\ceil{\log_2(K+1)}+1\).

\begin{proposition}[Propagation on the full loss-closed domain]
\label{prop:scatter}
For rail-independent coefficients,
\[
\ket{S,\mathbf a}\mapsto
\sum_{A\subseteq S}
\prod_{r\in A}\sqrt{\gamma_{jr}}
\prod_{r\in S\setminus A}e^{i\phi_{jr}}\sqrt{1-\gamma_{jr}}\,
\ket{A,\mathbf a_A}_D
\ket{S\setminus A,\mathbf a_{S\setminus A}}_F
\]
is an isometry on all of \(\HH_{\rm loss}\) and preserves energy.
\end{proposition}

\begin{proof}
Different assignments are orthogonal and their squared amplitudes
sum to one.
Different inputs are distinguished by the union of occupied output
modes and rail bits.
Both subsets remain in \(\Conf_{K,c}\), and their energies add
to the input energy.
\end{proof}

For example, loss from \(\{3,2,1\}\) can produce \(\{3,1\}\).
No emitted-interval tag survives for free.
Accessible vacuum can mean no emission, complete reflection,
or an already terminal core.

At opportunity \(j\), specify \(P_{j,n}(k)\) summing to one and
a unitary \(U_{j,n}\).
Let \(T_{n,k}\) transfer the first \(k\) current factors to
the ordered mode interval \(n,\ldots,n-k+1\).
Set
\[
W_j|_n=\sum_{k=0}^{\min(n,c)}
\sqrt{P_{j,n}(k)}\,T_{n,k}U_{j,n},
\qquad
W_j\ket{\rm end}=\ket{\rm end}\ket{\vac}.
\]

\begin{theorem}[Repeated dilation]
\label{thm:repeated}
Each \(W_j\) is isometric and energy preserving.
Its coarse branch effect is \(P_{j,n}(k)I_n\), for every
rail state and reference.
With propagation,
\[
H_{C_t}+H_{D_{\le t}}+H_{F_{\le t}}=E_KI
\]
on the evolved initial sector.
\end{theorem}

\begin{proof}
Each extraction is isometric, distinct counts are orthogonal,
and their effects sum to the identity.
The branch dimension is \(2^{n-k}2^k=2^n\).
Its energy is \(E_{n-k}+E_n-E_{n-k}=E_n\).
Different sectors have different total energies.
Compose with Proposition~\ref{prop:scatter}.
\end{proof}

Arbitrary rail gates preserve this Hamiltonian because each sector
is degenerate. This is not an excitation-number conservation claim
for another Hamiltonian.

%=====================================================================
\section{Absorption and drain-free turnover}
\label{sec:absorption}
%=====================================================================

For initial sector \(K\), let
\(\pi_t(n)=\tr(\Pi_n\rho_{C_t})\), \(s_t=1-\pi_t(0)\).
Then
\[
\pi_{t+1}(m)=\sum_{n=m}^K\pi_t(n)P_{t+1,n}(n-m).
\]
Branch effects are scalar and propagation does not change the
core reduction. Distinct core energies have distinct emitted
complementary energies, eliminating inter-sector coherences.
Thus this recursion is independent of internal gates and loss.

\begin{theorem}[Absorption tail and mean]
\label{thm:absorption}
If \(1-P_{j,n}(0)\ge r_*>0\) for every nonterminal sector and
opportunity, then
\[
s_t\le
\sum_{i=0}^{K-1}\binom ti r_*^i(1-r_*)^{t-i},
\qquad
\mathbb ET_{\rm abs}\le K/r_*.
\]
Terms \(i>t\) are zero; for \(r_*=1\), the tail is
\(\mathbf1_{\{t<K\}}\).
Absorption occurs almost surely, not necessarily by a deterministic
finite horizon.
\end{theorem}

\begin{proof}
Couple the population recursion to independent uniform variables.
A value at most \(r_*\) forces a sector decrease of at least one.
The waiting time for \(K\) Bernoulli-\(r_*\) successes dominates
absorption.
Its tail is the displayed binomial tail and its mean is the
sum of \(K\) geometric means \(1/r_*\).
This auxiliary probability construction does not measure the
coherent quantum history.
\end{proof}

For time-homogeneous stage A, \(r_n=P_n(1)>0\),
\[
\mathbb ET_{\rm abs}=\sum_{n=1}^K r_n^{-1},\qquad
\mathbb Ez^{T_{\rm abs}}=
\prod_{n=1}^K\frac{r_nz}{1-(1-r_n)z}.
\]
For the synthetic law \(r_n=(2^n+1)^{-1}\), \(K=5\),
the uniform bound is \(165\) opportunities and the exact mean is \(67\).

For a pure input and \(\mathcal R_t=D_{\le t}F_{\le t}\),
\[
S(\mathcal R_t)=S(C_t)
\le\hb(s_t)+s_t\log_2(2^{K+1}-2).
\]
The endpoint block is one-dimensional and the complement has
dimension at most \(2^{K+1}-2\).
Also
\[
|S(D_{\le t})-S(F_{\le t})|\le S(C_t).
\]
Permanent inaccessible loss need not give zero accessible entropy.

\begin{theorem}[Prepared-state turnover]
\label{thm:turnover}
For \(K=5,c=1\), deterministic emission, initial state
\(V_L\ket0\), and extraction of \(Q_1,\ldots,Q_5\) in order,
apply \(\CZ{4}{5}\) between emissions three and four.
At perfect transmission,
\[
S(D_{\le t})=S(D_{\le t}F_{\le t})
=(0,1,2,2,1,0)_t.
\]
The third prefix retains Theorem~\ref{thm:benchmark} with width
\(q_A\) and \(p=\gamma_{1,5}\gamma_{2,4}\gamma_{3,3}\).
\end{theorem}

\begin{proof}
The first three channels are the benchmark channels with known
descending mode labels.
The remaining Bell-partner reduction is \(I_4/4\), unchanged
by the controlled \(Z\).
After the fourth extraction it is \(I_2/2\); after the fifth
the core is one-dimensional.
No exceptional drain operation is used.
\end{proof}

%=====================================================================
\section{Collect-and-invert recovery}
\label{sec:collect}
%=====================================================================

Initialize by a known isometry
\(J:M\to(\mathbb C^2)^{\otimes K}\) with known unitary preparation.

Full simulator histories include hidden reflections.
Accessible histories contain only observed surviving sets and
observer measurement outcomes.

Let \(P_{\rm all}(t)\) be the probability that every one of the
\(K\) actual constituents has been emitted and transmitted.
For complete no-loss histories \(h\),
\[
P_{\rm all}(t)=
\sum_{h:n_t=0}
\prod_{j\le t}P_{j,n_{j-1}}(k_j)
\prod_{j\le t}\prod_{r\in I_{n_{j-1},k_j}}\gamma_{jr}.
\]
Distinct complete no-loss histories have orthogonal accessible
occupation configurations.

\begin{theorem}[Complete recovery programme]
\label{thm:collect}
A deterministic protocol has
\[
\Qpeak\le q_{\rm loss}+K-1
\]
and complete decoded channel
\[
P_{\rm all}(t)\id+(1-P_{\rm all}(t))\Tdep.
\]
Thus its achieved error is \(3(1-P_{\rm all}(t))/4\).
At perfect transmission \(P_{\rm all}(t)=1-s_t\).
\end{theorem}

\begin{proof}
Measure each surviving-set label, consume padding, and retain
only actual transmitted rails.
Each mode is emitted at most once.
Collecting \(K\) rails therefore certifies completion and no loss.
Only then do observed vacua certify no-emission opportunities.

The complete history is reconstructible.
Its collected map is \(\sqrt{\alpha_h}B_hJ\), with a known unitary
\(B_h\) on \(K\) factors.
Apply \(B_h^\dagger\), undo initialization, and consume the
\(K-1\) ancillary factors.
Every corrected success is the identity channel.
On incomplete collections, consume everything and prepare \(I/2\).

Before an arrival there are at most \(K-1\) undecoded rails or
one decoded output.
The atomic arrival adds \(q_{\rm loss}\) slots.
Label and padding consumption leave at most \(K\) real rails.
The inverse uses these existing slots.
Early completion leaves one live output through subsequent arrivals;
\(q_{\rm loss}+1\le q_{\rm loss}+K-1\).

The total success effect is a scalar identity, so fixed-output
failure has input-independent total probability.
This proves the complete channel, including references.
\end{proof}

Specified continuous gates and their inverses may be admitted as
primitives. Discrete-library compilation requires an additional
error and workspace budget.
This theorem is an achieved bound, not a memory optimum.

%=====================================================================
\section{Analytical transport controls and horizon-dependent execution}
\label{sec:transport}
%=====================================================================

Use stage A, identity inter-emission gates, transmission \(\gamma\),
and initialization
\[
J_{\rm loc}\ket\psi=\ket0^{\otimes(K-1)}\ket\psi.
\]
An initial sequence of \(\ell\) adjacent swaps moves the message
to extraction position \(d=K-\ell\).
Its mode is \(n_*=K-d+1\).
This is transport, not scrambling.

Let \(T_d\) be its emission time,
\(a_t=\Pr(T_d\le t)\), \(b_t=\Pr(T_d=t)\).
The population recursion gives
\[
a_t=\sum_{n=0}^{K-d}\pi_t(n),\qquad
b_t=r_{K-d+1}\pi_{t-1}(K-d+1).
\]

\begin{proposition}[Transport controls]
\label{prop:transport}
Unrestricted recovery and a one-retained-qubit programme satisfy
\[
\epsIT(t)=\epsop(q_A+1,t)=\frac34(1-\gamma a_t).
\]
A \(q_A\)-slot programme S0 implements
\[
\gamma b_t\id+\gamma(a_t-b_t)\Delta_Z+
(1-\gamma a_t)\Tdep
\]
and has achieved error
\[
e_{\rm S0}(t)=
\frac{\gamma}{2}(a_t-b_t)+\frac34(1-\gamma a_t).
\]
No stochastic \(q_A\)-slot optimum is asserted.
\end{proposition}

\begin{proof}
If the message mode is transmitted by the horizon, it carries
the message exactly.
Otherwise the message remains in a different core sector or
a reflected message mode, and the accessible channel is constant.
These success and failure subspaces are distinguished in the
complement, so their cross terms vanish.
Bell witnesses give the lower bound.

S1 retains the observed message rail through later arrivals.
S0 measures an earlier-arriving message rail in \(Z\) and consumes
it, retaining a classical outcome.
If the message arrives at the final opportunity, S0 returns it
directly without a logical measurement.
An earlier record causes eigenstate preparation after the last
packet; no record causes preparation of \(I/2\).
The stated complete channel follows.
\end{proof}

For deterministic emissions,
\[
\epsop(q_A,t)=
\begin{cases}
3/4,&t<d,\\
3(1-\gamma)/4,&t=d,\\
\gamma/2+3(1-\gamma)/4,&t>d.
\end{cases}
\]
The last lower bound follows because mandatory later delivery
forces consumption of the earlier message qubit.

For constant \(r\),
\[
a_t=\Pr[\operatorname{Binomial}(t,r)\ge d],\qquad
b_t=\binom{t-1}{d-1}r^d(1-r)^{t-d}.
\]
For pure input \(\ket0\), all rails remain zero, so
\(S(C_t)=S(D_{\le t}F_{\le t})=H(\pi_t)\).

At \(K=t=3,r=1/2,\gamma=3/4\), the following values are
\emph{analytical}, not solver outputs:
\[
\begin{array}{c|cc|cc}
\ell&a_3&b_3&\epsIT&e_{\rm S0}\\ \hline
0&1/8&1/8&87/128&87/128\\
1&1/2&1/4&15/32&9/16\\
2&7/8&1/8&33/128&69/128 .
\end{array}
\]
The common sector vector is \((1,3,3,1)/8\), ordered \(3,2,1,0\).
Its entropy is \(3-\tfrac34\log_2 3\).

\paragraph{Coherence warning.}
At two opportunities, ``emit then vacuum'' and ``vacuum then emit''
can share the same final core and reflected configuration.
For constant \(r\), perfect transmission, and zero rails,
their temporal off-diagonal element is \(r(1-r)\).
A mixture of simulator trajectories would incorrectly remove it.

%=====================================================================
\section{Inter-emission dynamics and explicit protocol classes}
\label{sec:study}
%=====================================================================

This section defines the unexecuted computational study precisely.
It does not supply numerical conclusions.

\subsection{Controlled dynamics}

Use stage A with constant \(r\), localized initialization,
and initially perfect transmission.
At every opportunity and sector, apply \(L\) alternating
nearest-neighbour layers before the emission decision.
Layer parity alternates with opportunity and layer index.

Each two-qubit gate is
\[
G(\boldsymbol\theta)=
(R_y(\theta_1)\otimes R_y(\theta_2))
\,\mathrm{CZ}\,
(R_x(\theta_3)\otimes R_x(\theta_4)),
\qquad
R_P(\theta)=e^{-i\theta P/2},
\]
with independent angles uniform on \([-\pi,\pi)\).
These are specified entangling gates, not Haar-\(U(4)\) samples.
The supplement records every angle and gate matrix.
Depths are nested using the same preselected layer arrays.

Controls are identity dynamics and initial SWAP transport.
The depth parameter in the new family changes actual
inter-emission gates, not just initialization.

The proposed first pilot uses \(K=3\), \(L=0,1,2\),
\(r=1,1/2\), two declared gate realizations, and horizons
\(1,\ldots,K\).
The \(K=4\) extension is a separate command, not an executed result.

\subsection{Decoder A: readout and preparation}

Measure every observed occupied rail in \(Z\), consume it,
and retain the latest readout bit.
After all horizon packets, prepare that bit as a computational
basis state.
If no occupied rail was observed, prepare \(I/2\).
The laboratory peak is at most \(q_A\).
This is a fixed achieved baseline, not the optimum of
\(\mathfrak P_{q_A}\).

\subsection{Decoder B: one retained qubit}

Retain the first observed occupied rail as memory.
For every later occupied rail \(a\), apply
\(\mathrm{CX}_{b\to a}\), then \(H_a\), measure \(a\) as \(z\),
consume it, and apply \(Z_b^z\).
Vacuum dummy rails are consumed.
Return \(b\) after the horizon; if no memory exists, prepare \(I/2\).
The peak is at most \(q_A+1\).

\subsection{Decoder C: two retained qubits}

Retain the first two occupied rails.
For each later occupied rail \(a\), apply
\(\mathrm{CX}_{b_1\to a}\), \(\mathrm{CZ}_{b_2,a}\), and \(H_a\);
measure and consume \(a\), applying \(X_{b_1}^z\).
At the horizon, if two rails remain, apply
\(\mathrm{CX}_{b_1\to b_2}\), \(H_{b_2}\), measure and consume
\(b_2\), and apply \(Z_{b_1}^z\).
Return the remaining rail.
One or zero retained rails are handled by direct return or
\(I/2\) preparation.
The peak is at most \(q_A+2\).

\subsection{Decoder D: collect and invert}

Use Theorem~\ref{thm:collect}.
At perfect transmission its achieved error is \(3s_t/4\),
with peak at most \(q_A+K-1\).
It is a correctness reference, not generally an optimal batch decoder.

\begin{proposition}[Implementability of A--C]
\label{prop:stream}
The specified programmes are deterministic CPTP maps with
the stated laboratory peaks.
\end{proposition}

\begin{proof}
Occupation-label readout determines actual occupied rails.
No supplier-side operation or hidden emission record is used.
At most \(m=0,1,2\) memory qubits coexist with the next
atomic packet.
Every gate acts on existing memory and an existing incoming rail.
Every measurement has both outcomes and its declared feedback.
Padding and consumed rails are destructively removed.
Finalization leaves exactly one output, or allocates one recyclable
slot for fixed-output preparation.
Instrument completeness proves trace preservation and includes
all references.
\end{proof}

No ordering of achieved errors across these heuristic programmes
is assumed. More permitted memory cannot worsen an optimum,
but different fixed heuristic programmes need not be monotone.

%=====================================================================
\section{Recovery SDPs and numerical verification}
\label{sec:sdp}
%=====================================================================

Use output-first unnormalized Choi matrices
\[
\Ch(\Phi)=\sum_{i,j}\Phi(\ketbra i j)\otimes\ketbra i j.
\]
For a decoder \(R=\Ch(\mathcal D)\),
\[
R\succeq0,\qquad \Tr_O R=I_B,\qquad
\mathcal D_R(A)=\Tr_B[R(I_O\otimes A^{\mathsf T})].
\]

For logical dimension \(d\), let
\[
C_{\mathcal N}=\frac1{d^2}
\sum_{i,j}\ketbra j i_O\otimes
\mathcal N(\ketbra i j)^{\mathsf T}.
\]
Entanglement fidelity is \(\tr(C_{\mathcal N}R)\).
Its recovery SDP and dual are
\[
\max_{R\succeq0,\ \Tr_OR=I_B}\tr(C_{\mathcal N}R),
\qquad
\min_{Y=Y^\dagger,\ I_O\otimes Y\succeq C_{\mathcal N}}\tr Y.
\]
Strict feasibility holds on both sides.
This is fixed-noise fidelity recovery \cite{Fletcher}.
A verified dual value \(U\) implies
\[
\epsIT\ge\max\{0,1-U\},
\]
by a normalized Bell-projector test.
It is not diamond optimization.

For a difference \(\Delta\) of CPTP channels, the SDP
\[
\max\{\tr(\Ch(\Delta)W):
0\preceq W\preceq I_O\otimes\rho,\ \rho\succeq0,\ \tr\rho=1\}
\]
has dual
\[
\min\{\lambda:
Z\succeq0,\ Z\succeq\Ch(\Delta),\
\Tr_OZ\preceq\lambda I_M\}.
\]
Their common value is \(\norm{\Delta}_\diamond/2\)
\cite{WatrousSDP}.

Unrestricted diamond recovery is therefore
\[
\begin{array}{ll}
\text{minimize}&\lambda\\
\text{subject to}&R\succeq0,\quad\Tr_OR=I_B,\\
&Z\succeq0,\quad Z\succeq\Ch(\mathcal D_R\mathcal N-\id),\\
&\Tr_OZ\preceq\lambda I_M.
\end{array}
\]
This affine finite-dimensional SDP is not a bounded-memory
strategy optimization.

\subsection{Numerical acceptance policy}

The implementation first checks identity, constant, dephasing,
and the flagged even benchmark against analytical optima.
For every new channel it records:
\begin{itemize}[leftmargin=*]
\item raw recovery variables and affine/positivity residuals;
\item a positive trace-preserving decoder obtained by explicit
Choi normalization;
\item an independent fixed-channel diamond primal and dual;
\item a fidelity-dual lower-bound candidate;
\item solver settings, statuses, and computed gaps.
\end{itemize}

Numerical positivity checks and scalar repairs are not interval
certificates. Values remain numerical estimates unless stronger
verification is supplied.
An optimizer's status string alone is insufficient.

%=====================================================================
\section{Joint dashboard and evidence boundaries}
%=====================================================================

For each realized circuit and horizon, the supplement is designed
to record
\[
\pi_t,\quad S(C_t),\quad S(D_{\le t}),\quad
S(D_{\le t}F_{\le t}),\quad\delta_{\rm dec}(t),
\]
the exact finite energy expectations, unrestricted recovery
estimates, complete A--D channels, and resource histories.

The predeclared closed-core spreading diagnostic is
\[
C_n(U)=\frac1{n(n-1)}
\sum_{i\ne j}
\frac{1}{4\,2^n}
\tr([U^\dagger X_iU,Z_j]^\dagger[U^\dagger X_iU,Z_j]),
\quad n\ge2.
\]
Set \(C_0=C_1=0\).
The dashboard uses
\(\sum_n\pi_{t-1}(n)C_n(U_{t,n})\).
This is an opportunity-local closed-core diagnostic, not a
cumulative open-system OTOC or recovery certificate.

Opportunity, actual emitted count, and accumulated internal layers
are distinct clocks.
Recording the distribution of emitted counts does not grant the
decoder access to hidden counts.
Replotting against their mean is not conditioning on a physical
emission-count trajectory.

Ensemble summaries must average per-realization quantities.
Entropy or recovery of an averaged channel is a different object.

\paragraph{Results status.}
No dashboard values for the new entangling study are supplied.
No conclusion about depth, memory improvement, or recovery
coincidence is prewritten.
The analytical transport table is the only results table above.

%=====================================================================
\section{Errors and retained calibration boundary}
%=====================================================================

For compatible complete-channel errors,
\[
\ddiam(\widetilde{\mathcal D}\widetilde{\mathcal N},\id)
\le e_{\rm rec}+e_{\rm model}+e_{\rm impl}.
\]
For a common packet embedding and common feasible protocol class,
the optimized errors differ by at most \(e_{\rm model}\).
Both statements follow from triangle inequalities and CPTP contraction.

For common isometry embeddings,
\[
\ddiam(\Ad_A,\Ad_B)\le\norm{A-B}_\infty.
\]
For changed branch probabilities,
\[
\norm{W_j-\widetilde W_j}_\infty=
\max_n\left[
\sum_k(\sqrt{P_{j,n}(k)}-\sqrt{\widetilde P_{j,n}(k)})^2
\right]^{1/2}.
\]
Such stepwise errors telescope.
The supplement discards no amplitude by a nonzero threshold.
Entropy eigenvalue tolerances and numerical solver tolerances
are not trajectory truncations.

The optional benchmark spectral comparison retains its
pre-barrier convention:
\[
b(\omega;\mathcal M)=
\frac1{2\pi(e^{8\pi G\mathcal M\omega}-1)},\qquad
f_\ell=\Gamma_\ell b,\qquad
w_x^{\rm cal}=2\Delta t\,\Delta\omega_x b(\omega_x;\mathcal M_*).
\]
These external scalar-rate inputs are motivated by
\cite{Hawking,BlackHawk}, not computed here.
Transmission is applied once.
For weight mismatch \(e_x\), transmission mismatch \(\eta_{jx}\),
frequency Lipschitz constant \(L_x\), mass derivative bound \(K_x\),
and mass variation \(\Delta\mathcal M\), the selected two-rail
count error is bounded by
\[
\sum_xe_x+
2\Delta t\sum_x\left[
\Delta\omega_x b(\omega_x;\mathcal M_*)\eta_{jx}
+\frac{L_x(\Delta\omega_x)^2}{4}
+K_x\Delta\mathcal M\,\Delta\omega_x
\right].
\]
The proof is weight comparison, midpoint integration, and the
mass mean-value bound.
Omitted target number expectation adds separately.
This does not calibrate the repeated model or determine coherent
channel error.

%=====================================================================
\section{Conclusions}
%=====================================================================

The finite analytical core supplies exact benchmark memory optima,
sector feasibility, loss closure, absorption, a drain-free prepared
turnover, and explicit complete-channel recovery programmes.

The present revision additionally supplies a concrete computational
study specification with repaired resource histories, multiparticle
regression, inter-emission entangling gates, and numerical SDP checks.
It does not substitute this specification for executed evidence.

Release as a completed numerical dynamics study requires the actual
passing archive, recovered decoder arrays, independent distance
calculations, dashboard records, and compilation logs.
Until then, only the analytical statements are presented as proved.

%=====================================================================
\appendix
\section{Computational supplement}
\label{app:code}
%=====================================================================

Copy the following listing to \code{en02_d_v4.py}.
Dependencies are Python, NumPy, CVXPY, and a supported SDP solver.
The default command requests SCS; installed versions are recorded.
Complex Hermitian variables and solver invocation follow the
official implementation documentation \cite{CVXPY}.

\begin{ShellBlock}
python en02_d_v4.py --mode audit
python en02_d_v4.py --mode pilot --tex En02-D-v4.tex --compile
# Run the larger extension only after inspecting pilot cost:
python en02_d_v4.py --mode extend --tex En02-D-v4.tex --compile
\end{ShellBlock}

Each invocation creates a new archive directory.
It initially has status RUNNING.
Exceptions preserve arrays, residuals, and a traceback with FAILED
status. A numerical passing status is issued only after the requested
checks finish.
Compilation is separately recorded and is required for the
combined numerical-and-compilation status.

The archive is a finite floating-point regression, not a formal
certificate. The code below has not been executed here.

\begin{CodeBlock}
"""En02-D-v4: unexecuted coherent audit and pilot implementation."""
import argparse
import datetime
import hashlib
import itertools as it
import json
import math
from pathlib import Path
import shutil
import subprocess
import sys
import traceback
from fractions import Fraction as F
import numpy as np

I = np.eye(2, dtype=complex)
X = np.array([[0,1],[1,0]],complex)
Y = np.array([[0,-1j],[1j,0]],complex)
Z = np.diag([1,-1]).astype(complex)
H = np.array([[1,1],[1,-1]],complex)/np.sqrt(2)
SD = np.diag([1,-1j]).astype(complex)
CZ = np.diag([1,1,1,-1]).astype(complex)
CX = np.array([[1,0,0,0],[0,1,0,0],
               [0,0,0,1],[0,0,1,0]],complex)
SW = np.array([[1,0,0,0],[0,0,1,0],
               [0,1,0,0],[0,0,0,1]],complex)
TOL, STOL = 1e-10, 3e-4
DATA = {"checks":{}, "records":[], "solvers":[], "occupancy":[]}
ROOT = None
SOLVER = "SCS"

def need(ok, msg):
    if not ok:
        raise AssertionError(msg)

def herm(A):
    return (A+A.conj().T)/2

def mineig(A):
    return float(np.linalg.eigvalsh(herm(A)).min())

def check(name,A,B,tol=TOL):
    need(name not in DATA["checks"], "duplicate check "+name)
    A,B = np.asarray(A),np.asarray(B)
    need(A.shape==B.shape,"shape "+name)
    e = float(np.max(np.abs(A-B)))
    DATA["checks"][name] = e
    need(e<=tol, name+" residual "+str(e))

def save(name, **arrays):
    np.savez_compressed(ROOT/(name+".npz"), **arrays)

def dump():
    (ROOT/"records.json").write_text(json.dumps(DATA,indent=2))

def kron(*ops):
    A = np.array([[1]],complex)
    for B in ops:
        A = np.kron(A,B)
    return A

def bits(i,n):
    return tuple((i>>(n-1-j))&1 for j in range(n))

def integer(b):
    out = 0
    for z in b:
        out = 2*out+int(z)
    return out

def embed(G,pos,n):
    pos = tuple(pos)
    A = np.zeros((2**n,2**n),complex)
    for col in range(2**n):
        b = list(bits(col,n))
        for row in range(2**len(pos)):
            a = b.copy()
            for p,z in zip(pos,bits(row,len(pos))):
                a[p] = z
            A[integer(a),col] += G[row,integer([b[p] for p in pos])]
    return A

def ptrace(A,keep,n):
    keep = tuple(keep)
    drop = tuple(j for j in range(n) if j not in keep)
    axes = keep+drop+tuple(n+j for j in keep)+tuple(n+j for j in drop)
    A = A.reshape((2,)*(2*n)).transpose(axes)
    A = A.reshape(2**len(keep),2**len(drop),
                  2**len(keep),2**len(drop))
    return np.einsum("abcb->ac",A)

def entropy(A):
    e = np.linalg.eigvalsh(herm(A))
    need(e.min()>=-TOL,"entropy positivity")
    # Eigenvalue handling only; no simulation amplitudes are dropped.
    e = e[e>1e-12]
    return float(-np.sum(e*np.log2(e)))

def units(d=2):
    for a,b in it.product(range(d),repeat=2):
        E = np.zeros((d,d),complex)
        E[a,b] = 1
        yield a,b,E

def dep(A):
    return np.trace(A)*I/2

def choi(N):
    return sum((np.kron(N[a,b],E) for a,b,E in units()),
               np.zeros((2*N[0,0].shape[0],)*2,complex))

def idchoi():
    return choi({(a,b):E for a,b,E in units()})

def channel(A):
    return {(a,b):A[:,:,a]@A[:,:,b].conj().T for a,b,E in units()}

def decoupling(A):
    C = {(a,b):A[:,:,a].T@A[:,:,b].conj()
         for a,b,E in units()}
    rho = np.block([[C[0,0],C[0,1]],[C[1,0],C[1,1]]])/2
    env = (C[0,0]+C[1,1])/2
    return float(np.abs(np.linalg.eigvalsh(
        herm(rho-np.kron(I/2,env)))).sum()/2)

def encoder():
    U = np.eye(8,dtype=complex)
    seq = [(CZ,(1,2)),(CZ,(0,1)),(SD,(2,)),(H,(2,)),
           (SD,(0,)),(H,(0,)),(CX,(0,1)),(CX,(2,1)),(Y,(1,))]
    for G,p in seq:
        U = embed(G,p,3)@U
    J = np.zeros((32,2),complex)
    for m,a,b in it.product(range(2),repeat=3):
        J[integer((a,m,b,a,b)),m] = .5
    return U,np.kron(U.conj().T,np.eye(4))@J

def benchmark(V,w0=.25,gamma=(.5,2/3,.75),t=3):
    entries = {}
    def put(key,v):
        entries[key] = entries.get(key,np.zeros(2,complex))+v
    for b in it.product(range(2),repeat=5):
        v = V[integer(b)]
        put(((0,)*t,(0,b,(0,)*t)),np.sqrt(w0)*v)
        for mask in it.product(range(2),repeat=t):
            d = tuple(b[j]+1 if mask[j] else 0 for j in range(t))
            f = tuple(0 if mask[j] else b[j]+1 for j in range(t))
            z = np.sqrt(1-w0)*np.prod([
                np.sqrt(gamma[j] if mask[j] else 1-gamma[j])
                for j in range(t)])
            put((d,(1,b[t:],f)),z*v)
    dk = list(it.product(range(3),repeat=t))
    ek = sorted({e for d,e in entries})
    dl,el = {d:i for i,d in enumerate(dk)},{e:i for i,e in enumerate(ek)}
    A = np.zeros((len(dk),len(ek),2),complex)
    for (d,e),v in entries.items():
        A[dl[d],el[e]] += v
    return A,dk

B12 = kron(H,I)@kron(SD,I)@CX@kron(I,H)
R0 = H@SD

def parity(A,O,P):
    return sum((np.trace((np.eye(len(A))+z*O)@A/2)*(I+z*P)/2
                for z in (-1,1)),np.zeros((2,2),complex))

def full_decode(A,odd):
    early = B12@(CZ if odd else np.eye(4))
    out = np.zeros((2,2),complex)
    for t,s in it.product(range(2),repeat=2):
        C = np.linalg.matrix_power(X,1-t)@np.linalg.matrix_power(Z,1-s)
        K = C@R0@kron(early[2*t+s][None,:],I)
        out += K@A@K.conj().T
    return out

def benchdecode(A,dk,odd=False,low=False):
    lookup = {d:i for i,d in enumerate(dk)}
    out = np.zeros((2,2),complex)
    for count in range(4):
        for S in it.combinations(range(3),count):
            ix = []
            for b in it.product(range(2),repeat=count):
                d = [0]*3
                for j,z in zip(S,b):
                    d[j] = z+1
                ix.append(lookup[tuple(d)])
            B = A[np.ix_(ix,ix)]
            if S==(0,1,2):
                out += parity(B,-kron(Z,X,Z),X) if low else full_decode(B,odd)
            elif odd and S==(1,2):
                out += parity(B,-kron(X,Z),X)
            elif odd and S==(0,2):
                out += parity(B,-kron(Y,Y),Z)
            else:
                out += dep(B)
    return out

def benchmark_audit():
    U,V = encoder()
    F3 = embed(CZ,(0,1),3)
    Vo = kron(F3,np.eye(4))@V
    check("encoder",V.conj().T@V,I)
    words = [-kron(Z,X,Z),-kron(X,Y,X),-kron(Y,Z,Y)]
    oddwords = [-kron(I,X,Z),kron(Y,X,X),-kron(Y,I,Y)]
    for k,(P,Q) in enumerate(zip((X,Y,Z),words)):
        check("logical_"+str(k),U.conj().T@kron(I,P,I)@U,Q)
        check("odd_logical_"+str(k),F3@Q@F3,oddwords[k])
    omega = np.block([[ptrace(V[:,a:a+1]@V[:,b:b+1].conj().T,
                               (0,1,2),5) for b in range(2)]
                       for a in range(2)])/2
    T = kron(Y,R0,I,R0)
    smolin = (np.eye(16)+kron(X,X,X,X)+kron(Y,Y,Y,Y)+kron(Z,Z,Z,Z))/16
    check("smolin",T@omega@T.conj().T,smolin)
    p,qx,qz = .75*.5*(2/3)*.75, .75*.5*(2/3)*.75, .75*.5*(1/3)*.75
    r = 1-p-qx-qz
    for odd,enc in [(False,V),(True,Vo)]:
        A,dk = benchmark(enc)
        N = channel(A)
        check("benchmark_iso_"+str(odd),A.reshape(-1,2).conj().T@A.reshape(-1,2),I)
        for low in ([False,True] if not odd else [False]):
            for a,b,E in units():
                expected = (p*(E+X@E@X)/2+(1-p)*dep(E)) if low else \
                    (p*E+qx*(E+X@E@X)/2+qz*(E+Z@E@Z)/2+r*dep(E)) if odd else \
                    p*E+(1-p)*dep(E)
                check("bench_channel_%s_%s_%d%d"%(odd,low,a,b),
                      benchdecode(N[a,b],dk,odd,low),expected)
        v = enc[:,0]
        later = kron(np.eye(8),CZ)@v
        for t,target in enumerate((0,1,2,2,1,0)):
            z = v if t<=3 else later
            check("turnover_%s_%d"%(odd,t),
                  np.array(entropy(ptrace(np.outer(z,z.conj()),range(t),5))),
                  np.array(float(target)))
    save("benchmark",U=U,V=V,Vo=Vo,A=A)
    A,dk = benchmark(V)
    return channel(A),.75*(1-p)

def loss_domain_audit():
    K,c = 4,3
    sets = [()]
    for k in range(1,c+1):
        sets += [tuple(sorted(S,reverse=True))
                 for S in it.combinations(range(1,K+1),k)
                 if max(S)-min(S)+1<=c]
    cfg = [(S,b) for S in sets for b in it.product(range(2),repeat=len(S))]
    M = 1+K+sum((K-d)*2**(d-1) for d in range(1,c))
    D = 1+2*K+sum((K-d)*4*3**(d-1) for d in range(1,c))
    need(len(sets)==M and len(cfg)==D,"loss-domain count")
    need((3,1) in sets,"missing nonconsecutive input")
    ix = {z:i for i,z in enumerate(cfg)}
    omega = {1:1.,2:2.,3:3.,4:5.}
    gamma = {r:.2+.12*r for r in range(1,K+1)}
    A = np.zeros((D*D,D),complex)
    for col,(S,b) in enumerate(cfg):
        for mask in it.product(range(2),repeat=len(S)):
            ds = tuple(r for r,z in zip(S,mask) if z)
            fs = tuple(r for r,z in zip(S,mask) if not z)
            db = tuple(a for a,z in zip(b,mask) if z)
            fb = tuple(a for a,z in zip(b,mask) if not z)
            amp = np.prod([np.sqrt(gamma[r] if z else 1-gamma[r])
                           for r,z in zip(S,mask)])
            A[ix[ds,db]*D+ix[fs,fb],col] += amp
    e = np.array([sum(omega[r] for r in S) for S,b in cfg])
    eo = (e[:,None]+e[None,:]).reshape(-1)
    check("full_loss_domain_isometry",A.conj().T@A,np.eye(D))
    check("nonuniform_loss_energy",eo[:,None]*A,A*e[None,:])
    save("loss_domain",scattering=A,energy=e)

def put(out,key,v):
    # Exact-zero optimization only: no nonzero amplitude is truncated.
    if np.any(v!=0):
        out[key] = out.get(key,np.zeros(2,complex))+v

def localized(K,ell=0):
    J = np.zeros((2**K,2),complex)
    for m in range(2):
        J[m,m] = 1
    U = np.eye(2**K,dtype=complex)
    for edge in range(K-2,K-ell-2,-1):
        U = embed(SW,(edge,edge+1),K)@U
    return U@J

def initial(J,K):
    return {((K,bits(i,K)),(),()):J[i]
            for i in range(2**K) if np.any(J[i]!=0)}

def advance(entries,j,law,U,gamma):
    out = {}
    for ((n,b),dh,fh),v in entries.items():
        G = U.get((j,n),np.eye(2**n,dtype=complex))
        for a in range(2**n):
            z = G[a,integer(b)] if n else 1
            if z==0:
                continue
            bb = bits(a,n)
            for k,p in enumerate(law[n]):
                if p==0:
                    continue
                modes = tuple(range(n,n-k,-1))
                for mask in it.product(range(2),repeat=k):
                    dp = tuple((r,x) for r,x,s in zip(modes,bb[:k],mask) if s)
                    fp = tuple((r,x) for r,x,s in zip(modes,bb[:k],mask) if not s)
                    amp = z*np.sqrt(float(p))*np.prod([
                        np.sqrt(gamma(j,r) if s else 1-gamma(j,r))
                        for r,s in zip(modes,mask)])
                    put(out,((n-k,bb[k:]),dh+(dp,),fh+(fp,)),amp*v)
    return out

def dense(entries):
    dk = sorted({d for core,d,f in entries})
    ek = sorted({(core,f) for core,d,f in entries})
    di,ei = {d:i for i,d in enumerate(dk)},{e:i for i,e in enumerate(ek)}
    A = np.zeros((len(dk),len(ek),2),complex)
    for (core,d,f),v in entries.items():
        A[di[d],ei[core,f]] += v
    return A,dk,ek

def labels(d):
    return tuple(tuple(r for r,a in p) for p in d)

def blocks(M,dk):
    groups = {}
    for i,d in enumerate(dk):
        groups.setdefault(labels(d),[]).append(i)
    for lab,ix in groups.items():
        e = sum(map(len,lab))
        B = np.zeros((2**e,2**e),complex)
        bi = {i:integer([a for p in dk[i] for r,a in p]) for i in ix}
        for i in ix:
            for j in ix:
                B[bi[i],bi[j]] += M[i,j]
        yield lab,B

def core_density(entries):
    ck = sorted({core for core,d,f in entries})
    ci = {c:i for i,c in enumerate(ck)}
    rk = sorted({(d,f) for core,d,f in entries})
    ri = {r:i for i,r in enumerate(rk)}
    A = np.zeros((len(ck),len(rk)),complex)
    for (core,d,f),v in entries.items():
        A[ci[core],ri[d,f]] += v[0]
    C = A@A.conj().T
    s = np.linalg.svd(A,compute_uv=False)**2
    emitted_entropy = float(-sum(x*np.log2(x) for x in s if x>1e-12))
    return C,ck,emitted_entropy

def popstep(pi,law):
    q = [F(0)]*len(pi)
    for n,p in enumerate(pi):
        for k,r in enumerate(law[n]):
            q[n-k] += p*r
    return q

def transport_decode(M,dk,target,retain,t):
    out = np.zeros((2,2),complex)
    for lab,B in blocks(M,dk):
        positions = [i for i,r in enumerate([r for S in lab for r in S])
                     if r==target]
        if not positions:
            out += dep(B)
            continue
        e = sum(map(len,lab))
        R = ptrace(B,positions,e)
        j = next(j for j,S in enumerate(lab) if target in S)
        out += R if retain or j==t-1 else (R+Z@R@Z)/2
    return out

def transport_ledger(lab,target,retain,h):
    """S0 final direct-return path is not logged as preparation."""
    q,live,held,record = h+1,0,False,False
    events,peak = [],0
    for j,S in enumerate(lab):
        live += q
        peak = max(peak,live)
        events.append(["arrival",j,live])
        live -= h
        if target in S and (retain or j==len(lab)-1):
            held = True
            events.append(["retain_target",j,live])
        else:
            if target in S:
                record = True
                events.append(["Z_target_readout",j,live])
            live -= 1
            events.append(["consume_rail_or_dummy",j,live])
    if held:
        events.append(["direct_return",len(lab),live])
        live -= 1
    else:
        live += 1
        peak = max(peak,live)
        events.append(["prepare_eigenstate" if record else "prepare_I_over_2",
                       len(lab),live])
        live -= 1
    need(live==0 and peak<=q+int(retain),"transport occupancy")
    return {"labels":lab,"retain":retain,"events":events,"peak":peak}

def transport_audit():
    K = 3
    law = {0:[F(1)],**{n:[F(1,2),F(1,2)] for n in range(1,K+1)}}
    for ell in range(K):
        entries = initial(localized(K,ell),K)
        pi = [F(0)]*K+[F(1)]
        d,target = K-ell,ell+1
        for t in range(4):
            A,dk,ek = dense(entries)
            check("transport_iso_%d_%d"%(ell,t),
                  A.reshape(-1,2).conj().T@A.reshape(-1,2),I)
            if t:
                a = sum(pi[:K-d+1])
                b = F(math.comb(t-1,d-1),2**t) if t>=d else F(0)
                for retain in (False,True):
                    for i,j,E in units():
                        expected = float(F(3,4)*a)*E+(1-float(F(3,4)*a))*dep(E) \
                            if retain else float(F(3,4)*b)*E+ \
                            float(F(3,4)*(a-b))*(E+Z@E@Z)/2+ \
                            (1-float(F(3,4)*a))*dep(E)
                        check("transport_channel_%d_%d_%s_%d%d"%(ell,t,retain,i,j),
                              transport_decode(channel(A)[i,j],dk,target,retain,t),
                              expected)
                    for lab in sorted({labels(x) for x in dk}):
                        DATA["occupancy"].append(
                            transport_ledger(lab,target,retain,2))
            if t<3:
                entries = advance(entries,t+1,law,{},lambda j,r:.75)
                pi = popstep(pi,law)
    entries = initial(localized(3),3)
    for j in (1,2):
        entries = advance(entries,j,law,{},lambda j,r:1.)
    A,dk,ek = dense(entries)
    d1,d2 = (((3,0),),()),((),((3,0),))
    check("temporal_coherence",
          np.array(channel(A)[0,0][dk.index(d1),dk.index(d2)]),
          np.array(.25+0j))

def stream_ops(e,m):
    """Kraus maps for A/B/C on actual occupied rails, in arrival order."""
    branches = [(np.eye(2**e,dtype=complex),0,None,[])]
    for pos in range(e):
        nxt = []
        for T,k,last,rec in branches:
            rem = e-pos
            n = k+rem
            if k<m:
                nxt.append((T,k+1,last,rec))
                continue
            if m==1:
                T = embed(CX,(0,k),n)@T
                T = embed(H,(k,),n)@T
            elif m==2:
                T = embed(CX,(0,k),n)@T
                T = embed(CZ,(1,k),n)@T
                T = embed(H,(k,),n)@T
            A = T.reshape(2**k,2,2**(rem-1),2**e)
            for z in range(2):
                P = A[:,z,:,:].reshape(2**(k+rem-1),2**e)
                if m:
                    G = Z if m==1 else X
                    if z:
                        P = embed(G,(0,),k+rem-1)@P
                nxt.append((P,k,z,rec+[["incoming",pos,z]]))
        branches = nxt
    out = []
    for T,k,last,rec in branches:
        if k==2:
            T = kron(I,H)@CX@T
            for z in range(2):
                P = T.reshape(2,2,2**e)[:,z,:]
                if z:
                    P = Z@P
                out.append((P,rec+[["final_memory",z]]))
        elif k==1:
            out.append((T,rec))
        elif last is None:
            for z in range(2):
                out.append((I[:,z:z+1]@T/np.sqrt(2),rec+[["coin",z]]))
        else:
            out.append((I[:,last:last+1]@T,rec))
    return out

def stream_decode(M,dk,m):
    out = np.zeros((2,2),complex)
    for lab,B in blocks(M,dk):
        for K,rec in stream_ops(int(round(np.log2(len(B)))),m):
            out += K@B@K.conj().T
    return out

def stream_ledger(lab,m,h,rec):
    live,held,peak,events = 0,0,0,[]
    for j,S in enumerate(lab):
        live += h+1
        peak = max(peak,live)
        events.append(["arrival",j,live])
        live -= h
        if not S:
            live -= 1
            events.append(["consume_vacuum_dummy",j,live])
        elif held<m:
            held += 1
            events.append(["retain_incoming",j,live])
        else:
            events.append(["readout_incoming_and_feedback",j,live])
            live -= 1
    if held==2:
        live -= 1
        held = 1
        events.append(["final_memory_readout_feedback",len(lab),live])
    if held:
        live -= 1
        events.append(["return",len(lab),live])
    else:
        live += 1
        peak = max(peak,live)
        events.append(["prepare_and_return",len(lab),live])
        live -= 1
    need(live==0 and peak<=h+1+m,"stream occupancy")
    return {"labels":lab,"m":m,"outcomes":rec,"events":events,"peak":peak}

def history_unitary(lab,K,U):
    B,e = np.eye(2**K,dtype=complex),0
    for j,S in enumerate(lab,1):
        n = K-e
        if S:
            need(tuple(S)==tuple(range(n,n-len(S),-1)),
                 "complete collection has wrong interval")
        G = U.get((j,n),np.eye(2**n,dtype=complex))
        if n:
            B = embed(G,range(e,K),K)@B
        e += len(S)
    need(e==K,"incomplete inverse history")
    return B

def collect_decode(M,dk,K,U):
    out = np.zeros((2,2),complex)
    for lab,A in blocks(M,dk):
        modes = [r for S in lab for r in S]
        need(len(modes)==len(set(modes)),"repeated emitted mode")
        if len(modes)==K:
            B = history_unitary(lab,K,U)
            R = B.conj().T@A@B
            out += ptrace(R,(K-1,),K)
        else:
            out += dep(A)
    return out

def collect_ledger(lab,K,h,c):
    live,held,peak,events = 0,0,0,[]
    for j,S in enumerate(lab):
        live += h+c
        peak = max(peak,live)
        events.append(["arrival",j,live])
        live -= h+c-len(S)
        held += len(S)
        events.append(["label_and_padding_consumed",j,live])
        if held==K:
            live -= K-1
            held = 1
            events.append(["invert_consume_ancillas",j,live])
    if sum(map(len,lab))==K:
        live -= 1
        events.append(["return",len(lab),live])
    else:
        live -= held
        events.append(["discard_incomplete",len(lab),live])
        live += 1
        peak = max(peak,live)
        events.append(["prepare_I_over_2",len(lab),live])
        live -= 1
    need(live==0 and peak<=h+c+K-1,"collect occupancy")
    return {"labels":lab,"events":events,"peak":peak,
            "discard_readout_outcomes":"all computational outcomes"}

def multiparticle_audit():
    K,c = 3,2
    law = {0:[F(1)],1:[F(1,2),F(1,2)],
           2:[F(1,2),F(1,4),F(1,4)],
           3:[F(1,2),F(1,4),F(1,4)]}
    U = {}
    for j in (1,2,3):
        for n in range(1,K+1):
            G = embed(H,(0,),n)
            if n>1:
                G = embed(CZ,(0,1),n)@embed(CX,(0,1),n)@G
            U[j,n] = G
    entries = initial(localized(K),K)
    for j in (1,2,3):
        entries = advance(entries,j,law,U,lambda j,r:.7+.05*r)
    A,dk,ek = dense(entries)
    check("multiparticle_process_iso",
          A.reshape(-1,2).conj().T@A.reshape(-1,2),I)
    N = channel(A)
    p = sum(np.trace(B).real for lab,B in blocks(N[0,0],dk)
            if sum(map(len,lab))==K)
    for i,j,E in units():
        check("multiparticle_recovery_%d%d"%(i,j),
              collect_decode(N[i,j],dk,K,U),p*E+(1-p)*dep(E))
    for lab in sorted({labels(d) for d in dk}):
        DATA["occupancy"].append(collect_ledger(lab,K,3,c))
    save("multiparticle_process",A=A,P_all=np.array(p),
         **{"U_%d_%d"%key:G for key,G in U.items()})

def rot(P,t):
    return np.cos(t/2)*I-1j*np.sin(t/2)*P

def schedule(K,tmax,L,seed,name):
    rng = np.random.default_rng(seed)
    U,gates = {},{}
    for j in range(1,tmax+1):
        for n in range(1,K+1):
            A = np.eye(2**n,dtype=complex)
            for layer in range(2):
                parity = (j-1+layer)%2
                for edge in range(parity,n-1,2):
                    th = rng.uniform(-np.pi,np.pi,4)
                    G = kron(rot(Y,th[0]),rot(Y,th[1]))@CZ@ \
                        kron(rot(X,th[2]),rot(X,th[3]))
                    if layer<L:
                        A = embed(G,(edge,edge+1),n)@A
                        gates["gate_%d_%d_%d_%d"%(j,n,layer,edge)] = G
                        gates["theta_%d_%d_%d_%d"%(j,n,layer,edge)] = th
            U[j,n] = A
            check(name+"_U_%d_%d"%(j,n),A.conj().T@A,np.eye(2**n))
    save(name+"_gates",**gates,**{"U_%d_%d"%key:G for key,G in U.items()})
    return U

def spreading(G,n):
    if n<2:
        return 0.
    value = 0.
    for a,b in it.permutations(range(n),2):
        A = G.conj().T@embed(X,(a,),n)@G
        B = embed(Z,(b,),n)
        C = A@B-B@A
        value += np.trace(C.conj().T@C).real/(4*2**n)
    return float(value/(n*(n-1)))

def cp_solve(problem,name):
    import cvxpy as cp
    opts = {"eps":1e-7,"max_iters":50000} if SOLVER=="SCS" else {}
    problem.solve(solver=SOLVER,verbose=False,**opts)
    DATA["solvers"].append({"name":name,"solver":SOLVER,
        "status":problem.status,"value":None if problem.value is None else float(problem.value),
        "iterations":problem.solver_stats.num_iters,
        "solve_time":problem.solver_stats.solve_time})
    need(problem.status in ("optimal","optimal_inaccurate"),"solver "+name)
    return float(problem.value)

def partial_output(A,outdim,indim):
    return sum((A[a*indim:(a+1)*indim,a*indim:(a+1)*indim]
                for a in range(outdim)))

def repaired_decoder(R):
    vals,V = np.linalg.eigh(herm(R))
    P = (V*np.maximum(vals,0))@V.conj().T
    b = len(R)//2
    M = partial_output(P,2,b)
    vals,V = np.linalg.eigh(herm(M))
    if vals.min()<=1e-12:
        P += 1e-10*np.eye(len(P))
        M = partial_output(P,2,b)
        vals,V = np.linalg.eigh(herm(M))
    G = (V*(1/np.sqrt(vals)))@V.conj().T
    R = kron(I,G)@P@kron(I,G)
    return herm(R)

def apply_decoder(R,N):
    b = len(R)//2
    return {(i,j):np.array([[np.trace(
        R[a*b:(a+1)*b,z*b:(z+1)*b]@N[i,j].T)
        for z in range(2)] for a in range(2)])
        for i,j,E in units()}

def distance(N,name):
    import cvxpy as cp
    J = herm(choi(N)-idchoi())
    W = cp.Variable((4,4),hermitian=True)
    rho = cp.Variable((2,2),hermitian=True)
    primal = cp.Problem(cp.Maximize(cp.real(cp.trace(J@W))),
        [W>>0,rho>>0,cp.trace(rho)==1,cp.kron(I,rho)-W>>0])
    lo = cp_solve(primal,name+"_diamond_primal")
    D = cp.Variable((4,4),hermitian=True)
    lam = cp.Variable()
    dual = cp.Problem(cp.Minimize(lam),
        [D>>0,D-J>>0,lam*I-(D[:2,:2]+D[2:,2:])>>0])
    hi = cp_solve(dual,name+"_diamond_dual")
    rv = herm(D.value)
    shift = max(0.,-mineig(rv),-mineig(rv-J))+1e-9
    rv += shift*np.eye(4)
    upper = float(np.linalg.eigvalsh(
        herm(partial_output(rv,2,2))).max())
    resid = max(0.,-mineig(W.value),-mineig(rho.value),
                -mineig(np.kron(I,rho.value)-W.value),
                abs(np.trace(rho.value)-1))
    need(resid<=STOL and abs(hi-lo)<=STOL,"diamond numerical gap "+name)
    save(name+"_distance",J=J,W=W.value,rho=rho.value,
         Z_raw=D.value,Z_repaired=rv)
    return {"primal":lo,"dual":hi,"repaired_dual":upper,
            "primal_residual":float(resid),"gap":hi-lo,
            "certified":False}

def recovery(N,name):
    import cvxpy as cp
    b = len(N[0,0])
    R = cp.Variable((2*b,2*b),hermitian=True)
    mats = {}
    for i,j,E in units():
        mats[i,j] = cp.bmat([[cp.reshape(cp.trace(
            R[a*b:(a+1)*b,z*b:(z+1)*b]@N[i,j].T),(1,1),order="C")
            for z in range(2)] for a in range(2)])
    J = sum(cp.kron(mats[i,j],E) for i,j,E in units())-idchoi()
    D = cp.Variable((4,4),hermitian=True)
    lam = cp.Variable()
    prob = cp.Problem(cp.Minimize(lam),
        [R>>0,R[:b,:b]+R[b:,b:]==np.eye(b),
         D>>0,D-J>>0,lam*I-(D[:2,:2]+D[2:,2:])>>0])
    estimate = cp_solve(prob,name+"_recovery")
    raw = R.value
    rr = max(0.,-mineig(raw),
             float(np.max(np.abs(partial_output(raw,2,b)-np.eye(b)))))
    need(rr<=STOL,"raw recovery residual "+name)
    fixed = repaired_decoder(raw)
    check(name+"_repaired_TP",partial_output(fixed,2,b),np.eye(b),STOL)
    need(mineig(fixed)>=-STOL,"repaired decoder positivity")
    achieved = apply_decoder(fixed,N)
    achieved_distance = distance(achieved,name+"_recovered")

    C = sum((np.kron(E.T,N[i,j].T)/4 for i,j,E in units()),
            np.zeros((2*b,2*b),complex))
    Yv = cp.Variable((b,b),hermitian=True)
    dual = cp.Problem(cp.Minimize(cp.real(cp.trace(Yv))),
                      [cp.kron(I,Yv)-C>>0])
    cp_solve(dual,name+"_fidelity_dual")
    Ynum = herm(Yv.value)
    shift = max(0.,-mineig(np.kron(I,Ynum)-C))+1e-9
    Ynum += shift*np.eye(b)
    lower = max(0.,1-float(np.trace(Ynum).real))
    need(lower<=achieved_distance["repaired_dual"]+STOL,
         "inconsistent recovery bounds")
    save(name+"_decoder",R_raw=raw,R_repaired=fixed,Y=Ynum,
         **{"unit_%d_%d"%key:A for key,A in achieved.items()})
    return {"estimate":estimate,"raw_residual":rr,
            "achieved_distance":achieved_distance,
            "fidelity_lower_candidate":lower,"certified":False}

def solver_audit(benchN,bench_error):
    tests = [("identity",{(a,b):E for a,b,E in units()},0.),
             ("constant",{(a,b):dep(E) for a,b,E in units()},.75),
             ("dephasing",{(a,b):(E+Z@E@Z)/2 for a,b,E in units()},.5),
             ("flagged_even",benchN,bench_error)]
    for name,N,target in tests:
        result = recovery(N,"validation_"+name)
        check("solver_expected_"+name,np.array(result["estimate"]),
              np.array(target),STOL)
        check("solver_achieved_"+name,
              np.array(result["achieved_distance"]["repaired_dual"]),
              np.array(target),STOL)
        DATA["records"].append({"validation":name,"result":result})

def dashboard(entries,pi,K,U,t,name):
    A,dk,ek = dense(entries)
    N = channel(A)
    check(name+"_isometry",A.reshape(-1,2).conj().T@A.reshape(-1,2),I)
    C,ck,SDF = core_density(entries)
    actual_pi = np.array([sum(C[i,i].real for i,(m,b) in enumerate(ck) if m==n)
                          for n in range(K+1)])
    check(name+"_population",actual_pi,np.array(list(map(float,pi))))
    check(name+"_entropy_purity",np.array(entropy(C)),np.array(SDF))
    ec = sum(n*float(p) for n,p in enumerate(pi))
    ed = sum(N[0,0][i,i].real*sum(len(p) for p in d)
             for i,d in enumerate(dk))
    ef = sum(np.linalg.norm(A[:,i,0])**2*sum(len(p) for p in f)
             for i,(core,f) in enumerate(ek))
    check(name+"_energy",np.array(ec+ed+ef),np.array(float(K)))
    save(name+"_channel",A=A,core=C,Choi=choi(N))
    return A,dk,N,{"population":list(map(float,pi)),
        "emitted_count_distribution":list(reversed(list(map(float,pi)))),
        "S_core":entropy(C),"S_accessible":entropy(N[0,0]),"S_DF":SDF,
        "decoupling":decoupling(A),"energy":[ec,ed,ef]}

def pilot(K):
    h = math.ceil(math.log2(K+1))
    cases = [("identity",0,0,0),("swap",0,0,K-1)]
    cases += [("entangling",L,seed,0) for L in (1,2) for seed in (0,1)]
    for family,L,seed,ell in cases:
        base = "K%d_%s_L%d_seed%d"%(K,family,L,seed)
        U = schedule(K,K,L,seed,base)
        for r in (F(1),F(1,2)):
            law = {0:[F(1)],**{n:[1-r,r] for n in range(1,K+1)}}
            entries = initial(localized(K,ell),K)
            pi = [F(0)]*K+[F(1)]
            for t in range(1,K+1):
                prev = pi
                entries = advance(entries,t,law,U,lambda j,r:1.)
                pi = popstep(pi,law)
                name = base+"_r%s_t%d"%(str(r).replace("/","_"),t)
                A,dk,N,record = dashboard(entries,pi,K,U,t,name)
                record.update(case=name,K=K,L=L,seed=seed,t=t,r=str(r),
                              family=family,internal_layers=t*L,
                              spreading=sum(float(prev[n])*spreading(
                                  U.get((t,n),np.eye(2**n)),n)
                                  for n in range(K+1)))
                record["batch"] = recovery(N,name)
                record["streaming"] = {}
                for m in (0,1,2):
                    out = {(i,j):stream_decode(B,dk,m) for (i,j),B in N.items()}
                    record["streaming"][str(m)] = distance(out,name+"_m"+str(m))
                    for lab in sorted({labels(d) for d in dk}):
                        e = sum(map(len,lab))
                        ops = stream_ops(e,m)
                        check(name+"_Kraus_%d_%s"%(m,str(lab)),
                              sum((Kx.conj().T@Kx for Kx,rec in ops),
                                  np.zeros((2**e,2**e),complex)),
                              np.eye(2**e))
                        for Kx,rec in ops:
                            DATA["occupancy"].append(stream_ledger(lab,m,h,rec))
                outD = {(i,j):collect_decode(B,dk,K,U) for (i,j),B in N.items()}
                p = float(pi[0])
                for i,j,E in units():
                    check(name+"_collect_%d%d"%(i,j),outD[i,j],
                          p*E+(1-p)*dep(E))
                record["collect_error"] = .75*(1-p)
                for lab in sorted({labels(d) for d in dk}):
                    DATA["occupancy"].append(collect_ledger(lab,K,h,1))
                DATA["records"].append(record)
                dump()

def absorption_audit():
    K = 5
    law = {0:[F(1)],**{n:[1-F(1,2**n+1),F(1,2**n+1)]
                        for n in range(1,K+1)}}
    rs = F(1,33)
    need(F(K)/rs==165 and sum(1/law[n][1] for n in range(1,K+1))==67,
         "absorption means")
    pi = [F(0)]*K+[F(1)]
    for t in range(20):
        bound = sum(F(math.comb(t,i))*rs**i*(1-rs)**(t-i)
                    for i in range(min(K-1,t)+1))
        need(1-pi[0]<=bound and sum(pi)==1,"absorption tail")
        pi = popstep(pi,law)

def compile_tex(tex):
    tex = Path(tex).resolve()
    need(tex.exists(),"missing TeX source")
    target = ROOT/tex.name
    shutil.copy2(tex,target)
    for run in (1,2):
        p = subprocess.run(["pdflatex","-interaction=nonstopmode",
                            "-halt-on-error",target.name],
                           cwd=ROOT,stdout=subprocess.PIPE,
                           stderr=subprocess.STDOUT,text=True)
        (ROOT/("pdflatex_run_%d.txt"%run)).write_text(p.stdout)
        need(p.returncode==0,"pdfLaTeX failure")
    need((ROOT/(tex.stem+".pdf")).exists(),"missing compiled PDF")

def main():
    global ROOT,SOLVER
    parser = argparse.ArgumentParser()
    parser.add_argument("--mode",choices=("audit","pilot","extend"),default="audit")
    parser.add_argument("--solver",default="SCS")
    parser.add_argument("--tex")
    parser.add_argument("--compile",action="store_true")
    args = parser.parse_args()
    SOLVER = args.solver
    stamp = datetime.datetime.now(datetime.timezone.utc).strftime("%Y%m%dT%H%M%S%fZ")
    ROOT = Path("en02d_v4_"+stamp)
    ROOT.mkdir()
    source = Path(__file__).resolve()
    shutil.copy2(source,ROOT/source.name)
    manifest = {"status":"RUNNING","mode":args.mode,"python":sys.version,
                "numpy":np.__version__,"solver":SOLVER,
                "audit_tolerance":TOL,"solver_tolerance":STOL,
                "source_sha256":hashlib.sha256(source.read_bytes()).hexdigest(),
                "synthetic":True,"formal_certificate":False}
    path = ROOT/"manifest.json"
    path.write_text(json.dumps(manifest,indent=2))
    try:
        benchN,expected = benchmark_audit()
        loss_domain_audit()
        transport_audit()
        multiparticle_audit()
        absorption_audit()
        for e in range(5):
            for m in range(3):
                ops = stream_ops(e,m)
                check("generic_stream_Kraus_%d_%d"%(e,m),
                      sum((A.conj().T@A for A,rec in ops),
                          np.zeros((2**e,2**e),complex)),np.eye(2**e))
        if args.mode!="audit":
            import cvxpy
            manifest["cvxpy"] = cvxpy.__version__
            manifest["installed_solvers"] = cvxpy.installed_solvers()
            need(SOLVER in cvxpy.installed_solvers(),"solver not installed")
            solver_audit(benchN,expected)
            pilot(3)
            if args.mode=="extend":
                pilot(4)
        if args.compile:
            need(args.tex is not None,"--compile requires --tex")
            compile_tex(args.tex)
        elif args.tex:
            shutil.copy2(Path(args.tex),ROOT/Path(args.tex).name)
        dump()
        manifest["status"] = "NUMERICAL_CHECKS_AND_COMPILATION_PASSED" \
            if args.compile else "NUMERICAL_CHECKS_PASSED_COMPILATION_NOT_RUN"
        manifest["scope"] = "finite floating-point regression; not certified optimum"
    except BaseException:
        dump()
        (ROOT/"failure.txt").write_text(traceback.format_exc())
        manifest["status"] = "FAILED"
        path.write_text(json.dumps(manifest,indent=2))
        raise
    finally:
        manifest["artifact_sha256"] = {
            f.name:hashlib.sha256(f.read_bytes()).hexdigest()
            for f in ROOT.iterdir() if f.is_file() and f.name!="manifest.json"}
        path.write_text(json.dumps(manifest,indent=2))
    print(ROOT)
    print(manifest["status"])

if __name__=="__main__":
    main()
\end{CodeBlock}

\section{Interpretation of the archive}

Occupation-label blocks are used only inside the explicitly
occupation-measuring decoders.
The simulator itself adds amplitudes whenever final physical
basis states coincide.
The unrestricted SDP receives the coherent channel before
occupation pinching.

Resource logs for destructive discards can quotient outcomes
that have identical occupancy; the channel computation still
includes the full trace over all discarded outcomes.
For A--C, the supplement constructs explicit Kraus maps and checks
their completeness on every occupied-rail input space.

The multiparticle regression uses \(K=3,c=2\), vacuum, one- and
two-constituent probabilities, entangling internal Clifford gates,
and partial transmission.
The scattering-domain regression separately includes every
loss-closed input, with constituent energies \(1,2,3,5\).

A passing finite archive would not prove the universal analytical
memory lower bounds, interval-certified SDP feasibility, a physical
spectral model, or an ensemble scaling law.

%=====================================================================
\section*{Declarations}
%=====================================================================

\paragraph{Competing interests.}
The author declares no competing interests.

\paragraph{Funding.}
No specific grant supported this work.

\paragraph{Author contribution.}
N.C.\ developed the finite-model specification and manuscript.
Analytical statements and computational acceptance conditions
are distinguished in the text.

\paragraph{Data and code availability.}
All formulas and the computational supplement are included.
No executed archive, numerical dynamics dataset, solver certificate,
or compilation log is asserted in this version.

\paragraph{Ethics.}
Not applicable.

%=====================================================================
\begin{thebibliography}{99}

\bibitem{HP}
P.~Hayden and J.~Preskill,
\emph{Black holes as mirrors: quantum information in random subsystems},
Journal of High Energy Physics \textbf{2007}(09), 120 (2007).
arXiv:0708.4025v2.
doi:10.1088/1126-6708/2007/09/120.

\bibitem{Piroli}
L.~Piroli, C.~S\"underhauf, and X.-L.~Qi,
\emph{A Random Unitary Circuit Model for Black Hole Evaporation},
Journal of High Energy Physics \textbf{2020}(04), 063 (2020).
arXiv:2002.09236v2.
doi:10.1007/JHEP04(2020)063.

\bibitem{Bisio}
A.~Bisio, G.~M.~D'Ariano, P.~Perinotti, and M.~Sedl\'ak,
\emph{Memory cost of quantum protocols},
Physical Review A \textbf{85}, 032333 (2012).
arXiv:1112.3853.
doi:10.1103/PhysRevA.85.032333.

\bibitem{Smolin}
J.~A.~Smolin,
\emph{A four-party unlockable bound-entangled state},
Physical Review A \textbf{63}, 032306 (2001).
arXiv:quant-ph/0001001.
doi:10.1103/PhysRevA.63.032306.

\bibitem{Nahum}
A.~Nahum, S.~Vijay, and J.~Haah,
\emph{Operator spreading in random unitary circuits},
Physical Review X \textbf{8}, 021014 (2018).
arXiv:1705.08975v2.
doi:10.1103/PhysRevX.8.021014.

\bibitem{AaronsonGottesman}
S.~Aaronson and D.~Gottesman,
\emph{Improved simulation of stabilizer circuits},
Physical Review A \textbf{70}, 052328 (2004).
arXiv:quant-ph/0406196v5.
doi:10.1103/PhysRevA.70.052328.

\bibitem{Winnel}
M.~S.~Winnel, J.~J.~Guanzon, N.~Hosseinidehaj, and T.~C.~Ralph,
\emph{Achieving the ultimate end-to-end rates of lossy quantum
communication networks},
npj Quantum Information \textbf{8}, 129 (2022).
arXiv:2203.13924.
doi:10.1038/s41534-022-00641-0.

\bibitem{Fletcher}
A.~S.~Fletcher, P.~W.~Shor, and M.~Z.~Win,
\emph{Optimum quantum error recovery using semidefinite programming},
Physical Review A \textbf{75}, 012338 (2007).
arXiv:quant-ph/0606035.
doi:10.1103/PhysRevA.75.012338.

\bibitem{WatrousSDP}
J.~Watrous,
\emph{Semidefinite programs for completely bounded norms},
Theory of Computing \textbf{5}, 217--238 (2009).
arXiv:0901.4709.
doi:10.4086/toc.2009.v005a011.

\bibitem{WatrousBook}
J.~Watrous,
\emph{The Theory of Quantum Information},
Cambridge University Press, 2018.

\bibitem{Hawking}
S.~W.~Hawking,
\emph{Particle creation by black holes},
Communications in Mathematical Physics \textbf{43},
199--220 (1975).
doi:10.1007/BF02345020.

\bibitem{BlackHawk}
A.~Arbey and J.~Auffinger,
\emph{BlackHawk v2.0: A public code for calculating the Hawking
evaporation spectra of any black hole distribution},
arXiv:1905.04268v3, 6 August 2021, version-specific manual.
Original software article:
European Physical Journal C \textbf{79}, 693 (2019).
doi:10.1140/epjc/s10052-019-7161-1.

\bibitem{CVXPY}
CVXPY developers,
\emph{Official documentation: Advanced Constraints and Solver Features}.
Documentation consulted for complex Hermitian variables,
semidefinite constraints, and solver-specific invocation.
Installed software versions are to be recorded by the supplement;
no particular installed version or executed solver run is asserted.

\end{thebibliography}

\end{document}