manuscript_psXT_re1.pdf
Introduction
Introduction.— Understanding how errors degrade encoded quantum information is central to realizing practical quantum technologies [1 ] . In the quantum error-correction framework, one naturally considers an encoding map that embeds k k k logical qubits into N N N physical qubits, a noise channel, and a decoding operation to reconstruct the logical state [2 , 3 , 4 , 5 , 6 ] . In general, tackling this problem is hard because it depends on the choice of a good decoder. An alternative strategy to explore the effect of noise on quantum information is offered by encoding-error-decoding (EED) protocols. In this framework, k k k system qubits are encoded together with N − k N-k N − k ancillas through an N N N -qubit unitary U U U and then subjected to a layer of errors. The decoder is simply U † U^{\dagger} U † , followed by syndrome measurements with postselection allowed. In the scaling limit N → ∞ N \to\infty N → ∞ at fixed code rate r = k / N r = k/N r = k / N , an error-resilience phase transition occurs as the error strength is varied [7 , 8 ] . Below a critical threshold, the input state on k k k qubits is recovered (error-protecting phase); above it, the encoded information washes out (error-vulnerable phase). While EED protocols differ from quantum error correction, the persistence of faithful recovery at finite error strength is reminiscent of the threshold theorem for fault-tolerant quantum computation [9 ] .
Beyond this analogy, the EED framework has become a useful lens for circuit-inversion benchmarks on quantum hardware [10 ] , emergent unitary designs [11 ] , and resource-theoretic properties such as nonstabilizerness [8 , 12 , 13 , 14 ] . The transition is also experimentally relevant, with signatures recently observed on a superconducting quantum processor [15 ] . Error resilience has been established for Haar-random and random Clifford encoders [7 , 8 ] ; for qubits, the latter form a unitary 3-design, matching the Haar average up to third moments [16 ] . Nevertheless, the general conditions an encoder ensemble must satisfy to sustain a stable error-protecting phase remain unclear.
In this work, we clarify the relation between error resilience and the randomness of the encoder ensemble. To that end, we first derive a universal inequality connecting the recovery fidelity in the EED setup to the second unitary frame potential. We then study the EED with encoders taken as doped matchgate circuits [17 , 18 , 19 , 20 ] [21], that approach the 2-design behavior when the number of non-Gaussian gates is sufficiently increased [22 ] . We analytically show that for matchgates without doping, the error-protecting regime shrinks with increasing system size and disappears in the thermodynamic limit. The regime becomes more stable by doping matchgate circuits with non-Gaussian gates. We further substantiate this connection using Gaussian unitary ensemble (GUE) Hamiltonian dynamics [23 ] , where approximate 2-designs can be achieved and an error-resilience phase transition is observed. In contrast, the dynamics of the clean non-integrable Ising model [24 , 25 , 26 ] , remains insufficiently random at the level of the second unitary moment [27 ] , and correspondingly does not support a stable error-protecting phase. We also study an experimentally feasible disordered all-to-all spin model, in which the recovery of error resilience closely tracks the emergence of 2-designs. Taken together, our results demonstrate that the error-resilience transition in the EED protocols reflects the second-moment randomness.
Encoding-error-decoding quantum evolutions and state designs
We start by presenting the general EED protocol, which can be framed as a quantum evolution of N N N qubits Fig. 1(a). The system is divided into a subsystem X X X of k k k logical qubits and its complement Y Y Y of N − k N-k N − k qubits, initialized in a computational-basis product state ∣ ψ i n ⟩ = ∣ ψ i n X ⟩ ⊗ ∣ ψ i n Y ⟩ = ⨂ i = 1 N ∣ s i ⟩ |\psi_{\mathrm{in}}\rangle= |\psi_{\mathrm{in}}^{X}\rangle\otimes|\psi_{\mathrm{in}}^{Y}\rangle= \bigotimes_{i=1}^{N}|s_i\rangle ∣ ψ in ⟩ = ∣ ψ in X ⟩ ⊗ ∣ ψ in Y ⟩ = ⨂ i = 1 N ∣ s i ⟩ , with s i ∈ { 0 , 1 } s_i \in\{0,1\} s i ∈ { 0 , 1 } and ρ i n = ∣ ψ i n ⟩ ⟨ ψ i n ∣ \rho_{\mathrm{in}} = |\psi_{\mathrm{in}}\rangle\langle\psi_{\mathrm{in}}| ρ in = ∣ ψ in ⟩ ⟨ ψ in ∣ . The state is encoded by a unitary U U U drawn from an ensemble E \mathcal{E} E , giving
Figure 1. (a) Schematic illustration of the encoding-error-decoding quantum evolutions comprised of the encoder U U U , the local error layer K ^ \hat{K} K ^ , and the decoder U † U^{\dagger} U † . The N N N -qubit system consists of k k k logical qubits with the initial state ∣ ψ X ( 0 ) ⟩ |\psi_X^{(0)}\rangle ∣ ψ X ( 0 ) ⟩ and N − k N-k N − k ancilla qubits which are projected onto their initial states after the decoder U † U^{\dagger} U † . (b) Doped fermionic Gaussian unitary (FGU) circuit considered as one choice of the encoder U U U , where non-Gaussian gates A A A are inserted into otherwise Gaussian matchgate circuits. The pure matchgate limit corresponds to t = 0 t=0 t = 0 . (c) Hamiltonian time evolution U = e − i H t U=e^{-iHt} U = e − i H t , considered as another choice of the encoder.
ρ U = U ρ i n U † \rho_U=U\rho_{\mathrm{in}}U^{\dagger} ρ U = U ρ in U † , and then subjected to a layer of local errors
K ^ α = ⨂ j = 1 N K ^ j , α \hat{K}_{\alpha}=\bigotimes_{j=1}^{N}\hat{K}_{j,\alpha} K ^ α = j = 1 ⨂ N K ^ j , α
of tunable strength α \alpha α , which corrupt the encoded information. To retrieve it, a decoder D D D is applied to K ^ α ( ρ U ) \hat{K}_{\alpha}(\rho_U) K ^ α ( ρ U ) , together with syndrome measurements on the ancillas. EED protocols fix the decoder to the inverse encoding unitary, D ( ρ ) = U † ρ U D(\rho)=U^{\dagger}\rho U D ( ρ ) = U † ρ U , and postselect the ancilla measurements on their initial state. The output state ρ o u t = U † K ^ α ( ρ U ) U \rho_{\mathrm{out}}=U^{\dagger}\hat{K}_{\alpha}(\rho_U)U ρ out = U † K ^ α ( ρ U ) U thus yields the logical state ρ X = ⟨ ψ X ∣ ρ o u t ∣ ψ X ⟩ / p \rho_X=\langle\psi_X|\rho_{\mathrm{out}}|\psi_X\rangle/p ρ X = ⟨ ψ X ∣ ρ out ∣ ψ X ⟩ / p , where p = tr ( ⟨ ψ X ∣ ρ o u t ∣ ψ X ⟩ ) p=\operatorname{tr}(\langle\psi_X|\rho_{\mathrm{out}}|\psi_X\rangle) p = tr (⟨ ψ X ∣ ρ out ∣ ψ X ⟩) is the postselection probability. To quantify error resilience, we use the EED fidelity
F = ⟨ ψ X i n ∣ ρ X ∣ ψ X i n ⟩ = ⟨ ψ i n ∣ ρ o u t ∣ ψ i n ⟩ p , (1) F=\langle\psi_X^{\mathrm{in}}|\rho_X|\psi_X^{\mathrm{in}}\rangle=\frac{\langle\psi_{\mathrm{in}}|\rho_{\mathrm{out}}|\psi_{\mathrm{in}}\rangle}{p}, \tag*{(1)} F = ⟨ ψ X in ∣ ρ X ∣ ψ X in ⟩ = p ⟨ ψ in ∣ ρ out ∣ ψ in ⟩ , (1)
i.e., the probability that the logical state is recovered, conditioned on the ancillas returning to their initial state. Related scrambling diagnostics are based on quantum channels and recovery protocols [28 , 29 ] .
Throughout this work, we consider coherent errors, K α ( ρ ) = K ^ α ρ K ^ α † \mathcal{K}_{\alpha}(\rho)=\hat{K}_{\alpha}\rho\hat{K}_{\alpha}^{\dagger} K α ( ρ ) = K ^ α ρ K ^ α † with K ^ α = exp [ − i ( α / 2 ) ∑ j = 1 N σ j z ] \hat{K}_{\alpha}=\exp[-i(\alpha/2)\sum_{j=1}^{N}\sigma_j^z] K ^ α = exp [ − i ( α /2 ) ∑ j = 1 N σ j z ] , which arise in current quantum devices from calibration imperfections. The output state is then pure, ρ o u t = ∣ ψ o u t ⟩ ⟨ ψ o u t ∣ \rho_{\mathrm{out}}=|\psi_{\mathrm{out}}\rangle\langle\psi_{\mathrm{out}}| ρ out = ∣ ψ out ⟩ ⟨ ψ out ∣ with ∣ ψ o u t ⟩ = U † K ^ U ∣ ψ i n ⟩ |\psi_{\mathrm{out}}\rangle=U^{\dagger}\hat{K}U|\psi_{\mathrm{in}}\rangle ∣ ψ out ⟩ = U † K ^ U ∣ ψ in ⟩ . For Haar-random encoders at code rate r = k / N = 1 / 2 r=k/N=1/2 r = k / N = 1/2 , F F F undergoes an error-resilience phase transition at α c H a a r = 2 arccos ( 2 − 1 / 4 ) ≈ 1.14 \alpha_c^{\mathrm{Haar}}=2\arccos(2^{-1/4})\approx1.14 α c Haar = 2 arccos ( 2 − 1/4 ) ≈ 1.14 : for α < α c H a a r \alpha<\alpha_c^{\mathrm{Haar}} α < α c Haar (α > α c H a a r \alpha>\alpha_c^{\mathrm{Haar}} α > α c Haar ), F → 1 F\to1 F → 1 (F → 0 F\to0 F → 0 ) as N → ∞ N\to\infty N → ∞ , defining the error-protecting (error-vulnerable) phase [7 ] . The transition stems from a competition between two contributions to p p p : the probability that the encoded state is left invariant by K ^ \hat{K} K ^ , which decays as cos 2 N ( α / 2 ) \cos^{2N}(\alpha/2) cos 2 N ( α /2 ) , and the probability that it is rotated into one of the 2 k − 1 2^k-1 2 k − 1 orthogonal logical states, which scales as 2 − N ( 1 − r ) 2^{-N(1-r)} 2 − N ( 1 − r ) . Balancing the two gives cos 2 ( α c H a a r / 2 ) = 2 − ( 1 − r ) \cos^2(\alpha_c^{\mathrm{Haar}}/2)=2^{-(1-r)} cos 2 ( α c Haar /2 ) = 2 − ( 1 − r ) , which reduces to the value above at r = 1 / 2 r=1/2 r = 1/2 .
Since the encoder is drawn from an ensemble E \mathcal{E} E , error resilience is characterized by the average fidelity F ‾ = E U ∼ E [ F ] \overline{F}=\mathbb{E}_{U\sim\mathcal{E}}[F] F = E U ∼ E [ F ] . Computing this quenched average analytically is generally hard since F F F is a ratio of two U U U -dependent quantities, and its ensemble average does not reduce to a finite number of moments of U U U . To circumvent this problem, we consider the annealed fidelity F ~ = E U ∼ E [ ⟨ ψ i n ∣ ρ o u t ∣ ψ i n ⟩ ] / E U ∼ E [ p ] \widetilde{F}=\mathbb{E}_{U\sim\mathcal{E}}[\langle\psi_{\mathrm{in}}|\rho_{\mathrm{out}}|\psi_{\mathrm{in}}\rangle]/\mathbb{E}_{U\sim\mathcal{E}}[p] F = E U ∼ E [⟨ ψ in ∣ ρ out ∣ ψ in ⟩] / E U ∼ E [ p ] , in which numerator and denominator are averaged separately, and depend only on the second unitary moment. In several cases, both are self-averaging, and F ~ \widetilde{F} F , which is tractable analytically, provides quantitative predictions for the quenched average as well [7 ] . Using replica boundary states [7 ] , the annealed fidelity reads
F ~ = Tr [ Φ E ( 2 ) ( K ^ ⊗ K ^ † ) B n u m F ] Tr [ Φ E ( 2 ) ( K ^ ⊗ K ^ † ) B d e n F ] , (2) \widetilde{F}=\frac{\operatorname{Tr}[\Phi_{\mathcal{E}}^{(2)}(\hat{K}\otimes\hat{K}^{\dagger})B_{\mathrm{num}}^{F}]}{\operatorname{Tr}[\Phi_{\mathcal{E}}^{(2)}(\hat{K}\otimes\hat{K}^{\dagger})B_{\mathrm{den}}^{F}]}, \tag*{(2)} F = Tr [ Φ E ( 2 ) ( K ^ ⊗ K ^ † ) B den F ] Tr [ Φ E ( 2 ) ( K ^ ⊗ K ^ † ) B num F ] , (2)
where B n u m F = ρ i n ⊗ 2 B_{\mathrm{num}}^{F}=\rho_{\mathrm{in}}^{\otimes2} B num F = ρ in ⊗ 2 , B d e n F = ρ i n ⊗ ( I X ⊗ ∣ ψ X i n ⟩ ⟨ ψ X i n ∣ ) T ( 1 , 2 ) B_{\mathrm{den}}^{F}=\rho_{\mathrm{in}}\otimes(\mathbb{I}_X\otimes|\psi_X^{\mathrm{in}}\rangle\langle\psi_X^{\mathrm{in}}|)T_{(1,2)} B den F = ρ in ⊗ ( I X ⊗ ∣ ψ X in ⟩ ⟨ ψ X in ∣ ) T ( 1 , 2 ) , T ( 1 , 2 ) T_{(1,2)} T ( 1 , 2 ) is the permutation swapping the two replicas, and Φ E ( 2 ) ( O ^ ) ≡ E U ∼ E [ ( U † ) ⊗ 2 O ^ U ⊗ 2 ] \Phi_{\mathcal{E}}^{(2)}(\hat{O})\equiv\mathbb{E}_{U\sim\mathcal{E}}[(U^{\dagger})^{\otimes2}\hat{O}U^{\otimes2}] Φ E ( 2 ) ( O ^ ) ≡ E U ∼ E [( U † ) ⊗ 2 O ^ U ⊗ 2 ] is the second-moment twirl [30 ] . Since F ~ \widetilde{F} F depends on E \mathcal{E} E only through Φ E ( 2 ) \Phi_{\mathcal{E}}^{(2)} Φ E ( 2 ) , it coincides with its Haar value for any unitary 2-design.
Our goal is to relate error resilience to the randomness of the encoder ensemble. A natural way to quantify the latter is to compare the moments of E \mathcal{E} E with those of the maximally random Haar ensemble. At order t t t , this comparison is captured by the frame potential F E ( t ) = E U , V ∼ E [ ∣ Tr ( U † V ) ∣ 2 t ] \mathcal{F}_{\mathcal{E}}^{(t)}=\mathbb{E}_{U,V\sim\mathcal{E}}[|\operatorname{Tr}(U^{\dagger}V)|^{2t}] F E ( t ) = E U , V ∼ E [ ∣ Tr ( U † V ) ∣ 2 t ] [27 , 31 ] , which satisfies F E ( t ) ≥ F H a a r ( t ) \mathcal{F}_{\mathcal{E}}^{(t)}\geq\mathcal{F}_{\mathrm{Haar}}^{(t)} F E ( t ) ≥ F Haar ( t ) , with equality if and only if E \mathcal{E} E is a unitary t t t -design. Since the annealed fidelity (2) involves only second moments, we focus on t = 2 t=2 t = 2 and define the design excess Δ E ≡ F E ( 2 ) − F H a a r ( 2 ) \Delta_{\mathcal{E}}\equiv\mathcal{F}_{\mathcal{E}}^{(2)}-\mathcal{F}_{\mathrm{Haar}}^{(2)} Δ E ≡ F E ( 2 ) − F Haar ( 2 ) , with F H a a r ( 2 ) = 2 \mathcal{F}_{\mathrm{Haar}}^{(2)}=2 F Haar ( 2 ) = 2 for the Haar measure on U ( d ) U(d) U ( d ) , d = 2 N d=2^N d = 2 N . Equivalently, Δ E \Delta_{\mathcal{E}} Δ E is the squared Hilbert–Schmidt distance between the second-moment operators of E \mathcal{E} E and of the Haar ensemble. We now show that Δ E \Delta_{\mathcal{E}} Δ E controls how far the annealed fidelity can deviate from its Haar value.
In the EED setup of Fig. 1(a), with 1 ≤ k ≤ N 1\leq k\leq N 1 ≤ k ≤ N and a fixed unitary error layer K ^ \hat{K} K ^ , any encoder ensemble E \mathcal{E} E with average postselection probability p ‾ E ≡ E U ∼ E [ p ] > 0 \overline{p}_{\mathcal{E}}\equiv\mathbb{E}_{U\sim\mathcal{E}}[p]>0 p E ≡ E U ∼ E [ p ] > 0 satisfies
Δ E ≥ p ‾ E 2 ∣ F ~ − F ~ H a a r ∣ 2 d 2 ( 1 + D F ~ H a a r 2 − 2 F ~ H a a r ) , (3) \Delta_{\mathcal{E}}\geq\frac{\overline{p}_{\mathcal{E}}^{\,2}|\widetilde{F}-\widetilde{F}_{\mathrm{Haar}}|^2}{d^2(1+D\widetilde{F}_{\mathrm{Haar}}^{\,2}-2\widetilde{F}_{\mathrm{Haar}})}, \tag*{(3)} Δ E ≥ d 2 ( 1 + D F Haar 2 − 2 F Haar ) p E 2 ∣ F − F Haar ∣ 2 , (3)
where D = 2 k D=2^k D = 2 k and F ~ H a a r = ( c + d ) ( d − 1 ) / [ ( c + d ) ( d − 1 ) + ( D − 1 ) ( d 2 − c ) ] \widetilde{F}_{\mathrm{Haar}}=(c+d)(d-1)/[(c+d)(d-1)+(D-1)(d^2-c)] F Haar = ( c + d ) ( d − 1 ) / [( c + d ) ( d − 1 ) + ( D − 1 ) ( d 2 − c )] , with c = ∣ Tr K ^ ∣ 2 c=|\operatorname{Tr}\hat{K}|^2 c = ∣ Tr K ^ ∣ 2 , is the annealed fidelity of Haar-random encoders at the same N N N , k k k , K ^ \hat{K} K ^ , with the same input state and postselection [7 ] . Exact 2-designs (Δ E = 0 \Delta_{\mathcal{E}}=0 Δ E = 0 ) thus reproduce F H a a r F_{\mathrm{Haar}} F Haar , and any deviation from it requires a finite design excess. The same bound holds for encoders restricted to a symmetry class, i.e., to a compact subgroup G ⊂ U ( d ) G\subset U(d) G ⊂ U ( d ) , with F H a a r ( 2 ) F_{\mathrm{Haar}}^{(2)} F Haar ( 2 ) and F ~ H a a r \widetilde{F}_{\mathrm{Haar}} F Haar replaced by their values for the Haar measure on G G G .
To illustrate how this connection manifests in concrete encoders, we study two classes of unitaries U U U : doped matchgate circuits and Hamiltonian time evolution, with input states ∣ ψ i n ⟩ = ∣ 0 ⟩ ⊗ N \lvert\psi_{\mathrm{in}}\rangle=\lvert0\rangle^{\otimes N} ∣ ψ in ⟩ = ∣ 0 ⟩ ⊗ N and the Neel state, respectively. Doped matchgate circuits.— We first consider an undoped random matchgate encoder U M U_{\mathrm{M}} U M [see Fig. 1(b) with t = 0 t=0 t = 0 ]. Via the Jordan–Wigner transformation, parity-preserving matchgates correspond to fermionic Gaussian unitaries
U M = exp [ 1 4 ∑ μ , ν = 1 2 N G μ ν γ μ γ ν ] , U_{\mathrm{M}}=\exp\left[\frac{1}{4}\sum_{\mu,\nu=1}^{2N}G_{\mu\nu}\gamma_\mu\gamma_\nu\right], U M = exp [ 4 1 μ , ν = 1 ∑ 2 N G μν γ μ γ ν ] ,
where G = − G T G=-G^{T} G = − G T is real and γ 2 j − 1 = ( ∏ l < j Z l ) X j \gamma_{2j-1}=\left(\prod_{l<j}Z_l\right)X_j γ 2 j − 1 = ( ∏ l < j Z l ) X j , γ 2 j = ( ∏ l < j Z l ) Y j \gamma_{2j}=\left(\prod_{l<j}Z_l\right)Y_j γ 2 j = ( ∏ l < j Z l ) Y j are Majorana operators, satisfying { γ μ , γ ν } = 2 δ μ ν \{\gamma_\mu,\gamma_\nu\}=2\delta_{\mu\nu} { γ μ , γ ν } = 2 δ μν [20 , 32 , 33 ] . Their Majorana action lies in S O ( 2 N ) SO(2N) S O ( 2 N ) , which can be sampled using Haar-random active fermionic-linear-optics (FLO) circuits [21]. The second-moment average used below is Haar over the full orthogonal Gaussian ensemble O ( 2 N ) O(2N) O ( 2 N ) , obtained by composing these draws with a fixed improper Majorana reflection with probability 1 / 2 1/2 1/2 [19 ] .
The annealed fidelity (2) is exactly computable from the two-copy twirl Φ M ( 2 ) ( O ^ ) ≡ E U M [ ( U M † ) ⊗ 2 O ^ U M ⊗ 2 ] \Phi_{\mathrm{M}}^{(2)}(\hat{O})\equiv\mathbb{E}_{U_{\mathrm{M}}}[(U_{\mathrm{M}}^\dagger)^{\otimes2}\hat{O}U_{\mathrm{M}}^{\otimes2}] Φ M ( 2 ) ( O ^ ) ≡ E U M [( U M † ) ⊗ 2 O ^ U M ⊗ 2 ] [34 , 35 , 36 ] . This is the orthogonal projector onto the two-copy commutant of the O ( 2 N ) O(2N) O ( 2 N ) Gaussian unitaries, which is spanned by 2 N + 1 2N+1 2 N + 1 operators [19 ] , so that
Φ M ( 2 ) ( O ^ ) = ∑ ℓ = 0 2 N Tr ( Υ ℓ O ^ ) Υ ℓ , Υ ℓ = ∑ ∣ S ∣ = ℓ γ S ⊗ γ S 2 N ( 2 N ℓ ) , \Phi_{\mathrm{M}}^{(2)}(\hat{O})=\sum_{\ell=0}^{2N}\operatorname{Tr}(\Upsilon_\ell\hat{O})\Upsilon_\ell,\qquad\Upsilon_\ell=\frac{\sum_{\lvert S\rvert=\ell}\gamma_S\otimes\gamma_S}{2^N\sqrt{\binom{2N}{\ell}}}, Φ M ( 2 ) ( O ^ ) = ℓ = 0 ∑ 2 N Tr ( Υ ℓ O ^ ) Υ ℓ , Υ ℓ = 2 N ( ℓ 2 N ) ∑ ∣ S ∣ = ℓ γ S ⊗ γ S ,
where γ S = ∏ μ ∈ S γ μ \gamma_S=\prod_{\mu\in S}\gamma_\mu γ S = ∏ μ ∈ S γ μ for S ⊆ { 1 , … , 2 N } S\subseteq\{1,\ldots,2N\} S ⊆ { 1 , … , 2 N } , and Tr ( Υ ℓ Υ ℓ ′ ) = δ ℓ ℓ ′ \operatorname{Tr}(\Upsilon_\ell\Upsilon_{\ell'})=\delta_{\ell\ell'} Tr ( Υ ℓ Υ ℓ ′ ) = δ ℓ ℓ ′ . Since K ^ = ∏ j [ cos ( α / 2 ) − sin ( α / 2 ) γ 2 j − 1 γ 2 j ] \hat{K}=\prod_j[\cos(\alpha/2)-\sin(\alpha/2)\gamma_{2j-1}\gamma_{2j}] K ^ = ∏ j [ cos ( α /2 ) − sin ( α /2 ) γ 2 j − 1 γ 2 j ] , only even shells contribute, Φ M ( 2 ) ( K ^ ⊗ K ^ † ) = d ∑ m = 0 N s 2 m Υ 2 m \Phi_{\mathrm{M}}^{(2)}(\hat{K}\otimes\hat{K}^{\dagger})=d\sum_{m=0}^{N}s_{2m}\Upsilon_{2m} Φ M ( 2 ) ( K ^ ⊗ K ^ † ) = d ∑ m = 0 N s 2 m Υ 2 m , and Eq. (2) becomes
F ~ M = ∑ m = 0 N s 2 m N 2 m ∑ m = 0 N s 2 m D 2 m , (4) \widetilde{F}_{\mathrm{M}}=\frac{\sum_{m=0}^{N}s_{2m}N_{2m}}{\sum_{m=0}^{N}s_{2m}D_{2m}}, \tag*{(4)} F M = ∑ m = 0 N s 2 m D 2 m ∑ m = 0 N s 2 m N 2 m , (4)
with N 2 m ≡ Tr ( Υ 2 m B n u m F ) N_{2m}\equiv\operatorname{Tr}(\Upsilon_{2m}B_{\mathrm{num}}^{F}) N 2 m ≡ Tr ( Υ 2 m B num F ) and D 2 m ≡ Tr ( Υ 2 m B d e n F ) D_{2m}\equiv\operatorname{Tr}(\Upsilon_{2m}B_{\mathrm{den}}^{F}) D 2 m ≡ Tr ( Υ 2 m B den F ) . As detailed in the Supplementary Material, for logical and ancilla qubits initialized in the computational basis we find
D 2 m = 2 − N ( 2 N 2 m ) − 1 / 2 ( − 1 ) m ∑ m ′ = 0 min ( m , N − k ) ( N − k m ′ ) ( 2 k 2 ( m − m ′ ) ) , D_{2m}=2^{-N}\binom{2N}{2m}^{-1/2}(-1)^m\sum_{m'=0}^{\min(m,N-k)}\binom{N-k}{m'}\binom{2k}{2(m-m')}, D 2 m = 2 − N ( 2 m 2 N ) − 1/2 ( − 1 ) m m ′ = 0 ∑ m i n ( m , N − k ) ( m ′ N − k ) ( 2 ( m − m ′ ) 2 k ) ,
s 2 m = ( 2 N 2 m ) − 1 / 2 ( N m ) ( − 1 ) m ( cos 2 α 2 ) N − m ( sin 2 α 2 ) m , s_{2m}=\binom{2N}{2m}^{-1/2}\binom{N}{m}(-1)^m\left(\cos^2\frac{\alpha}{2}\right)^{N-m}\left(\sin^2\frac{\alpha}{2}\right)^m, s 2 m = ( 2 m 2 N ) − 1/2 ( m N ) ( − 1 ) m ( cos 2 2 α ) N − m ( sin 2 2 α ) m ,
N 2 m = 2 − N ( 2 N 2 m ) − 1 / 2 ( N m ) ( − 1 ) m , (5) N_{2m}=2^{-N}\binom{2N}{2m}^{-1/2}\binom{N}{m}(-1)^m, \tag*{(5)} N 2 m = 2 − N ( 2 m 2 N ) − 1/2 ( m N ) ( − 1 ) m , (5)
where we notice that the signs ( − 1 ) m (-1)^m ( − 1 ) m cancel in Eq. (5), so that all terms are positive.
Figure 2(a) shows F ~ M \widetilde{F}_{\mathrm{M}} F M as a function of the error strength α \alpha α for code rate r = k / N = 1 / 2 r=k/N=1/2 r = k / N = 1/2 and different system sizes N N N (solid lines). Here, in the following, whenever the encoder is random, numerical data for F F F (markers) are averaged over its realizations, i.e., they give the quenched average F ‾ = E U ∼ E [ F ] \overline{F}=\mathbb{E}_{U\sim\mathcal{E}}[F] F = E U ∼ E [ F ] , obtained here from FLO simulations. The annealed and quenched fidelities agree well, with ∣ F ‾ − F ~ M ∣ < 10 − 2 \lvert\overline{F}-\widetilde{F}_{\mathrm{M}}\rvert<10^{-2} ∣ F − F M ∣ < 1 0 − 2 (see Supplementary Material). With increasing N N N , the fidelity drops at increasingly small α \alpha α , and Eq. (5) gives F ~ M → 0 \widetilde{F}_{\mathrm{M}}\to0 F M → 0 as N → ∞ N\to\infty N → ∞ for every fixed 0 < α < π 0<\alpha<\pi 0 < α < π (see Supplementary Material). Random matchgate encoders therefore do not support a stable error-protecting phase.
Next, we study the EED setup with doped matchgate circuits U D U_{\mathrm{D}} U D in Fig. 1(b), i.e., U D = [ ∏ i = 1 n d ( U M ( i ) A ) ] U M ( 0 ) U_{\mathrm{D}}=\left[\prod_{i=1}^{n_d}(U_{\mathrm{M}}^{(i)}A)\right]U_{\mathrm{M}}^{(0)} U D = [ ∏ i = 1 n d ( U M ( i ) A ) ] U M ( 0 ) , with U M ( i ) U_{\mathrm{M}}^{(i)} U M ( i ) (i = 0 , 1 , … , n d i=0,1,\ldots,n_d i = 0 , 1 , … , n d ) being independent draws from the matchgate ensemble and A = exp [ − i ( π / 4 ) Z 1 Z 2 ] A=\exp[-i(\pi/4)Z_1Z_2] A = exp [ − i ( π /4 ) Z 1 Z 2 ] referring to the non-Gaussian doping gate [37 ] . Increasing the density of non-Gaussian gates breaks the fermionic Gaussian structure of the matchgate circuits [38 , 39 , 40 ] and drives the circuit ensemble toward an approximate symmetry-resolved unitary 2-design [22 ] . By using the doped matchgate twirl in Ref. [22 ] (also see Supplementary Material), the annealed fidelity for the EED circuits can be analytically expressed as
F ~ D = ∑ r , m = 0 N N 2 r ( Γ n d ) r , m s 2 m ∑ r , m = 0 N D 2 r ( Γ n d ) r , m s 2 m , (6) \widetilde{F}_{\mathrm{D}} = \frac{\sum_{r,m=0}^{N} N_{2r}(\Gamma^{n_d})_{r,m}s_{2m}}{\sum_{r,m=0}^{N} D_{2r}(\Gamma^{n_d})_{r,m}s_{2m}}, \tag*{(6)} F D = ∑ r , m = 0 N D 2 r ( Γ n d ) r , m s 2 m ∑ r , m = 0 N N 2 r ( Γ n d ) r , m s 2 m , (6)
which reduces to Eq. (5) for n d = 0 n_d = 0 n d = 0 . Here, s 2 m s_{2m} s 2 m , N 2 m N_{2m} N 2 m , and D 2 m D_{2m} D 2 m are defined in Eq. (6), n d n_d n d is the number of non-Gaussian doping gates, and Γ r , m = C 2 r , 2 m \Gamma_{r,m} = C_{2r,2m} Γ r , m = C 2 r , 2 m is the even-shell transfer matrix, cf. Supplementary Material for details.
Based on the analytical expression of F ~ \widetilde{F} F in Eq. (7), we plot F ~ \widetilde{F} F as a function of error strength α \alpha α with N = 20 N = 20 N = 20 and different n d / N n_d/N n d / N in Figure 2 (b). With increasing n d n_d n d , in the regime α < α c H a a r \alpha< \alpha_c^{\mathrm{Haar}} α < α c Haar , F ~ \widetilde{F} F increases toward its large-doping limit, indicating enhanced error resilience. The same tendency is observed for N = 100 N = 100 N = 100 [inset of Fig. 2(b)], consistent with the stabilization of an error-protecting phase in the thermodynamic limit when n d n_d n d grows sufficiently rapidly with N N N .
Figure 2. (a) For EED matchgate circuits without non-Gaussian doping gates, the fidelity versus error strength α \alpha α . Markers show the fidelity F F F in Eq. (1), while solid lines show the annealed fidelity F ~ \widetilde{F} F in Eq. (2). (b) For doped matchgate circuits with N = 20 N=20 N = 20 , the fidelity versus α \alpha α ; the inset shows N = 100 N=100 N = 100 . Markers and lines show F F F and F ~ \widetilde{F} F from Eq. (7), and dashed lines show the Haar result. (c) The value of ∣ Δ F ~ ∣ \lvert\Delta\widetilde{F}\rvert ∣ Δ F ∣ as a function of the number of non-Gaussian doping gates n d n_d n d with different system sizes N N N . The inset of (c) shows a data collapse of ∣ Δ F ~ ∣ \lvert\Delta\widetilde{F}\rvert ∣ Δ F ∣ with the form of the function ∣ Δ F ~ ∣ = f [ n d / N − a log ( N / N 0 ) ] \lvert\Delta\widetilde{F}\rvert=f[n_d/N-a\log(N/N_0)] ∣ Δ F ∣ = f [ n d / N − a log ( N / N 0 )] with a ≃ 0.26 a\simeq0.26 a ≃ 0.26 and N 0 ≃ 100 N_0\simeq100 N 0 ≃ 100 .
We quantify this restoration of error resilience by the protected-window average of the fidelity deviation from the Haar result, defined as ∣ Δ F ~ ∣ = 1 α c H a a r ∫ 0 α c H a a r d α ∣ F ~ D ( α ) − F ~ H a a r ( α ) ∣ |\Delta\widetilde{F}| = \frac{1}{\alpha_c^{\mathrm{Haar}}}\int_{0}^{\alpha_c^{\mathrm{Haar}}}d\alpha|\widetilde{F}_{\mathrm{D}}(\alpha) - \widetilde{F}_{\mathrm{Haar}}(\alpha)| ∣Δ F ∣ = α c Haar 1 ∫ 0 α c Haar d α ∣ F D ( α ) − F Haar ( α ) ∣ . Figure 2 (c) shows that ∣ Δ F ~ ∣ |\Delta\widetilde{F}| ∣Δ F ∣ decays approximately as e − 4 τ e^{-4\tau} e − 4 τ in the late-doping regime shown, with τ = n d / N \tau= n_d/N τ = n d / N . Remarkably, this is the same late-doping slope as the excess second unitary frame potential above the symmetry-constrained Haar value [22 ] . Moreover, in the inset of Figure 2 (c), we show a data collapse following the form ∣ Δ F ~ ∣ ≃ f [ n d / N − a log ( N / N 0 ) ] |\Delta\widetilde{F}| \simeq f[n_d/N - a\log(N/N_0)] ∣Δ F ∣ ≃ f [ n d / N − a log ( N / N 0 )] , indicating that a fixed averaged fidelity deviation ∣ Δ F ~ ∣ |\Delta\widetilde{F}| ∣Δ F ∣ can be reached on the scale n d ∼ N log N n_d \sim N\log N n d ∼ N log N . This is particularly suggestive because Ref. [22 ] establishes Ω ( N log N ) \Omega(N\log N) Ω ( N log N ) as a lower bound for approximate unitary 2-design formation within this symmetry class in the same doped-matchgate architecture. An analytic explanation of the common slope is given in the End Matter.
Hamiltonian dynamics.— Finally, we study the EED protocol with encoders generated by time-independent Hamiltonian dynamics, U = exp ( − i H t ) U = \exp(-iHt) U = exp ( − i H t ) [Fig. 1(c)].
We first consider a non-integrable quantum Ising model [25 , 41 ] H I s i n g = − ∑ i = 1 N − 1 X i X i + 1 − ∑ i = 1 N − 2 X i X i + 2 − ∑ i = 1 N Z i H_{\mathrm{Ising}} = -\sum_{i=1}^{N-1}X_iX_{i+1} - \sum_{i=1}^{N-2}X_iX_{i+2} - \sum_{i=1}^{N}Z_i H Ising = − ∑ i = 1 N − 1 X i X i + 1 − ∑ i = 1 N − 2 X i X i + 2 − ∑ i = 1 N Z i . The Néel state has zero energy, ⟨ H I s i n g ⟩ = Tr ( H I s i n g ) / d = 0 \langle H_{\mathrm{Ising}}\rangle= \operatorname{Tr}(H_{\mathrm{Ising}})/d = 0 ⟨ H Ising ⟩ = Tr ( H Ising ) / d = 0 , and thus thermalizes to infinite temperature: its half-chain entanglement entropy S = − Tr ρ A log ρ A S = -\operatorname{Tr}\rho_A\log\rho_A S = − Tr ρ A log ρ A , with ρ A \rho_A ρ A the reduced density matrix for the half chain, rapidly approaches the Page value S P ≃ ( N log 2 − 1 ) / 2 S_{\mathrm{P}} \simeq(N\log2 - 1)/2 S P ≃ ( N log 2 − 1 ) /2 [42 , 43 ] , a clear signature of quantum thermalization [44 , 45 , 46 , 47 , 48 ] [see the inset of Figure 3 (a)].
Figure 3. (a) Fidelity F F F , Eq. (1), versus error strength α \alpha α for the EED quantum evolution with the Ising Hamiltonian dynamics as the encoder, for different system sizes N N N . The inset shows the dynamics of the half-chain entanglement entropy. (b) Same as (a), but with GUE Hamiltonian dynamics as the encoder. Markers show the quenched average F ‾ \overline{F} F of the fidelity (1), while solid lines show the annealed fidelity F ~ G U E \widetilde{F}_{\mathrm{GUE}} F GUE , Eq. (8). The inset shows the data collapse of F ~ G U E \widetilde{F}_{\mathrm{GUE}} F GUE as a function of ( α − α c ) N 1 / ν (\alpha-\alpha_c)N^{1/\nu} ( α − α c ) N 1/ ν .
For the EED quantum evolution with the encoding unitary U = exp ( − i H I s i n g t ) U = \exp(-iH_{\mathrm{Ising}}t) U = exp ( − i H Ising t ) and t = 6 N t = 6N t = 6 N , we numerically calculate the fidelity (1), see Figure 3 (a). Unlike the previous examples, the encoder is now a single deterministic unitary, and no ensemble average is involved. Similar to the case of undoped matchgate circuits, there is no stable error-protecting phase, in which F → 1 F \to1 F → 1 with increasing N N N , and no signature of the error-resilience phase transition observed for Haar-random encoders. Thermalization of the encoded state, even at infinite temperature, is therefore not sufficient for error resilience. While the numerator of F F F depends only on the evolved state U ∣ ψ i n ⟩ U|\psi_{\mathrm{in}}\rangle U ∣ ψ in ⟩ , the postselection probability p p p depends on how the decoder U † U^\dagger U † acts on the error-affected state, and thus probes the randomness of U U U itself. At this level, local Hamiltonian dynamics is insufficiently random: even ensembles of constant-local Hamiltonians fail to form 2-designs at an evolution time [49 ] . In contrast, for the ensemble generated by the unitary dynamics of a GUE Hamiltonian, approximate 2-designs can emerge [23 ] .
To further clarify the role of approximate 2-designs in the emergence of error resilience, we consider the encoding unitary U = exp ( − i H G U E t ) U = \exp(-iH_{\mathrm{GUE}}t) U = exp ( − i H GUE t ) at t = d t = \sqrt{d} t = d , an appropriate time for approximate 2-designs [23 ] . For this setup, the annealed fidelity can be derived analytically as
F ~ G U E = ∑ σ , τ ∈ S 4 W g d ( σ , τ ) [ ∏ c cyc ( γ ) g N ( c ) ] R τ ∑ σ , τ ∈ S 4 W g d ( σ , τ ) [ ∏ c cyc ( γ ) g D ( c ) ] R τ , (7) \widetilde{F}_{\mathrm{GUE}} = \frac{\sum_{\sigma,\tau\in S_4}W_{\mathrm{gd}}(\sigma,\tau)\left[\prod_c\operatorname{cyc}(\gamma)g_{\mathrm{N}}(c)\right]\mathcal{R}_{\tau}}{\sum_{\sigma,\tau\in S_4}W_{\mathrm{gd}}(\sigma,\tau)\left[\prod_c\operatorname{cyc}(\gamma)g_{\mathrm{D}}(c)\right]\mathcal{R}_{\tau}}, \tag*{(7)} F GUE = ∑ σ , τ ∈ S 4 W gd ( σ , τ ) [ ∏ c cyc ( γ ) g D ( c ) ] R τ ∑ σ , τ ∈ S 4 W gd ( σ , τ ) [ ∏ c cyc ( γ ) g N ( c ) ] R τ , (7)
where W g d ( σ , τ ) W_{\mathrm{gd}}(\sigma,\tau) W gd ( σ , τ ) is the S 4 S_4 S 4 Weingarten matrix [50 ] , R τ \mathcal{R}_{\tau} R τ , as a function of t t t , is the GUE spectral factor from Ref. [23 ] , and γ = ( 1234 ) \gamma= (1234) γ = ( 1234 ) . The numerator and denominator differ only in the cycle factors g N ( c ) g_{\mathrm{N}}(c) g N ( c ) and g D ( c ) g_{\mathrm{D}}(c) g D ( c ) . The details of the derivation and the expressions of g N ( c ) g_{\mathrm{N}}(c) g N ( c ) , g D ( c ) g_{\mathrm{D}}(c) g D ( c ) , and R τ \mathcal{R}_{\tau} R τ are provided in the Supplementary Material.
In Figure 3 (b), we plot the fidelity for the EED with GUE Hamiltonian dynamics. As in the Haar-random case [7 ] , we observe a clear signature of a phase transition between the error-protecting and error-vulnerable phases, where the fidelity tends to 1 and 0, respectively. A data collapse of the form F ~ G U E = f [ ( α − α c ) N 1 / ν ] \widetilde{F}_{\mathrm{GUE}}=f[(\alpha-\alpha_c)N^{1/\nu}] F GUE = f [( α − α c ) N 1/ ν ] gives the transition point α c ≃ 1.14 \alpha_c\simeq1.14 α c ≃ 1.14 , in agreement with α H a a r \alpha_{\mathrm{Haar}} α Haar , and the critical exponent ν ≃ 1.02 \nu\simeq1.02 ν ≃ 1.02 [see the inset of Figure 3 (b)].
Figure 3 separates conventional thermalization from Haar-like error resilience by contrasting a clean non-integrable Ising model with GUE Hamiltonian dynamics. We now tackle this contrast in an experimentally motivated all-to-all model. Specifically, we consider the Hamiltonian
H = ∑ i < j N J i j ( W ) ( X i X j + Y i Y j ) + H F , (8) H=\sum_{i<j}^{N}J_{ij}(W)(X_iX_j+Y_iY_j)+H_F, \tag*{(8)} H = i < j ∑ N J ij ( W ) ( X i X j + Y i Y j ) + H F , (8)
where H F = ∑ i = 1 N ( h i x X i + h i y Y i + h i z Z i ) H_F=\sum_{i=1}^{N}(h_i^xX_i+h_i^yY_i+h_i^zZ_i) H F = ∑ i = 1 N ( h i x X i + h i y Y i + h i z Z i ) is the local-field Hamiltonian with h i x , y , z h_i^{x,y,z} h i x , y , z independently drawn from the uniform distribution on [ − 3 / 2 , 3 / 2 ] [-\sqrt{3}/2,\sqrt{3}/2] [ − 3 /2 , 3 /2 ] , and the all-to-all coupling matrix is J i j ( W ) = − 1 / N + η i j / N J_{ij}(W)=-1/N+\eta_{ij}/\sqrt{N} J ij ( W ) = − 1/ N + η ij / N with η i j \eta_{ij} η ij independently drawn from the uniform distribution on [ − W , W ] [-W,W] [ − W , W ] . At W = 0 W=0 W = 0 , the coupling matrix is uniform and the interaction term is permutation-symmetric. A finite W W W breaks this symmetry, and increasing it makes the encoder more random. Related 2-local all-to-all X Y XY X Y Hamiltonians have been implemented in atomic cavity QED [51 , 52 , 53 ] and with superconducting qubits coupled to a common bus resonator [54 ] .
Figure 4 (a) shows the EED fidelity F F F for the unitary dynamics of Eq. (9) as the encoder, with N = 20 N=20 N = 20 and evolution time t = 10 t=10 t = 10 . Increasing W W W systematically shifts the fidelity curves towards the Haar result, as quantified by the rapid suppression of the averaged fidelity deviation ∣ Δ F ∣ = 1 α H a a r ∫ 0 α H a a r d α ∣ F ( α ) − F H a a r ( α ) ∣ |\Delta F|=\frac{1}{\alpha_{\mathrm{Haar}}}\int_{0}^{\alpha_{\mathrm{Haar}}}d\alpha|F(\alpha)-F_{\mathrm{Haar}}(\alpha)| ∣Δ F ∣ = α Haar 1 ∫ 0 α Haar d α ∣ F ( α ) − F Haar ( α ) ∣ [see Figure 4 (b)]. Crucially, this behavior is accompanied by the approach toward unitary 2-design behavior. The inset of Figure 4 (b) shows the design excess Δ E = F E ( 2 ) − 2 \Delta_{\mathcal{E}}=\mathcal{F}_{\mathcal{E}}^{(2)}-2 Δ E = F E ( 2 ) − 2 for the ensemble E \mathcal{E} E generated by the unitary dynamics of Hamiltonian (9) over disorder realizations. Δ E \Delta_{\mathcal{E}} Δ E is suppressed by several orders of magnitude when W W W increases, closely tracking the decay of ∣ Δ F ∣ |\Delta F| ∣Δ F ∣ .
Figure 4. (a) Fidelity F F F , Eq. (1), versus error strength α \alpha α for the EED quantum evolution generated by Hamiltonian (9), for different disorder strengths at N = 20 N=20 N = 20 . Dashed lines show the Haar-random result from Ref. [7 ] . (b) Averaged absolute fidelity deviation ∣ Δ F ∣ |\Delta F| ∣Δ F ∣ versus W W W for different system sizes. The inset shows the design excess Δ E = F E ( 2 ) − 2 \Delta_{\mathcal{E}}=\mathcal{F}_{\mathcal{E}}^{(2)}-2 Δ E = F E ( 2 ) − 2 versus W W W at N = 12 N=12 N = 12 . All results are averaged over 200 disorder realizations.
Discussion. – In summary, we have connected the error resilience in the EED setup to second-moment randomness through a universal witness and complementary circuit and Hamiltonian examples. For purely Gaussian matchgate encoders, the error-protecting regime disappears in the thermodynamic limit at any finite coherent-error strength. Adding non-Gaussian gates restores it: the second-moment channel approaches its Haar form, and the EED fidelity converges to the Haar result exponentially in n d / N n_d/N n d / N . A similar picture holds for Hamiltonian encoders. The dynamics of a clean non-integrable Ising model thermalizes without stabilizing an error-protecting regime, whereas GUE Hamiltonian dynamics reproduces the Haar-like fidelity transition. Finally, in an experimentally motivated random all-to-all X Y XY X Y model, suppression of the excess second frame potential closely tracks recovery of Haar-like EED behavior.
Our inequality provides a general diagnostic of deviations from unitary 2-design behavior, applicable to encoder ensembles generated by random quantum circuits or Hamiltonian dynamics [55 , 56 , 57 , 58 , 59 , 60 ] . More broadly, conventional diagnostics of thermalization and chaos, such as random-matrix level statistics [61 , 62 ] and the growth of entanglement entropies [63 , 64 ] , cannot resolve the convergence of the second-moment channel to its Haar form [65 , 66 ] , and exact evaluation of unitary frame potentials is #P-hard [67 ] . Estimating the EED fidelity, in contrast, requires only recovery and postselection measurements, avoiding reconstruction of the full second-moment channel. Implementing the EED protocol on programmable quantum simulators thus offers a practical route to witnessing deviations from unitary 2-design behavior, building on recent experimental advances in quantum pseudorandomness and scrambling [68 , 69 , 70 , 71 , 72 ] .
Acknowledgments
Acknowledgments. – X.T. acknowledges support from DFG under Germany’s Excellence Strategy – Cluster of Excellence Matter and Light for Quantum Computing (ML4Q) EXC 2004/2 – 390534769, and DFG Collaborative Research Center (CRC) 183 Project No. 277101999 - project B01, and DFG Emmy Noether Programme proposal “Digital Quantum Matter Out-of-Equilibrium” No. 560726973. P.S. acknowledges fellowship within the “Generación D” initiative, Red.es, Ministerio para la Transformación Digital y de la Función Pública, for talent attraction (C005/24-ED CV1), funded by the European Union NextGenerationEU funds, through PRTR.
AI statement. — We used Claude Opus 5.5 (Anthropic) to improve the writing and presentation of the manuscript. The authors reviewed all suggested changes and take full responsibility for the content and results of this work.
End matter.
Second-moment witness and proof of (23) .
We use the same input, error layer, and ancilla projection as in the main text. Set ρ i n = ∣ ψ i n ⟩ ⟨ ψ i n ∣ \rho_{\mathrm{in}} = |\psi_{\mathrm{in}}\rangle\langle\psi_{\mathrm{in}}| ρ in = ∣ ψ in ⟩ ⟨ ψ in ∣ , Π X ‾ = I X ⊗ ∣ ψ X ‾ i n ⟩ ⟨ ψ X ‾ i n ∣ \Pi_{\overline{X}} = I_X \otimes|\psi_{\overline{X}}^{\mathrm{in}}\rangle\langle\psi_{\overline{X}}^{\mathrm{in}}| Π X = I X ⊗ ∣ ψ X in ⟩ ⟨ ψ X in ∣ , and T = T ( 1 , 2 ) T = T_{(1,2)} T = T ( 1 , 2 ) . The postselection projector Π X ‾ \Pi_{\overline{X}} Π X acts on the full N N N -qubit Hilbert space. Thus Π X ‾ ρ i n = ρ i n \Pi_{\overline{X}}\rho_{\mathrm{in}} = \rho_{\mathrm{in}} Π X ρ in = ρ in , Tr [ Π X ‾ ] = D = 2 k \operatorname{Tr}[\Pi_{\overline{X}}] = D = 2^k Tr [ Π X ] = D = 2 k , and Tr ρ i n = Tr ρ i n 2 = 1 \operatorname{Tr}\rho_{\mathrm{in}} = \operatorname{Tr}\rho_{\mathrm{in}}^2 = 1 Tr ρ in = Tr ρ in 2 = 1 . For each encoder, we define n U = Tr ( ρ i n ρ o u t ) n_U = \operatorname{Tr}(\rho_{\mathrm{in}}\rho_{\mathrm{out}}) n U = Tr ( ρ in ρ out ) , p U = Tr ( Π X ‾ ρ o u t ) p_U = \operatorname{Tr}(\Pi_{\overline{X}}\rho_{\mathrm{out}}) p U = Tr ( Π X ρ out ) , and the EED fidelity is F = n U / p U F = n_U/p_U F = n U / p U when p U > 0 p_U > 0 p U > 0 ; for p U = 0 p_U = 0 p U = 0 we set F = 0 F = 0 F = 0 in ensemble averages, since n U = 0 n_U = 0 n U = 0 .
With n ˉ E = E n U \bar n_{\mathcal{E}} = \mathbb{E}n_U n ˉ E = E n U and p ˉ E = E p U > 0 \bar p_{\mathcal{E}} = \mathbb{E}p_U > 0 p ˉ E = E p U > 0 , the precise relation to the fidelity in Eq. (1) is
F ~ = n ˉ E p ˉ E = E [ p U F ] p ˉ E , F ~ − F ‾ = Cov ( p U , F ) p ˉ E . (9) \widetilde F = \frac{\bar n_{\mathcal{E}}}{\bar p_{\mathcal{E}}} = \frac{\mathbb{E}[p_U F]}{\bar p_{\mathcal{E}}}, \qquad\widetilde F - \overline F = \frac{\operatorname{Cov}(p_U,F)}{\bar p_{\mathcal{E}}}. \tag*{(9)} F = p ˉ E n ˉ E = p ˉ E E [ p U F ] , F − F = p ˉ E Cov ( p U , F ) . (9)
Thus F ~ \widetilde F F is obtained by pooling accepted trials with independently sampled encoders.
To exhibit the second moments explicitly, let A K = K ^ ⊗ K ^ † A_K = \widehat K \otimes\widehat K^\dagger A K = K ⊗ K † , reserving A A A for the doping gate. The identity Tr [ ( X ⊗ Y ) T ] = Tr ( X Y ) \operatorname{Tr}[(X\otimes Y)T] = \operatorname{Tr}(XY) Tr [( X ⊗ Y ) T ] = Tr ( X Y ) gives
n ˉ E = Tr [ Φ E ( 2 ) ( A K ) B n u m F ] , \bar n_{\mathcal{E}} = \operatorname{Tr}\left[\Phi_{\mathcal{E}}^{(2)}(A_K)B_{\mathrm{num}}^F\right], n ˉ E = Tr [ Φ E ( 2 ) ( A K ) B num F ] ,
p ˉ E = Tr [ Φ E ( 2 ) ( A K ) B d e n F ] , B n u m F = ρ i n ⊗ 2 , B d e n F = ( ρ i n ⊗ Π X ‾ ) T . (10) \bar p_{\mathcal{E}} = \operatorname{Tr}\left[\Phi_{\mathcal{E}}^{(2)}(A_K)B_{\mathrm{den}}^F\right],
\qquad
B_{\mathrm{num}}^F = \rho_{\mathrm{in}}^{\otimes2},
\qquad
B_{\mathrm{den}}^F = (\rho_{\mathrm{in}}\otimes\Pi_{\overline{X}})T. \tag*{(10)} p ˉ E = Tr [ Φ E ( 2 ) ( A K ) B den F ] , B num F = ρ in ⊗ 2 , B den F = ( ρ in ⊗ Π X ) T . (10)
We use linear vectorization with ⟨ ⟨ X ∣ Y ⟩ ⟩ = Tr ( X † Y ) \langle\langle X|Y\rangle\rangle= \operatorname{Tr}(X^\dagger Y) ⟨⟨ X ∣ Y ⟩⟩ = Tr ( X † Y ) , and denote the matrix of Φ E ( 2 ) \Phi_{\mathcal{E}}^{(2)} Φ E ( 2 ) in this operator space by M E M_{\mathcal{E}} M E . The Hilbert–Schmidt norm of this matrix is its Frobenius norm, not the induced norm of the channel. For independent U , V U,V U , V ,
∥ M E ∥ H S 2 = E U , V ∣ Tr ( U † V ) ∣ 4 = F E ( 2 ) , \|M_{\mathcal{E}}\|_{\mathrm{HS}}^2 = \mathbb{E}_{U,V}|\operatorname{Tr}(U^\dagger V)|^4 = \mathcal{F}_{\mathcal{E}}^{(2)}, ∥ M E ∥ HS 2 = E U , V ∣ Tr ( U † V ) ∣ 4 = F E ( 2 ) ,
∥ M E − M H a a r ∥ H S 2 = F E ( 2 ) − 2 = Δ E . (11) \|M_{\mathcal{E}}-M_{\mathrm{Haar}}\|_{\mathrm{HS}}^2 = \mathcal{F}_{\mathcal{E}}^{(2)}-2 = \Delta_{\mathcal{E}}. \tag*{(11)} ∥ M E − M Haar ∥ HS 2 = F E ( 2 ) − 2 = Δ E . (11)
Indeed, Haar invariance implies M H a a r 2 = M H a a r = M H a a r † M_{\mathrm{Haar}}^2 = M_{\mathrm{Haar}} = M_{\mathrm{Haar}}^\dagger M Haar 2 = M Haar = M Haar † and M H a a r M E = M E M H a a r = M H a a r M_{\mathrm{Haar}}M_{\mathcal{E}} = M_{\mathcal{E}}M_{\mathrm{Haar}} = M_{\mathrm{Haar}} M Haar M E = M E M Haar = M Haar . The range of M H a a r M_{\mathrm{Haar}} M Haar is spanned by I I I and T T T , so its rank is two. Expanding the squared norm yields the second identity, the standard relation between the frame potential and the Hilbert–Schmidt distance of the second-moment operators [27 ] .
Write f = F ~ H a a r f = \widetilde F_{\mathrm{Haar}} f = F Haar , B f = B n u m F − f B d e n F B_f = B_{\mathrm{num}}^F - fB_{\mathrm{den}}^F B f = B num F − f B den F , and Δ Φ = Φ E ( 2 ) − Φ H a a r ( 2 ) \Delta\Phi= \Phi_{\mathcal{E}}^{(2)} - \Phi_{\mathrm{Haar}}^{(2)} ΔΦ = Φ E ( 2 ) − Φ Haar ( 2 ) . Since the Haar contraction with B f B_f B f vanishes, Eq. (10) gives the exact contrast
p ˉ E ( F ~ − f ) = Tr [ Δ Φ ( A K ) B f ] . (12) \bar p_{\mathcal{E}}(\widetilde F-f) = \operatorname{Tr}[\Delta\Phi(A_K)B_f]. \tag*{(12)} p ˉ E ( F − f ) = Tr [ ΔΦ ( A K ) B f ] . (12)
Unitarity of K ^ \widehat K K gives ∥ A K ∥ H S = d \|A_K\|_{\mathrm{HS}} = d ∥ A K ∥ HS = d . Purity of the input and Π X ‾ ρ i n = ρ i n \Pi_{\overline{X}}\rho_{\mathrm{in}} = \rho_{\mathrm{in}} Π X ρ in = ρ in give
∥ B n u m F ∥ H S 2 = 1 , ∥ B d e n F ∥ H S 2 = D , \|B_{\mathrm{num}}^F\|_{\mathrm{HS}}^2 = 1, \qquad\|B_{\mathrm{den}}^F\|_{\mathrm{HS}}^2 = D, ∥ B num F ∥ HS 2 = 1 , ∥ B den F ∥ HS 2 = D ,
Tr [ ( B n u m F ) † B d e n F ] = 1 , ∥ B f ∥ H S 2 = 1 + D f 2 − 2 f . (13) \operatorname{Tr}[(B_{\mathrm{num}}^F)^\dagger B_{\mathrm{den}}^F] = 1, \qquad\|B_f\|_{\mathrm{HS}}^2 = 1 + Df^2 - 2f. \tag*{(13)} Tr [( B num F ) † B den F ] = 1 , ∥ B f ∥ HS 2 = 1 + D f 2 − 2 f . (13)
Cauchy–Schwarz in operator space and the inequality between induced and Frobenius norms now yield
∣ p ˉ E ( F ~ − f ) ∣ ≤ ∥ B f ∥ H S ∥ Δ Φ ( A K ) ∥ H S ≤ d 1 + D f 2 − 2 f Δ E . (14) \left|\bar p_{\mathcal{E}}(\widetilde F-f)\right| \le\|B_f\|_{\mathrm{HS}}\|\Delta\Phi(A_K)\|_{\mathrm{HS}}
\le d\sqrt{1+Df^2-2f}\sqrt{\Delta_{\mathcal{E}}}. \tag*{(14)} p ˉ E ( F − f ) ≤ ∥ B f ∥ HS ∥ΔΦ ( A K ) ∥ HS ≤ d 1 + D f 2 − 2 f Δ E . (14)
For k > 0 k>0 k > 0 , 1 + D f 2 − 2 f = ( 1 − f ) 2 + ( D − 1 ) f 2 > 0 1+Df^2-2f=(1-f)^2+(D-1)f^2>0 1 + D f 2 − 2 f = ( 1 − f ) 2 + ( D − 1 ) f 2 > 0 . Squaring and dividing proves Eq. (3) for any encoder distribution with p ˉ E > 0 \bar p_{\mathcal{E}}>0 p ˉ E > 0 and any fixed unitary error layer.
Shell sectors and the dark gap mode.
The full doped-matchgate shell matrix C C C acts on Majorana weights ℓ = 0 , … , 2 N \ell=0,\ldots,2N ℓ = 0 , … , 2 N . Since C C C only connects ℓ \ell ℓ to ℓ \ell ℓ and ℓ ± 2 \ell\pm2 ℓ ± 2 , it splits into even and odd shells, C = C e v e n ⊕ C o d d C=C_{\mathrm{even}}\oplus C_{\mathrm{odd}} C = C even ⊕ C odd , and Eq. (7) only involves Γ = C e v e n \Gamma=C_{\mathrm{even}} Γ = C even . Its fixed space is four-dimensional and spanned by { I , T , P ^ ⊗ P ^ , T ( P ^ ⊗ P ^ ) } \{I,T,\widehat P\otimes\widehat P,T(\widehat P\otimes\widehat P)\} { I , T , P ⊗ P , T ( P ⊗ P )} , with T T T the replica swap and P ^ \widehat P P the fermion parity. In the shell basis we can take as fixed vectors the two endpoints ℓ = 0 \ell=0 ℓ = 0 and ℓ = 2 N \ell=2N ℓ = 2 N , an even-shell bulk vector with binomial weights, and an odd-shell bulk vector, i.e., three even and one odd at λ = 1 \lambda=1 λ = 1 .
The first decaying quartet has the opposite allocation. The four invariant birth–death sectors of the full transfer problem share the Ornstein–Uhlenbeck (OU) levels λ j = 1 − 2 j / N + O ( N − 2 ) \lambda_j=1-2j/N+O(N^{-2}) λ j = 1 − 2 j / N + O ( N − 2 ) [22 ] . Resolving the j = 1 j=1 j = 1 level in shell parity gives one even-shell mode and three odd-shell modes, all approaching 1 − 2 / N 1-2/N 1 − 2/ N . These are first excited modes, rather than members of the fixed space. The frame potential retains all four and is quadratic in their amplitudes. Hence, with τ = n d / N \tau=n_d/N τ = n d / N and Φ ∞ ( 2 ) \Phi_{\infty}^{(2)} Φ ∞ ( 2 ) the second-moment channel of the symmetry-resolved Haar class E ∞ \mathcal{E}_{\infty} E ∞ reached as n d → ∞ n_d\to\infty n d → ∞ ,
λ g a p = 1 − 2 N + O ( N − 3 ) , \lambda_{\mathrm{gap}}=1-\frac{2}{N}+O(N^{-3}), λ gap = 1 − N 2 + O ( N − 3 ) ,
ϵ H S 2 = ∥ M D − M ∞ ∥ H S 2 = F D ( 2 ) − F ∞ ( 2 ) ≃ 4 e − 4 τ , (15) \epsilon_{\mathrm{HS}}^2=\|M_D-M_{\infty}\|_{\mathrm{HS}}^2=\mathcal{F}_D^{(2)}-\mathcal{F}_{\infty}^{(2)}\simeq4e^{-4\tau}, \tag*{(15)} ϵ HS 2 = ∥ M D − M ∞ ∥ HS 2 = F D ( 2 ) − F ∞ ( 2 ) ≃ 4 e − 4 τ , (15)
and hence ϵ H S ≃ 2 e − 2 τ \epsilon_{\mathrm{HS}}\simeq2e^{-2\tau} ϵ HS ≃ 2 e − 2 τ . In particular, the rate 4 4 4 of the frame-potential excess comes from λ g a p 2 n d → e − 4 τ \lambda_{\mathrm{gap}}^{2n_d}\to e^{-4\tau} λ gap 2 n d → e − 4 τ .
The error vector and both boundaries of the EED fidelity have only even-shell support. To classify the remaining mode, define shell reflection by ( R v ) m = v N − m (Rv)_m=v_{N-m} ( R v ) m = v N − m and introduce S = diag [ ( − 1 ) m ] m = 0 N S=\operatorname{diag}[(-1)^m]_{m=0}^N S = diag [( − 1 ) m ] m = 0 N . In the positive staggered-sign gauge, Γ + = S Γ S \Gamma_+=S\Gamma S Γ + = S Γ S commutes with R R R . Its stationary bulk vector is positive and R R R -even, whereas its first decaying bulk eigenvector w g a p = S v g a p w_{\mathrm{gap}}=Sv_{\mathrm{gap}} w gap = S v gap has a single node and is R R R -odd; in the continuum limit it becomes the odd OU eigenfunction H 1 ( x ) ∝ x H_1(x)\propto x H 1 ( x ) ∝ x .
For the EED boundary vectors b n u m = ( N 0 , N 2 , … , N 2 N ) T b_{\mathrm{num}}=(N_0,N_2,\ldots,N_{2N})^T b num = ( N 0 , N 2 , … , N 2 N ) T and b d e n = ( D 0 , D 2 , … , D 2 N ) T b_{\mathrm{den}}=(D_0,D_2,\ldots,D_{2N})^T b den = ( D 0 , D 2 , … , D 2 N ) T , the transformed vectors S b a Sb_a S b a are R R R -even. Hence
b a T v g a p = ( S b a ) T w g a p = ( R S b a ) T ( R w g a p ) = − b a T v g a p = 0 , (16) b_a^T v_{\mathrm{gap}}=(Sb_a)^T w_{\mathrm{gap}}=(RSb_a)^T(Rw_{\mathrm{gap}})=-b_a^T v_{\mathrm{gap}}=0, \tag*{(16)} b a T v gap = ( S b a ) T w gap = ( R S b a ) T ( R w gap ) = − b a T v gap = 0 , (16)
where a = n u m , d e n a=\mathrm{num},\mathrm{den} a = num , den . This removes the entire first decaying level from the fidelity.
Fidelity response and design accuracy.
To determine which modes are seen by the fidelity, write h ( 0 ) = ( s 0 , s 2 , … , s 2 N ) T h^{(0)}=(s_0,s_2,\ldots,s_{2N})^T h ( 0 ) = ( s 0 , s 2 , … , s 2 N ) T for the pre-doping shell vector and h n d = Γ n d h ( 0 ) = h ∞ + δ h h_{n_d}=\Gamma^{n_d}h^{(0)}=h_\infty+\delta h h n d = Γ n d h ( 0 ) = h ∞ + δ h . Define p a = b a T h n d = p a , ∞ + δ p a p_a=b_a^T h_{n_d}=p_{a,\infty}+\delta p_a p a = b a T h n d = p a , ∞ + δ p a for a = n u m , d e n a=\mathrm{num},\mathrm{den} a = num , den . These shell contractions satisfy E [ n U ] = d p n u m \mathbb{E}[n_U]=d\,p_{\mathrm{num}} E [ n U ] = d p num and E [ p U ] = d p d e n \mathbb{E}[p_U]=d\,p_{\mathrm{den}} E [ p U ] = d p den , so that F ~ D = p n u m / p d e n \widetilde{F}_D=p_{\mathrm{num}}/p_{\mathrm{den}} F D = p num / p den . Here the averages are over the doped-matchgate ensemble. Expanding F ~ D = p n u m / p d e n \widetilde{F}_D=p_{\mathrm{num}}/p_{\mathrm{den}} F D = p num / p den about F ~ ∞ = p n u m , ∞ / p d e n , ∞ \widetilde{F}_\infty=p_{\mathrm{num},\infty}/p_{\mathrm{den},\infty} F ∞ = p num , ∞ / p den , ∞ gives
δ F ~ D ≡ F ~ D − F ~ ∞ = δ p n u m − F ~ ∞ δ p d e n p d e n , ∞ + O ( ∥ δ h ∥ 2 ) , (17) \delta\widetilde{F}_D\equiv\widetilde{F}_D-\widetilde{F}_\infty=\frac{\delta p_{\mathrm{num}}-\widetilde{F}_\infty\delta p_{\mathrm{den}}}{p_{\mathrm{den},\infty}}+O(\lVert\delta h\rVert^2), \tag*{(17)} δ F D ≡ F D − F ∞ = p den , ∞ δ p num − F ∞ δ p den + O (∥ δ h ∥ 2 ) , (17)
δ p a = b a T δ h = ∑ j c j λ j n d b a T v j . (18) \delta p_a=b_a^T\delta h=\sum_j c_j\lambda_j^{n_d}b_a^T v_j. \tag*{(18)} δ p a = b a T δ h = j ∑ c j λ j n d b a T v j . (18)
Here the sum runs over decaying modes of Γ \Gamma Γ , with orthonormal eigenvectors v j v_j v j and c j = v j T h ( 0 ) c_j=v_j^T h^{(0)} c j = v j T h ( 0 ) . A mode thus contributes to the linear response only if it is excited by the input, c j ≠ 0 c_j\ne0 c j = 0 , and has a nonzero overlap with b n u m − F ~ ∞ b d e n b_{\mathrm{num}}-\widetilde{F}_\infty b_{\mathrm{den}} b num − F ∞ b den .
Because the two selection rules above remove the j = 1 j=1 j = 1 quartet, the first boundary-visible contribution is the reflection-even j = 2 j=2 j = 2 , or bright, mode,
λ b r i g h t = 1 − 4 N + O ( N − 2 ) , \lambda_{\mathrm{bright}}=1-\frac{4}{N}+O(N^{-2}), λ bright = 1 − N 4 + O ( N − 2 ) ,
F ~ ∞ − F ~ D ≃ N g ( α ) λ b r i g h t n d ∼ N g ( α ) e − 4 τ . (19) \widetilde{F}_\infty-\widetilde{F}_D\simeq Ng(\alpha)\lambda_{\mathrm{bright}}^{n_d}\sim Ng(\alpha)e^{-4\tau}. \tag*{(19)} F ∞ − F D ≃ N g ( α ) λ bright n d ∼ N g ( α ) e − 4 τ . (19)
This explains the observed slopes: the frame potential squares the level-one decay, while the fidelity is linear in the first visible level-two decay. Inside the protected window, F ~ ∞ \widetilde{F}_\infty F ∞ and F ~ H a a r \widetilde{F}_{\mathrm{Haar}} F Haar agree up to corrections that are exponentially small in N N N .
Combining Eqs. (15) and (19) at late doping, we obtain
F ~ ∞ − F ~ D ≃ N g ( α ) 4 ϵ H S 2 . (20) \widetilde{F}_\infty-\widetilde{F}_D\simeq\frac{Ng(\alpha)}{4}\epsilon_{\mathrm{HS}}^2. \tag*{(20)} F ∞ − F D ≃ 4 N g ( α ) ϵ HS 2 . (20)
The protected-window average inherits the scaling N e − 4 τ Ne^{-4\tau} N e − 4 τ . To keep this deviation fixed in the scaling limit, one must fix ϵ H S = O ( N − 1 / 2 ) \epsilon_{\mathrm{HS}}=O(N^{-1/2}) ϵ HS = O ( N − 1/2 ) , implying that we need n d = Θ ( N log N ) n_d=\Theta(N\log N) n d = Θ ( N log N ) , consistent with the design lower bound in [22 ] .
The required scaling of an approximate-design error depends on its definition. Here ϵ H S \epsilon_{\mathrm{HS}} ϵ HS is an additive error, read off directly from the frame potential. If the numerator and denominator of the EED fidelity, both positive, are known up to a relative error ϵ r e l \epsilon_{\mathrm{rel}} ϵ rel , the fidelity is off by at most 2 ϵ r e l / ( 1 − ϵ r e l ) 2\epsilon_{\mathrm{rel}}/(1-\epsilon_{\mathrm{rel}}) 2 ϵ rel / ( 1 − ϵ rel ) . An additive bound, for instance in diamond norm, has to be small compared with the exponentially small postselection probability, and can therefore require a much higher accuracy. This estimate breaks down close to α c \alpha_c α c , where the crossing point is very sensitive to the doping. Pinning it down to within δ N \delta_N δ N takes roughly ( N / 4 ) log ( 1 / δ N ) (N/4)\log(1/\delta_N) ( N /4 ) log ( 1/ δ N ) extra gates.
References
Supplemental Material for “Error Resilience and Unitary 2-Designs”
Zheng-Hang Sun; Fabian Ballar Trigueros; Xhek Turkeshi; Piotr Sierant
SM_fixed2.pdf
Supplemental Material for ``Error Resilience and Unitary 2-Designs''
Derivation of Eqs. (4)–(6) of the main text
In this section, we derive the annealed fidelity in Eq. (5) of the main text and the two boundary coefficients N 2 m N_{2m} N 2 m and D 2 m D_{2m} D 2 m in Eq. (6). We use precisely the conventions of the main text: the system contains N N N qubits, X X X contains k k k logical qubits, X ‾ \overline{X} X contains N − k N-k N − k ancilla qubits, and the matchgate calculation uses
ρ i n = ∣ ψ i n ⟩ ⟨ ψ i n ∣ = ∣ 0 ⟩ ⟨ 0 ∣ ⊗ N , ρ X ‾ i n = ∣ 0 X ‾ ⟩ ⟨ 0 X ‾ ∣ , Π X ‾ = I X ⊗ ρ X ‾ i n . (21) \rho_{\mathrm{in}} = \lvert\psi_{\mathrm{in}}\rangle\langle\psi_{\mathrm{in}}\rvert= \lvert0\rangle\langle0\rvert^{\otimes N}, \qquad\rho_{\overline{X}}^{\mathrm{in}} = \lvert0_{\overline{X}}\rangle\langle0_{\overline{X}}\rvert, \qquad\Pi_{\overline{X}} = I_X \otimes\rho_{\overline{X}}^{\mathrm{in}}. \tag*{(21)} ρ in = ∣ ψ in ⟩ ⟨ ψ in ∣ = ∣ 0 ⟩ ⟨ 0 ∣ ⊗ N , ρ X in = ∣ 0 X ⟩ ⟨ 0 X ∣ , Π X = I X ⊗ ρ X in . (21)
The local coherent error is
K ^ = exp ( − i α 2 ∑ j = 1 N σ j z ) . (22) \hat{K} = \exp\left(-\frac{\mathrm{i}\alpha}{2}\sum_{j=1}^{N}\sigma_j^z\right). \tag*{(22)} K ^ = exp ( − 2 i α j = 1 ∑ N σ j z ) . (22)
and, for a matchgate encoder U M U_{\mathrm{M}} U M , we write
V U M = U M † K ^ U M . (23) V_{U_{\mathrm{M}}} = U_{\mathrm{M}}^\dagger\hat{K} U_{\mathrm{M}}. \tag*{(23)} V U M = U M † K ^ U M . (23)
Replica representation of the annealed fidelity
For a fixed realization of U M U_{\mathrm{M}} U M , the unnormalized numerator and postselection probability entering the fidelity are
n ( U M ) = Tr ( ρ i n V U M ρ i n V U M † ) , (24) n(U_{\mathrm{M}}) = \operatorname{Tr}\left(\rho_{\mathrm{in}}V_{U_{\mathrm{M}}}\rho_{\mathrm{in}}V_{U_{\mathrm{M}}}^{\dagger}\right), \tag*{(24)} n ( U M ) = Tr ( ρ in V U M ρ in V U M † ) , (24)
p ( U M ) = Tr ( Π X ‾ V U M ρ i n V U M † ) . (25) p(U_{\mathrm{M}}) = \operatorname{Tr}\left(\Pi_{\overline{X}}V_{U_{\mathrm{M}}}\rho_{\mathrm{in}}V_{U_{\mathrm{M}}}^{\dagger}\right). \tag*{(25)} p ( U M ) = Tr ( Π X V U M ρ in V U M † ) . (25)
Let T ( 1 , 2 ) T_{(1,2)} T ( 1 , 2 ) swap the two replicas. The identity
Tr [ ( A ⊗ B ) ( C ⊗ D ) T ( 1 , 2 ) ] = Tr ( A C B D ) (26) \operatorname{Tr}\left[(A\otimes B)(C\otimes D)T_{(1,2)}\right] = \operatorname{Tr}(ACBD) \tag*{(26)} Tr [ ( A ⊗ B ) ( C ⊗ D ) T ( 1 , 2 ) ] = Tr ( A C B D ) (26)
allows Eqs. (24) and (5) to be written as
n ( U M ) = Tr [ ( V U M ⊗ V U M † ) B n u m F ] , B n u m F = ρ i n ⊗ 2 , (27) n(U_{\mathrm{M}}) = \operatorname{Tr}\left[(V_{U_{\mathrm{M}}}\otimes V_{U_{\mathrm{M}}}^{\dagger})B_{\mathrm{num}}^{F}\right], \qquad B_{\mathrm{num}}^{F} = \rho_{\mathrm{in}}^{\otimes2}, \tag*{(27)} n ( U M ) = Tr [ ( V U M ⊗ V U M † ) B num F ] , B num F = ρ in ⊗ 2 , (27)
p ( U M ) = Tr [ ( V U M ⊗ V U M † ) B d e n F ] , B d e n F = ( ρ i n ⊗ Π X ‾ ) T ( 1 , 2 ) . (28) p(U_{\mathrm{M}}) = \operatorname{Tr}\left[(V_{U_{\mathrm{M}}}\otimes V_{U_{\mathrm{M}}}^{\dagger})B_{\mathrm{den}}^{F}\right], \qquad B_{\mathrm{den}}^{F} = (\rho_{\mathrm{in}}\otimes\Pi_{\overline{X}})T_{(1,2)}. \tag*{(28)} p ( U M ) = Tr [ ( V U M ⊗ V U M † ) B den F ] , B den F = ( ρ in ⊗ Π X ) T ( 1 , 2 ) . (28)
The second-moment matchgate twirl defined in the main text obeys
E U M [ V U M ⊗ V U M † ] = Φ M ( 2 ) ( K ^ ⊗ K ^ † ) . (29) \mathbb{E}_{U_{\mathrm{M}}}\left[V_{U_{\mathrm{M}}}\otimes V_{U_{\mathrm{M}}}^{\dagger}\right] = \Phi_{\mathrm{M}}^{(2)}(\hat{K}\otimes\hat{K}^{\dagger}). \tag*{(29)} E U M [ V U M ⊗ V U M † ] = Φ M ( 2 ) ( K ^ ⊗ K ^ † ) . (29)
Taking the ratio of the separately averaged quantities gives the annealed fidelity,
F ~ M = E U M [ n ( U M ) ] E U M [ p ( U M ) ] = Tr [ Φ M ( 2 ) ( K ^ ⊗ K ^ † ) B n u m F ] Tr [ Φ M ( 2 ) ( K ^ ⊗ K ^ † ) B d e n F ] . (30) \widetilde{F}_{\mathrm{M}} = \frac{\mathbb{E}_{U_{\mathrm{M}}}[n(U_{\mathrm{M}})]}{\mathbb{E}_{U_{\mathrm{M}}}[p(U_{\mathrm{M}})]} = \frac{\operatorname{Tr}\left[\Phi_{\mathrm{M}}^{(2)}(\hat{K}\otimes\hat{K}^{\dagger})B_{\mathrm{num}}^{F}\right]}{\operatorname{Tr}\left[\Phi_{\mathrm{M}}^{(2)}(\hat{K}\otimes\hat{K}^{\dagger})B_{\mathrm{den}}^{F}\right]}. \tag*{(30)} F M = E U M [ p ( U M )] E U M [ n ( U M )] = Tr [ Φ M ( 2 ) ( K ^ ⊗ K ^ † ) B den F ] Tr [ Φ M ( 2 ) ( K ^ ⊗ K ^ † ) B num F ] . (30)
This is Eq. (2) of the main text specialized to the matchgate ensemble. Notice that F ~ M \widetilde{F}_{\mathrm{M}} F M is a ratio of ensemble averages, whereas E U M [ F ] \mathbb{E}_{U_{\mathrm{M}}}[F] E U M [ F ] is the average of the sample-dependent ratio n ( U M ) / p ( U M ) n(U_{\mathrm{M}})/p(U_{\mathrm{M}}) n ( U M ) / p ( U M ) . Their numerical agreement is examined separately in the Supplemental Material.
Majorana-shell decomposition of the error operator
Let d = 2 N d=2^N d = 2 N and introduce 2 N 2N 2 N Majorana operators satisfying { γ μ , γ ν } = 2 δ μ ν \{\gamma_\mu,\gamma_\nu\}=2\delta_{\mu\nu} { γ μ , γ ν } = 2 δ μν . We use
σ j z = − i γ 2 j − 1 γ 2 j , γ S = ∏ μ ∈ S γ μ , ∣ γ S / d ⟩ ⟩ = vec ( γ S ) d , (31) \sigma_j^z=-i\gamma_{2j-1}\gamma_{2j},\qquad\gamma_S=\prod_{\mu\in S}\gamma_\mu,\qquad|\gamma_S/\sqrt{d}\rangle\rangle=\frac{\operatorname{vec}(\gamma_S)}{\sqrt{d}}, \tag*{(31)} σ j z = − i γ 2 j − 1 γ 2 j , γ S = μ ∈ S ∏ γ μ , ∣ γ S / d ⟩⟩ = d vec ( γ S ) , (31)
where the arrow fixes increasing Majorana order. The basis is orthonormal under the Hilbert–Schmidt inner product. For the full orthogonal Gaussian ensemble used in the main text, the two-copy invariant shell vectors are
∣ Υ ℓ ⟩ ⟩ = ( 2 N ℓ ) − 1 / 2 ∑ S ⊆ [ 2 N ] ∣ S ∣ = ℓ ∣ γ S / d ⟩ ⟩ ⊗ ∣ γ S / d ⟩ ⟩ , ℓ = 0 , … , 2 N , (32) |\Upsilon_\ell\rangle\rangle=\binom{2N}{\ell}^{-1/2}\sum_{\substack{S\subseteq[2N]\\|S|=\ell}}|\gamma_S/\sqrt{d}\rangle\rangle\otimes|\gamma_S/\sqrt{d}\rangle\rangle,\qquad\ell=0,\ldots,2N, \tag*{(32)} ∣ Υ ℓ ⟩⟩ = ( ℓ 2 N ) − 1/2 S ⊆ [ 2 N ] ∣ S ∣ = ℓ ∑ ∣ γ S / d ⟩⟩ ⊗ ∣ γ S / d ⟩⟩ , ℓ = 0 , … , 2 N , (32)
Here ∣ O ⟩ ⟩ = vec ( O ) |O\rangle\rangle=\operatorname{vec}(O) ∣ O ⟩⟩ = vec ( O ) denotes linear, tensor-compatible vectorization, with ⟨ ⟨ O ∣ P ⟩ ⟩ = Tr ( O † P ) \langle\langle O|P\rangle\rangle=\operatorname{Tr}(O^\dagger P) ⟨⟨ O ∣ P ⟩⟩ = Tr ( O † P ) . Thus ∣ Υ ℓ ⟩ ⟩ = vec ( Υ ℓ ) |\Upsilon_\ell\rangle\rangle=\operatorname{vec}(\Upsilon_\ell) ∣ Υ ℓ ⟩⟩ = vec ( Υ ℓ ) , where Υ ℓ \Upsilon_\ell Υ ℓ is the normalized two-copy operator in Eq. (24) of the main text. The second-moment twirl is the orthogonal projector onto their span.
Because ( γ 2 j − 1 γ 2 j ) 2 = − I (\gamma_{2j-1}\gamma_{2j})^2=-\mathbb{I} ( γ 2 j − 1 γ 2 j ) 2 = − I , Eq. (2) factorizes as
K ^ = ∏ j = 1 N [ cos ( α 2 ) I − sin ( α 2 ) γ 2 j − 1 γ 2 j ] , (33) \hat{K}=\prod_{j=1}^{N}\left[\cos\left(\frac{\alpha}{2}\right)\mathbb{I}-\sin\left(\frac{\alpha}{2}\right)\gamma_{2j-1}\gamma_{2j}\right], \tag*{(33)} K ^ = j = 1 ∏ N [ cos ( 2 α ) I − sin ( 2 α ) γ 2 j − 1 γ 2 j ] , (33)
K ^ † = ∏ j = 1 N [ cos ( α 2 ) I + sin ( α 2 ) γ 2 j − 1 γ 2 j ] . (34) \hat{K}^{\dagger}=\prod_{j=1}^{N}\left[\cos\left(\frac{\alpha}{2}\right)\mathbb{I}+\sin\left(\frac{\alpha}{2}\right)\gamma_{2j-1}\gamma_{2j}\right]. \tag*{(34)} K ^ † = j = 1 ∏ N [ cos ( 2 α ) I + sin ( 2 α ) γ 2 j − 1 γ 2 j ] . (34)
Only monomials made of complete canonical pairs { 2 j − 1 , 2 j } \{2j-1,2j\} { 2 j − 1 , 2 j } occur. Consequently, only even Majorana shells contribute. Projecting the two-copy operator onto Eq. (32) gives
vec [ Φ M ( 2 ) ( K ^ ⊗ K ^ † ) ] = d ∑ m = 0 N s 2 m ∣ Υ 2 m ⟩ ⟩ , (35) \operatorname{vec}\left[\Phi_{\mathrm{M}}^{(2)}(\hat{K}\otimes\hat{K}^{\dagger})\right]=d\sum_{m=0}^{N}s_{2m}|\Upsilon_{2m}\rangle\rangle, \tag*{(35)} vec [ Φ M ( 2 ) ( K ^ ⊗ K ^ † ) ] = d m = 0 ∑ N s 2 m ∣ Υ 2 m ⟩⟩ , (35)
in agreement with the operator normalization of the main text. There are ( N m ) \binom{N}{m} ( m N ) choices of m m m canonical pairs, and the product of the coefficients from Eqs. (33) and (34) is ( − 1 ) m sin 2 m ( α / 2 ) cos 2 ( N − m ) ( α / 2 ) (-1)^m\sin^{2m}(\alpha/2)\cos^{2(N-m)}(\alpha/2) ( − 1 ) m sin 2 m ( α /2 ) cos 2 ( N − m ) ( α /2 ) . Therefore
s 2 m = ( 2 N 2 m ) − 1 / 2 ( N m ) ( − 1 ) m ( cos 2 α 2 ) N − m ( sin 2 α 2 ) m , s 2 m + 1 = 0 , (36) s_{2m}=\binom{2N}{2m}^{-1/2}\binom{N}{m}(-1)^m\left(\cos^2\frac{\alpha}{2}\right)^{N-m}\left(\sin^2\frac{\alpha}{2}\right)^m,\qquad s_{2m+1}=0, \tag*{(36)} s 2 m = ( 2 m 2 N ) − 1/2 ( m N ) ( − 1 ) m ( cos 2 2 α ) N − m ( sin 2 2 α ) m , s 2 m + 1 = 0 , (36)
which reproduces s 2 m s_{2m} s 2 m in Eq. (6) of the main text.
Numerator boundary and Eq. (6)
Define the shell overlap with the numerator boundary by
N 2 m = ⟨ ⟨ Υ 2 m ∣ B n u m F ⟩ ⟩ . (37) N_{2m}=\langle\langle\Upsilon_{2m}|B_{\mathrm{num}}^{F}\rangle\rangle. \tag*{(37)} N 2 m = ⟨⟨ Υ 2 m ∣ B num F ⟩⟩ . (37)
Using Eqs. (7) and (32) ,
N 2 m = ( 2 N 2 m ) − 1 / 2 1 d ∑ ∣ S ∣ = 2 m Tr ( γ S † ρ i n ) Tr ( γ S † ρ i n ) . (38) N_{2m}=\binom{2N}{2m}^{-1/2}\frac{1}{d}\sum_{|S|=2m}\operatorname{Tr}(\gamma_S^\dagger\rho_{\mathrm{in}})\operatorname{Tr}(\gamma_S^\dagger\rho_{\mathrm{in}}). \tag*{(38)} N 2 m = ( 2 m 2 N ) − 1/2 d 1 ∣ S ∣ = 2 m ∑ Tr ( γ S † ρ in ) Tr ( γ S † ρ in ) . (38)
The vacuum expectation value vanishes if S S S contains exactly one Majorana from any physical site. Hence, a nonzero contribution requires
S = ⋃ j ∈ J { 2 j − 1 , 2 j } , ∣ J ∣ = m , (39) S=\bigcup_{j\in J}\{2j-1,2j\},\qquad|J|=m, \tag*{(39)} S = j ∈ J ⋃ { 2 j − 1 , 2 j } , ∣ J ∣ = m , (39)
and there are ( N m ) \binom{N}{m} ( m N ) such subsets. Since
γ S = i m ∏ j ∈ J σ j z , ⟨ 0 ⊗ N ∣ γ S † ∣ 0 ⊗ N ⟩ = ( − i ) m , (40) \gamma_S=i^m\prod_{j\in J}\sigma_j^z,\qquad\langle0^{\otimes N}|\gamma_S^\dagger|0^{\otimes N}\rangle=(-i)^m, \tag*{(40)} γ S = i m j ∈ J ∏ σ j z , ⟨ 0 ⊗ N ∣ γ S † ∣ 0 ⊗ N ⟩ = ( − i ) m , (40)
the product of the two identical vacuum matrix elements in Eq. (38) is ( − 1 ) m (-1)^m ( − 1 ) m . We obtain
N 2 m = 2 − N ( 2 N 2 m ) − 1 / 2 ( N m ) ( − 1 ) m . (41) N_{2m}=2^{-N}\binom{2N}{2m}^{-1/2}\binom{N}{m}(-1)^m. \tag*{(41)} N 2 m = 2 − N ( 2 m 2 N ) − 1/2 ( m N ) ( − 1 ) m . (41)
This is N 2 m N_{2m} N 2 m in Eq. (6) of the main text.
Denominator boundary and (26)
We now evaluate
D 2 m = ⟨ ⟨ Υ 2 m ∣ B d e n F ⟩ ⟩ . (42) D_{2m}=\langle\!\langle\Upsilon_{2m}|B_{\mathrm{den}}^F\rangle\!\rangle. \tag*{(42)} D 2 m = ⟨ ⟨ Υ 2 m ∣ B den F ⟩ ⟩ . (42)
For each S S S , Eqs. (6) and (8) give the elementary boundary matrix element
b S ( d e n ) ≡ 1 d Tr [ ( γ S † ⊗ γ S † ) ( ρ i n ⊗ Π X ˉ ) T ( 1 , 2 ) ] = 1 d Tr ( γ S † ρ i n γ S † Π X ˉ ) = 1 d ⟨ 0 ⊗ N ∣ γ S † Π X ˉ γ S † ∣ 0 ⊗ N ⟩ . (43) \begin{aligned}
b_S^{(\mathrm{den})}&\equiv\frac{1}{d}\operatorname{Tr}\left[(\gamma_S^\dagger\otimes\gamma_S^\dagger)(\rho_{\mathrm{in}}\otimes\Pi_{\bar X})T_{(1,2)}\right]\\
&=\frac{1}{d}\operatorname{Tr}(\gamma_S^\dagger\rho_{\mathrm{in}}\gamma_S^\dagger\Pi_{\bar X})=\frac{1}{d}\langle0^{\otimes N}|\gamma_S^\dagger\Pi_{\bar X}\gamma_S^\dagger|0^{\otimes N}\rangle. \tag*{(43)}
\end{aligned} b S ( den ) ≡ d 1 Tr [ ( γ S † ⊗ γ S † ) ( ρ in ⊗ Π X ˉ ) T ( 1 , 2 ) ] = d 1 Tr ( γ S † ρ in γ S † Π X ˉ ) = d 1 ⟨ 0 ⊗ N ∣ γ S † Π X ˉ γ S † ∣ 0 ⊗ N ⟩ . (43)
Acting on the computational-basis vacuum, a Majorana monomial flips precisely those physical qubits on which it contains an odd number of the two local Majoranas. Since Π X ˉ \Pi_{\bar X} Π X ˉ projects the ancillas in X ˉ \bar X X ˉ back onto their vacuum while acting as the identity on X X X , Eq. (43) is nonzero if and only if every site in X ˉ \bar X X ˉ contributes either zero or two Majoranas. No analogous restriction occurs on X X X .
Suppose m X ˉ m_{\bar X} m X ˉ sites in X ˉ \bar X X ˉ contribute complete Majorana pairs. They account for 2 m X ˉ 2m_{\bar X} 2 m X ˉ of the total 2 m 2m 2 m Majoranas and can be chosen in ( N − k m X ˉ ) \binom{N-k}{m_{\bar X}} ( m X ˉ N − k ) ways. The remaining 2 ( m − m X ˉ ) 2(m-m_{\bar X}) 2 ( m − m X ˉ ) Majoranas can be chosen arbitrarily among the 2 k 2k 2 k Majoranas supported in X X X . The total number of allowed subsets is thus
A 2 m ( k , N − k ) = ∑ m X ˉ = 0 min ( m , N − k ) ( N − k m X ˉ ) ( 2 k 2 ( m − m X ˉ ) ) . (44) A_{2m}(k,N-k)=\sum_{m_{\bar X}=0}^{\min(m,N-k)}\binom{N-k}{m_{\bar X}}\binom{2k}{2(m-m_{\bar X})}. \tag*{(44)} A 2 m ( k , N − k ) = m X ˉ = 0 ∑ m i n ( m , N − k ) ( m X ˉ N − k ) ( 2 ( m − m X ˉ ) 2 k ) . (44)
Here and below, ( a b ) = 0 \binom{a}{b}=0 ( b a ) = 0 when b < 0 b<0 b < 0 or b > a b>a b > a , so Eq. (44) automatically enforces 2 ( m − m X ˉ ) ≤ 2 k 2(m-m_{\bar X})\le2k 2 ( m − m X ˉ ) ≤ 2 k .
For every allowed S S S , the projector Π X ˉ \Pi_{\bar X} Π X ˉ acts trivially on γ S † ∣ 0 ⊗ N ⟩ \gamma_S^\dagger|0^{\otimes N}\rangle γ S † ∣ 0 ⊗ N ⟩ . Moreover, for ∣ S ∣ = 2 m |S|=2m ∣ S ∣ = 2 m ,
( γ S † ) 2 = γ S 2 = ( − 1 ) ∣ S ∣ ( ∣ S ∣ − 1 ) / 2 I = ( − 1 ) m I . (45) (\gamma_S^\dagger)^2=\gamma_S^2=(-1)^{|S|(|S|-1)/2}\mathbb{I}=(-1)^m\mathbb{I}. \tag*{(45)} ( γ S † ) 2 = γ S 2 = ( − 1 ) ∣ S ∣ ( ∣ S ∣ − 1 ) /2 I = ( − 1 ) m I . (45)
Therefore every allowed subset contributes the same value b S ( d e n ) = ( − 1 ) m 2 − N b_S^{(\mathrm{den})}=(-1)^m2^{-N} b S ( den ) = ( − 1 ) m 2 − N .
b S ( d e n ) = ( − 1 ) m 2 − N . (46) b_S^{(\mathrm{den})}=(-1)^m2^{-N}. \tag*{(46)} b S ( den ) = ( − 1 ) m 2 − N . (46)
Substituting Eqs. (44) and (46) into Eq. (42) , we arrive at
D 2 m = ( − 1 ) m 2 − N ( 2 N 2 m ) − 1 / 2 ∑ m X ˉ = 0 min ( m , N − k ) ( N − k m X ˉ ) ( 2 k 2 ( m − m X ˉ ) ) . (47) D_{2m}=(-1)^m2^{-N}\binom{2N}{2m}^{-1/2}\sum_{m_{\bar X}=0}^{\min(m,N-k)}\binom{N-k}{m_{\bar X}}\binom{2k}{2(m-m_{\bar X})}. \tag*{(47)} D 2 m = ( − 1 ) m 2 − N ( 2 m 2 N ) − 1/2 m X ˉ = 0 ∑ m i n ( m , N − k ) ( m X ˉ N − k ) ( 2 ( m − m X ˉ ) 2 k ) . (47)
This is Eq. (6) of the main text.
Final form and normalization check
With the normalized Majorana basis of Eq. (31) , the two contractions entering Eq. (30) are
E U M [ n ( U M ) ] = d ∑ m = 0 N s 2 m N 2 m , (48) \mathbb{E}_{U_M}[n(U_M)] = d \sum_{m=0}^{N} s_{2m}N_{2m}, \tag*{(48)} E U M [ n ( U M )] = d m = 0 ∑ N s 2 m N 2 m , (48)
E U M [ p ( U M ) ] = d ∑ m = 0 N s 2 m D 2 m . (49) \mathbb{E}_{U_M}[p(U_M)] = d \sum_{m=0}^{N} s_{2m}D_{2m}. \tag*{(49)} E U M [ p ( U M )] = d m = 0 ∑ N s 2 m D 2 m . (49)
The common factor d = 2 N d = 2^N d = 2 N cancels in their ratio. Equivalently, defining A 2 m A_{2m} A 2 m by Eq. (44) , the annealed fidelity can be written without any normalization ambiguity as
F ~ M = ∑ m = 0 N ( N m ) 2 ( 2 N 2 m ) ( sin 2 α 2 ) m ( cos 2 α 2 ) N − m ∑ m = 0 N ( N m ) A 2 m ( k , N − k ) ( 2 N 2 m ) ( sin 2 α 2 ) m ( cos 2 α 2 ) N − m . (50) \widetilde{F}_M =
\frac{\sum_{m=0}^{N} \frac{\binom{N}{m}^{2}}{\binom{2N}{2m}}\left(\sin^{2}\frac{\alpha}{2}\right)^{m}\left(\cos^{2}\frac{\alpha}{2}\right)^{N-m}}
{\sum_{m=0}^{N} \frac{\binom{N}{m}A_{2m}(k,N-k)}{\binom{2N}{2m}}\left(\sin^{2}\frac{\alpha}{2}\right)^{m}\left(\cos^{2}\frac{\alpha}{2}\right)^{N-m}}. \tag*{(50)} F M = ∑ m = 0 N ( 2 m 2 N ) ( m N ) A 2 m ( k , N − k ) ( sin 2 2 α ) m ( cos 2 2 α ) N − m ∑ m = 0 N ( 2 m 2 N ) ( m N ) 2 ( sin 2 2 α ) m ( cos 2 2 α ) N − m . (50)
The factors ( − 1 ) m (-1)^m ( − 1 ) m in s 2 m s_{2m} s 2 m cancel those in both boundary coefficients, so every term in Eq. (50) is nonnegative. Several limiting cases provide useful checks. At α = 0 \alpha= 0 α = 0 , only m = 0 m = 0 m = 0 contributes and F ~ M = 1 \widetilde{F}_M = 1 F M = 1 . If k = 0 k = 0 k = 0 , then A 2 m = ( N m ) A_{2m} = \binom{N}{m} A 2 m = ( m N ) and the numerator equals the denominator, again giving F ~ M = 1 \widetilde{F}_M = 1 F M = 1 . If N − k = 0 N-k = 0 N − k = 0 , then A 2 m = ( 2 N 2 m ) A_{2m} = \binom{2N}{2m} A 2 m = ( 2 m 2 N ) and Eq. (49) gives unit postselection probability.
Thermodynamic limit at half code rate
We now prove the thermodynamic-limit statement used in the main text. Let N N N be even and set k = N / 2 k = N/2 k = N /2 . It is convenient to introduce x = sin 2 ( α 2 ) x = \sin^{2}\left(\frac{\alpha}{2}\right) x = sin 2 ( 2 α ) , y = cos 2 ( α 2 ) y = \cos^{2}\left(\frac{\alpha}{2}\right) y = cos 2 ( 2 α ) , x + y = 1 x+y=1 x + y = 1 , and the nonnegative coefficients
u m = ( N m ) 2 ( 2 N 2 m ) , v m = ( N m ) A 2 m ( N / 2 , N / 2 ) ( 2 N 2 m ) . (51) u_m = \frac{\binom{N}{m}^{2}}{\binom{2N}{2m}}, \qquad v_m = \frac{\binom{N}{m}A_{2m}(N/2,N/2)}{\binom{2N}{2m}}. \tag*{(51)} u m = ( 2 m 2 N ) ( m N ) 2 , v m = ( 2 m 2 N ) ( m N ) A 2 m ( N /2 , N /2 ) . (51)
Equation (50) then becomes
F ~ M , N ( α ) = ∑ m = 0 N u m x m y N − m ∑ m = 0 N v m x m y N − m . (52) \widetilde{F}_{M,N}(\alpha) =
\frac{\sum_{m=0}^{N}u_m x^m y^{N-m}}
{\sum_{m=0}^{N}v_m x^m y^{N-m}}. \tag*{(52)} F M , N ( α ) = ∑ m = 0 N v m x m y N − m ∑ m = 0 N u m x m y N − m . (52)
First consider 0 < x < y 0 < x < y 0 < x < y . Vandermonde’s identity gives
( 2 N 2 m ) = ∑ j ( N j ) ( N 2 m − j ) ≥ ( N m ) 2 , (53) \binom{2N}{2m} = \sum_j \binom{N}{j}\binom{N}{2m-j} \ge\binom{N}{m}^{2}, \tag*{(53)} ( 2 m 2 N ) = j ∑ ( j N ) ( 2 m − j N ) ≥ ( m N ) 2 , (53)
and hence 0 ≤ u m ≤ 1 0 \le u_m \le1 0 ≤ u m ≤ 1 . With z = x / y < 1 z=x/y<1 z = x / y < 1 , the numerator of Eq. (52) therefore satisfies the uniform bound
∑ m = 0 N u m x m y N − m = y N ∑ m = 0 N u m z m ≤ y N 1 − z . (54) \sum_{m=0}^{N}u_m x^m y^{N-m}
= y^N\sum_{m=0}^{N}u_m z^m
\le\frac{y^N}{1-z}. \tag*{(54)} m = 0 ∑ N u m x m y N − m = y N m = 0 ∑ N u m z m ≤ 1 − z y N . (54)
All denominator terms are nonnegative, so it is sufficient to retain only the m = 1 m=1 m = 1 term. At half code rate,
A 2 ( N / 2 , N / 2 ) = ( N / 2 1 ) + ( N 2 ) = N 2 2 , v 1 = N 2 2 ( 2 N − 1 ) . (55) A_2(N/2,N/2) = \binom{N/2}{1}+\binom{N}{2} = \frac{N^2}{2}, \qquad v_1 = \frac{N^2}{2(2N-1)}. \tag*{(55)} A 2 ( N /2 , N /2 ) = ( 1 N /2 ) + ( 2 N ) = 2 N 2 , v 1 = 2 ( 2 N − 1 ) N 2 . (55)
Combining Eqs. (54) and (55) , we obtain the explicit upper bound
0 ≤ F ~ M , N ( α ) ≤ 2 ( 2 N − 1 ) y 2 N 2 x ( y − x ) = O ( 1 N ) , 0 < x < y , (56) 0 \leq\widetilde{F}_{M,N}(\alpha) \leq\frac{2(2N-1)y^2}{N^2x(y-x)}=O\left(\frac{1}{N}\right),\qquad0<x<y, \tag*{(56)} 0 ≤ F M , N ( α ) ≤ N 2 x ( y − x ) 2 ( 2 N − 1 ) y 2 = O ( N 1 ) , 0 < x < y , (56)
where the constant implicit in O ( N − 1 ) O(N^{-1}) O ( N − 1 ) is finite for every fixed x ∈ ( 0 , 1 / 2 ) x\in(0,1/2) x ∈ ( 0 , 1/2 ) . Consequently, lim N → ∞ F ~ M , N ( α ) = 0 \lim_{N\to\infty}\widetilde{F}_{M,N}(\alpha)=0 lim N → ∞ F M , N ( α ) = 0 throughout this interval.
The midpoint x = y = 1 / 2 x=y=1/2 x = y = 1/2 follows separately. The numerator is at most ( N + 1 ) 2 − N (N+1)2^{-N} ( N + 1 ) 2 − N . In the denominator, the m = 2 m=2 m = 2 term alone gives
∑ m = 0 N v m 2 − N ≥ 2 − N ( N 2 ) A 4 ( N / 2 , N / 2 ) ( 2 N 4 ) ≥ 2 − N ( N 2 ) ( N 4 ) ( 2 N 4 ) . (57) \sum_{m=0}^{N}v_m2^{-N}\geq2^{-N}\binom{N}{2}\frac{A_4(N/2,N/2)}{\binom{2N}{4}}\geq2^{-N}\binom{N}{2}\frac{\binom{N}{4}}{\binom{2N}{4}}. \tag*{(57)} m = 0 ∑ N v m 2 − N ≥ 2 − N ( 2 N ) ( 4 2 N ) A 4 ( N /2 , N /2 ) ≥ 2 − N ( 2 N ) ( 4 2 N ) ( 4 N ) . (57)
The last inequality keeps only the allowed subsets whose four Majoranas all lie in X X X . Since ( N 4 ) / ( 2 N 4 ) → 1 / 16 \binom{N}{4}/\binom{2N}{4}\to1/16 ( 4 N ) / ( 4 2 N ) → 1/16 , it is at least 1 / 32 1/32 1/32 for all sufficiently large N N N . Thus
0 ≤ F ~ M , N ( π 2 ) ≤ 32 ( N + 1 ) ( N 2 ) = O ( 1 N ) → N → ∞ 0. (58) 0\leq\widetilde{F}_{M,N}\left(\frac{\pi}{2}\right)\leq\frac{32(N+1)}{\binom{N}{2}}=O\left(\frac{1}{N}\right)\xrightarrow[N\to\infty]{}0. \tag*{(58)} 0 ≤ F M , N ( 2 π ) ≤ ( 2 N ) 32 ( N + 1 ) = O ( N 1 ) N → ∞ 0. (58)
It remains to note an exact reflection symmetry. Taking the complement of an allowed 2 m 2m 2 m -Majorana subset gives an allowed 2 ( N − m ) 2(N-m) 2 ( N − m ) -Majorana subset: on every site in X ‾ \overline{X} X , the local occupation changes from zero to two or from two to zero. Therefore
A 2 ( N − m ) ( N / 2 , N / 2 ) = A 2 m ( N / 2 , N / 2 ) , u N − m = u m , v N − m = v m . (59) A_{2(N-m)}(N/2,N/2)=A_{2m}(N/2,N/2),\qquad u_{N-m}=u_m,\qquad v_{N-m}=v_m. \tag*{(59)} A 2 ( N − m ) ( N /2 , N /2 ) = A 2 m ( N /2 , N /2 ) , u N − m = u m , v N − m = v m . (59)
Equation (52) is consequently invariant under x ↔ y x\leftrightarrow y x ↔ y , which extends the preceding result to 0 < y < x 0<y<x 0 < y < x . We have proved
lim N → ∞ F ~ M , N ( α ) = 0 for every fixed α ∉ π Z , k = N / 2. (60) \lim_{N\to\infty}\widetilde{F}_{M,N}(\alpha)=0\quad\text{for every fixed }\alpha\notin\pi\mathbb{Z},\qquad k=N/2. \tag*{(60)} N → ∞ lim F M , N ( α ) = 0 for every fixed α ∈ / π Z , k = N /2. (60)
Equivalently, because the exact finite-N N N expression is invariant under x ↔ y x\leftrightarrow y x ↔ y , one may use the fundamental interval 0 ≤ α ≤ π / 2 0\leq\alpha\leq\pi/2 0 ≤ α ≤ π /2 ; within the interval studied in the main text, every fixed α > 0 \alpha>0 α > 0 has vanishing thermodynamic fidelity. The isolated angles α ∈ π Z \alpha\in\pi\mathbb{Z} α ∈ π Z are trivial exceptions: only m = 0 m=0 m = 0 or m = N m=N m = N contributes to Eq. (50) , and F ~ M , N = 1 \widetilde{F}_{M,N}=1 F M , N = 1 exactly. The bound is a fixed-α \alpha α statement and is not uniform as α → 0 \alpha\to0 α → 0 , consistently allowing the finite-size error-protecting window to shrink toward the origin as N N N grows.
Derivation of (27) of the main text
We now extend the preceding matchgate calculation to the doped encoder in Fig. 1(b) of the main text,
U D = U M ( n d ) A U M ( n d − 1 ) A ⋯ A U M ( 0 ) , A = exp ( − i π 4 Z 1 Z 2 ) , (61) U_{\mathrm{D}}=U_{\mathrm{M}}^{(n_{\mathrm{d}})}AU_{\mathrm{M}}^{(n_{\mathrm{d}}-1)}A\cdots AU_{\mathrm{M}}^{(0)},\qquad A=\exp\left(-\frac{i\pi}{4}Z_1Z_2\right), \tag*{(61)} U D = U M ( n d ) A U M ( n d − 1 ) A ⋯ A U M ( 0 ) , A = exp ( − 4 iπ Z 1 Z 2 ) , (61)
where the U M ( i ) U_{\mathrm{M}}^{(i)} U M ( i ) are independent random matchgate circuits. The derivation uses two results established in Ref. [1 ] . First, the matchgate two-copy twirl is the orthogonal projector onto the commutant spanned by the pairing vectors ∣ Υ ℓ ⟩ ⟩ |\Upsilon_\ell\rangle\rangle ∣ Υ ℓ ⟩⟩ defined in Eq. (32) . Second, after projection onto this commutant, successive globally scrambled doping rounds are described by repeated application of a finite-dimensional transfer matrix. In the notation of Ref. [1 ] , the iterative channel is given in its Eq. (22), while the pairing basis is defined in its Eq. (27). That reference uses n n n for the number of qubits and 2 n 2n 2 n for the number of Majoranas; here we retain the main-text convention of N N N qubits and 2 N 2N 2 N Majoranas.
For the Heisenberg-picture encoding-error-decoding (EED) echo, define the two-copy doping map
A H ( 2 ) ( O 1 ⊗ O 2 ) = ( A † O 1 A ) ⊗ ( A † O 2 A ) . (62) \mathcal{A}_{\mathrm{H}}^{(2)}(O_1\otimes O_2)=(A^\dagger O_1A)\otimes(A^\dagger O_2A). \tag*{(62)} A H ( 2 ) ( O 1 ⊗ O 2 ) = ( A † O 1 A ) ⊗ ( A † O 2 A ) . (62)
Independence of all matchgate layers in Eq. (61) , together with the idempotence of the matchgate twirl, gives
E U D [ ( U D † K ^ U D ) ⊗ ( U D † K ^ † U D ) ] = [ Φ M ( 2 ) ∘ Φ A H ( 2 ) ∘ Φ M ( 2 ) ] n d Φ M ( 2 ) ( K ^ ⊗ K ^ † ) . (63) \mathbb{E}_{U_D}\left[\left(U_D^\dagger\hat{K} U_D\right)\otimes\left(U_D^\dagger\hat{K}^\dagger U_D\right)\right]
=
\left[\Phi_M^{(2)}\circ\Phi_{A_H}^{(2)}\circ\Phi_M^{(2)}\right]^{n_d}\Phi_M^{(2)}\left(\hat{K}\otimes\hat{K}^\dagger\right). \tag*{(63)} E U D [ ( U D † K ^ U D ) ⊗ ( U D † K ^ † U D ) ] = [ Φ M ( 2 ) ∘ Φ A H ( 2 ) ∘ Φ M ( 2 ) ] n d Φ M ( 2 ) ( K ^ ⊗ K ^ † ) . (63)
Reference [1 ] writes the doping conjugation in the Schrödinger direction, with A A A and A † A^\dagger A † interchanged relative to Eq. (62) . For the quartic gate in Eq. (61) , the transfer matrix derived below is real and symmetric and is unchanged under A ↔ A † A\leftrightarrow A^\dagger A ↔ A † . Thus the same transfer matrix applies to the EED convention.
Within the orthonormal pairing basis, define
C ℓ ′ , ℓ ≡ ⟨ Υ ℓ ′ ∣ A H ( 2 ) ∣ Υ ℓ ⟩ , ℓ , ℓ ′ = 0 , … , 2 N . (64) C_{\ell',\ell}\equiv\langle\Upsilon_{\ell'}\vert A_H^{(2)}\vert\Upsilon_\ell\rangle,\qquad\ell,\ell'=0,\ldots,2N. \tag*{(64)} C ℓ ′ , ℓ ≡ ⟨ Υ ℓ ′ ∣ A H ( 2 ) ∣ Υ ℓ ⟩ , ℓ , ℓ ′ = 0 , … , 2 N . (64)
The matchgate twirls surrounding A H ( 2 ) A_H^{(2)} A H ( 2 ) in Eq. (63) act as the identity on these commutant vectors. Moreover, Eq. (36) shows that the initial error vector has support only on even Majorana shells. Since the quartic dopant preserves shell parity, it is therefore sufficient to restrict C C C to its even-shell block,
Γ r , m ≡ C 2 r , 2 m , r , m = 0 , … , N . (65) \Gamma_{r,m}\equiv C_{2r,2m},\qquad r,m=0,\ldots,N. \tag*{(65)} Γ r , m ≡ C 2 r , 2 m , r , m = 0 , … , N . (65)
Using the shell expansion in Eq. (35) , define h ( 0 ) = ( s 0 , s 2 , … , s 2 N ) T \boldsymbol{h}^{(0)}=(s_0,s_2,\ldots,s_{2N})^T h ( 0 ) = ( s 0 , s 2 , … , s 2 N ) T and h n d = Γ n d h ( 0 ) \boldsymbol{h}_{n_d}=\Gamma^{n_d}\boldsymbol{h}^{(0)} h n d = Γ n d h ( 0 ) , as in the End Matter. Its component associated with shell 2 r 2r 2 r is consequently
( h n d ) r = ∑ m = 0 N ( Γ n d ) r , m s 2 m . (66) (h_{n_d})_r=\sum_{m=0}^{N}\left(\Gamma^{n_d}\right)_{r,m}s_{2m}. \tag*{(66)} ( h n d ) r = m = 0 ∑ N ( Γ n d ) r , m s 2 m . (66)
The numerator and denominator boundaries are unchanged by the doping. Contracting Eq. (66) with N 2 r N_{2r} N 2 r and D 2 r D_{2r} D 2 r from Eqs. (41) and (47) , respectively, and cancelling the common factor d d d identified in Eqs. (48) and (49) , yields
F ~ D = ∑ r , m = 0 N N 2 r ( Γ n d ) r , m s 2 m ∑ r , m = 0 N D 2 r ( Γ n d ) r , m s 2 m . (67) \widetilde{F}_D=
\frac{\sum_{r,m=0}^{N}N_{2r}\left(\Gamma^{n_d}\right)_{r,m}s_{2m}}
{\sum_{r,m=0}^{N}D_{2r}\left(\Gamma^{n_d}\right)_{r,m}s_{2m}}. \tag*{(67)} F D = ∑ r , m = 0 N D 2 r ( Γ n d ) r , m s 2 m ∑ r , m = 0 N N 2 r ( Γ n d ) r , m s 2 m . (67)
This is Eq. (7) of the main text. At n d = 0 n_d=0 n d = 0 , Γ 0 = I \Gamma^0=I Γ 0 = I , and Eq. (67) reduces immediately to the undoped result derived in the preceding section.
Quartic-dopant matrix elements
It remains to evaluate the transfer matrix in Eq. (64) . Let
T = { 1 , 2 , 3 , 4 } , G = γ 1 γ 2 γ 3 γ 4 = − Z 1 Z 2 , A = e i π G / 4 . (68) \mathcal{T}=\{1,2,3,4\},\qquad G=\gamma_1\gamma_2\gamma_3\gamma_4=-Z_1Z_2,\qquad A=e^{i\pi G/4}. \tag*{(68)} T = { 1 , 2 , 3 , 4 } , G = γ 1 γ 2 γ 3 γ 4 = − Z 1 Z 2 , A = e iπ G /4 . (68)
For a Majorana subset S S S , set q = ∣ S ∩ T ∣ q=\lvert S\cap\mathcal{T}\rvert q = ∣ S ∩ T ∣ . Since G γ S = ( − 1 ) q γ S G G\gamma_S=(-1)^q\gamma_SG G γ S = ( − 1 ) q γ S G , conjugation by A A A gives
A † γ S A = { γ S , q = 0 , 2 , 4 , − i G γ S , q = 1 , 3. (69) A^\dagger\gamma_S A=
\begin{cases}
\gamma_S, & q=0,2,4,\\
-iG\gamma_S, & q=1,3.
\end{cases} \tag*{(69)} A † γ S A = { γ S , − i G γ S , q = 0 , 2 , 4 , q = 1 , 3. (69)
Up to the sign required to restore increasing Majorana order, G γ S G\gamma_S G γ S is the monomial associated with the symmetric difference S △ T S\mathbin{\triangle}\mathcal{T} S △ T . This reordering sign is squared in the two-copy pairing vector and hence cancels. Equation (69) therefore implies
A H ( 2 ) ( ∣ γ S / d ⟩ ⟩ ⊗ ∣ γ S / d ⟩ ⟩ ) = { ∣ γ S / d ⟩ ⟩ ⊗ ∣ γ S / d ⟩ ⟩ , q = 0 , 2 , 4 , − ∣ γ S △ T / d ⟩ ⟩ ⊗ ∣ γ S △ T / d ⟩ ⟩ , q = 1 , 3. (70) A_H^{(2)}\left(\lvert\gamma_S/\sqrt{d}\rangle\!\rangle\otimes\lvert\gamma_S/\sqrt{d}\rangle\!\rangle\right)
=
\begin{cases}
\lvert\gamma_S/\sqrt{d}\rangle\!\rangle\otimes\lvert\gamma_S/\sqrt{d}\rangle\!\rangle, & q=0,2,4,\\
-\lvert\gamma_{S\triangle\mathcal{T}}/\sqrt{d}\rangle\!\rangle\otimes\lvert\gamma_{S\triangle\mathcal{T}}/\sqrt{d}\rangle\!\rangle, & q=1,3.
\end{cases} \tag*{(70)} A H ( 2 ) ( ∣ γ S / d ⟩ ⟩ ⊗ ∣ γ S / d ⟩ ⟩ ) = { ∣ γ S / d ⟩ ⟩ ⊗ ∣ γ S / d ⟩ ⟩ , − ∣ γ S △ T / d ⟩ ⟩ ⊗ ∣ γ S △ T / d ⟩ ⟩ , q = 0 , 2 , 4 , q = 1 , 3. (70)
Changing the sign of the exponent of A A A changes − i -i − i to + i +i + i in Eq. (69) , but leaves the minus sign in Eq. (70) unchanged. This explicitly verifies the A ↔ A † A \leftrightarrow A^\dagger A ↔ A † statement made above.
Consider an input shell of Majorana weight ℓ \ell ℓ . The number of subsets with ∣ S ∩ T ∣ = q |S \cap T|=q ∣ S ∩ T ∣ = q is
( 4 q ) ( 2 N − 4 ℓ − q ) . (71) \binom{4}{q}\binom{2N-4}{\ell-q}. \tag*{(71)} ( q 4 ) ( ℓ − q 2 N − 4 ) . (71)
For even q q q , the monomial is unchanged. Summing the contributions with q = 0 , 2 , 4 q=0,2,4 q = 0 , 2 , 4 and using the normalization of Eq. (32) gives
C ℓ , ℓ = ( 2 N − 4 ℓ ) + 6 ( 2 N − 4 ℓ − 2 ) + ( 2 N − 4 ℓ − 4 ) ( 2 N ℓ ) . (72) C_{\ell,\ell}=\frac{\binom{2N-4}{\ell}+6\binom{2N-4}{\ell-2}+\binom{2N-4}{\ell-4}}{\binom{2N}{\ell}}. \tag*{(72)} C ℓ , ℓ = ( ℓ 2 N ) ( ℓ 2 N − 4 ) + 6 ( ℓ − 2 2 N − 4 ) + ( ℓ − 4 2 N − 4 ) . (72)
For q = 1 q=1 q = 1 , the symmetric difference has weight ℓ + 2 \ell+2 ℓ + 2 ; for q = 3 q=3 q = 3 , it has weight ℓ − 2 \ell-2 ℓ − 2 . The corresponding matrix elements are
C ℓ + 2 , ℓ = − 4 ( 2 N − 4 ℓ − 1 ) ( 2 N ℓ + 2 ) ( 2 N ℓ ) . (73) C_{\ell+2,\ell}=-\frac{4\binom{2N-4}{\ell-1}}{\sqrt{\binom{2N}{\ell+2}\binom{2N}{\ell}}}. \tag*{(73)} C ℓ + 2 , ℓ = − ( ℓ + 2 2 N ) ( ℓ 2 N ) 4 ( ℓ − 1 2 N − 4 ) . (73)
C ℓ − 2 , ℓ = − 4 ( 2 N − 4 ℓ − 3 ) ( 2 N ℓ − 2 ) ( 2 N ℓ ) . (74) C_{\ell-2,\ell}=-\frac{4\binom{2N-4}{\ell-3}}{\sqrt{\binom{2N}{\ell-2}\binom{2N}{\ell}}}. \tag*{(74)} C ℓ − 2 , ℓ = − ( ℓ − 2 2 N ) ( ℓ 2 N ) 4 ( ℓ − 3 2 N − 4 ) . (74)
All other entries vanish. The map S ↦ S △ T S \mapsto S \mathbin{\triangle} T S ↦ S △ T is one-to-one, which also makes C C C symmetric. Using the symmetry of C C C , Eqs. (72) –(74) can also be written as
C ℓ , ℓ = ( 2 N − 4 ℓ ) + ( 2 N − 4 ℓ − 4 ) + 6 ( 2 N − 4 ℓ − 2 ) ( 2 N ℓ ) , C ℓ , ℓ + 2 = − 4 ( 2 N − 4 ℓ − 1 ) ( 2 N ℓ ) ( 2 N ℓ + 2 ) , C ℓ , ℓ − 2 = − 4 ( 2 N − 4 ℓ − 3 ) ( 2 N ℓ ) ( 2 N ℓ − 2 ) . (75) \begin{aligned}
C_{\ell,\ell}&=\frac{\binom{2N-4}{\ell}+\binom{2N-4}{\ell-4}+6\binom{2N-4}{\ell-2}}{\binom{2N}{\ell}},\\
C_{\ell,\ell+2}&=-\frac{4\binom{2N-4}{\ell-1}}{\sqrt{\binom{2N}{\ell}\binom{2N}{\ell+2}}},\qquad
C_{\ell,\ell-2}=-\frac{4\binom{2N-4}{\ell-3}}{\sqrt{\binom{2N}{\ell}\binom{2N}{\ell-2}}}. \tag*{(75)}
\end{aligned} C ℓ , ℓ C ℓ , ℓ + 2 = ( ℓ 2 N ) ( ℓ 2 N − 4 ) + ( ℓ − 4 2 N − 4 ) + 6 ( ℓ − 2 2 N − 4 ) , = − ( ℓ 2 N ) ( ℓ + 2 2 N ) 4 ( ℓ − 1 2 N − 4 ) , C ℓ , ℓ − 2 = − ( ℓ 2 N ) ( ℓ − 2 2 N ) 4 ( ℓ − 3 2 N − 4 ) . (75)
These entries determine Γ r , m = C 2 r , 2 m \Gamma_{r,m}=C_{2r,2m} Γ r , m = C 2 r , 2 m in Eq. (7) of the main text. As in the preceding section, ( a b ) = 0 \binom{a}{b}=0 ( b a ) = 0 when b < 0 b<0 b < 0 or b > a b>a b > a , so the expressions also apply at the shell boundaries.
Derivation of (28) of the main text
In this section, we derive Eq. (8) for encoding-error-decoding (EED) dynamics generated by a Gaussian-unitary-ensemble (GUE) Hamiltonian. We use the notation of the main text and of the preceding derivation of Eqs. (24) –(6). The system contains N N N qubits, the logical subsystem X X X contains k k k qubits, and the ancilla subsystem X ˉ \bar{X} X ˉ contains N − k N-k N − k qubits. The Hilbert-space dimension is d = 2 N d=2^N d = 2 N .
Annealed fidelity as a ratio of two GUE averages
The initial state for the GUE Hamiltonian dynamics is the computational-basis Néel state
∣ ψ i n ⟩ = ∣ ψ X i n ⟩ ⊗ ∣ ψ X ˉ i n ⟩ , ρ i n = ∣ ψ i n ⟩ ⟨ ψ i n ∣ . (76) |\psi_{\mathrm{in}}\rangle=|\psi_X^{\mathrm{in}}\rangle\otimes|\psi_{\bar{X}}^{\mathrm{in}}\rangle,\qquad\rho_{\mathrm{in}}=|\psi_{\mathrm{in}}\rangle\langle\psi_{\mathrm{in}}|. \tag*{(76)} ∣ ψ in ⟩ = ∣ ψ X in ⟩ ⊗ ∣ ψ X ˉ in ⟩ , ρ in = ∣ ψ in ⟩ ⟨ ψ in ∣. (76)
Here ρ i n \rho_{\mathrm{in}} ρ in denotes the Néel input of this section, rather than the vacuum input used in the matchgate calculation, as in the main text. The ancilla postselection projector is
ρ X ˉ i n = ∣ ψ X ˉ i n ⟩ ⟨ ψ X ˉ i n ∣ , Π X ˉ = I X ⊗ ρ X ˉ i n . (77) \rho_{\bar{X}}^{\mathrm{in}}=|\psi_{\bar{X}}^{\mathrm{in}}\rangle\langle\psi_{\bar{X}}^{\mathrm{in}}|,\qquad\Pi_{\bar{X}}=I_X\otimes\rho_{\bar{X}}^{\mathrm{in}}. \tag*{(77)} ρ X ˉ in = ∣ ψ X ˉ in ⟩ ⟨ ψ X ˉ in ∣ , Π X ˉ = I X ⊗ ρ X ˉ in . (77)
The error operator is exactly the one used in the preceding section,
K ^ = exp ( − i α 2 ∑ j = 1 N σ j z ) . (78) \hat{K}=\exp\left(-\frac{i\alpha}{2}\sum_{j=1}^{N}\sigma_j^z\right). \tag*{(78)} K ^ = exp ( − 2 i α j = 1 ∑ N σ j z ) . (78)
For
U ( t ) = e − i H t , H ∈ G U E ( d ) , (79) U(t)=e^{-iHt},\qquad H\in\mathrm{GUE}(d), \tag*{(79)} U ( t ) = e − i H t , H ∈ GUE ( d ) , (79)
the state after encoding, the error, and decoding is
∣ ψ o u t ⟩ = U † K ^ U ∣ ψ i n ⟩ . (80) |\psi_{\mathrm{out}}\rangle=U^\dagger\hat{K}U|\psi_{\mathrm{in}}\rangle. \tag*{(80)} ∣ ψ out ⟩ = U † K ^ U ∣ ψ in ⟩ . (80)
For a fixed realization of H H H , the unnormalized fidelity numerator and the postselection probability are
n ( H ) = Tr ( ρ i n U † K ^ U ρ i n U † K ^ † U ) , (81) n(H)=\operatorname{Tr}\left(\rho_{\mathrm{in}}U^\dagger\hat{K}U\rho_{\mathrm{in}}U^\dagger\hat{K}^\dagger U\right), \tag*{(81)} n ( H ) = Tr ( ρ in U † K ^ U ρ in U † K ^ † U ) , (81)
p ( H ) = Tr ( Π X ‾ U † K ^ U ρ i n U † K ^ † U ) . (82) p(H)=\operatorname{Tr}\left(\Pi_{\overline{X}}U^\dagger\hat{K}U\rho_{\mathrm{in}}U^\dagger\hat{K}^\dagger U\right). \tag*{(82)} p ( H ) = Tr ( Π X U † K ^ U ρ in U † K ^ † U ) . (82)
Consequently, the annealed fidelity in Eq. (8) is
F ~ G U E = E H [ n ( H ) ] E H [ p ( H ) ] . (83) \widetilde{F}_{\mathrm{GUE}}=\frac{\mathbb{E}_{H}[n(H)]}{\mathbb{E}_{H}[p(H)]}. \tag*{(83)} F GUE = E H [ p ( H )] E H [ n ( H )] . (83)
As in Eq. (2), this ratio of separately averaged quantities is distinct at finite N N N from E H [ n ( H ) / p ( H ) ] \mathbb{E}_{H}[n(H)/p(H)] E H [ n ( H ) / p ( H )] . Both averages are obtained from the common trace
I B ( t , α ) = E H Tr ( B U † K ^ U ρ i n U † K ^ † U ) , (84) I_{B}(t,\alpha)=\mathbb{E}_{H}\operatorname{Tr}\left(BU^\dagger\hat{K}U\rho_{\mathrm{in}}U^\dagger\hat{K}^\dagger U\right), \tag*{(84)} I B ( t , α ) = E H Tr ( B U † K ^ U ρ in U † K ^ † U ) , (84)
where B = ρ i n B=\rho_{\mathrm{in}} B = ρ in gives the numerator and B = Π X ‾ B=\Pi_{\overline{X}} B = Π X gives the denominator.
GUE eigenbasis average and the Weingarten matrix
A GUE Hamiltonian can be diagonalized as
H = V Λ V † , Λ = diag ( λ 1 , … , λ d ) , (85) H=V\Lambda V^\dagger,\qquad\Lambda=\operatorname{diag}(\lambda_1,\ldots,\lambda_d), \tag*{(85)} H = V Λ V † , Λ = diag ( λ 1 , … , λ d ) , (85)
where V V V is Haar distributed over U ( d ) U(d) U ( d ) and statistically independent of Λ \Lambda Λ [3 ] . Defining
D ( t ) = e − i Λ t , U ( t ) = V D ( t ) V † , (86) D(t)=e^{-i\Lambda t},\qquad U(t)=VD(t)V^\dagger, \tag*{(86)} D ( t ) = e − i Λ t , U ( t ) = V D ( t ) V † , (86)
we obtain
I B ( t , α ) = E Λ , V Tr ( B V D † V † K ^ V D V † ρ i n V D † V † K ^ † V D V † ) . (87) I_{B}(t,\alpha)=\mathbb{E}_{\Lambda,V}\operatorname{Tr}\left(BVD^\dagger V^\dagger\hat{K}VDV^\dagger\rho_{\mathrm{in}}VD^\dagger V^\dagger\hat{K}^\dagger VDV^\dagger\right). \tag*{(87)} I B ( t , α ) = E Λ , V Tr ( B V D † V † K ^ V D V † ρ in V D † V † K ^ † V D V † ) . (87)
Introduce the ordered lists
( A 1 , A 2 , A 3 , A 4 ) = ( B , K ^ , ρ i n , K ^ † ) , ( Ω 1 , Ω 2 , Ω 3 , Ω 4 ) = ( D † , D , D † , D ) . (88) (A_1,A_2,A_3,A_4)=(B,\hat{K},\rho_{\mathrm{in}},\hat{K}^\dagger),\qquad(\Omega_1,\Omega_2,\Omega_3,\Omega_4)=(D^\dagger,D,D^\dagger,D). \tag*{(88)} ( A 1 , A 2 , A 3 , A 4 ) = ( B , K ^ , ρ in , K ^ † ) , ( Ω 1 , Ω 2 , Ω 3 , Ω 4 ) = ( D † , D , D † , D ) . (88)
We next fix the permutation convention in Eq. (8). For π ∈ S 4 \pi\in S_4 π ∈ S 4 , define
Tr π ( O 1 , O 2 , O 3 , O 4 ) = ∏ c = ( i 1 ⋯ i s ) ∈ cyc ( π ) Tr ( O i 1 ⋯ O i s ) . (89) \operatorname{Tr}_{\pi}(O_1,O_2,O_3,O_4)=\prod_{c=(i_1\cdots i_s)\in\operatorname{cyc}(\pi)}\operatorname{Tr}(O_{i_1}\cdots O_{i_s}). \tag*{(89)} Tr π ( O 1 , O 2 , O 3 , O 4 ) = c = ( i 1 ⋯ i s ) ∈ cyc ( π ) ∏ Tr ( O i 1 ⋯ O i s ) . (89)
Here s s s denotes only the length of the cycle c c c ; it is unrelated to the Majorana-shell coefficient s 2 m s_{2m} s 2 m used in the derivation of Eq. (6). Let
G σ , τ = d # cyc ( σ − 1 τ ) , W g d ( σ , τ ) = [ G − 1 ] σ , τ (90) G_{\sigma,\tau}=d^{\#\operatorname{cyc}(\sigma^{-1}\tau)},\qquad W_{gd}(\sigma,\tau)=\left[G^{-1}\right]_{\sigma,\tau} \tag*{(90)} G σ , τ = d # cyc ( σ − 1 τ ) , W g d ( σ , τ ) = [ G − 1 ] σ , τ (90)
be the S 4 S_4 S 4 Gram and Weingarten matrices. Equivalently, W g d ( σ , τ ) = W g d ( σ − 1 τ ) W_{gd}(\sigma,\tau)=W_{gd}(\sigma^{-1}\tau) W g d ( σ , τ ) = W g d ( σ − 1 τ ) . Since the unitary Weingarten function is a class function, this is also equal to W g d ( τ σ − 1 ) W_{gd}(\tau\sigma^{-1}) W g d ( τ σ − 1 ) .
For completeness, we make the index contraction explicit. At fixed Λ \Lambda Λ , the integrand in Eq. (87) is
∑ { x r , a r , b r , c r } r = 1 4 ∏ r = 1 4 ( A r ) x r a r V a r b r ( Ω r ) b r c r V x r + 1 c r ∗ , x 5 = x 1 . (91) \sum_{\{x_r,a_r,b_r,c_r\}_{r=1}^{4}} \prod_{r=1}^{4} (A_r)_{x_r a_r} V_{a_r b_r}(\Omega_r)_{b_r c_r} V^{*}_{x_{r+1}c_r}, \qquad x_5=x_1. \tag*{(91)} { x r , a r , b r , c r } r = 1 4 ∑ r = 1 ∏ 4 ( A r ) x r a r V a r b r ( Ω r ) b r c r V x r + 1 c r ∗ , x 5 = x 1 . (91)
The fourth Haar moment identifies a r = x σ ( r ) + 1 a_r=x_{\sigma(r)+1} a r = x σ ( r ) + 1 and b r = c τ ( r ) b_r=c_{\tau(r)} b r = c τ ( r ) . With
γ = ( 1234 ) , (92) \gamma=(1234), \tag*{(92)} γ = ( 1234 ) , (92)
and permutation products acting from right to left, so that ( γ σ ) ( r ) = γ ( σ ( r ) ) (\gamma\sigma)(r)=\gamma(\sigma(r)) ( γ σ ) ( r ) = γ ( σ ( r )) , the x x x -index loops give Tr γ σ ( A 1 , A 2 , A 3 , A 4 ) \operatorname{Tr}_{\gamma\sigma}(A_1,A_2,A_3,A_4) Tr γ σ ( A 1 , A 2 , A 3 , A 4 ) , whereas the spectral loops give Tr τ − 1 ( Ω 1 , Ω 2 , Ω 3 , Ω 4 ) \operatorname{Tr}_{\tau^{-1}}(\Omega_1,\Omega_2,\Omega_3,\Omega_4) Tr τ − 1 ( Ω 1 , Ω 2 , Ω 3 , Ω 4 ) . Because D D D and D † D^\dagger D † are diagonal and mutually commuting,
Tr τ − 1 ( D † , D , D † , D ) = Tr τ ( D † , D , D † , D ) . (93) \operatorname{Tr}_{\tau^{-1}}(D^\dagger,D,D^\dagger,D)=\operatorname{Tr}_{\tau}(D^\dagger,D,D^\dagger,D). \tag*{(93)} Tr τ − 1 ( D † , D , D † , D ) = Tr τ ( D † , D , D † , D ) . (93)
The eigenbasis average is therefore
I B ( t , α ) = ∑ σ , τ ∈ S 4 W g d ( σ , τ ) Tr γ σ ( B , K ^ , ρ i n , K ^ † ) R τ ( t ) , (94) I_B(t,\alpha)=\sum_{\sigma,\tau\in S_4}\mathrm{Wg}_d(\sigma,\tau)\operatorname{Tr}_{\gamma\sigma}(B,\hat{K},\rho_{\mathrm{in}},\hat{K}^{\dagger})R_\tau(t), \tag*{(94)} I B ( t , α ) = σ , τ ∈ S 4 ∑ Wg d ( σ , τ ) Tr γ σ ( B , K ^ , ρ in , K ^ † ) R τ ( t ) , (94)
where
R τ ( t ) = E Λ [ Tr τ ( D † , D , D † , D ) ] . (95) R_\tau(t)=\mathbb{E}_{\Lambda}\left[\operatorname{Tr}_{\tau}(D^\dagger,D,D^\dagger,D)\right]. \tag*{(95)} R τ ( t ) = E Λ [ Tr τ ( D † , D , D † , D ) ] . (95)
The appearance of S 4 S_4 S 4 follows from the four copies each of V V V and V † V^\dagger V † in Eq. (87) .
Permutation-resolved GUE spectral factors
All time dependence is contained in R τ ( t ) R_\tau(t) R τ ( t ) . Define
Z a ( t ) = Tr e i a Λ t , Z 0 ( t ) = d , Z − a ( t ) = Z a ∗ ( t ) , a ∈ Z . (96) Z_a(t)=\operatorname{Tr}e^{ia\Lambda t},\qquad Z_0(t)=d,\qquad Z_{-a}(t)=Z_a^*(t),\qquad a\in\mathbb{Z}. \tag*{(96)} Z a ( t ) = Tr e ia Λ t , Z 0 ( t ) = d , Z − a ( t ) = Z a ∗ ( t ) , a ∈ Z . (96)
The four spectral operators in Eq. (88) carry signs
( ϵ 1 , ϵ 2 , ϵ 3 , ϵ 4 ) = ( + 1 , − 1 , + 1 , − 1 ) . (97) (\epsilon_1,\epsilon_2,\epsilon_3,\epsilon_4)=(+1,-1,+1,-1). \tag*{(97)} ( ϵ 1 , ϵ 2 , ϵ 3 , ϵ 4 ) = ( + 1 , − 1 , + 1 , − 1 ) . (97)
For a cycle c ∈ cyc ( τ ) c\in\operatorname{cyc}(\tau) c ∈ cyc ( τ ) , define the spectral charge
χ ( c ) = ∑ i ∈ c ϵ i . (98) \chi(c)=\sum_{i\in c}\epsilon_i. \tag*{(98)} χ ( c ) = i ∈ c ∑ ϵ i . (98)
Then
R τ ( t ) = E Λ [ ∏ c ∈ cyc ( τ ) Z χ ( c ) ( t ) ] . (99) R_\tau(t)=\mathbb{E}_{\Lambda}\left[\prod_{c\in\operatorname{cyc}(\tau)}Z_{\chi(c)}(t)\right]. \tag*{(99)} R τ ( t ) = E Λ c ∈ cyc ( τ ) ∏ Z χ ( c ) ( t ) . (99)
In terms of the standard GUE spectral form factors
R 2 ( t ) = E Λ [ Z 1 ( t ) Z − 1 ( t ) ] , R_2(t)=\mathbb{E}_{\Lambda}[Z_1(t)Z_{-1}(t)], R 2 ( t ) = E Λ [ Z 1 ( t ) Z − 1 ( t )] ,
R 4 ( t ) = E Λ [ Z 1 2 ( t ) Z − 1 2 ( t ) ] , R_4(t)=\mathbb{E}_{\Lambda}[Z_1^2(t)Z_{-1}^2(t)], R 4 ( t ) = E Λ [ Z 1 2 ( t ) Z − 1 2 ( t )] ,
R 4 , 1 ( t ) = E Λ [ Z 1 2 ( t ) Z − 2 ( t ) ] , R_{4,1}(t)=\mathbb{E}_{\Lambda}[Z_1^2(t)Z_{-2}(t)], R 4 , 1 ( t ) = E Λ [ Z 1 2 ( t ) Z − 2 ( t )] ,
R 4 , 2 ( t ) = E Λ [ Z 2 ( t ) Z − 2 ( t ) ] = R 2 ( 2 t ) , (100) R_{4,2}(t)=\mathbb{E}_{\Lambda}[Z_2(t)Z_{-2}(t)]=R_2(2t), \tag*{(100)} R 4 , 2 ( t ) = E Λ [ Z 2 ( t ) Z − 2 ( t )] = R 2 ( 2 t ) , (100)
the 24 spectral permutations reduce to Table I . The GUE eigenvalue measure is invariant under Λ ↦ − Λ \Lambda\mapsto-\Lambda Λ ↦ − Λ , so the ensemble-averaged R 4 , 1 ( t ) R_{4,1}(t) R 4 , 1 ( t ) is real.
Table I. Permutation-resolved spectral factors in the convention of Eq. (95) .
Equation (99) is exact at finite d d d . If one substitutes the closed spectral-kernel expressions of [3 ] , their stated large-d d d approximation and GUE normalization must be used. A rescaling of H H H changes only the time argument of these spectral factors.
Fixed-operator cycle factors for the Néel state
For each site, write
σ j z ∣ ψ i n ⟩ = z j ∣ ψ i n ⟩ , z j ∈ { + 1 , − 1 } , (101) \sigma^{z}_{j}|\psi_{\mathrm{in}}\rangle=z_{j}|\psi_{\mathrm{in}}\rangle,\qquad z_{j}\in\{+1,-1\}, \tag*{(101)} σ j z ∣ ψ in ⟩ = z j ∣ ψ in ⟩ , z j ∈ { + 1 , − 1 } , (101)
We define the total and ancilla magnetizations of the selected Néel configuration as
M 0 = ∑ j = 1 N z j , M X ‾ = ∑ j ∈ X ‾ z j . (102) \mathcal{M}_{0}=\sum_{j=1}^{N}z_{j},\qquad\mathcal{M}_{\overline{X}}=\sum_{j\in\overline{X}}z_{j}. \tag*{(102)} M 0 = j = 1 ∑ N z j , M X = j ∈ X ∑ z j . (102)
The calligraphic symbol M \mathcal{M} M is used here to avoid any confusion with the matchgate subscript M M M in U M U_{M} U M and Φ M ( 2 ) \Phi^{(2)}_{M} Φ M ( 2 ) in the preceding section.
For a cycle c ∈ cyc ( γ σ ) c\in\operatorname{cyc}(\gamma\sigma) c ∈ cyc ( γ σ ) , define the net error charge
q ( c ) = 1 { 2 ∈ c } − 1 { 4 ∈ c } ∈ { − 1 , 0 , + 1 } . (103) q(c)=\mathbf{1}_{\{2\in c\}}-\mathbf{1}_{\{4\in c\}}\in\{-1,0,+1\}. \tag*{(103)} q ( c ) = 1 { 2 ∈ c } − 1 { 4 ∈ c } ∈ { − 1 , 0 , + 1 } . (103)
The labels 2 and 4 refer to K ^ \hat{K} K ^ and K ^ † = K ^ − 1 \hat{K}^{\dagger}=\hat{K}^{-1} K ^ † = K ^ − 1 , respectively, in the ordered list in Eq. (88) . All fixed operators are diagonal in the computational basis, so the error operators in a cycle reduce to K ^ q ( c ) \hat{K}^{q(c)} K ^ q ( c ) .
Only three elementary traces are required:
η q ≡ ⟨ ψ i n ∣ K ^ q ∣ ψ i n ⟩ = e − i q α M 0 / 2 , (104) \eta_{q}\equiv\langle\psi_{\mathrm{in}}|\hat{K}^{q}|\psi_{\mathrm{in}}\rangle=e^{-iq\alpha\mathcal{M}_{0}/2}, \tag*{(104)} η q ≡ ⟨ ψ in ∣ K ^ q ∣ ψ in ⟩ = e − i q α M 0 /2 , (104)
κ q ≡ Tr ( K ^ q ) = [ 2 cos ( q α 2 ) ] N = d cos N ( q α 2 ) , (105) \kappa_{q}\equiv\operatorname{Tr}(\hat{K}^{q})=\left[2\cos\left(\frac{q\alpha}{2}\right)\right]^{N}=d\cos^{N}\left(\frac{q\alpha}{2}\right), \tag*{(105)} κ q ≡ Tr ( K ^ q ) = [ 2 cos ( 2 q α ) ] N = d cos N ( 2 q α ) , (105)
μ q ≡ Tr ( Π X ‾ K ^ q ) = Tr X ( K ^ X q ) ⟨ ψ X ‾ i n ∣ K ^ X ‾ q ∣ ψ X ‾ i n ⟩ = 2 k cos k ( q α 2 ) e − i q α M X ‾ / 2 . (106) \begin{aligned}
\mu_{q}&\equiv\operatorname{Tr}(\Pi_{\overline{X}}\hat{K}^{q})\\
&=\operatorname{Tr}_{X}(\hat{K}^{q}_{X})\langle\psi_{\overline{X}}^{\mathrm{in}}|\hat{K}^{q}_{\overline{X}}|\psi_{\overline{X}}^{\mathrm{in}}\rangle\\
&=2^{k}\cos^{k}\left(\frac{q\alpha}{2}\right)e^{-iq\alpha\mathcal{M}_{\overline{X}}/2}. \tag*{(106)}
\end{aligned} μ q ≡ Tr ( Π X K ^ q ) = Tr X ( K ^ X q ) ⟨ ψ X in ∣ K ^ X q ∣ ψ X in ⟩ = 2 k cos k ( 2 q α ) e − i q α M X /2 . (106)
In particular, η 0 = 1 \eta_{0}=1 η 0 = 1 , κ 0 = d \kappa_{0}=d κ 0 = d , and μ 0 = 2 k \mu_{0}=2^{k} μ 0 = 2 k .
For the numerator, B = ρ i n B=\rho_{\mathrm{in}} B = ρ in , so indices 1 and 3 in Eq. (88) both represent ρ i n \rho_{\mathrm{in}} ρ in . Since
( ρ i n ) 2 = ρ i n , [ ρ i n , K ^ ] = 0 , (107) (\rho_{\mathrm{in}})^{2}=\rho_{\mathrm{in}},\qquad[\rho_{\mathrm{in}},\hat{K}]=0, \tag*{(107)} ( ρ in ) 2 = ρ in , [ ρ in , K ^ ] = 0 , (107)
every cycle containing index 1 or 3 gives η q ( c ) \eta_{q(c)} η q ( c ) , whereas a cycle containing neither gives κ q ( c ) \kappa_{q(c)} κ q ( c ) . Hence the numerator cycle factor in Eq. (8) is
g N ( c ) = { η q ( c ) , c ∩ { 1 , 3 } ≠ ∅ , κ q ( c ) , c ∩ { 1 , 3 } = ∅ . (108) g_{N}(c)=
\begin{cases}
\eta_{q(c)}, & c\cap\{1,3\}\ne\varnothing,\\
\kappa_{q(c)}, & c\cap\{1,3\}=\varnothing.
\end{cases} \tag*{(108)} g N ( c ) = { η q ( c ) , κ q ( c ) , c ∩ { 1 , 3 } = ∅ , c ∩ { 1 , 3 } = ∅ . (108)
It follows that
E H [ n ( H ) ] = ∑ σ , τ ∈ S 4 Wg d ( σ , τ ) [ ∏ c ∈ cyc ( γ σ ) g N ( c ) ] R τ ( t ) . (109) E_{H}[n(H)]=\sum_{\sigma,\tau\in S_{4}}\operatorname{Wg}_{d}(\sigma,\tau)\left[\prod_{c\in\operatorname{cyc}(\gamma\sigma)}g_{N}(c)\right]\mathcal{R}_{\tau}(t). \tag*{(109)} E H [ n ( H )] = σ , τ ∈ S 4 ∑ Wg d ( σ , τ ) c ∈ cyc ( γ σ ) ∏ g N ( c ) R τ ( t ) . (109)
For the denominator, B = Π X ‾ B = \Pi_{\overline{X}} B = Π X . The identities
Π X ‾ ρ i n = ρ i n Π X ‾ = ρ i n (110) \Pi_{\overline{X}}\rho_{\mathrm{in}}=\rho_{\mathrm{in}}\Pi_{\overline{X}}=\rho_{\mathrm{in}} \tag*{(110)} Π X ρ in = ρ in Π X = ρ in (110)
give three mutually exclusive cases. A cycle containing index 3 contains ρ i n \rho_{\mathrm{in}} ρ in and gives η q ( c ) \eta_q(c) η q ( c ) , irrespective of whether it also contains index 1. A cycle containing index 1 but not index 3 contains Π X ‾ \Pi_{\overline{X}} Π X without ρ i n \rho_{\mathrm{in}} ρ in and gives μ q ( c ) \mu_q(c) μ q ( c ) . A cycle containing neither index gives κ q ( c ) \kappa_q(c) κ q ( c ) . Therefore,
g D ( c ) = { η q ( c ) , 3 ∈ c , μ q ( c ) , 1 ∈ c and 3 ∉ c , κ q ( c ) , 1 ∉ c and 3 ∉ c . (111) g_{\mathrm{D}}(c)=
\begin{cases}
\eta_q(c), & 3\in c,\\
\mu_q(c), & 1\in c\ \text{and}\ 3\notin c,\\
\kappa_q(c), & 1\notin c\ \text{and}\ 3\notin c.
\end{cases} \tag*{(111)} g D ( c ) = ⎩ ⎨ ⎧ η q ( c ) , μ q ( c ) , κ q ( c ) , 3 ∈ c , 1 ∈ c and 3 ∈ / c , 1 ∈ / c and 3 ∈ / c . (111)
and
E H [ p ( H ) ] = ∑ σ , τ ∈ S 4 W g d ( σ , τ ) [ ∏ c ∈ cyc ( γ σ ) g D ( c ) ] R τ ( t ) . (112) \mathbb{E}_{H}[p(H)] = \sum_{\sigma,\tau\in S_4} \mathrm{Wg}_{\mathrm{d}}(\sigma,\tau)\left[\prod_{c\in\operatorname{cyc}(\gamma_\sigma)}g_{\mathrm{D}}(c)\right]\mathcal{R}_{\tau}(t). \tag*{(112)} E H [ p ( H )] = σ , τ ∈ S 4 ∑ Wg d ( σ , τ ) c ∈ cyc ( γ σ ) ∏ g D ( c ) R τ ( t ) . (112)
Combining Eqs. (109) and (112) gives Eq. (8) of the main text:
F ~ G U E = ∑ σ , τ ∈ S 4 W g d ( σ , τ ) [ ∏ c ∈ cyc ( γ σ ) g N ( c ) ] R τ ( t ) ∑ σ , τ ∈ S 4 W g d ( σ , τ ) [ ∏ c ∈ cyc ( γ σ ) g D ( c ) ] R τ ( t ) . (113) \widetilde{F}_{\mathrm{GUE}}=
\frac{\sum_{\sigma,\tau\in S_4}\mathrm{Wg}_{\mathrm{d}}(\sigma,\tau)\left[\prod_{c\in\operatorname{cyc}(\gamma_\sigma)}g_{\mathrm{N}}(c)\right]\mathcal{R}_{\tau}(t)}
{\sum_{\sigma,\tau\in S_4}\mathrm{Wg}_{\mathrm{d}}(\sigma,\tau)\left[\prod_{c\in\operatorname{cyc}(\gamma_\sigma)}g_{\mathrm{D}}(c)\right]\mathcal{R}_{\tau}(t)}. \tag*{(113)} F GUE = ∑ σ , τ ∈ S 4 Wg d ( σ , τ ) [ ∏ c ∈ cyc ( γ σ ) g D ( c ) ] R τ ( t ) ∑ σ , τ ∈ S 4 Wg d ( σ , τ ) [ ∏ c ∈ cyc ( γ σ ) g N ( c ) ] R τ ( t ) . (113)
The lowercase cycle factors g N g_{\mathrm{N}} g N and g D g_{\mathrm{D}} g D in Eq. (113) are distinct from the Majorana-shell boundary coefficients N 2 m N_{2m} N 2 m and D 2 m D_{2m} D 2 m in Eq. (6).
For the balanced Néel state used in the main text, M 0 = 0 \mathcal{M}_0=0 M 0 = 0 , and hence
η q = 1. (114) \eta_q=1. \tag*{(114)} η q = 1. (114)
If X X X and X ‾ \overline{X} X each contain an even number of consecutive sites of the alternating Néel pattern, as for the half-system bipartitions used in the calculation, then M X ‾ = 0 \mathcal{M}_{\overline{X}}=0 M X = 0 as well and
μ q = 2 k cos k ( q α 2 ) . (115) \mu_q=2^k\cos^k\left(\frac{q\alpha}{2}\right). \tag*{(115)} μ q = 2 k cos k ( 2 q α ) . (115)
Keeping M X ‾ \mathcal{M}_{\overline{X}} M X in Eq. (106) makes the result valid for a generic placement or parity of X X X .
Numerical implementation of random matchgate circuits and self-averaging of the EED fidelity
This section describes the numerical implementation used to sample the random matchgate encoder and to evaluate the sample-resolved EED fidelity. We first specify the Hurwitz sampling of Haar-random active-FLO circuits, their implementation in terms of elementary qubit gates, and the exact state-vector evaluation of the numerator, postselection probability, and fidelity defined in § 5 . The resulting realization-resolved data provide the input for the self-averaging analysis described in the second part of this section.
Exact state-vector simulation of Haar-random matchgate circuits
Majorana convention and elementary rotations
We use the Jordan–Wigner Majorana operators
γ 2 j − 1 = ( ∏ ℓ < j σ ℓ z ) σ j x , γ 2 j = ( ∏ ℓ < j σ ℓ z ) σ j y , j = 1 , … , N , (116) \gamma_{2j-1}=\left(\prod_{\ell<j}\sigma_\ell^z\right)\sigma_j^x,\qquad
\gamma_{2j}=\left(\prod_{\ell<j}\sigma_\ell^z\right)\sigma_j^y,\qquad j=1,\ldots,N, \tag*{(116)} γ 2 j − 1 = ℓ < j ∏ σ ℓ z σ j x , γ 2 j = ℓ < j ∏ σ ℓ z σ j y , j = 1 , … , N , (116)
which obey σ j z = − i γ 2 j − 1 γ 2 j \sigma_j^z=-i\gamma_{2j-1}\gamma_{2j} σ j z = − i γ 2 j − 1 γ 2 j , in agreement with Eq. (31) . The random active-FLO circuit is built from adjacent-Majorana rotations
U R j ( θ ) = exp ( θ 2 γ j γ j + 1 ) , j = 1 , … , 2 N − 1. (117) U_{R_j}(\theta)=\exp\left(\frac{\theta}{2}\gamma_j\gamma_{j+1}\right),\qquad j=1,\ldots,2N-1. \tag*{(117)} U R j ( θ ) = exp ( 2 θ γ j γ j + 1 ) , j = 1 , … , 2 N − 1. (117)
In the qubit representation of Eq. (116) , these are implemented as
U R j ( θ ) = { exp ( + i θ 2 σ q z ) , j = 2 q − 1 , exp ( + i θ 2 σ q x σ q + 1 x ) , j = 2 q . (118) U_{R_j}(\theta)=
\begin{cases}
\exp\left(+\frac{i\theta}{2}\sigma_q^z\right), & j=2q-1,\\
\exp\left(+\frac{i\theta}{2}\sigma_q^x\sigma_{q+1}^x\right), & j=2q.
\end{cases} \tag*{(118)} U R j ( θ ) = { exp ( + 2 i θ σ q z ) , exp ( + 2 i θ σ q x σ q + 1 x ) , j = 2 q − 1 , j = 2 q . (118)
Thus only single-qubit Z rotations and nearest-neighbor XX rotations are required. The signs and half-angle convention in Eq. (118) are fixed by γ j γ j + 1 = i σ q z \gamma_j\gamma_{j+1}=i\sigma_q^z γ j γ j + 1 = i σ q z for odd j j j and γ j γ j + 1 = i σ q x σ q + 1 x \gamma_j\gamma_{j+1}=i\sigma_q^x\sigma_{q+1}^x γ j γ j + 1 = i σ q x σ q + 1 x for even j j j .
Hurwitz sampling of Haar-random active-FLO circuits
To generate Haar-random active fermionic linear optics (FLO) unitaries, we employ the triangular Hurwitz parameterization described in Ref. [2 ] . For every ℓ = 2 , … , 2 N \ell=2,\ldots,2N ℓ = 2 , … , 2 N , the circuit contains the ℓ − 1 \ell-1 ℓ − 1 angles θ r , ℓ \theta_{r,\ell} θ r , ℓ , with r = 1 , … , ℓ − 1 r=1,\ldots,\ell-1 r = 1 , … , ℓ − 1 . The first angle in each column is uniform,
θ 1 , ℓ ∼ Uniform [ 0 , 2 π ) , (119) \theta_{1,\ell}\sim\operatorname{Uniform}[0,2\pi), \tag*{(119)} θ 1 , ℓ ∼ Uniform [ 0 , 2 π ) , (119)
whereas, for r = 2 , … , ℓ − 1 r=2,\ldots,\ell-1 r = 2 , … , ℓ − 1 ,
p r ( θ ) = Γ [ ( r + 1 ) / 2 ] π Γ ( r / 2 ) sin r − 1 θ , 0 ≤ θ ≤ π . (120) p_r(\theta)=\frac{\Gamma[(r+1)/2]}{\sqrt{\pi}\,\Gamma(r/2)}\sin^{r-1}\theta,\qquad0\leq\theta\leq\pi. \tag*{(120)} p r ( θ ) = π Γ ( r /2 ) Γ [( r + 1 ) /2 ] sin r − 1 θ , 0 ≤ θ ≤ π . (120)
In the implementation, Eq. (120) is sampled without rejection by drawing
Y ∼ Beta ( r 2 , r 2 ) , θ r , ℓ = arccos ( 2 Y − 1 ) . (121) Y\sim\operatorname{Beta}\left(\frac{r}{2},\frac{r}{2}\right),\qquad\theta_{r,\ell}=\arccos(2Y-1). \tag*{(121)} Y ∼ Beta ( 2 r , 2 r ) , θ r , ℓ = arccos ( 2 Y − 1 ) . (121)
The total number of independently sampled continuous parameters is
∑ ℓ = 2 2 N ( ℓ − 1 ) = N ( 2 N − 1 ) . (122) \sum_{\ell=2}^{2N}(\ell-1)=N(2N-1). \tag*{(122)} ℓ = 2 ∑ 2 N ( ℓ − 1 ) = N ( 2 N − 1 ) . (122)
To state the gate order without ambiguity from matrix-product conventions, the state-vector routine performs the following nested updates:
for j = 1 , … , 2 N − 1 , ℓ = j + 1 , and r = j , j − 1 , … , 1 : ∣ ψ ⟩ ← U R r ( θ r , ℓ ) ∣ ψ ⟩ . (123) \text{for }j=1,\ldots,2N-1,\ \ell=j+1,\ \text{and }r=j,j-1,\ldots,1:\qquad|\psi\rangle\leftarrow U_{R_r}(\theta_{r,\ell})|\psi\rangle. \tag*{(123)} for j = 1 , … , 2 N − 1 , ℓ = j + 1 , and r = j , j − 1 , … , 1 : ∣ ψ ⟩ ← U R r ( θ r , ℓ ) ∣ ψ ⟩ . (123)
This gate order is an equivalent Hurwitz word and generates the desired Haar-random active-FLO ensemble. The inverse circuit is applied by reversing both loops and changing the angle signs,
for j = 2 N − 1 , … , 1 , ℓ = j + 1 , and r = 1 , 2 , … , j : ∣ ψ ⟩ ← U R r ( − θ r , ℓ ) ∣ ψ ⟩ . (124) \text{for }j=2N-1,\ldots,1,\ \ell=j+1,\ \text{and }r=1,2,\ldots,j:\qquad|\psi\rangle\leftarrow U_{R_r}(-\theta_{r,\ell})|\psi\rangle. \tag*{(124)} for j = 2 N − 1 , … , 1 , ℓ = j + 1 , and r = 1 , 2 , … , j : ∣ ψ ⟩ ← U R r ( − θ r , ℓ ) ∣ ψ ⟩ . (124)
Equations (123) and (124) therefore implement exactly U F L O U_{\mathrm{FLO}} U FLO and U F L O † U_{\mathrm{FLO}}^\dagger U FLO † for every stored set of angles. Although the triangular circuit has O ( N 2 ) O(N^2) O ( N 2 ) gates and nonoptimal depth, its output ensemble is identical to that of the depth-optimized construction of Ref. [2 ] .
EED evolution and realization-resolved observables
For a single realization a a a , we begin with the same state and error operator as in § 5 ,
∣ ψ i n ⟩ = ∣ 0 ⟩ ⊗ N , K ^ = ∏ j = 1 N exp ( − i α 2 σ j z ) , (125) |\psi_{\mathrm{in}}\rangle=|0\rangle^{\otimes N},\qquad\hat{K}=\prod_{j=1}^{N}\exp\left(-\frac{i\alpha}{2}\sigma_j^z\right), \tag*{(125)} ∣ ψ in ⟩ = ∣0 ⟩ ⊗ N , K ^ = j = 1 ∏ N exp ( − 2 i α σ j z ) , (125)
Figure 1 (PDF p. 22). For EED matchgate circuits without non-Gaussian doping gates, the difference between the quenched and annealed fidelity ∣ F ‾ − F ~ M ∣ \lvert\overline{F}-\widetilde{F}_{\mathrm{M}}\rvert ∣ F − F M ∣ as a function of system size N N N with different error strengths α \alpha α . The horizontal-axis label L L L denotes N N N .
and apply
∣ ψ o u t ( a ) ⟩ = U M , a † K ^ U M , a ∣ 0 ⟩ ⊗ N , U M , a = γ 1 ξ a U F L O , a , (126) \lvert\psi_{\mathrm{out}}^{(a)} \rangle= U_{\mathrm{M},a}^{\dagger} \hat{K} U_{\mathrm{M},a} \lvert0 \rangle^{\otimes N}, \qquad U_{\mathrm{M},a} = \gamma_{1}^{\xi_a} U_{\mathrm{FLO},a}, \tag*{(126)} ∣ ψ out ( a ) ⟩ = U M , a † K ^ U M , a ∣ 0 ⟩ ⊗ N , U M , a = γ 1 ξ a U FLO , a , (126)
Here ξ a ∈ { 0 , 1 } \xi_a \in\{0,1\} ξ a ∈ { 0 , 1 } is sampled independently with equal probabilities. The fixed improper Majorana reflection γ 1 = X 1 \gamma_1=X_1 γ 1 = X 1 extends the Haar-random S O ( 2 N ) SO(2N) S O ( 2 N ) active-FLO draws to the full O ( 2 N ) O(2N) O ( 2 N ) Gaussian ensemble used in the main text. Thus the state-vector routines apply U F L O , a U_{\mathrm{FLO},a} U FLO , a and γ 1 ξ a \gamma_1^{\xi_a} γ 1 ξ a , followed by K ^ \hat{K} K ^ , and then γ 1 ξ a \gamma_1^{\xi_a} γ 1 ξ a and the stored inverse U F L O , a † U_{\mathrm{FLO},a}^{\dagger} U FLO , a † . For the undoped matchgate calculation there is a single Haar-random Gaussian encoder, and no non-Gaussian gates are applied.
Using Π ‾ X = I X ⊗ ρ X i n \overline{\Pi}_{X}=\mathbb{I}_{X}\otimes\rho_{X}^{\mathrm{in}} Π X = I X ⊗ ρ X in from Eq. (1), we calculate the following quantities:
n a = ∣ ⟨ 0 ⊗ N ∣ ψ o u t ( a ) ⟩ ∣ 2 , (127) n_a=\left|\langle0^{\otimes N} \vert\psi_{\mathrm{out}}^{(a)}\rangle\right|^2, \tag*{(127)} n a = ⟨ 0 ⊗ N ∣ ψ out ( a ) ⟩ 2 , (127)
p a = ⟨ ψ o u t ( a ) ∣ Π ‾ X ∣ ψ o u t ( a ) ⟩ = ∑ x X ∈ { 0 , 1 } k ∣ ⟨ x X , 0 X ‾ ∣ ψ o u t ( a ) ⟩ ∣ 2 , (128) p_a=\langle\psi_{\mathrm{out}}^{(a)}\vert\overline{\Pi}_{X}\vert\psi_{\mathrm{out}}^{(a)}\rangle=\sum_{x_X\in\{0,1\}^k}\left|\langle x_X,0_{\overline{X}}\vert\psi_{\mathrm{out}}^{(a)}\rangle\right|^2, \tag*{(128)} p a = ⟨ ψ out ( a ) ∣ Π X ∣ ψ out ( a ) ⟩ = x X ∈ { 0 , 1 } k ∑ ⟨ x X , 0 X ∣ ψ out ( a ) ⟩ 2 , (128)
F a = n a p a . (129) F_a=\frac{n_a}{p_a}. \tag*{(129)} F a = p a n a . (129)
These are precisely the realization-resolved quantities n ( U M ) n(U_{\mathrm{M}}) n ( U M ) , p ( U M ) p(U_{\mathrm{M}}) p ( U M ) , and F ( U M ) F(U_{\mathrm{M}}) F ( U M ) defined in Eqs. (24) and (5). We consider 10 4 10^4 1 0 4 circuit realizations in the calculation.
Self-averaging of the sample-resolved fidelity
Here, we study the difference between the quenched fidelity and annealed fidelity, which are defined by
F ‾ = E a [ n a p a ] , (130) \overline{F}=\mathbb{E}_a\left[\frac{n_a}{p_a}\right], \tag*{(130)} F = E a [ p a n a ] , (130)
and
F ~ M = E a [ n a ] E a [ p a ] , (131) \widetilde{F}_{\mathrm{M}}=\frac{\mathbb{E}_a[n_a]}{\mathbb{E}_a[p_a]}, \tag*{(131)} F M = E a [ p a ] E a [ n a ] , (131)
respectively. We show the results of the fidelity difference ∣ F ‾ − F ~ M ∣ \lvert\overline{F}-\widetilde{F}_{\mathrm{M}}\rvert ∣ F − F M ∣ for the EED matchgate circuits without non-Gaussian doping gates in Fig. 1. At N = 20 N=20 N = 20 , this difference is below 10 − 3 10^{-3} 1 0 − 3 for all error strengths shown, supporting the annealed approximation to the quenched fidelity in this regime.
References