Introduction
Measurements allow a quantum computation to extract classical information, discard information, and reuse its workspace. In polynomial time, these operations can be simulated by a unitary circuit that retains the discarded information in ancillary qubits and measures only at the end [2 , 25 ] . This construction need not preserve a space bound: recording T T T single-qubit measurement outcomes can require T T T additional qubits. We ask whether measurements can be eliminated while retaining logarithmic workspace and a one-sided error guarantee.
Background
Watrous established the basic complexity-theoretic framework for space-bounded quantum computation and its classical simulation bounds [35 , 37 ] . We consider polynomial-time computations with O ( log n ) O(\log n) O ( log n ) quantum work qubits and classical work bits, and read-only access to an input of length n n n .
The class BQL allows intermediate measurements and classical control. It requires acceptance probability at least 2 / 3 2/3 2/3 on yes-instances and at most 1 / 3 1/3 1/3 on no-instances. Its unitary counterpart, BQUL, allows only a final measurement. Fefferman and Remscrim proved BQL = BQUL, preserving logarithmic space and polynomial time [11 Theorem 1] .
The one-sided class RQL instead requires acceptance probability exactly zero on no-instances; RQUL is its unitary counterpart. Both models here are absolutely halting: every branch on every input halts within a common polynomial bound. An additive approximation preserves a two-sided gap but can change zero acceptance into a small positive probability. Fefferman and Remscrim therefore left R Q L = R Q U L RQL = RQUL R Q L = R Q U L as a separate question [11 Open Problem 1] .
Girish, Raz and Zhan independently eliminated measurements for unital computations, whose channels preserve the maximally mixed state [15 Section 5] . Their density-matrix doubling method represents a mixed state by a vector on two registers. Unitality bounds the norms of the resulting operators, but excludes a qubit reset. We extend this construction to general channels while preserving zero acceptance on no-instances.
Exact acceptance conditions also make the gate convention important. Approximate gate synthesis need not preserve a zero probability [34 , 22 ] . We therefore state the gate assumptions explicitly. Figure 1 summarizes prior logarithmic-space results under the cited gate conventions; Appendix § 8 gives further background.
Figure 1. Ordinary logarithmic space. An arrow A → B A \to B A → B means A ⊆ B A \subseteq B A ⊆ B , not necessarily strict. Unlabelled arrows follow from the definitions and displayed equalities; crossing lines are not junctions. Transitive edges and some classes are omitted. The subscript U U U means unitary until the final measurement. R R R means bounded error with perfect soundness, N N N means positive acceptance on yes-instances and zero on no-instances, and PrQL means two-sided unbounded error (often denoted QL). Post allows postselection; C=L is the zero-test class for GapL functions. QUMAL₁ has perfect completeness. †: use QUMAL₁ ⊆ \subseteq ⊆ QUMAL = BQL and closure of BQL under complement. We use polynomial-time, logspace-uniform models and the standard algebraic gate conventions of the cited results. In particular, no arbitrary-gate-set invariance for exact or one-sided error is claimed. This figure summarizes prior results. The reverse inclusion R Q L G ⊆ R Q U L G RQL_G \subseteq RQUL_G R Q L G ⊆ R Q U L G proved in Theorems 3.3 and 3.5 holds under their stated gate assumptions and is not added to this prior-work diagram. The layout follows the containment-map convention of Watrous [35 Fig. 9] .
Main results
Put Γ = { H , T , C N O T } \Gamma= \{H,T,\mathrm{CNOT}\} Γ = { H , T , CNOT } , where T = diag ( 1 , e i π / 4 ) T = \operatorname{diag}(1,e^{i\pi/4}) T = diag ( 1 , e iπ /4 ) . For the two RQL results below, we use fixed finite sets of one- and two-qubit gates; all computations have polynomial time and logarithmic classical and quantum workspace, with every branch on every input halting within a common polynomial bound. An exact gate implementation is a fixed finite circuit whose extra qubits start and end in zero on every input. Unless we explicitly allow a global phase, its action is exactly the specified matrix U U U , rather than a scalar multiple e i θ U e^{i\theta}U e i θ U . We write M † = M ‾ T M^\dagger= \overline{M}^{\mathsf{T}} M † = M T for the Hermitian conjugate (conjugate transpose) of a matrix. For a unitary gate, U † = U − 1 U^\dagger= U^{-1} U † = U − 1 is its inverse. For the standard gate set, Theorem 3.1 proves
R Q L Γ = R Q U L Γ \mathrm{RQL}_{\Gamma}=\mathrm{RQUL}_{\Gamma} RQL Γ = RQUL Γ
Thus an adaptive Clifford+T T T computation with one-sided bounded error can be simulated with only a final measurement, preserving polynomial time, logarithmic space, and exactly zero acceptance on no-instances. The two theorems below extend this conclusion to broader gate sets.
Gate sets with exact inverses (Theorem 3.3 ). Suppose the entries of every gate in G \mathcal{G} G can be approximated to error 2 − b 2^{-b} 2 − b in deterministic space O ( b ) O(b) O ( b ) and time 2 O ( b ) 2^{O(b)} 2 O ( b ) . This condition concerns computing numerical descriptions of the gates; the primitive gates themselves are applied exactly. If circuits over G \mathcal{G} G implement every gate of Γ \Gamma Γ and every inverse U † U^\dagger U † , for U ∈ G U \in\mathcal{G} U ∈ G , exactly in this sense, then
R Q L G = R Q U L G \mathrm{RQL}_{\mathcal{G}}=\mathrm{RQUL}_{\mathcal{G}} RQL G = RQUL G
Exact conjugates and controlled versions of the additional gates are unnecessary. In particular, this covers Γ ∪ { U 1 , U 1 † , … , U k , U k † } \Gamma\cup\{U_1,U_1^\dagger,\ldots,U_k,U_k^\dagger\} Γ ∪ { U 1 , U 1 † , … , U k , U k † } for any fixed family whose entries satisfy these bounds, even when they are transcendental. This statement eliminates measurements within the given gate set; it does not identify the classes defined by different gate sets.
CM-field gate-set independence (Theorem 3.5 ). A number field is a field obtained from Q \mathbb{Q} Q by adjoining finitely many algebraic numbers. It is totally real if every element has only real algebraic conjugates, meaning that all roots of its minimal polynomial over Q \mathbb{Q} Q are real. For example, Q ( 2 ) \mathbb{Q}(\sqrt{2}) Q ( 2 ) is totally real. A CM field has the form K ( − a ) K(\sqrt{-a}) K ( − a ) , where K K K is totally real and every conjugate of a ∈ K a \in K a ∈ K is positive. For example, Q ( 2 , i ) \mathbb{Q}(\sqrt{2},i) Q ( 2 , i ) is a CM field containing the Clifford+T T T entries. § 3.4 gives the equivalent formal definition. Suppose that, after multiplying each primitive gate by its own fixed phase, all entries lie in one fixed CM field. If circuits over G \mathcal{G} G implement the gates of Γ \Gamma Γ exactly with extra qubits returned to zero, now allowing a global phase, then
R Q L G = R Q U L G = R Q L Γ = R Q U L Γ \mathrm{RQL}_{\mathcal{G}}=\mathrm{RQUL}_{\mathcal{G}}=\mathrm{RQL}_{\Gamma}=\mathrm{RQUL}_{\Gamma} RQL G = RQUL G = RQL Γ = RQUL Γ
The additional gates need not have exact implementations of their inverses, complex conjugates, or controlled versions. The field and all phases are fixed independently of input length.
The first result places no algebraic restriction on the entries but requires exact inverses; the second removes that requirement under a field restriction and identifies the resulting class with the Clifford+T T T class. Both preserve zero acceptance exactly , despite approximation in the circuits implementing the right Kraus factors. The proofs use the established two-sided measurement-elimination theorem to implement the right Kraus factors. Accordingly, the bounded-error application in Appendix § 7 is conditional on that implementation and is not an independent proof of B Q L = B Q U L \mathrm{BQL}=\mathrm{BQU L} BQL = BQUL .
Perfect completeness with quantum witnesses (Theorem 4.1). There is also an exact history-checking construction for quantum Merlin–Arthur verification. Here Merlin supplies an arbitrary quantum witness, and its size counts towards the total logarithmic space bound. For any fixed finite gate set G G G of constant arity whose entries satisfy the bounds in item 1, implementing H H H , X X X , and Toffoli exactly, and each primitive inverse up to a global phase, we prove
Q M A L 1 , G = Q U M A L 1 , G . \mathrm{QMAL}_{1,G} = \mathrm{QUMAL}_{1,G}. QMAL 1 , G = QUMAL 1 , G .
The subscript 1 means that some witness is accepted with certainty on each yes-instance; every witness is accepted with probability at most 1 / 3 1/3 1/3 on no-instances. All fixed gate implementations return their extra qubits to zero. Section 4 defines the models and proves the theorem. The construction propagates the rejection observable backwards and tests a history certificate supplied by Merlin. Paired calls to a gate and its inverse give the necessary doubled coefficients exactly, without controlled or conjugated versions of the gate. This construction requires neither reweighting nor the two-sided measurement-elimination theorem, but retains a quantum witness.
Proof idea: preserve zero acceptance and retain a signal
Density-matrix doubling represents X X X by vec ( X ) = ∑ i , j X i j ∣ i ⟩ ∣ j ⟩ \operatorname{vec}(X) = \sum_{i,j} X_{ij} \lvert i\rangle\lvert j\rangle vec ( X ) = ∑ i , j X ij ∣ i ⟩ ∣ j ⟩ . For a channel Φ t ( X ) = ∑ a K t , a X K t , a † \Phi_t(X) = \sum_a K_{t,a}XK_{t,a}^{\dagger} Φ t ( X ) = ∑ a K t , a X K t , a † , its doubled operator is ∑ a K t , a ⊗ K ‾ t , a \sum_a K_{t,a} \otimes\overline{K}_{t,a} ∑ a K t , a ⊗ K t , a . The two registers use twice the original number of qubits.
The one-sided argument starts from a simple observation. If K h K_h K h is the product of Kraus operators along history h h h , and Π \Pi Π projects onto acceptance, then
p = ∑ h ∥ Π K h ∣ 0 ⟩ ∥ 2 = 0 ⟹ Π K h ∣ 0 ⟩ = 0 for every h . p = \sum_h \lVert\Pi K_h \lvert0\rangle\rVert^2 = 0 \quad\Longrightarrow\quad\Pi K_h \lvert0\rangle= 0 \quad\text{for every } h. p = h ∑ ∥ Π K h ∣ 0 ⟩ ∥ 2 = 0 ⟹ Π K h ∣ 0 ⟩ = 0 for every h .
Consequently, changing only the right factor in each doubled term cannot create acceptance: every accepting term still contains the same zero left vector. Accuracy is needed to retain acceptance on yes-instances.
The difficulty is normalization. A doubled qubit reset has operator norm 2 \sqrt{2} 2 , so normalizing every step separately can lose an exponential factor. We use reference states that follow the source channels, with a small maximally mixed contribution added at each step. Their square roots and inverse square roots reweight the right factors. Each reweighted step has norm at most one, consecutive weights cancel, and the final accepting probability remains inverse polynomial. These weights are related to Petz recovery [26 , 27 , 5 , 12 ] ; Section 3.1 explains the relation precisely.
A unitary circuit implements an approximation to each reweighted step in the part selected by zero scratch registers, while retaining the left Kraus factors exactly. A logarithmic counter selects the product of those parts without storing all outcomes. Unitary amplification then raises the accepting probability to a constant. Figure 2 summarizes the construction.
Figure 2. The direct RQL simulation under the gate assumptions of Theorem 3.1 and its extension in Theorem 3.3 . The first two stages describe matrices; the last three implement the simulation in logarithmic space and polynomial time. Exact left Kraus factors preserve perfect soundness throughout, while reweighting and accurate right factors retain acceptance on yes-instances. The use of two-sided measurement elimination is a dependency of the construction. The CM-field theorem first converts the source computation to the standard gate set, then applies this simulation.
Section 3.2 proves the Clifford+T T T case by following this algorithm. Sections 3.3 and 3.4 then address broader gate sets. The implementation of the right factors uses the established two-sided measurement-elimination theorem: reference-entry estimates are converted into unitary circuits before the one-sided simulation is constructed. There is no dependence on the one-sided conclusion. The bounded-error application in Appendix § 7 uses the same implementation and is not an independent proof of BQL = BQUL.
Section 4 gives a separate construction for quantum witnesses with perfect completeness. It tests a history of rejection observables supplied by Merlin and uses neither reweighting nor two-sided measurement elimination. Supporting mathematical lemmas are checked in Lean; Appendix § 9 states the scope.
Use of generative AI. AI tools were used in drafting this article. They were also used in developing and checking parts of the mathematical arguments, searching and checking the literature, revising the exposition, and constructing formal proofs of supporting lemmas. The Lean proofs of supporting mathematical lemmas are available at https://github.com/ExampleOne/unitary-rql-lean .
Preliminaries
Quantum Turing machines
We use the classically controlled model of space-bounded quantum computation, in which a classical Turing machine directs operations on a tape of qubits [33 , 11 ] . The cited works use this model. Watrous’ earlier model allows the entire machine configuration to be in superposition [35 ] .
Definition 2.1 (Quantum Turing machine over G \mathcal{G} G ). Let G \mathcal{G} G be a finite set of one- and two-qubit unitaries, for example G = { H , T , C N O T } \mathcal{G} = \{H,T,\mathrm{CNOT}\} G = { H , T , CNOT } . A quantum Turing machine over G \mathcal{G} G , or Q T M G \mathrm{QTM}_{\mathcal{G}} QTM G , is a deterministic Turing machine M M M with a finite set of states Q Q Q , a read-only input tape, and a classical work tape. It also has a quantum work tape, scanned by two heads. Each cell of this tape holds a qubit initialized to ∣ 0 ⟩ \lvert0\rangle ∣ 0 ⟩ . The set Q Q Q contains a halting accepting state q a c c q_{\mathrm{acc}} q acc , a halting rejecting state q r e j q_{\mathrm{rej}} q rej , a state q g q_g q g for each gate g ∈ G g \in\mathcal{G} g ∈ G , and a measurement state q m e a s q_{\mathrm{meas}} q meas . In each step M M M behaves as an ordinary Turing machine, except that:
on entering q g q_g q g , the gate g g g is applied to the qubit(s) under the quantum heads (a one-qubit gate acts on the qubit under the first head);
on entering q m e a s q_{\mathrm{meas}} q meas , the qubit under the first quantum head is measured in the computational basis, and the outcome b ∈ { 0 , 1 } b \in\{0,1\} b ∈ { 0 , 1 } is made available to the finite control, which determines the next step.
Measurement outcomes are the only way information flows from the quantum tape to the classical control. M M M accepts if it halts in q a c c q_{\mathrm{acc}} q acc ; the acceptance probability Pr [ M ( x ) accepts ] \Pr[M(x)\text{ accepts}] Pr [ M ( x ) accepts ] is taken over the measurement outcomes.
M M M runs in space s ( n ) s(n) s ( n ) if on every input of length n n n and every sequence of measurement outcomes it visits at most s ( n ) s(n) s ( n ) cells of each work tape. We require absolute halting: every computation branch halts. A time bound t ( n ) t(n) t ( n ) means that every branch on every input of length n n n halts within t ( n ) t(n) t ( n ) steps, including inputs outside the promise. Thus time is bounded in the worst case over both inputs and measurement outcomes. Throughout this paper, space-s s s machines satisfy such a bound t ( n ) = 2 O ( s ( n ) ) t(n)=2^{O(s(n))} t ( n ) = 2 O ( s ( n )) ; for logarithmic space this is polynomial.
We distinguish two kinds of Q T M G \mathrm{QTM}_{\mathcal{G}} QTM G according to how they may use measurements.
Definition 2.2 (General and unitary QTMs).
A general Q T M G \mathrm{QTM}_{\mathcal{G}} QTM G may enter q m e a s q_{\mathrm{meas}} q meas any number of times, so its subsequent classical and quantum operations may depend on intermediate measurement outcomes.
A unitary Q T M G \mathrm{QTM}_{\mathcal{G}} QTM G , or U Q T M G \mathrm{UQTM}_{\mathcal{G}} UQTM G , enters q m e a s q_{\mathrm{meas}} q meas exactly once, as the last step of its computation: it measures a designated output qubit and then immediately halts, in q a c c q_{\mathrm{acc}} q acc if the outcome is 1 1 1 and in q r e j q_{\mathrm{rej}} q rej otherwise.
Every U Q T M G \mathrm{UQTM}_{\mathcal{G}} UQTM G is in particular a general Q T M G \mathrm{QTM}_{\mathcal{G}} QTM G . When we write Q T M G \mathrm{QTM}_{\mathcal{G}} QTM G without qualification we mean a general one.
The classical control of a U Q T M G \mathrm{UQTM}_{\mathcal{G}} UQTM G never depends on the quantum tape, so on input x x x it deterministically applies a fixed sequence of 2 O ( s ) 2^{O(s)} 2 O ( s ) gates to O ( s ) O(s) O ( s ) qubits, followed by a single measurement. In other words, space-s s s U Q T M G \mathrm{UQTM}_{\mathcal{G}} UQTM G s are equivalent to D S P A C E ( s ) \mathrm{DSPACE}(s) DSPACE ( s ) -uniform families of unitary circuits of width O ( s ) O(s) O ( s ) and size 2 O ( s ) 2^{O(s)} 2 O ( s ) [10 , 11 ] . Likewise, general Q T M G \mathrm{QTM}_{\mathcal{G}} QTM G s correspond to uniform circuits with intermediate measurements whose outcomes classically control later gates. Under the usual universality and gate-compatibility assumptions, the space-efficient Solovay–Kitaev theorem makes two-sided bounded-error classes such as B Q L \mathrm{BQL} BQL independent of the gate set [11 ] . This argument does not extend directly to one-sided error, since approximating gates can make a rejecting computation accept with small nonzero probability, which is why we make the gate set explicit.
We define the following complexity classes.
Throughout, a machine solves a promise problem ( L y e s , L n o ) (L_{\mathrm{yes}},L_{\mathrm{no}}) ( L yes , L no ) with one-sided error if its acceptance probability is at least 2 / 3 2/3 2/3 on L y e s L_{\mathrm{yes}} L yes and is exactly zero on L n o L_{\mathrm{no}} L no . All machines below are *absolutely halting: there is a polynomial P P P such that, for every input x x x , every computation branch halts within P ( ∣ x ∣ ) P(|x|) P ( ∣ x ∣ ) steps. This requirement also applies outside the promise, where no correctness condition is imposed.
Definition 2.3. The class R Q L G \mathrm{RQL}_{\mathsf{G}} RQL G consists of promise problems solved with the one-sided error specified above by an absolutely halting, polynomial-time Q T M G \mathrm{QTM}_{\mathsf{G}} QTM G using O ( log n ) O(\log n) O ( log n ) qubits and O ( log n ) O(\log n) O ( log n ) classical work bits.
Definition 2.4. The class R Q U L G \mathrm{RQUL}_{\mathsf{G}} RQUL G is the class of promise problems that can be solved with the one-sided error specified above by an absolutely halting, polynomial-time U Q T M G \mathrm{UQTM}_{\mathsf{G}} UQTM G using O ( log n ) O(\log n) O ( log n ) qubits and O ( log n ) O(\log n) O ( log n ) classical work bits.
Removing measurements from RQL computations
The reweighted doubling framework
We first develop the linear-algebraic construction shared by the bounded- and one-sided-error simulations. Let T ≥ 1 T \ge1 T ≥ 1 , let d d d be the dimension of the source configuration register, and, for 1 ≤ t ≤ T 1 \le t \le T 1 ≤ t ≤ T , write
ρ 0 = ∣ 0 ⟩ ⟨ 0 ∣ , ρ t = Φ t ( ρ t − 1 ) , Φ t ( X ) = ∑ a K t , a X K t , a † . (1) \rho_0 = |0\rangle\langle0|,\qquad\rho_t = \Phi_t(\rho_{t-1}),\qquad\Phi_t(X) = \sum_a K_{t,a} X K_{t,a}^{\dagger}. \tag*{(1)} ρ 0 = ∣0 ⟩ ⟨ 0∣ , ρ t = Φ t ( ρ t − 1 ) , Φ t ( X ) = a ∑ K t , a X K t , a † . (1)
Each Φ t \Phi_t Φ t is trace preserving. The source acceptance probability is p = Tr ( Π ρ T ) p = \operatorname{Tr}(\Pi\rho_T) p = Tr ( Π ρ T ) for a computational-basis acceptance projector Π \Pi Π . For logarithmic-space, polynomial-time computations, the register includes the retained classical configuration and quantum workspace, and d , T ≤ n O ( 1 ) d,T \le n^{O(1)} d , T ≤ n O ( 1 ) .
Vectorization and normalization. Use row vectorization
vec ( X ) = ∑ i , j X i j ∣ i ⟩ ∣ j ⟩ , M t = ∑ a K t , a ⊗ K t , a ‾ , \operatorname{vec}(X) = \sum_{i,j} X_{ij}|i\rangle|j\rangle,\qquad M_t = \sum_a K_{t,a} \otimes\overline{K_{t,a}}, vec ( X ) = i , j ∑ X ij ∣ i ⟩ ∣ j ⟩ , M t = a ∑ K t , a ⊗ K t , a ,
vec ( ρ t ) = M t vec ( ρ t − 1 ) . \operatorname{vec}(\rho_t) = M_t\operatorname{vec}(\rho_{t-1}). vec ( ρ t ) = M t vec ( ρ t − 1 ) .
This doubles the number of qubits used to index a matrix. It is a linear representation of ρ \rho ρ , rather than a purification of it: ∥ vec ( ρ ) ∥ 2 = Tr ( ρ 2 ) \|\operatorname{vec}(\rho)\|^2 = \operatorname{Tr}(\rho^2) ∥ vec ( ρ ) ∥ 2 = Tr ( ρ 2 ) , and its normalized first-register reduced state is ρ 2 / Tr ( ρ 2 ) \rho^2/\operatorname{Tr}(\rho^2) ρ 2 / Tr ( ρ 2 ) . The vector vec ( ρ ) \operatorname{vec}(\sqrt{\rho}) vec ( ρ ) is the canonical purification.
The matrices M t M_t M t need not be contractions. For example, resetting a qubit gives M = ∣ 00 ⟩ ( ⟨ 00 ∣ + ⟨ 11 ∣ ) M = |00\rangle(\langle00|+\langle11|) M = ∣00 ⟩ (⟨ 00∣ + ⟨ 11∣ ) , with operator norm 2 \sqrt{2} 2 . Normalizing every step separately to obtain a unitary clean block can lose an exponential factor over T T T steps. This loss concerns the implementation normalization; the density-vector norm itself is always at least 1 / d 1/\sqrt{d} 1/ d .
Reference states and contractive steps. We start the reference computation in the maximally mixed state. At each step, we apply the original channel and then mix in a small maximally mixed contribution. Following the channel adapts the reference to the computation; the added contribution keeps every eigenvalue bounded away from zero, so the inverse square roots below are controlled. Set
η = 1 / T , κ = 1 + η , σ 0 = I / d , σ t = Φ t ( σ t − 1 ) + η I / d κ . (2) \eta= 1/T,\qquad\kappa= 1+\eta,\qquad\sigma_0 = I/d,\qquad\sigma_t = \frac{\Phi_t(\sigma_{t-1})+\eta I/d}{\kappa}. \tag*{(2)} η = 1/ T , κ = 1 + η , σ 0 = I / d , σ t = κ Φ t ( σ t − 1 ) + η I / d . (2)
These are density operators satisfying σ t ⪰ I / ( d ( T + 1 ) ) \sigma_t \succeq I/(d(T+1)) σ t ⪰ I / ( d ( T + 1 )) ; every eigenvalue is at least 1 / ( d ( T + 1 ) ) 1/(d(T+1)) 1/ ( d ( T + 1 )) .
Define
J t , a = κ − 1 / 2 σ t − 1 1 / 2 K t , a † σ t − 1 / 2 , J t , ∗ = η κ d σ t − 1 / 2 , W t ∣ v ⟩ = ∑ a J t , a ∣ v ⟩ ∣ a ⟩ + J t , ∗ ∣ v ⟩ ∣ ∗ ⟩ , C t = ∑ a K t , a ⊗ J t , a † . (3) \begin{aligned}
J_{t,a} &= \kappa^{-1/2}\sigma_{t-1}^{1/2}K_{t,a}^{\dagger}\sigma_t^{-1/2}, & J_{t,*} &= \sqrt{\frac{\eta}{\kappa d}}\sigma_t^{-1/2},\\
W_t|v\rangle&= \sum_a J_{t,a}|v\rangle|a\rangle+ J_{t,*}|v\rangle|*\rangle, & C_t &= \sum_a K_{t,a}\otimes J_{t,a}^{\dagger}. \tag*{(3)}
\end{aligned} J t , a W t ∣ v ⟩ = κ − 1/2 σ t − 1 1/2 K t , a † σ t − 1/2 , = a ∑ J t , a ∣ v ⟩ ∣ a ⟩ + J t , ∗ ∣ v ⟩ ∣ ∗ ⟩ , J t , ∗ C t = κ d η σ t − 1/2 , = a ∑ K t , a ⊗ J t , a † . (3)
The reference recurrence gives
W t † W t = κ − 1 / 2 σ t − 1 / 2 ( Φ t ( σ t − 1 ) + η I / d ) σ t − 1 / 2 = I . W_t^{\dagger}W_t=\kappa^{-1/2}\sigma_t^{-1/2}\left(\Phi_t(\sigma_{t-1})+\eta I/d\right)\sigma_t^{-1/2}=I. W t † W t = κ − 1/2 σ t − 1/2 ( Φ t ( σ t − 1 ) + η I / d ) σ t − 1/2 = I .
Thus W t W_t W t is an isometry: it preserves vector lengths. Choose a unitary dilation D t D_t D t of the Kraus operators and an abstract unitary extension U W t ‾ U_{\overline{W_t}} U W t of W t ‾ \overline{W_t} W t , padding the label space as needed and setting K t , ∗ = 0 K_{t,*}=0 K t , ∗ = 0 . On doubled registers A A A , B B B and label register E E E ,
C t = ⟨ 0 ∣ E ( U W t ‾ † ) B E ( D t ) A E ∣ 0 ⟩ E . C_t=\langle0|_E(U_{\overline{W_t}}^{\dagger})_{BE}(D_t)_{AE}|0\rangle_E. C t = ⟨ 0 ∣ E ( U W t † ) B E ( D t ) A E ∣0 ⟩ E .
It is therefore a compression of a unitary, and ∥ C t ∥ ≤ 1 \lVert C_t\rVert\leq1 ∥ C t ∥ ≤ 1 in Euclidean operator norm. This identity does not assume exact synthesis of the abstract extension over a finite gate set.
Keeping the left factors exact. Trace preservation ensures that the original left preparation preserves vector lengths: ∑ a K t , a † K t , a = I \sum_a K_{t,a}^{\dagger}K_{t,a}=I ∑ a K t , a † K t , a = I . The preparation for the unweighted right factor would use Hermitian conjugates, which need not satisfy the same condition: ∑ a K t , a K t , a † = Φ t ( I ) \sum_a K_{t,a}K_{t,a}^{\dagger}=\Phi_t(I) ∑ a K t , a K t , a † = Φ t ( I ) may differ from I I I . The factors J t , a J_{t,a} J t , a and the extra branch J t , ∗ J_{t,*} J t , ∗ correct this second normalization, as the identity W t † W t = I W_t^{\dagger}W_t=I W t † W t = I shows. Figure 3 (a) places both reference-state weights on the right register. In the implementation of § 3.2 , the original circuit D t D_t D t remains exact while the circuit for the right factors is approximated, as shown in Figure 3 (b).
Figure 3. Keeping the left Kraus factors exact while approximating the right factors. Read both diagrams from left to right. Panel (a) is an algebraic factorization: its matrix boxes need not be unitary. Both reference-state weights act on B B B , and summing over a a a gives C t C_t C t . Panel (b) is a unitary circuit. The exact source circuit D t D_t D t writes the Kraus label into E E E ; Q t Q_t Q t acts only on B B B , E E E , Z Z Z and supplies the approximate right factors. Its implemented inverse is exact. In particular, B t , a = ⟨ 0 E 0 Z ∣ Q t − 1 ∣ a E 0 Z ⟩ B_{t,a} = \langle0_E0_Z|Q_t^{-1}|a_E0_Z\rangle B t , a = ⟨ 0 E 0 Z ∣ Q t − 1 ∣ a E 0 Z ⟩ , so approximation leaves every left factor K t , a K_{t,a} K t , a unchanged. The green conditions select the component with zero scratch; they are not intermediate measurements. The full simulation uses the failure counter described in § 3.3 . Appendix § 6 gives the detailed circuits.
Cancellation of weights and acceptance bounds. Vectorization gives
C t vec ( X ) = κ − 1 / 2 vec ( Φ t ( X σ t − 1 1 / 2 ) σ t − 1 / 2 ) . C_t\operatorname{vec}(X)=\kappa^{-1/2}\operatorname{vec}\left(\Phi_t(X\sigma_{t-1}^{1/2})\sigma_t^{-1/2}\right). C t vec ( X ) = κ − 1/2 vec ( Φ t ( X σ t − 1 1/2 ) σ t − 1/2 ) .
Consecutive square roots cancel, yielding
C T ⋯ C 1 vec ( ρ 0 ) = vec ( ρ T σ T − 1 / 2 ) d κ T . (4) C_T\cdots C_1\operatorname{vec}(\rho_0)=\frac{\operatorname{vec}(\rho_T\sigma_T^{-1/2})}{\sqrt{d\kappa^T}}. \tag*{(4)} C T ⋯ C 1 vec ( ρ 0 ) = d κ T vec ( ρ T σ T − 1/2 ) . (4)
Let
q ∗ : = ∥ ( Π ⊗ I ) C T ⋯ C 1 ∣ 00 ⟩ ∥ 2 = ∥ Π ρ T σ T − 1 / 2 ∥ F 2 d κ T . (5) q_*:=\lVert(\Pi\otimes I)C_T\cdots C_1|00\rangle\rVert^2=\frac{\lVert\Pi\rho_T\sigma_T^{-1/2}\rVert_F^2}{d\kappa^T}. \tag*{(5)} q ∗ := ∥( Π ⊗ I ) C T ⋯ C 1 ∣00 ⟩ ∥ 2 = d κ T ∥ Π ρ T σ T − 1/2 ∥ F 2 . (5)
In the unitary implementation, this is the joint probability that the first register indicates acceptance and the scratch registers and failure counter are zero. This probability satisfies
p 2 e d ≤ p 2 d κ T ≤ q ∗ ≤ p , e = exp ( 1 ) . (6) \frac{p^2}{ed}\leq\frac{p^2}{d\kappa^T}\leq q_*\leq p,\qquad e=\exp(1). \tag*{(6)} e d p 2 ≤ d κ T p 2 ≤ q ∗ ≤ p , e = exp ( 1 ) . (6)
For the lower bound, use the Frobenius inner product:
⟨ Π σ T 1 / 2 , Π ρ T σ T − 1 / 2 ⟩ F = p , ∥ Π σ T 1 / 2 ∥ F 2 = Tr ( Π σ T ) ≤ 1. \langle\Pi\sigma_T^{1/2},\Pi\rho_T\sigma_T^{-1/2}\rangle_F=p,\qquad\lVert\Pi\sigma_T^{1/2}\rVert_F^2=\operatorname{Tr}(\Pi\sigma_T)\leq1. ⟨ Π σ T 1/2 , Π ρ T σ T − 1/2 ⟩ F = p , ∥ Π σ T 1/2 ∥ F 2 = Tr ( Π σ T ) ≤ 1.
Cauchy–Schwarz and ( 1 + 1 / T ) T ≤ e (1+1/T)^T \le e ( 1 + 1/ T ) T ≤ e give the result.
For the upper bound, positivity of the channels and σ 0 ⪰ ρ 0 / d \sigma_0 \succeq\rho_0/d σ 0 ⪰ ρ 0 / d imply σ T ⪰ ρ T / ( d κ T ) \sigma_T \succeq\rho_T/(d\kappa^T) σ T ⪰ ρ T / ( d κ T ) . Put a = d κ T a = d\kappa^T a = d κ T and X = σ T − 1 / 2 ρ T σ T − 1 / 2 X = \sigma_T^{-1/2}\rho_T\sigma_T^{-1/2} X = σ T − 1/2 ρ T σ T − 1/2 . Then 0 ⪯ X ⪯ a I 0 \preceq X \preceq aI 0 ⪯ X ⪯ a I , so X 2 ⪯ a X X^2 \preceq aX X 2 ⪯ a X . Congruence by σ T 1 / 2 \sigma_T^{1/2} σ T 1/2 gives ρ T σ T − 1 ρ T ⪯ a ρ T \rho_T\sigma_T^{-1}\rho_T \preceq a\rho_T ρ T σ T − 1 ρ T ⪯ a ρ T . Taking the trace against Π \Pi Π proves q ∗ ≤ p q_* \le p q ∗ ≤ p . Neither bound requires the operators to commute.
Example: repeated qubit resets. Figure 4 makes the normalization issue explicit for Φ ( X ) = Tr ( X ) ∣ 0 ⟩ ⟨ 0 ∣ \Phi(X) = \operatorname{Tr}(X)|0\rangle\langle0| Φ ( X ) = Tr ( X ) ∣0 ⟩ ⟨ 0∣ . Starting in ∣ 0 ⟩ |0\rangle ∣0 ⟩ and accepting ∣ 0 ⟩ |0\rangle ∣0 ⟩ after T T T resets gives p = 1 p = 1 p = 1 . Dividing each unweighted doubled step by 2 \sqrt{2} 2 leaves acceptance probability 2 − T 2^{-T} 2 − T . In contrast, our reference recurrence gives q ∗ = [ ( 2 + 1 / T ) ( 1 + 1 / T ) T − 1 ] − 1 ≥ 1 / ( 2 e ) q_* = [(2+1/T)(1+1/T)^{T-1}]^{-1} \ge1/(2e) q ∗ = [( 2 + 1/ T ) ( 1 + 1/ T ) T − 1 ] − 1 ≥ 1/ ( 2 e ) . Indeed, σ t = diag ( 2 + η , η ) / ( 2 κ ) \sigma_t = \operatorname{diag}(2+\eta,\eta)/(2\kappa) σ t = diag ( 2 + η , η ) / ( 2 κ ) for every t ≥ 1 t \ge1 t ≥ 1 , so C 1 ∣ 00 ⟩ = ∣ 00 ⟩ / 2 + η C_1|00\rangle= |00\rangle/\sqrt{2+\eta} C 1 ∣00 ⟩ = ∣00 ⟩ / 2 + η and C t ∣ 00 ⟩ = κ − 1 / 2 ∣ 00 ⟩ C_t|00\rangle= \kappa^{-1/2}|00\rangle C t ∣00 ⟩ = κ − 1/2 ∣00 ⟩ for t ≥ 2 t \ge2 t ≥ 2 . The stated lower bound follows from 2 + η ≤ 2 κ 2+\eta\le2\kappa 2 + η ≤ 2 κ and κ T ≤ e \kappa^T \le e κ T ≤ e .
Figure 4. Reweighting a qubit reset Φ ( X ) = Tr ( X ) ∣ 0 ⟩ ⟨ 0 ∣ \Phi(X) = \operatorname{Tr}(X)|0\rangle\langle0| Φ ( X ) = Tr ( X ) ∣0 ⟩ ⟨ 0∣ . In (a), σ 0 = I / 2 \sigma_0 = I/2 σ 0 = I /2 and σ 1 = diag ( 2 + η , η ) / ( 2 κ ) \sigma_1 = \operatorname{diag}(2+\eta,\eta)/(2\kappa) σ 1 = diag ( 2 + η , η ) / ( 2 κ ) , where κ = 1 + η \kappa= 1+\eta κ = 1 + η . Substitution into the definition of C 1 C_1 C 1 gives the displayed contraction. In (b), the source starts in ∣ 0 ⟩ |0\rangle ∣0 ⟩ , applies T T T resets, and accepts ∣ 0 ⟩ |0\rangle ∣0 ⟩ with certainty. Normalizing each doubled step as M / 2 M/\sqrt{2} M / 2 gives probability 2 − T 2^{-T} 2 − T . With η = 1 / T \eta= 1/T η = 1/ T , the reference state is the same after every reset; for t ≥ 2 t \ge2 t ≥ 2 , C t ∣ 00 ⟩ = κ − 1 / 2 ∣ 00 ⟩ C_t|00\rangle= \kappa^{-1/2}|00\rangle C t ∣00 ⟩ = κ − 1/2 ∣00 ⟩ . Thus reweighting gives q ∗ = [ ( 2 + 1 / T ) ( 1 + 1 / T ) T − 1 ] − 1 q_* = [(2+1/T)(1+1/T)^{T-1}]^{-1} q ∗ = [( 2 + 1/ T ) ( 1 + 1/ T ) T − 1 ] − 1 , tending to 1 / ( 2 e ) 1/(2e) 1/ ( 2 e ) . The curves compare exact matrix products before compilation and amplification. The vector ∣ Ω ⟩ |\Omega\rangle ∣Ω ⟩ in (a) tests the operator norm; it is not the initial vector used in (b).
Relation to Petz recovery. The square-root reweighting has a precise connection with the Petz (or transpose) recovery map [26 , 27 , 5 ] . For a channel N \mathcal{N} N and full-rank reference states σ \sigma σ and τ = N ( σ ) \tau= \mathcal{N}(\sigma) τ = N ( σ ) , this map is
R σ , N ( Y ) = σ 1 / 2 N † ( τ − 1 / 2 Y τ − 1 / 2 ) σ 1 / 2 . (7) \mathcal{R}_{\sigma,\mathcal{N}}(Y) = \sigma^{1/2}\mathcal{N}^{\dagger}\left(\tau^{-1/2}Y\tau^{-1/2}\right)\sigma^{1/2}. \tag*{(7)} R σ , N ( Y ) = σ 1/2 N † ( τ − 1/2 Y τ − 1/2 ) σ 1/2 . (7)
where N † \mathcal{N}^{\dagger} N † is the Hermitian conjugate of N \mathcal{N} N , acting backwards on observables: N † ( Y ) = ∑ b L b † Y L b \mathcal{N}^{\dagger}(Y)=\sum_b L_b^{\dagger}YL_b N † ( Y ) = ∑ b L b † Y L b for Kraus operators L b L_b L b of N \mathcal{N} N . The recovery Kraus operators are σ 1 / 2 L b † τ − 1 / 2 \sigma^{1/2}L_b^{\dagger}\tau^{-1/2} σ 1/2 L b † τ − 1/2 . Their squared products sum to I I I , and R σ , N ( τ ) = σ \mathcal{R}_{\sigma,\mathcal{N}}(\tau)=\sigma R σ , N ( τ ) = σ . Recovering arbitrary other states is an additional property, not a consequence of this identity.
For the references in (2) , set
Ψ t ( X ) = Φ t ( X ) + η Tr ( X ) I / d κ , Ψ t ( σ t − 1 ) = σ t . \Psi_t(X)=\frac{\Phi_t(X)+\eta\operatorname{Tr}(X)I/d}{\kappa},\qquad\Psi_t(\sigma_{t-1})=\sigma_t. Ψ t ( X ) = κ Φ t ( X ) + η Tr ( X ) I / d , Ψ t ( σ t − 1 ) = σ t .
This is a channel; the trace in its replacement term is essential. Its Kraus family consists of K t , a / κ K_{t,a}/\sqrt{\kappa} K t , a / κ and η / ( κ d ) ∣ i ⟩ ⟨ j ∣ \sqrt{\eta/(\kappa d)}\lvert i\rangle\langle j\rvert η / ( κ d ) ∣ i ⟩ ⟨ j ∣ . The original-channel Kraus operators of R σ t − 1 , Ψ t \mathcal{R}_{\sigma_{t-1},\Psi_t} R σ t − 1 , Ψ t are exactly the J t , a J_{t,a} J t , a in (3) . Its replacement-branch Kraus operators are instead
R t , i j = η κ d σ t − 1 1 / 2 ∣ j ⟩ ⟨ i ∣ σ t − 1 / 2 . R_{t,ij}=\sqrt{\frac{\eta}{\kappa d}}\sigma_{t-1}^{1/2}\lvert j\rangle\langle i\rvert\sigma_t^{-1/2}. R t , ij = κ d η σ t − 1 1/2 ∣ j ⟩ ⟨ i ∣ σ t − 1/2 .
Since Tr σ t − 1 = 1 \operatorname{Tr}\sigma_{t-1}=1 Tr σ t − 1 = 1 , they satisfy
∑ i , j R t , i j † R t , i j = η κ d σ t − 1 = J t , ∗ † J t , ∗ . (8) \sum_{i,j}R_{t,ij}^{\dagger}R_{t,ij}=\frac{\eta}{\kappa d}\sigma_t^{-1}=J_{t,*}^{\dagger}J_{t,*}. \tag*{(8)} i , j ∑ R t , ij † R t , ij = κ d η σ t − 1 = J t , ∗ † J t , ∗ . (8)
Thus our W t W_t W t retains the Petz original-channel factors and uses a single Kraus operator with the same remaining normalization contribution. It generally induces a different channel: the two completion maps are respectively
Y ⟼ η κ d Tr ( σ t − 1 Y ) σ t − 1 , Y ⟼ η κ d σ t − 1 / 2 Y σ t − 1 / 2 . Y\longmapsto\frac{\eta}{\kappa d}\operatorname{Tr}(\sigma_t^{-1}Y)\sigma_{t-1},\qquad
Y\longmapsto\frac{\eta}{\kappa d}\sigma_t^{-1/2}Y\sigma_t^{-1/2}. Y ⟼ κ d η Tr ( σ t − 1 Y ) σ t − 1 , Y ⟼ κ d η σ t − 1/2 Y σ t − 1/2 .
One can instead use the full Petz isometry by replacing the label ∗ * ∗ with the d 2 d^2 d 2 labels ( i , j ) (i,j) ( i , j ) and assigning all their left Kraus factors zero. The doubled operator C t C_t C t is unchanged. This requires only O ( log d ) O(\log d) O ( log d ) additional label qubits, so the total remains O ( log n ) O(\log n) O ( log n ) . Neither version asserts that C t C_t C t itself is a recovery channel: it is a contraction on vectorized matrices.
Gilyén, Lloyd, Marvian, Quek and Wilde give an algorithm for Petz recovery using block encodings, quantum singular value transformation, and oblivious amplitude amplification [12 ] . Their isometry construction combines reference square roots, the inverse of a unitary dilation of the channel, and an inverse square root of the output reference; these are also the ingredients of Appendix § 6 .§ 4 . Their access assumptions do not by themselves establish the logarithmic-space uniform reference access required here, nor exact preservation of a zero accepting amplitude. We establish those properties separately.
§ 3.2 implements the approximate clean blocks coherently in logarithmic space while keeping the left Kraus factors exact. Each accepting history remains zero on no-instances, and unitary amplification raises the inverse-polynomial acceptance probability to a constant. Appendix § 7 records the separate conditional bounded-error application.
The Clifford+T T T case
We first give the complete simulation for the standard gate set Γ = { H , T , CNOT } \Gamma=\{H,T,\operatorname{CNOT}\} Γ = { H , T , CNOT } . This case contains the main argument: keep the original Kraus operators exact, approximate only the right factors, and amplify without introducing acceptance on no-instances. The later subsections extend the available gate sets.
Theorem 3.1 (Measurement elimination over Clifford+T T T ). For absolutely halting, polynomial-time computations with logarithmic space,
R Q L Γ = R Q U L Γ . \mathrm{RQL}_{\Gamma} = \mathrm{RQUL}_{\Gamma}. RQL Γ = RQUL Γ .
We use the following implementation result. Its proof in Appendix A.4 uses the established two-sided measurement-elimination theorem [11 ] and unitary error reduction [9 ] , independently of our one-sided theorem. Thus the result below isolates the numerical work needed to implement the reweighted operators.
Lemma 3.2 (Uniform implementation of the right Kraus factors). Let T , d ≤ n O ( 1 ) T,d \le n^{O(1)} T , d ≤ n O ( 1 ) . Suppose the source channels have exact unitary dilations D t D_t D t , given by polynomial-size, logspace-uniform circuits over Γ \Gamma Γ on O ( log n ) O(\log n) O ( log n ) qubits, including their environment. For each inverse-polynomial ε > 0 \varepsilon> 0 ε > 0 , there are polynomial-size, logspace-uniform unitary circuits Q t Q_t Q t over Γ \Gamma Γ on O ( log n ) O(\log n) O ( log n ) qubits such that
H t = ∑ a H t , a ⊗ ∣ a ⟩ , H t , a = ⟨ a E 0 Z ∣ Q t ∣ 0 E 0 Z ⟩ , ∥ H t − W ~ t ∥ ≤ ε . H_t = \sum_a H_{t,a} \otimes|a\rangle,\qquad H_{t,a} = \langle aE_0Z|Q_t|0E_0Z\rangle,\qquad\lVert H_t-\widetilde{W}_t\rVert\le\varepsilon. H t = a ∑ H t , a ⊗ ∣ a ⟩ , H t , a = ⟨ a E 0 Z ∣ Q t ∣0 E 0 Z ⟩ , ∥ H t − W t ∥ ≤ ε . The data register is implicit. The labels include ∗ \ast ∗ and any unused labels in (3); there are polynomially many. The same statement holds with Γ \Gamma Γ replaced throughout by any fixed finite constant-arity gate set satisfying conditions (1)–(4) of Appendix A.1.
Proof of Theorem 3.1. The inclusion R Q U L Γ ⊆ R Q L Γ \mathrm{RQUL}_{\Gamma} \subseteq\mathrm{RQL}_{\Gamma} RQUL Γ ⊆ RQL Γ is immediate. For the converse, fix a source machine and an input x x x of length n n n . We describe its unitary simulation in five steps.
Implement each original step exactly. Include the retained classical configuration, head positions and quantum work tape in the log d = O ( log n ) \log d = O(\log n) log d = O ( log n ) -qubit data register. Pad unused basis configurations so d d d is a power of two, and pad halting configurations with idle steps to a polynomial time bound T ≥ 1 T \ge1 T ≥ 1 . This gives the channels and acceptance projector of § 3.1 . Each channel has an exact dilation
D t ( ∣ v ⟩ ∣ 0 ⟩ E ) = ∑ a K t , a ∣ v ⟩ ∣ a ⟩ E . (9) D_t(|v\rangle|0\rangle_E) = \sum_a K_{t,a}|v\rangle|a\rangle_E. \tag*{(9)} D t ( ∣ v ⟩ ∣0 ⟩ E ) = a ∑ K t , a ∣ v ⟩ ∣ a ⟩ E . (9)
For a unitary step, apply the gate. For a computational-basis measurement, copy the measured bit into E E E using CNOT. For a reset, copy the old bit into E E E and XOR that copy back into the data qubit. Classically controlled steps are handled by copying the old classical configuration and any measurement outcome into E E E , then reversibly computing the new configuration. These saved registers ensure that the update is reversible; tracing them out gives the original channel on every reachable source state. Enumerating the polynomially many configurations and tape positions gives polynomial-size, logspace-uniform circuits. One step needs only O ( log n ) O(\log n) O ( log n ) environment qubits.
All gates used here have exact Clifford+T T T circuits. In particular, H − 1 = H H^{-1}=H H − 1 = H , CNOT − 1 = CNOT \operatorname{CNOT}^{-1}=\operatorname{CNOT} CNOT − 1 = CNOT and T − 1 = T 7 T^{-1}=T^7 T − 1 = T 7 ; complex-conjugated gates also have exact circuits over Γ \Gamma Γ . Toffoli is exact: the identity
4 a b c = a + b + c − ( a ⊕ b ) − ( a ⊕ c ) − ( b ⊕ c ) + ( a ⊕ b ⊕ c ) 4abc = a+b+c-(a\oplus b)-(a\oplus c)-(b\oplus c)+(a\oplus b\oplus c) 4 ab c = a + b + c − ( a ⊕ b ) − ( a ⊕ c ) − ( b ⊕ c ) + ( a ⊕ b ⊕ c )
implements CCZ using parity computations and T T T gates, after which conjugating the target by H H H gives Toffoli. Controlled-T T T computes the AND of control and target into zero scratch, applies T T T , and uncomputes. Controlled-CNOT is Toffoli. Finally, with S = T 2 S=T^2 S = T 2 and W = S H T H S − 1 W=SHTHS^{-1} W = S H T H S − 1 , the identity W Z W − 1 = H WZW^{-1}=H W Z W − 1 = H gives an exact controlled-H H H using controlled-Z Z Z . Further controls reduce to a reversible AND. Every extra qubit in these fixed gate circuits is returned to zero.
2. Approximate the right Kraus factors. Use the reference states from (2) and apply Lemma 3.2 with ε = 1 / ( 12 T d ) \varepsilon=1/(12Td) ε = 1/ ( 12 T d ) . On doubled data registers A , B A,B A , B , first apply D t D_t D t to A , E A,E A , E , and then apply the inverse of the actual circuit Q t Q_t Q t to B , E , Z B,E,Z B , E , Z . The block with E , Z E,Z E , Z initialized and returned to zero is exactly
C ^ t = ∑ a K t , a ⊗ H t , a † , ∥ C ^ t ∥ ≤ 1 , ∥ C ^ t − C t ∥ ≤ ε . (10) \widehat{C}_t=\sum_a K_{t,a}\otimes H_{t,a}^{\dagger},\qquad\lVert\widehat{C}_t\rVert\le1,\qquad\lVert\widehat{C}_t-C_t\rVert\le\varepsilon. \tag*{(10)} C t = a ∑ K t , a ⊗ H t , a † , ∥ C t ∥ ≤ 1 , ∥ C t − C t ∥ ≤ ε . (10)
Set K t , ∗ = 0 K_{t,*}=0 K t , ∗ = 0 and use zero left Kraus factors on all padding labels. The contraction bound holds because this is a block of a unitary. The error bound follows by composing the difference between the implemented right block and its target isometry with the exact left isometry and projecting onto zero scratch. No implementation of an exact matrix square root is required. Figure 3 shows this separation.
3. Preserve perfect soundness and enough acceptance. For a history h = ( a 1 , … , a T ) h=(a_1,\ldots,a_T) h = ( a 1 , … , a T ) , write K h = K T , a T ⋯ K 1 , a 1 K_h=K_{T,a_T}\cdots K_{1,a_1} K h = K T , a T ⋯ K 1 , a 1 . The source probability satisfies
p = ∑ h ∥ Π K h ∣ 0 ⟩ ∥ 2 . p=\sum_h\lVert\Pi K_h\lvert0\rangle\rVert^2. p = h ∑ ∥ Π K h ∣ 0 ⟩ ∥ 2 .
On a no-instance p = 0 p=0 p = 0 , so every vector Π K h ∣ 0 ⟩ \Pi K_h\lvert0\rangle Π K h ∣ 0 ⟩ is zero. Expanding the product in (10) therefore gives
( Π ⊗ I ) C ^ T ⋯ C ^ 1 ∣ 00 ⟩ = 0. (11) (\Pi\otimes I)\widehat{C}_T\cdots\widehat{C}_1\lvert00\rangle=0. \tag*{(11)} ( Π ⊗ I ) C T ⋯ C 1 ∣ 00 ⟩ = 0. (11)
This conclusion holds for any right factors, with no accuracy assumption; Figure 5 illustrates why. For yes-instances, the ideal signal from § 3.1 satisfies
Figure 5. Perfect soundness holds history by history. The histories are h 1 , … , h m h_1,\ldots,h_m h 1 , … , h m , with B h = B T , a T ⋯ B 1 , a 1 B_h=B_{T,a_T}\cdots B_{1,a_1} B h = B T , a T ⋯ B 1 , a 1 . Zero original acceptance forces every accepting left vector to vanish. Changing its right factor therefore leaves the whole tensor-product term zero. The final scratch and counter tests select the displayed sum.
q ∗ ≥ p 2 e d , e = exp ( 1 ) . (12) q_*\ge\frac{p^2}{ed},\qquad e=\exp(1). \tag*{(12)} q ∗ ≥ e d p 2 , e = exp ( 1 ) . (12)
Telescoping the products of contractions gives
∥ C ^ T ⋯ C ^ 1 − C T ⋯ C 1 ∥ ≤ T ε = 1 12 d . \left\lVert\widehat{C}_T\cdots\widehat{C}_1-C_T\cdots C_1\right\rVert\le T\varepsilon=\frac{1}{12d}. C T ⋯ C 1 − C T ⋯ C 1 ≤ T ε = 12 d 1 .
Since p ≥ 2 / 3 p\ge2/3 p ≥ 2/3 and e < 4 e<4 e < 4 , the actual accepting norm is at least 1 / ( 3 d ) − 1 / ( 12 d ) ≥ 1 / ( 4 d ) 1/(3\sqrt{d})-1/(12d)\ge1/(4\sqrt{d}) 1/ ( 3 d ) − 1/ ( 12 d ) ≥ 1/ ( 4 d ) . Its square is therefore at least 1 / ( 16 d ) 1/(16d) 1/ ( 16 d ) .
Compose the steps with logarithmic space. Let V t V_t V t be the full unitary used in step 2 and let P P P project its scratch registers onto zero. Reuse these registers at every step. Add a counter F F F of modulus N > T N>T N > T , where N N N is a power of two, and write X N ∣ f ⟩ = ∣ f + 1 m o d N ⟩ X_N|f\rangle=|f+1\bmod N\rangle X N ∣ f ⟩ = ∣ f + 1 mod N ⟩ . Apply
V t = ( P ⊗ I F + ( I − P ) ⊗ X N ) ( V t ⊗ I F ) . (13) \mathcal{V}_t=(P\otimes I_F+(I-P)\otimes X_N)(V_t\otimes I_F). \tag*{(13)} V t = ( P ⊗ I F + ( I − P ) ⊗ X N ) ( V t ⊗ I F ) . (13)
Thus we apply V t V_t V t unconditionally, then increment the counter if its scratch is nonzero. These operations are unitary and the increment uses only a computational-basis predicate. To verify the selected block, put P 0 = P P_0=P P 0 = P , P 1 = I − P P_1=I-P P 1 = I − P and expand:
V T ⋯ V 1 = ∑ δ ∈ { 0 , 1 } T P δ T V T ⋯ P δ 1 V 1 ⊗ X N δ 1 + ⋯ + δ T . \mathcal{V}_T\cdots\mathcal{V}_1=\sum_{\delta\in\{0,1\}^T}P_{\delta_T}V_T\cdots P_{\delta_1}V_1\otimes X_N^{\delta_1+\cdots+\delta_T}. V T ⋯ V 1 = δ ∈ { 0 , 1 } T ∑ P δ T V T ⋯ P δ 1 V 1 ⊗ X N δ 1 + ⋯ + δ T .
Starting and ending with counter zero selects exactly the term δ 1 = ⋯ = δ T = 0 \delta_1=\cdots=\delta_T=0 δ 1 = ⋯ = δ T = 0 , since 0 ≤ ∑ t δ t ≤ T < N 0\leq\sum_t\delta_t\leq T<N 0 ≤ ∑ t δ t ≤ T < N . With initial scratch zero, the selected operation is exactly C ^ T ⋯ C ^ 1 \widehat{C}_T\cdots\widehat{C}_1 C T ⋯ C 1 , with final scratch zero. The final good predicate requires counter zero, scratch zero and acceptance in A A A . Its probability q ^ \widehat{q} q is zero on no-instances and at least 1 / ( 16 d ) 1/(16d) 1/ ( 16 d ) on yes-instances. All failure components remain in the circuit; no intermediate measurement or postselection occurs.
Amplify with exact reflections. Append a Hadamard coin and include coin one in the good predicate. Call the resulting preparation A A A and its good projector P g o o d P_{\mathrm{good}} P good . Its success probability is q = q ^ / 2 ≤ 1 / 2 q=\widehat{q}/2\leq1/2 q = q /2 ≤ 1/2 . Use the Grover iterate [4 ]
R 0 = 2 ∣ 0 ⟩ ⟨ 0 ∣ − I , R g o o d = I − 2 P g o o d , Q = A R 0 A † R g o o d . R_0=2|0\rangle\langle0|-I,\qquad R_{\mathrm{good}}=I-2P_{\mathrm{good}},\qquad Q=AR_0A^\dagger R_{\mathrm{good}}. R 0 = 2∣0 ⟩ ⟨ 0∣ − I , R good = I − 2 P good , Q = A R 0 A † R good .
The inverse A † A^\dagger A † reverses the actual implemented circuit, including its approximations. Both reflections are exact Boolean predicates. Moreover, for an external control,
ctrl ( Q ) = ( I ⊗ A ) ctrl ( R 0 ) ( I ⊗ A † ) ctrl ( R g o o d ) . (14) \operatorname{ctrl}(Q)=(I\otimes A)\operatorname{ctrl}(R_0)(I\otimes A^\dagger)\operatorname{ctrl}(R_{\mathrm{good}}). \tag*{(14)} ctrl ( Q ) = ( I ⊗ A ) ctrl ( R 0 ) ( I ⊗ A † ) ctrl ( R good ) . (14)
On control zero the preparations cancel; on control one this applies Q Q Q . Thus only the reflections need controls, including the displayed sign of R 0 R_0 R 0 .
Prepare and retain a uniform choice j ∈ { 0 , … , M − 1 } j\in\{0,\ldots,M-1\} j ∈ { 0 , … , M − 1 } with M = 4 d M=4d M = 4 d , a power of two. Apply Q Q Q conditioned on j ≥ k j\geq k j ≥ k for k = 1 , … , M − 1 k=1,\ldots,M-1 k = 1 , … , M − 1 , using (14). The choice and comparison registers remain outside R 0 R_0 R 0 . For q = sin 2 θ > 0 q=\sin^2\theta>0 q = sin 2 θ > 0 , success is
1 M ∑ j = 0 M − 1 sin 2 ( ( 2 j + 1 ) θ ) = 1 2 − sin ( 4 M θ ) 4 M sin ( 2 θ ) . \frac{1}{M}\sum_{j=0}^{M-1}\sin^2((2j+1)\theta)=\frac{1}{2}-\frac{\sin(4M\theta)}{4M\sin(2\theta)}. M 1 j = 0 ∑ M − 1 sin 2 (( 2 j + 1 ) θ ) = 2 1 − 4 M sin ( 2 θ ) sin ( 4 M θ ) .
On yes-instances q ∈ [ 1 / ( 32 d ) , 1 / 2 ] q\in[1/(32d),1/2] q ∈ [ 1/ ( 32 d ) , 1/2 ] , so sin ( 2 θ ) ≥ 1 / ( 4 d ) \sin(2\theta)\geq1/(4\sqrt{d}) sin ( 2 θ ) ≥ 1/ ( 4 d ) and the result is at least 1 / 4 1/4 1/4 . On no-instances every iterate has zero good amplitude. Four independent coherent copies, followed by a reversible OR of their good predicates, accept with probability at least 1 − ( 3 / 4 ) 4 = 175 / 256 > 2 / 3 1-(3/4)^4=175/256>2/3 1 − ( 3/4 ) 4 = 175/256 > 2/3 on yes-instances and zero on no-instances. Only this final OR qubit is measured.
Each register has O ( log n ) O(\log n) O ( log n ) qubits, and the number of complete copies is constant. Circuit lengths and loop bounds are polynomial. The lemma supplies logspace-uniform right-factor circuits; the remaining gates, reversed circuits and loops also have logspace-uniform descriptions. The simulator is absolutely halting.
Steps 3–5 apply to any exact left dilations and approximate right circuits satisfying (10), provided their actual inverses and the Clifford+T T T gates are available exactly. They use neither controlled versions nor complex conjugates of the additional source gates. The next subsection reuses these steps after constructing the required left and right circuits for more general gate sets.
Exact inverses suffice
We now extend Theorem 3.1 to gate sets whose entries can be computed within the bounds below and that implement Clifford+T T T and each gate’s inverse exactly. An exact implementation is a fixed finite circuit over the gate set, with a constant number of extra qubits initialized and returned to zero on every input; the circuit must implement the specified matrix exactly, including its phase.
Theorem 3.3 (Measurement elimination with exact inverses). Let G \mathcal{G} G be a fixed finite set of one- and two-qubit unitaries. Suppose that:
every entry of every U ∈ G U \in\mathcal{G} U ∈ G can be approximated to error 2 − b 2^{-b} 2 − b in deterministic space O ( b ) O(b) O ( b ) and time 2 O ( b ) 2^{O(b)} 2 O ( b ) ;
circuits over G \mathcal{G} G implement H , T , C N O T H,T,\mathrm{CNOT} H , T , CNOT exactly;
for every U ∈ G U \in\mathcal{G} U ∈ G , a circuit over G \mathcal{G} G implements its inverse U † U^\dagger U † exactly.
Then R Q L G = R Q U G \mathrm{RQL}_{\mathcal{G}}=\mathrm{RQU}_{\mathcal{G}} RQL G = RQU G . Neither exact conjugation nor exact controlled versions of the additional gates are required.
Proof. Put Γ = { H , T , C N O T } \Gamma=\{H,T,\mathrm{CNOT}\} Γ = { H , T , CNOT } . We construct exact left circuits D t D_t D t over G \mathcal{G} G and approximate right circuits Q t Q_t Q t over Γ \Gamma Γ . Steps 3–5 of Theorem 3.1 then give perfect soundness, coherent composition and amplification. The only new issues are implementing adaptive source steps without controlled source gates and obtaining the right circuits without exact conjugation.
Implementing the original channel without controlled source gates. Pad the quantum tape to at least two cells, and copy the old classical configuration c c c into the environment. For each gate symbol U ∈ G U \in\mathcal{G} U ∈ G , allocate a separate dummy register of the same arity as U U U , initially zero. There is only one dummy per gate symbol, not one per classical configuration, so their total width is constant. Reversible Boolean routing, controlled by the copied configuration, moves the target qubit or ordered pair of target qubits to a fixed port. On configurations not requesting U U U , choose any fixed valid target port. Let S S S be the swap of this port with its dummy, and put S 0 = I S_0=I S 0 = I , S 1 = S S_1=S S 1 = S . If b ( c ) = 1 b(c)=1 b ( c ) = 1 precisely when U U U is inactive, apply
S b ( c ) ( U ⊗ I ) S b ( c ) . S_{b(c)}(U \otimes I)S_{b(c)}. S b ( c ) ( U ⊗ I ) S b ( c ) .
Here U U U is applied unconditionally to the port. For b ( c ) = 0 b(c)=0 b ( c ) = 0 this is U ⊗ I U \otimes I U ⊗ I ; for b ( c ) = 1 b(c)=1 b ( c ) = 1 it is I ⊗ U I \otimes U I ⊗ U . Undo the routing and retain the dummy in the environment. Thus the active branch applies U U U to the data, and every inactive branch leaves the data unchanged while placing the normalized state U ∣ 0 ⟩ U\lvert0\rangle U ∣ 0 ⟩ in the dummy. The controlled swaps and routing permutations are exact reversible Boolean circuits over Γ \Gamma Γ .
Perform this operation for each of the finitely many gate symbols. For a measurement step, copy the measured basis bit into an environment register. Reversible updates compute the new classical configuration while retaining the old configuration and measurement outcome in the environment. For example, the working configuration can be cleared by XOR with its saved copy and then filled with the new configuration. Polynomial enumeration of configurations and wire positions supplies logspace-uniform routing and input access. Unused configurations receive any fixed valid extension of these reversible operations.
Tracing out the environment gives exactly the source transition on states whose classical configuration is diagonal, which includes every reachable source state. Copying c c c deliberately dephases different classical configurations: we have constructed the required channel, not a coherent controlled-U U U gate. Use this chosen channel extension when defining Φ t \Phi_t Φ t and its reference states. Its exact dilation D t D_t D t acts on O ( log n ) O(\log n) O ( log n ) qubits and uses no controlled source gate. All registers used to retain discarded information, including the dummies, are included in the Kraus label. The source acceptance probability p p p is unchanged.
Right Kraus factors over the fixed standard gate set. We claim that Lemma 3.2 still supplies Q t Q_t Q t , now as a circuit over Γ \Gamma Γ , for the original chosen dilations D t D_t D t and their original Kraus labels. To prove this, introduce a virtual finite constant-arity gate set containing Γ \Gamma Γ , the gates
U , U † , U ‾ , U T ( U ∈ G ) , U,\quad U^\dagger,\quad\overline{U},\quad U^{\mathsf T}\qquad(U\in\mathcal{G}), U , U † , U , U T ( U ∈ G ) ,
and their singly controlled versions. This virtual gate set has the exact inverse and conjugation operations used in Appendix § 6 .§ 4 . Further controls reduce to computing an AND into scratch and using a singly controlled gate. Controls of the standard gates have exact circuits over Γ \Gamma Γ by step 1 of Theorem 3.1 . The appendix construction therefore produces a circuit over this virtual gate set for the right Kraus factors, with labelled-block error at most ε / 2 \varepsilon/2 ε /2 and length at most a polynomial L ( n ) L(n) L ( n ) . This is an intermediate circuit description, not an enlargement of the source machine’s gate set.
The entries of each gate B B B in this virtual set can also be computed within the stated time and space bounds. To approximate it with its phase intact, specify the constant-dimensional matrix
E ( B ) = ∣ 0 ⟩ ⟨ 0 ∣ ⊗ B + ∣ 1 ⟩ ⟨ 1 ∣ ⊗ B † , det E ( B ) = 1. \mathcal{E}(B)=|0\rangle\langle0|\otimes B+|1\rangle\langle1|\otimes B^\dagger,\qquad\det\mathcal{E}(B)=1. E ( B ) = ∣0 ⟩ ⟨ 0∣ ⊗ B + ∣1 ⟩ ⟨ 1∣ ⊗ B † , det E ( B ) = 1.
This is a target matrix for synthesis; its definition assumes no physical controlled-B B B gate. Space-efficient Solovay–Kitaev synthesis for fixed dimension [34 Theorem 4.5] approximates E ( B ) \mathcal{E}(B) E ( B ) in operator norm over Γ \Gamma Γ , including its phase. For completeness, the determinant-one subgroup of the group generated by fixed-width Clifford+T T T circuits has finite index and is finitely generated. Projective universality [6 ] and connectedness imply that its closure is the full special unitary group. A fixed finite inverse-closed generating set of gate sequences therefore meets that theorem’s hypotheses: compactness supplies its fixed constant-accuracy net. This extends the one-qubit argument in Appendix § 6 .§ 4 . Only constant dimensions occur here.
Use error ε / ( 2 L ( n ) ) \varepsilon/(2L(n)) ε / ( 2 L ( n )) per gate in the virtual set and one shared extra qubit for the embedding E ( B ) \mathcal{E}(B) E ( B ) , initially zero. The ideal embedded gates preserve this qubit’s zero state and act on that subspace as the virtual circuit. Their approximations may leave this qubit nonzero. We retain it coherently and include it among the registers required to be zero in the selected block. A telescoping bound on the full circuits bounds their difference by ε / 2 \varepsilon/2 ε /2 , even with this reuse. Compression to the labelled block cannot increase the error. Thus the resulting Γ \Gamma Γ circuit Q t Q_t Q t has error at most ε \varepsilon ε relative to W ‾ t \overline{W}_t W t , without changing the target reference states or assuming exact conjugation over G \mathcal{G} G . The required precision is O ( log n ) O(\log n) O ( log n ) bits; entry computation and synthesis take polynomial time and logarithmic space to generate the circuit. The embedding uses only this one extra qubit.
Substitute the exact implementations of the Γ \Gamma Γ gates only after compiling the circuit for the right Kraus factors. Keep the original D t D_t D t exact on the first doubled register. The full step unitary V t V_t V t is D t D_t D t followed by the actual Q t † Q_t^\dagger Q t † on the second register and shared labels, so its clean block remains exactly
C ^ t = ∑ a K t , a ⊗ H t , a † . \widehat{C}_t=\sum_a K_{t,a}\otimes H_{t,a}^\dagger. C t = a ∑ K t , a ⊗ H t , a † .
With ε = 1 / ( 12 T d ) \varepsilon=1/(12Td) ε = 1/ ( 12 T d ) this is precisely the setting of steps 3–5 of Theorem 3.1 . The history argument preserves zero accepting amplitude on no-instances, and the product has squared accepting norm at least 1 / ( 16 d ) 1/(16d) 1/ ( 16 d ) on yes-instances. The unconditional counter construction (13) composes these blocks without controlling a source gate. Its inverse is available by assumption (3). The identity (14) also avoids controlling the preparation circuit: only exact Boolean reflections need controls. The same amplification therefore gives acceptance at least 175/256 > 2/3 on yes-instances and zero on no-instances.
The fixed number of dummy registers, shared helper and reused scratch require O ( log n ) O(\log n) O ( log n ) qubits. Routing, entry approximation and synthesis have polynomial running time and logarithmic generation space. Thus the simulator satisfies the resource and absolute-halting requirements of RQuL G \operatorname{RQuL}_{\mathcal{G}} RQuL G . The reverse inclusion follows from the definitions.
Corollary 3.4 (Adding gates together with their inverses). For any fixed finite family of one- and two-qubit unitaries U 1 , … , U k U_1,\ldots,U_k U 1 , … , U k whose entries satisfy condition 1 of Theorem 3.3, the gate set
G = Γ ∪ { U j , U j † : 1 ≤ j ≤ k } \mathcal{G}=\Gamma\cup\{U_j,U_j^\dagger:1\leq j\leq k\} G = Γ ∪ { U j , U j † : 1 ≤ j ≤ k } satisfies RQL G = RQuL G \operatorname{RQL}_{\mathcal{G}}=\operatorname{RQuL}_{\mathcal{G}} RQL G = RQuL G . The entries may be transcendental.
Proof. The inverses of the added gates are already present, while H H H and CNOT are self-inverse and T † = T 7 T^\dagger=T^7 T † = T 7 .
Inverses need not be separate primitives. For example, Γ ∪ { R θ } \Gamma\cup\{R_\theta\} Γ ∪ { R θ } also satisfies the theorem when
R θ = ( cos θ − sin θ sin θ cos θ ) R_\theta=
\begin{pmatrix}
\cos\theta& -\sin\theta\\
\sin\theta& \cos\theta
\end{pmatrix} R θ = ( cos θ sin θ − sin θ cos θ )
has entries satisfying condition 1: R θ † = Z R θ Z R_\theta^\dagger=ZR_\theta Z R θ † = Z R θ Z and Z = T 4 Z=T^4 Z = T 4 . This includes θ = 1 \theta=1 θ = 1 , whose entries are transcendental. The conclusion here is an equality over the same gate set G \mathcal{G} G . It does not by itself identify that class with the class over Γ \Gamma Γ ; the next subsection establishes such gate-set independence under a different, algebraic hypothesis.
Gate-set independence over CM fields
Put Γ = { H , T , C N O T } \Gamma=\{H,T,\mathrm{CNOT}\} Γ = { H , T , CNOT } . A number field is a finite extension of Q \mathbb{Q} Q . An embedding into C \mathbb{C} C is an injective map preserving addition, multiplication, and rational numbers; it consistently replaces algebraic numbers by conjugates. A number field is totally real if every such embedding takes values in R \mathbb{R} R , or equivalently if every element’s minimal polynomial over Q \mathbb{Q} Q has only real roots. It is totally imaginary if no such embedding takes all its values in R \mathbb{R} R .
A CM field F F F is a totally imaginary quadratic extension of a totally real field K K K : it has dimension two as a vector space over K K K . Equivalently, F = K ( − a ) F=K(\sqrt{-a}) F = K ( − a ) for some a ∈ K a\in K a ∈ K positive under every embedding of K K K ; for example, Q ( 2 , i ) \mathbb{Q}(\sqrt{2},i) Q ( 2 , i ) has K = Q ( 2 ) K=\mathbb{Q}(\sqrt{2}) K = Q ( 2 ) and a = 1 a=1 a = 1 [24 Proposition 1.4] . Its complex conjugation satisfies
σ ( a ‾ ) = σ ( a ) ‾ \sigma(\overline{a})=\overline{\sigma(a)} σ ( a ) = σ ( a )
for every embedding σ : F ↪ C \sigma:F\hookrightarrow\mathbb{C} σ : F ↪ C and every a ∈ F a\in F a ∈ F . {#eq:15}
The same identity holds for totally real fields. CM fields are also closed under finite composita: the smallest field containing finitely many CM fields is again CM. See [24 Proposition 1.4 and Corollary 1.5] .
Theorem 3.5 (Algebraic gate-set independence). Let G \mathcal{G} G be a fixed finite gate set in the local machine model of the preliminaries. Suppose:
there is a fixed CM field F ⊆ C F\subseteq\mathbb{C} F ⊆ C such that, for each U ∈ G U\in\mathcal{G} U ∈ G , some fixed scalar λ U \lambda_U λ U of modulus one makes every entry of λ U U \lambda_U U λ U U belong to F F F ;
for each g ∈ Γ g \in\Gamma g ∈ Γ , there is a fixed finite circuit over G \mathcal{G} G which, with a constant number of extra qubits initialized to zero, implements μ g g \mu_g g μ g g and returns those ancillas to zero on every input, for some fixed scalar ∣ μ g ∣ = 1 |\mu_g| = 1 ∣ μ g ∣ = 1 .
Then
R Q L G = R Q U G = R Q U Γ . (15) \mathrm{RQL}_{\mathcal{G}} = \mathrm{RQU}_{\mathcal{G}} = \mathrm{RQU}_{\Gamma}. \tag*{(15)} RQL G = RQU G = RQU Γ . (15)
The additional gates of G \mathcal{G} G need not have exact implementations of their inverses, complex conjugates, or controlled versions.
The field and the gate set are fixed independently of input length. The proof uses two lemmas. The first replaces field-valued gates by an intermediate finite gate set of rational orthogonal gates of constant arity; the second compiles those gates into the original one- and two-qubit gate set Γ \Gamma Γ .
Lemma 3.6 (Exact rational simulation of a fixed field). Let F F F be a fixed totally real or CM field of degree m m m . A polynomial-time, logarithmic-space computation over a fixed finite gate set with entries in F F F can be simulated over a fixed finite rational orthogonal gate set, using O ( 1 ) O(1) O ( 1 ) additional qubits. If its acceptance probability is p p p , the simulator’s probability is
p ~ = 1 m ∑ σ : F ↪ C p σ , p = 0 ⟹ p ~ = 0 , p ~ ≥ p m , (16) \widetilde{p} = \frac{1}{m}\sum_{\sigma:F\hookrightarrow\mathbb{C}} p_{\sigma}, \qquad p = 0 \Longrightarrow\widetilde{p} = 0, \qquad\widetilde{p} \ge\frac{p}{m}, \tag*{(16)} p = m 1 σ : F ↪ C ∑ p σ , p = 0 ⟹ p = 0 , p ≥ m p , (16) where p σ p_{\sigma} p σ is the acceptance probability with σ \sigma σ applied entrywise to the original gates. Computational-basis measurements and classical control are retained in this intermediate simulation.
Proof. Choose a rational basis b 1 = 1 , b 2 , … , b m b_1 = 1, b_2, \ldots, b_m b 1 = 1 , b 2 , … , b m of F F F , and write c ( a ) ∈ Q m c(a) \in\mathbb{Q}^m c ( a ) ∈ Q m for the coefficient vector of a ∈ F a \in F a ∈ F . Define the normalized trace matrix
B i j = 1 m Tr F / Q ( b i ‾ b j ) = 1 m ∑ σ σ ( b i ) ‾ σ ( b j ) . (17) B_{ij} = \frac{1}{m}\operatorname{Tr}_{F/\mathbb{Q}}(\overline{b_i}b_j) = \frac{1}{m}\sum_{\sigma}\overline{\sigma(b_i)}\sigma(b_j). \tag*{(17)} B ij = m 1 Tr F / Q ( b i b j ) = m 1 σ ∑ σ ( b i ) σ ( b j ) . (17)
It is rational and symmetric, with B 11 = 1 B_{11} = 1 B 11 = 1 . It is positive definite because the embedding matrix ( σ ( b i ) ) σ , i (\sigma(b_i))_{\sigma,i} ( σ ( b i ) ) σ , i is nonsingular. In particular,
c ( a ) T B c ( a ) = 1 m ∑ σ ∣ σ ( a ) ∣ 2 . (18) c(a)^{\mathsf T} B c(a) = \frac{1}{m}\sum_{\sigma}|\sigma(a)|^2. \tag*{(18)} c ( a ) T B c ( a ) = m 1 σ ∑ ∣ σ ( a ) ∣ 2 . (18)
There is a fixed rectangular rational matrix E E E with E T E = B E^{\mathsf T}E = B E T E = B . Indeed, rational L D L T LDL^{\mathsf T} L D L T elimination writes B = C T D C B = C^{\mathsf T}DC B = C T D C with C C C rational and D D D positive rational diagonal. Each diagonal entry p / q > 0 p/q > 0 p / q > 0 is a sum of four rational squares: apply Lagrange’s four-square theorem to the integer p q pq pq and divide the four integers by q q q . Combining these four-square vectors gives a rational factor of D D D , hence of B B B . Pad the row dimension of E E E to a power of two r < 8 m r < 8m r < 8 m and put
L = B − 1 E T , P = E L . L = B^{-1}E^{\mathsf T}, \qquad P = EL. L = B − 1 E T , P = E L .
Then L E = I m LE = I_m L E = I m and P = P T = P 2 P = P^{\mathsf T} = P^2 P = P T = P 2 is the orthogonal projector onto the image of E E E . All these matrices are fixed constants; no uniform four-square algorithm for growing inputs is being assumed. For a k k k -dimensional gate U U U over F F F , let ρ k ( U ) \rho_k(U) ρ k ( U ) be its rational regular representation: its ( i , j ) (i,j) ( i , j ) block is multiplication by U i j U_{ij} U ij on field coefficient vectors. This representation preserves products. By (15), each σ ( U ) \sigma(U) σ ( U ) is unitary, so
ρ k ( U ) T ( I k ⊗ B ) ρ k ( U ) = I k ⊗ B . \rho_k(U)^{\mathsf T}(I_k \otimes B)\rho_k(U) = I_k \otimes B. ρ k ( U ) T ( I k ⊗ B ) ρ k ( U ) = I k ⊗ B .
Set E k = I k ⊗ E E_k=I_k\otimes E E k = I k ⊗ E , L k = I k ⊗ L L_k=I_k\otimes L L k = I k ⊗ L , P k = I k ⊗ P P_k=I_k\otimes P P k = I k ⊗ P and
U ~ = E k ρ k ( U ) L k + ( I − P k ) . (19) \widetilde{U}=E_k\rho_k(U)L_k+(I-P_k). \tag*{(19)} U = E k ρ k ( U ) L k + ( I − P k ) . (19)
This is rational orthogonal and U ~ E k = E k ρ k ( U ) \widetilde{U}E_k=E_k\rho_k(U) U E k = E k ρ k ( U ) . For verification, if X = E k ρ k ( U ) L k X=E_k\rho_k(U)L_k X = E k ρ k ( U ) L k , then X T X = P k X^\mathsf{T}X=P_k X T X = P k , while the cross terms between X X X and I − P k I-P_k I − P k vanish. Hence U ~ T U ~ = I \widetilde{U}^\mathsf{T}\widetilde{U}=I U T U = I .
Use one shared r r r -dimensional field register for the entire computation, initialized to v = E c ( 1 ) v=E c(1) v = E c ( 1 ) . This is a rational unit vector. It can be prepared from e 0 e_0 e 0 by the fixed rational Householder gate
I − 2 ( e 0 − v ) ( e 0 − v ) T ∥ e 0 − v ∥ 2 , I-\frac{2(e_0-v)(e_0-v)^\mathsf{T}}{\lVert e_0-v\rVert^2}, I − ∥ e 0 − v ∥ 2 2 ( e 0 − v ) ( e 0 − v ) T ,
with the identity used if v = e 0 v=e_0 v = e 0 . Replace each source gate by (19) on its physical wires and this same field register. Measurements, resets, and classical control act on the physical registers as before. Each lifted primitive has constant arity.
For an unnormalized source history h h h , write a h , i ∈ F a_{h,i}\in F a h , i ∈ F for its amplitude at physical basis coordinate i i i . Induction on gates and measurement outcomes shows that the corresponding simulator coordinate is exactly E c ( a h , i ) E c(a_{h,i}) E c ( a h , i ) . Thus
p ~ = ∑ h , i accepting c ( a h , i ) T B c ( a h , i ) = 1 m ∑ σ ∑ h , i accepting ∣ σ ( a h , i ) ∣ 2 . \widetilde{p}=\sum_{\substack{h,i\\\text{accepting}}}c(a_{h,i})^\mathsf{T}B c(a_{h,i})=\frac{1}{m}\sum_{\sigma}\sum_{\substack{h,i\\\text{accepting}}}\lvert\sigma(a_{h,i})\rvert^2. p = h , i accepting ∑ c ( a h , i ) T B c ( a h , i ) = m 1 σ ∑ h , i accepting ∑ ∣ σ ( a h , i ) ∣ 2 .
This proves (16) . If p = 0 p=0 p = 0 , every accepting amplitude is zero under the original embedding F ⊆ C F\subseteq\mathbb{C} F ⊆ C , hence is the zero field element and vanishes under every embedding. The summand for the original embedding also gives p ~ ≥ p / m \widetilde{p}\ge p/m p ≥ p / m . The loss of m m m occurs once for the entire computation.
The coefficient encoding is Q \mathbb{Q} Q -linear and preserves the norm defined by the trace matrix B B B ; it is not asserted to be a complex-linear isometry on arbitrary unknown source states. The known initial basis state and unnormalized histories are what make this simulation valid. Since F F F , the basis, and the gate set are fixed, all rational lifted gates and the preparation gate are finite data that can be hardwired. The extra field register has O ( 1 ) O(1) O ( 1 ) qubits, and gate substitution preserves polynomial time and logarithmic-space uniformity.
Lemma 3.7 (Implementing a rational gate exactly up to a scalar). Fix a rational orthogonal gate U U U of constant arity. For every integer b ≥ 1 b\ge1 b ≥ 1 , put δ = 2 − b \delta=2^{-b} δ = 2 − b . There is a unitary circuit over Γ \Gamma Γ whose clean block is exactly h U hU h U for a scalar h h h satisfying ∣ h ∣ 2 ≥ 1 − δ \lvert h\rvert^2\ge1-\delta ∣ h ∣ 2 ≥ 1 − δ . Its size is polynomial in b b b ; its generator, given b b b , uses O ( b ) O(b) O ( b ) space. The number of extra qubits is constant, depending on U U U .
Proof. Choose a positive integer q q q with A = q U A=qU A = q U integral, and a power of two N ≥ max { 2 q , ∑ i j ∣ A i j ∣ } N\ge\max\{2q,\sum_{ij}\lvert A_{ij}\rvert\} N ≥ max { 2 q , ∑ ij ∣ A ij ∣} . These are constants. Each matrix unit ∣ i ⟩ ⟨ j ∣ \lvert i\rangle\langle j\rvert ∣ i ⟩ ⟨ j ∣ is a clean block of a fixed reversible basis circuit: flag every input label other than j j j , then apply a basis permutation sending j j j to i i i . Signs are exact phase gates; a zero block is obtained by flipping a clean flag. Using ∣ A i j ∣ \lvert A_{ij}\rvert ∣ A ij ∣ signed copies of the appropriate matrix units and padding with zero blocks gives N N N such blocks. Prepare a uniform selector, apply the selected unitary, and unprepare the selector. Hadamards and reversible Boolean circuits over Γ \Gamma Γ give a fixed unitary W W W with clean block
s U , s = q / N ∈ ( 0 , 1 / 2 ] . sU,\qquad s=q/N\in(0,1/2]. s U , s = q / N ∈ ( 0 , 1/2 ] .
All temporary scratch registers must be zero in the selected block.
Choose a fixed integer ℓ ≥ 1 \ell\ge1 ℓ ≥ 1 such that sin ( π / ( 4 ℓ + 2 ) ) ≤ s / 2 \sin(\pi/(4\ell+2))\le s/2 sin ( π / ( 4 ℓ + 2 )) ≤ s /2 , and put
a = sin ( π / ( 4 ℓ + 2 ) ) s ∈ ( 0 , 1 / 2 ] , R a = ( a − 1 − a 2 1 − a 2 a ) . a=\frac{\sin(\pi/(4\ell+2))}{s}\in(0,1/2],\qquad
R_a=\begin{pmatrix}a&-\sqrt{1-a^2}\\\sqrt{1-a^2}&a\end{pmatrix}. a = s sin ( π / ( 4 ℓ + 2 )) ∈ ( 0 , 1/2 ] , R a = ( a 1 − a 2 − 1 − a 2 a ) .
Phase-sensitive one-qubit synthesis from Appendix § 6 .§ 4 , using [34 Theorem 4.5] , supplies a Γ \Gamma Γ circuit R R R with ∥ R − R a ∥ ≤ ϵ = δ / ( 2 ( 2 ℓ + 1 ) ) \lVert R-R_a\rVert\le\epsilon=\delta/(2(2\ell+1)) ∥ R − R a ∥ ≤ ϵ = δ / ( 2 ( 2 ℓ + 1 )) . Writing z = ⟨ 0 ∣ R ∣ 0 ⟩ z=\langle0|R|0\rangle z = ⟨ 0∣ R ∣0 ⟩ , the unitary V = R ⊗ W V=R\otimes W V = R ⊗ W has clean block exactly s z U szU sz U , including any complex phase of z z z .
Let P 0 P_0 P 0 be the clean-scratch projector tensored with the identity on the data, and use oblivious amplitude amplification with V V V and its inverse:
A = − V ( I − 2 P 0 ) V † ( I − 2 P 0 ) . \mathcal{A}=-V(I-2P_0)V^\dagger(I-2P_0). A = − V ( I − 2 P 0 ) V † ( I − 2 P 0 ) .
The standard two-dimensional amplitude-amplification calculation [4 ] , applied to each singular vector, gives
blk ( A ℓ V ) = h U , h = z ∣ z ∣ sin ( ( 2 ℓ + 1 ) arcsin ( s ∣ z ∣ ) ) , (20) \operatorname{blk}(\mathcal{A}^{\ell}V)=hU,\qquad h=\frac{z}{|z|}\sin((2\ell+1)\arcsin(s|z|)), \tag*{(20)} blk ( A ℓ V ) = h U , h = ∣ z ∣ z sin (( 2 ℓ + 1 ) arcsin ( s ∣ z ∣ )) , (20)
with h = 0 h=0 h = 0 if z = 0 z=0 z = 0 . All singular values of s z U szU sz U are equal, so the same scalar multiplies every input direction. The reflections and the inverse of the implemented circuit are exact over Γ \Gamma Γ .
For the ideal rotation R a R_a R a , the amplified clean block is exactly U U U . There are 2 ℓ + 1 2\ell+1 2 ℓ + 1 calls to V V V or V † V^\dagger V † in the amplified circuit. Unitary telescoping therefore gives
∣ h − 1 ∣ ≤ ( 2 ℓ + 1 ) ϵ = δ / 2 , ∣ h ∣ 2 ≥ ( 1 − δ / 2 ) 2 ≥ 1 − δ . |h-1|\le(2\ell+1)\epsilon=\delta/2,\qquad|h|^2\ge(1-\delta/2)^2\ge1-\delta. ∣ h − 1∣ ≤ ( 2 ℓ + 1 ) ϵ = δ /2 , ∣ h ∣ 2 ≥ ( 1 − δ /2 ) 2 ≥ 1 − δ .
The error estimate is used only to bound the scalar magnitude; the proportionality in (20) holds exactly for the actual synthesized circuit. Since s s s and ℓ \ell ℓ are constants, the claimed resource bounds follow from the one-qubit synthesis bound. ■
Proof of Theorem 3.5 . Take a machine for a promise problem in R Q L G \mathrm{RQL}_{G} RQL G . Replacing each primitive U U U by λ U U \lambda_U U λ U U changes each complete classically selected history by a phase and leaves all outcome probabilities unchanged. Apply Lemma 3.6 to the resulting field-valued gate set. It gives an intermediate rational-gate simulation with acceptance zero on no-instances and at least 2 / ( 3 m ) 2/(3m) 2/ ( 3 m ) on yes-instances, where m = [ F : Q ] m=[F:\mathbb{Q}] m = [ F : Q ] .
Let N 0 ( n ) ≥ 1 N_0(n)\ge1 N 0 ( n ) ≥ 1 be a polynomial upper bound on the number of rational gate applications in one such trial, including preparation of the field register. Apply Lemma 3.7 to each of the finitely many rational gates with b = ⌈ log 2 ( 2 N 0 ( n ) ) ⌉ b=\lceil\log_2(2N_0(n))\rceil b = ⌈ log 2 ( 2 N 0 ( n ))⌉ and δ = 2 − b ≤ 1 / ( 2 N 0 ( n ) ) \delta=2^{-b}\le1/(2N_0(n)) δ = 2 − b ≤ 1/ ( 2 N 0 ( n )) . After each compiled gate, test whether all its scratch qubits are zero. Reject if they are not; otherwise reuse them. This is an ordinary measured computation over Γ \Gamma Γ . The successful block is exactly proportional to the intended rational gate on every input, including inputs entangled with the rest of the workspace. Therefore an accepting history’s probability is multiplied by a product of at most N 0 ( n ) N_0(n) N 0 ( n ) factors, each at least 1 − δ 1-\delta 1 − δ . Consequently its total acceptance satisfies
p Γ ≥ ( 1 − δ ) N 0 ( n ) p ~ ≥ 1 2 p ~ , p ~ = 0 ⟹ p Γ = 0. p_{\Gamma}\ge(1-\delta)^{N_0(n)}\widetilde{p}\ge\frac{1}{2}\widetilde{p},\qquad\widetilde{p}=0\Longrightarrow p_{\Gamma}=0. p Γ ≥ ( 1 − δ ) N 0 ( n ) p ≥ 2 1 p , p = 0 ⟹ p Γ = 0.
On yes-instances this is at least 1 / ( 3 m ) 1/(3m) 1/ ( 3 m ) . Run 6 m 6m 6 m independent trials with reused measured workspace and accept if any trial accepts. Their success is at least 1 − ( 1 − 1 / ( 3 m ) ) 6 m ≥ 1 − e − 2 > 2 / 3 1-(1-1/(3m))^{6m}\ge1-e^{-2}>2/3 1 − ( 1 − 1/ ( 3 m ) ) 6 m ≥ 1 − e − 2 > 2/3 , while no-instance success is zero. The field and compiler scratch require at most extra quantum space. Their finite gate generators and repetition counters use O ( log n ) O(\log n) O ( log n ) classical space, and the running time is polynomial. This proves R Q L G ⊆ R Q L Γ \mathrm{RQL}_{G}\subseteq\mathrm{RQL}_{\Gamma} RQL G ⊆ RQL Γ using only the stated gate assumptions.
By Theorem 3.1 , R Q L Γ = R Q U Γ \mathrm{RQL}_{\Gamma}=\mathrm{RQU}_{\Gamma} RQL Γ = RQU Γ . Finally take the completed unitary Γ \Gamma Γ circuit, expand every control and inverse into an elementary Γ \Gamma Γ circuit, and only then substitute the gate implementations from condition (2). The product of their phases is a single global phase, so this substitution preserves acceptance exactly and gives R Q U Γ ⊆ R Q U G \mathrm{RQU}_{\Gamma}\subseteq\mathrm{RQU}_{G} RQU Γ ⊆ RQU G . Together with the defining reverse inclusion, the chain is
R Q U G ⊆ R Q L G ⊆ R Q L Γ = R Q U Γ ⊆ R Q U G , \mathrm{RQU}_{G}\subseteq\mathrm{RQL}_{G}\subseteq\mathrm{RQL}_{\Gamma}=\mathrm{RQU}_{\Gamma}\subseteq\mathrm{RQU}_{G}, RQU G ⊆ RQL G ⊆ RQL Γ = RQU Γ ⊆ RQU G ,
which proves (15) . ■
Corollary 3.8 (Algebraic extensions and alternative standard gates). The equality (15) holds for Γ \Gamma Γ augmented by any fixed finite collection of one- and two-qubit unitary gates over totally real or C M CM C M fields. In particular, it holds for finite collections of root-of-unity phase gates or rational orthogonal gates, without adjoining their inverses or controls. It also holds for { H , P M , CNOT } \{H, P_M, \operatorname{CNOT}\} { H , P M , CNOT } when 8 ∣ M 8 \mid M 8 ∣ M , where P M = diag ( 1 , e 2 π i / M ) P_M = \operatorname{diag}(1,e^{2\pi i/M}) P M = diag ( 1 , e 2 π i / M ) , and for { H , R z ( π / 4 ) , CNOT } \{H,R_z(\pi/4),\operatorname{CNOT}\} { H , R z ( π /4 ) , CNOT } .
Proof. Take the compositum of the fields of the extra gates with Q ( e i π / 4 ) \mathbb{Q}(e^{i\pi/4}) Q ( e iπ /4 ) . It is C M CM C M : totally real fields can first be adjoined to Q ( i ) \mathbb{Q}(i) Q ( i ) , and finite composita of C M CM C M fields are C M CM C M . For the displayed alternative gate sets, T = P M M / 8 T=P_M^{M/8} T = P M M /8 and R z ( π / 4 ) = e − i π / 8 T R_z(\pi/4)=e^{-i\pi/8}T R z ( π /4 ) = e − iπ /8 T , respectively. Thus both hypotheses of Theorem 3.5 hold. ▪
For an example whose entries cannot all lie in a cyclotomic field (a field generated by a root of unity), let t t t be a root of x 3 − 4 x + 1 x^3-4x+1 x 3 − 4 x + 1 and adjoin
U ( t ) = 1 1 + t 2 ( 1 − t 2 − 2 t 2 t 1 − t 2 ) U(t)=\frac{1}{1+t^2}
\begin{pmatrix}
1-t^2 & -2t\\
2t & 1-t^2
\end{pmatrix} U ( t ) = 1 + t 2 1 ( 1 − t 2 2 t − 2 t 1 − t 2 )
to Γ \Gamma Γ . The cubic is irreducible by the rational-root test and has positive nonsquare discriminant 229. Hence Q ( t ) \mathbb{Q}(t) Q ( t ) is totally real and non-Galois, and cannot be a subfield of a cyclotomic field, whose subfields are abelian Galois over Q \mathbb{Q} Q . Moreover, t = − U ( t ) 12 / ( 1 + U ( t ) 11 ) t=-U(t)_{12}/(1+U(t)_{11}) t = − U ( t ) 12 / ( 1 + U ( t ) 11 ) , so the gate entries themselves cannot all lie in a cyclotomic field. Nevertheless Corollary 3.8 applies.
Remark 3.9 (Scope of the field hypothesis). Theorem 3.5 is an equality for fixed gate sets, not a uniform algorithm over input-dependent number fields. Its use of primitive global phases is compatible with classical control; relative phases inside a controlled gate supplied as a primitive must still satisfy the field hypothesis for that full matrix. For arbitrary algebraic fields, conjugate gates need not be unitary and the positive trace form used above need not be available. Thus this proof does not establish the same conclusion for every algebraic gate set.
Perfect completeness with quantum witnesses
For two-sided bounded error, the known equality Q M A L = Q U M A L = B Q L \mathrm{QMAL}=\mathrm{QUMAL}=\mathrm{BQL} QMAL = QUMAL = BQL already eliminates both intermediate measurements and logarithmic-size witnesses [11 Theorem 1] . We ask whether measurements can be eliminated while preserving perfect completeness: some witness must still be accepted with probability exactly one on each yes-instance. Doubling provides such a construction under the gate assumptions below. Here we propagate the final rejection observable backwards and ask Merlin to supply a state encoding its history. Checking the history avoids preparing reference states or implementing matrix inverse square roots. We first state the gate assumptions, illustrate the construction for Clifford+T T T , and then give the general construction and its soundness proof.
Model and theorem
We use the witness-size convention of Fefferman and Remscrim [11 Definition 8] : the witness and all stored workspace together have O ( log n ) O(\log n) O ( log n ) qubits, including classical memory represented in the computational basis. The verifier is a logspace-uniform, polynomial-time computation over a fixed finite gate set G \mathcal{G} G , with computational-basis measurements, resets, and classical control allowed. It is absolutely halting: every branch, on every input and for every witness, halts within a common polynomial bound. The classical input is read-only and does not count towards the space bound. The witness may be any state; no circuit-size or gate-set restriction is imposed on Merlin’s preparation. Write Q M A L 1 , G \mathrm{QMAL}_{1,G} QMAL 1 , G for the resulting promise class with acceptance probability one for some witness on each yes-instance and at most 1 / 3 1/3 1/3 for every witness on each no-instance. The class Q U M A L 1 , G \mathrm{QUMAL}_{1,G} QUMAL 1 , G restricts the verifier to unitary operations until one final computational-basis measurement. In this section we also allow primitive gates of any fixed constant arity. This explicitly extends the one- and two-qubit convention used earlier; the theorem includes that convention as a special case. We retain the paper’s convention that gate entries can be computed to error 2 − b 2^{-b} 2 − b in deterministic space O ( b ) O(b) O ( b ) and time 2 O ( b ) 2^{O(b)} 2 O ( b ) . This fixes the computational model; it is not an approximation step in this proof. The primitive gates are applied exactly, and the construction below never evaluates their entries. In particular, the exact circuit construction in Lemma 4.3 needs only symbolic access to the gate names and wire indices.
Theorem 4.1 (Measurement elimination with perfect completeness). Let G \mathcal{G} G be a fixed finite set of constant-arity unitaries whose entries satisfy the preceding time and space bounds. Suppose that:
Fixed circuits over G \mathcal{G} G implement H H H , X X X , and Toffoli exactly, with a constant number of extra qubits that start and end in zero for every input state.
For every U ∈ G U \in\mathcal{G} U ∈ G , a fixed circuit over G \mathcal{G} G implements e i ϕ U U † e^{i\phi_U}U^\dagger e i ϕ U U † for some fixed real ϕ U \phi_U ϕ U , again returning its constant number of extra qubits to zero.
Then
Q M A L 1 , G = Q U M A L 1 , G . \mathrm{QMAL}_{1,\mathcal{G}} = \mathrm{QUMAL}_{1,\mathcal{G}}. QMAL 1 , G = QUMAL 1 , G . No exact controlled, conjugated, or transposed versions of the additional gates are required, and their entries need not be algebraic.
The proof below shows why the phase allowed in condition 2 remains global even when a circuit chooses between different matrix entries. The reverse containment is immediate; we prove the forward containment.
The Clifford+T T T case: checking a rejection history
For Γ = { H , T , C N O T } \Gamma= \{H, T, \mathrm{CNOT}\} Γ = { H , T , CNOT } , the theorem gives
Q M A L 1 , Γ = Q U M A L 1 , Γ . \mathrm{QMAL}_{1,\Gamma} = \mathrm{QUMAL}_{1,\Gamma}. QMAL 1 , Γ = QUMAL 1 , Γ .
The gate assumptions hold exactly: T † = T 7 T^\dagger= T^7 T † = T 7 , H H H and C N O T \mathrm{CNOT} CNOT are self-inverse, X = H T 4 H X = HT^4H X = H T 4 H , and Toffoli has an exact Clifford+T T T circuit (§ 3.2 ). Here is how the unitary verifier works.
Describe rejection. Let R R R be the original verifier’s rejection operator on its witness space: a normalized witness v v v is rejected with probability ⟨ v , R v ⟩ \langle v, Rv\rangle ⟨ v , R v ⟩ . Since R R R is positive semidefinite, perfect completeness means that some nonzero v v v satisfies R v = 0 Rv = 0 R v = 0 .
Ask Merlin for a history. Work backwards from the final rejection projector. Write B t B_t B t for the observable after t t t backward steps, and b t = vec ( B t ) b_t = \operatorname{vec}(B_t) b t = vec ( B t ) . For τ \tau τ elementary channels, Merlin supplies a normalized version of
h ( v ) = ( v , b 0 ⊗ v , b 1 ⊗ v , … , b τ ⊗ v ) . h(v) = (v, b_0 \otimes v, b_1 \otimes v, \ldots, b_\tau\otimes v). h ( v ) = ( v , b 0 ⊗ v , b 1 ⊗ v , … , b τ ⊗ v ) .
The parentheses denote a direct sum: these are amplitudes in distinct labelled parts of one state, not separately supplied copies of v v v . The history has polynomial dimension, so it fits in O ( log n ) O(\log n) O ( log n ) qubits. The verifier does not prepare it. § 4.3 constructs a matrix F F F that checks the final rejection projector, every backward propagation equation, and zero rejection on v v v . In particular,
F h ( v ) = ( 0 , … , 0 , R v ) . Fh(v) = (0,\ldots,0,Rv). F h ( v ) = ( 0 , … , 0 , R v ) .
Test all the equations exactly. Pad F F F by an identity matrix to a power-of-two dimension N N N , obtaining A = F ⊕ I A = F \oplus I A = F ⊕ I . Lemma 4.3 constructs an exact Clifford+T T T unitary V V V whose matrix block between zero-workspace states is A / N A/N A / N . The preliminary test rejects exactly when the verifier workspace is all zero after V V V . For a normalized certificate z z z , this probability is
p r e j ( z ) = ∥ A z ∥ 2 N 2 . p_{\mathrm{rej}}(z) = \frac{\lVert Az\rVert^2}{N^2}. p rej ( z ) = N 2 ∥ A z ∥ 2 .
The circuit applies the full unitary V V V and retains every component; it does not postselect. An honest history, extended by zero in the padding coordinates, is never rejected. On a no-instance, Lemma 4.2 gives an inverse-polynomial lower bound on this rejection probability for every certificate, including certificates that do not describe a valid history.
Amplify using the same witness. Alternate coherent tests of acceptance and initialized workspace, using V V V and its actual inverse. A logarithmic-size register records the first failed test. § 4.5 shows that polynomially many tests reduce soundness to at most 1 / 3 1/3 1/3 , while an honest certificate passes every test with certainty. Only the final failure indicator is measured. This uses one supplied certificate and no approximation of the exact rejection test.
A one-qubit example. Apply H H H to the witness, measure in the computational basis and discard the outcome, then measure again and accept outcome zero. The backward observables are
B 0 = B 1 = ∣ 1 ⟩ ⟨ 1 ∣ , B 2 = H ∣ 1 ⟩ ⟨ 1 ∣ H = ∣ − ⟩ ⟨ − ∣ . B_0 = B_1 = |1\rangle\langle1|,\qquad B_2 = H|1\rangle\langle1|H = |-\rangle\langle-|. B 0 = B 1 = ∣1 ⟩ ⟨ 1∣ , B 2 = H ∣1 ⟩ ⟨ 1∣ H = ∣ − ⟩ ⟨ − ∣.
Thus v = ∣ + ⟩ v = |+\rangle v = ∣ + ⟩ is accepted with certainty, and its normalized history is h ( ∣ + ⟩ ) / 2 h(|+\rangle)/2 h ( ∣ + ⟩) /2 . The exact history test never rejects this certificate. The first measurement is redundant in this small example; it illustrates the encoding of an honest history. The general no-instance bound is proved below. Unlike the RQL simulation, this construction needs no reference-state preparation or reweighting: Merlin supplies the history, and the verifier checks it exactly.
Encoding the rejection observables in a history
We now give the construction for any gate set G \mathcal{G} G satisfying Theorem 4.1 . We describe rejection by an operator at each stage of the computation. Starting with the final rejection projector, we propagate this operator backwards through the verifier. Its expectation at any stage equals the probability that the rest of the original computation rejects. Merlin supplies one state encoding a candidate witness together with the vectorized rejection operators at all stages. The verifier checks equations fixing the final rejection projector, relating consecutive operators, and requiring zero rejection on the candidate witness. An honest certificate satisfies all equations exactly. On a no-instance, the bound proved below forces every normalized certificate to violate the combined equations by an inverse-polynomial amount.
Elementary channels and adaptive control. Fix a source verifier. It can be represented by a logspace-uniform sequence Φ 1 , … , Φ τ \Phi_1,\ldots,\Phi_\tau Φ 1 , … , Φ τ of polynomially many elementary channels on s = O ( log n ) s = O(\log n) s = O ( log n ) qubits, each either a primitive unitary gate, single-qubit dephasing, or a single-qubit reset. This representation preserves the acceptance probability on every witness. Here is why it needs no controlled-U U U assumption. Store classical configurations in basis registers, copy a measured bit to the appropriate classical register after dephasing it, and implement deterministic updates using reversible Boolean gates followed by resets of discarded registers. For a classically conditional U U U , use a zero dummy register of its arity. On the inactive classical branch, swap the target with the dummy; apply U U U unconditionally; undo the swap; then reset the dummy. The active branch applies U U U to the target, and the inactive branch leaves the target unchanged. Classical configurations are diagonal, so discarding the dummy gives precisely the desired source channel.
Equality tests, wire routing, and Boolean updates use X X X and Toffoli (a fixed helper in state ∣ 1 ⟩ \lvert1\rangle ∣ 1 ⟩ also supplies CNOT). Enumerating the polynomially many configurations gives logspace-uniform circuits of polynomial length and logarithmic width; an update can retain the old configuration until the new one has been computed and then reset the old register. Expand the fixed Boolean-gate circuits into primitives of G \mathcal{G} G , and include their helper qubits in the total register. Absolute halting permits padding the source evolution to a fixed length with an absorbing classical output. The final rejection projector Π r e j \Pi_{\mathrm{rej}} Π rej is diagonal and its diagonal entries are logspace computable. Thus every chosen elementary map is a channel on the full register, even on states that are not reachable in the source computation.
Let D = 2 s D=2^s D = 2 s be the total register dimension after this conversion, d ≤ D d\le D d ≤ D the original witness dimension, and E : C d → C D E:\mathbb{C}^{d}\to\mathbb{C}^{D} E : C d → C D the basis embedding E ∣ v ⟩ = ∣ v ⟩ ∣ 0 ⟩ E\lvert v\rangle=\lvert v\rangle\lvert0\rangle E ∣ v ⟩ = ∣ v ⟩ ∣ 0 ⟩ . Define
B 0 = Π r e j , B t = Φ τ − t + 1 ∗ ( B t − 1 ) ( 1 ≤ t ≤ τ ) , R = E † B τ E . B_0=\Pi_{\mathrm{rej}},\qquad B_t=\Phi_{\tau-t+1}^{*}(B_{t-1})\quad(1\le t\le\tau),\qquad R=E^\dagger B_\tau E. B 0 = Π rej , B t = Φ τ − t + 1 ∗ ( B t − 1 ) ( 1 ≤ t ≤ τ ) , R = E † B τ E .
Here Φ ∗ \Phi^* Φ ∗ is the Hermitian conjugate with respect to the trace inner product. It propagates observables backwards, with Tr ( Φ ∗ ( B ) ρ ) = Tr ( B Φ ( ρ ) ) \operatorname{Tr}(\Phi^*(B)\rho)=\operatorname{Tr}(B\Phi(\rho)) Tr ( Φ ∗ ( B ) ρ ) = Tr ( B Φ ( ρ )) . For every channel, this backward map is unital and completely positive, so 0 ⪯ B t ⪯ I D 0\preceq B_t\preceq I_D 0 ⪯ B t ⪯ I D and 0 ⪯ R ⪯ I d 0\preceq R\preceq I_d 0 ⪯ R ⪯ I d . The original rejection probability on v v v is ⟨ v , R v ⟩ \langle v,Rv\rangle ⟨ v , R v ⟩ . Consequently the promise gives
x ∈ L y e s ⟹ ker R ≠ { 0 } , x ∈ L n o ⟹ R ⪰ δ I d , (21) x\in L_{\mathrm{yes}}\Longrightarrow\ker R\ne\{0\},\qquad x\in L_{\mathrm{no}}\Longrightarrow R\succeq\delta I_d, \tag*{(21)} x ∈ L yes ⟹ ker R = { 0 } , x ∈ L no ⟹ R ⪰ δ I d , (21)
where one may take δ = 2 / 3 \delta=2/3 δ = 2/3 . The proof also works for any known inverse-polynomial rejection lower bound 0 < δ ≤ 1 0<\delta\le1 0 < δ ≤ 1 . Positivity is essential to the first implication: ⟨ v , R v ⟩ = 0 \langle v,Rv\rangle=0 ⟨ v , R v ⟩ = 0 holds exactly when R v = 0 Rv=0 R v = 0 .
Use row vectorization vec ( B ) = ∑ a , b B a b ∣ a , b ⟩ \operatorname{vec}(B)=\sum_{a,b}B_{ab}\lvert a,b\rangle vec ( B ) = ∑ a , b B ab ∣ a , b ⟩ , and set b t = vec ( B t ) b_t=\operatorname{vec}(B_t) b t = vec ( B t ) . If M t M_t M t is the matrix of Φ τ − t + 1 ∗ \Phi_{\tau-t+1}^* Φ τ − t + 1 ∗ in this representation, then
b t = M t b t − 1 , M t = ∑ j K j † ⊗ K j T when Φ τ − t + 1 ( X ) = ∑ j K j X K j † . b_t=M_tb_{t-1},\qquad M_t=\sum_j K_j^\dagger\otimes K_j^{\mathsf{T}}\quad\text{when }\Phi_{\tau-t+1}(X)=\sum_jK_jXK_j^\dagger. b t = M t b t − 1 , M t = j ∑ K j † ⊗ K j T when Φ τ − t + 1 ( X ) = j ∑ K j X K j † .
Unless stated otherwise, matrix norms below are Euclidean operator norms; ∥ X ∥ F \lVert X\rVert_F ∥ X ∥ F is the Frobenius norm and ∥ X ∥ ∞ \lVert X\rVert_\infty ∥ X ∥ ∞ the operator norm of an observable. A unital completely positive map Ψ ∗ \Psi^* Ψ ∗ is contractive in the latter norm: the Schwarz inequality gives Ψ ∗ ( X ) † Ψ ∗ ( X ) ⪯ Ψ ∗ ( X † X ) ⪯ ∥ X ∥ ∞ 2 I \Psi^*(X)^\dagger\Psi^*(X)\preceq\Psi^*(X^\dagger X)\preceq\lVert X\rVert_\infty^2I Ψ ∗ ( X ) † Ψ ∗ ( X ) ⪯ Ψ ∗ ( X † X ) ⪯ ∥ X ∥ ∞ 2 I . Therefore
∥ Ψ ∗ ( X ) ∥ F ≤ D ∥ X ∥ ∞ ≤ D ∥ X ∥ F . \lVert\Psi^*(X)\rVert_F\le\sqrt{D}\lVert X\rVert_\infty\le\sqrt{D}\lVert X\rVert_F. ∥ Ψ ∗ ( X ) ∥ F ≤ D ∥ X ∥ ∞ ≤ D ∥ X ∥ F .
Every consecutive product of the M t M_t M t represents such a map. Hence
∥ M j ⋯ M i ∥ ≤ D ( 1 ≤ i ≤ j ≤ τ ) , ∥ b t ∥ ≤ D . (22) \lVert M_j\cdots M_i\rVert\le\sqrt{D}\quad(1\le i\le j\le\tau),\qquad\lVert b_t\rVert\le\sqrt{D}. \tag*{(22)} ∥ M j ⋯ M i ∥ ≤ D ( 1 ≤ i ≤ j ≤ τ ) , ∥ b t ∥ ≤ D . (22)
The bound on whole products, rather than a separate normalization at each step, prevents an exponential loss in time.
Define a linear map C : C D 2 ⊗ C d → C d \mathcal{C}:\mathbb{C}^{D^2}\otimes\mathbb{C}^{d}\to\mathbb{C}^{d} C : C D 2 ⊗ C d → C d by
C = ∑ i , j = 0 d − 1 ∣ i ⟩ ⟨ E i ∣ ⊗ ⟨ E j ∣ ⊗ ∣ j ⟩ . C=\sum_{i,j=0}^{d-1}\lvert i\rangle\langle Ei\lvert\otimes\langle Ej\lvert\otimes\lvert j\rangle. C = i , j = 0 ∑ d − 1 ∣ i ⟩ ⟨ E i ∣ ⊗ ⟨ E j ∣ ⊗ ∣ j ⟩ .
Then C ( vec ( B ) ⊗ v ) = E † B E v C(\operatorname{vec}(B) \otimes v) = E^\dagger BEv C ( vec ( B ) ⊗ v ) = E † B E v , C C † = d I d CC^\dagger= dI_d C C † = d I d , and ∥ C ∥ = d \lVert C\rVert= \sqrt{d} ∥ C ∥ = d . In particular, this map is not a contraction when d > 1 d > 1 d > 1 . On the direct sum
H = C d ⊕ ⨁ t = 0 τ ( C D 2 ⊗ C d ) , N 0 = d + ( τ + 1 ) D 2 d , \mathcal{H} = \mathbb{C}^{d} \oplus\bigoplus_{t=0}^{\tau}(\mathbb{C}^{D^2} \otimes\mathbb{C}^{d}), \qquad N_0 = d + (\tau+ 1)D^2d, H = C d ⊕ t = 0 ⨁ τ ( C D 2 ⊗ C d ) , N 0 = d + ( τ + 1 ) D 2 d ,
write a vector as Z = ( v , z 0 , … , z τ ) Z = (v,z_0,\ldots,z_\tau) Z = ( v , z 0 , … , z τ ) and define a square matrix F F F by its output blocks:
F Z = ( z 0 − b 0 ⊗ v , z 1 − ( M 1 ⊗ I d ) z 0 , … , z τ − ( M τ ⊗ I d ) z τ − 1 , C z τ ) . (23) FZ = (z_0 - b_0 \otimes v, z_1 - (M_1 \otimes I_d)z_0,\ldots,z_\tau- (M_\tau\otimes I_d)z_{\tau-1}, Cz_\tau). \tag*{(23)} F Z = ( z 0 − b 0 ⊗ v , z 1 − ( M 1 ⊗ I d ) z 0 , … , z τ − ( M τ ⊗ I d ) z τ − 1 , C z τ ) . (23)
Domain and codomain have the same dimension, although the d d d -dimensional block comes first in the domain and last in the codomain. Set h ( v ) = ( v , b 0 ⊗ v , … , b τ ⊗ v ) h(v) = (v,b_0 \otimes v,\ldots,b_\tau\otimes v) h ( v ) = ( v , b 0 ⊗ v , … , b τ ⊗ v ) . Then F h ( v ) = ( 0 , … , 0 , R v ) Fh(v) = (0,\ldots,0,Rv) F h ( v ) = ( 0 , … , 0 , R v ) , and the first τ + 1 \tau+1 τ + 1 zero constraints force every kernel vector of F F F to have this form. Thus
ker F ≠ { 0 } ⟺ ker R ≠ { 0 } . (24) \ker F \ne\{0\} \Longleftrightarrow\ker R \ne\{0\}. \tag*{(24)} ker F = { 0 } ⟺ ker R = { 0 } . (24)
Although h ( v ) h(v) h ( v ) encodes a polynomial number of coefficients, its normalization is a state on only ⌈ log 2 N 0 ⌉ = O ( log n ) \lceil\log_2 N_0\rceil= O(\log n) ⌈ log 2 N 0 ⌉ = O ( log n ) qubits. Merlin supplies this state; the verifier need not prepare it. Dishonest witnesses need not factor into history and witness registers. The following estimate applies to every vector Z Z Z .
Figure 6 aligns the backward observables with the original computation and summarizes the equations checked on the certificate.
Figure 6. The backward history for QMAL1. For a candidate witness v v v , the original verifier starts in ρ 0 = ∣ E v ⟩ ⟨ E v ∣ \rho_0 = \lvert Ev\rangle\langle Ev\rvert ρ 0 = ∣ E v ⟩ ⟨ E v ∣ and applies ρ j = Φ j ( ρ j − 1 ) \rho_j = \Phi_j(\rho_{j-1}) ρ j = Φ j ( ρ j − 1 ) . The aligned observable is B τ − j B_{\tau-j} B τ − j , so Tr ( B τ − j ρ j ) \operatorname{Tr}(B_{\tau-j}\rho_j) Tr ( B τ − j ρ j ) is the same rejection probability at every time j j j . The tuple h ( v ) h(v) h ( v ) denotes an unnormalized vector in a direct sum; its normalized encoding uses O ( log n ) O(\log n) O ( log n ) qubits, not a separate copy of every operator. For a general certificate Z = ( v , z 0 , … , z τ ) Z = (v,z_0,\ldots,z_\tau) Z = ( v , z 0 , … , z τ ) , the three sets of equations are precisely F Z = 0 FZ = 0 F Z = 0 . They force Z = h ( v ) Z = h(v) Z = h ( v ) and R v = 0 Rv = 0 R v = 0 . An honest witness on a yes-instance satisfies them exactly; the gap bound of Lemma 4.2 controls their combined violation for every normalized certificate on a no-instance.
Lemma 4.2 (History constraint gap). On a no-instance, the smallest singular value of F F F satisfies
σ min ( F ) ≥ μ , μ = δ 3 D d ( τ + 1 ) . \sigma_{\min}(F) \ge\mu,\qquad\mu= \frac{\delta}{3D\sqrt{d}(\tau+1)}. σ m i n ( F ) ≥ μ , μ = 3 D d ( τ + 1 ) δ . Proof. Put q = τ + 1 q=\tau+1 q = τ + 1 and write the output in (23) as ( e 0 , … , e τ , f ) (e_0,\ldots,e_\tau,f) ( e 0 , … , e τ , f ) . Let η = ∥ F Z ∥ \eta=\lVert FZ\rVert η = ∥ F Z ∥ and w t = z t − b t ⊗ v w_t=z_t-b_t\otimes v w t = z t − b t ⊗ v . The recurrence for w t w_t w t and (22) , also using the identity for an empty product, give
∥ w τ ∥ ≤ D q ∥ e ∥ , ( ∑ t = 0 τ ∥ w t ∥ 2 ) 1 / 2 ≤ D q ∥ e ∥ , ∥ e ∥ 2 = ∑ t ∥ e t ∥ 2 . \lVert w_\tau\rVert\le\sqrt{Dq}\lVert e\rVert,\qquad\left(\sum_{t=0}^{\tau}\lVert w_t\rVert^2\right)^{1/2}\le\sqrt{D}q\lVert e\rVert,\qquad\lVert e\rVert^2=\sum_t\lVert e_t\rVert^2. ∥ w τ ∥ ≤ D q ∥ e ∥ , ( t = 0 ∑ τ ∥ w t ∥ 2 ) 1/2 ≤ D q ∥ e ∥ , ∥ e ∥ 2 = t ∑ ∥ e t ∥ 2 . Since f = R v + C w τ f=Rv+Cw_\tau f = R v + C w τ and R ⪰ δ I R\succeq\delta I R ⪰ δ I ,
δ ∥ v ∥ ≤ ∥ f ∥ + d D q ∥ e ∥ ≤ 1 + d D q η . \delta\lVert v\rVert\le\lVert f\rVert+\sqrt{dDq}\lVert e\rVert\le\sqrt{1+dDq}\,\eta. δ ∥ v ∥ ≤ ∥ f ∥ + d D q ∥ e ∥ ≤ 1 + d D q η . Also ∥ h ( v ) ∥ ≤ 1 + D q ∥ v ∥ \lVert h(v)\rVert\le\sqrt{1+Dq}\lVert v\rVert ∥ h ( v )∥ ≤ 1 + D q ∥ v ∥ . Combining the bounds yields
∥ Z ∥ ≤ ( ( 1 + D q ) ( 1 + d D q ) δ + D q ) η ≤ 3 D d q δ η . \lVert Z\rVert\le\left(\frac{\sqrt{(1+Dq)(1+dDq)}}{\delta}+\sqrt{D}q\right)\eta\le\frac{3D\sqrt{d}q}{\delta}\eta. ∥ Z ∥ ≤ ( δ ( 1 + D q ) ( 1 + d D q ) + D q ) η ≤ δ 3 D d q η . The last inequality uses D , d , q ≥ 1 D,d,q\ge1 D , d , q ≥ 1 and δ ≤ 1 \delta\le1 δ ≤ 1 . ■
An exact test using the original gates
Pad by the identity to dimension N = 2 ℓ N=2^\ell N = 2 ℓ , the least power of two at least N 0 N_0 N 0 , and put A = F ⊕ I N − N 0 A=F\oplus I_{N-N_0} A = F ⊕ I N − N 0 . Identity padding preserves the kernel and the lower bound μ ≤ 1 \mu\le1 μ ≤ 1 ; zero padding would introduce spurious accepting witnesses.
Lemma 4.3 (Exact matrix test from paired gate entries). Assume the two exact gate-implementation conditions in Theorem 4.1 . Let N = 2 ℓ = poly ( n ) N=2^\ell=\operatorname{poly}(n) N = 2 ℓ = poly ( n ) , N ≥ 2 N\ge2 N ≥ 2 , and suppose a deterministic logspace procedure identifies each entry of an N N N -by-N N N matrix A A A as 0 0 0 , 1 1 1 , − 1 -1 − 1 , or
± U ‾ c , a U d , b \pm\overline{U}_{c,a}U_{d,b} ± U c , a U d , b for a named gate U ∈ G U\in\mathcal{G} U ∈ G and local basis indices a , b , c , d a,b,c,d a , b , c , d . Then there is a logspace-uniform circuit V V V over G \mathcal{G} G , using O ( log N ) O(\log N) O ( log N ) additional qubits and O ( N 2 log N ) O(N^2\log N) O ( N 2 log N ) gates, such that
( I N ⊗ ⟨ 0 a ∣ ) V ( I N ⊗ ∣ 0 a ⟩ ) = e i θ A N . (25) \left(I_N\otimes\langle0^a|\right)V\left(I_N\otimes|0^a\rangle\right)=e^{i\theta}\frac{A}{N}. \tag*{(25)} ( I N ⊗ ⟨ 0 a ∣ ) V ( I N ⊗ ∣ 0 a ⟩ ) = e i θ N A . (25) The phase θ \theta θ may depend on the input circuit but is common to all entries. The constants in the resource bounds depend only on the fixed gate set and its fixed implementation circuits. No controlled version of U U U , no entrywise conjugate gate, and no numerical evaluation of a matrix entry are required.
The matrix F ⊕ I F\oplus I F ⊕ I satisfies the symbolic-entry hypothesis, as we now check before proving the circuit assertion.
Which coefficients occur? The blocks in (24) occupy disjoint matrix positions. For a primitive unitary U U U the backwards step is M U = U † ⊗ U T M_U = U^\dagger\otimes U^T M U = U † ⊗ U T , with local entries
( M U ) ( a , b ) , ( c , d ) = U c , a U d , b = ⟨ a , d ∣ ( U † ⊗ U ) ∣ c , b ⟩ . (26) (M_U)_{(a,b),(c,d)} = U_{c,a}U_{d,b} = \langle a,d|(U^\dagger\otimes U)|c,b\rangle. \tag*{(26)} ( M U ) ( a , b ) , ( c , d ) = U c , a U d , b = ⟨ a , d ∣ ( U † ⊗ U ) ∣ c , b ⟩ . (26)
Untouched wires contribute only Kronecker deltas. Dephasing has a diagonal matrix with entries in { 0 , 1 } \{0,1\} { 0 , 1 } in the vectorized representation; the backward map for qubit reset sends B B B to B 00 I B_{00}I B 00 I locally and also has only 0–1 entries. The entries of b 0 b_0 b 0 , C C C , and the padding are 0 or 1. Thus every entry of A A A is either 0, 1, − 1 -1 − 1 , or a signed coefficient in (27). Given row and column indices, a logspace machine identifies this form and its indices by inspecting the source circuit. It need not decide whether a gate coefficient is numerically zero or compute its value.
Proof of Lemma 4.3. We first select an entry coherently, then combine the entries into the matrix block.
Selecting a coefficient without a controlled source gate. For one such coefficient use registers R 0 R_0 R 0 , S 0 S_0 S 0 , each of the arity of U U U , and a bit q q q specifying whether this coefficient is selected. Perform the following operations in order:
If q = 1 q = 1 q = 1 , XOR c c c into R 0 R_0 R 0 and b b b into S 0 S_0 S 0 .
Apply the available inverse of U U U , up to global phase, to R 0 R_0 R 0 .
If q = 0 q = 0 q = 0 , swap R 0 R_0 R 0 and S 0 S_0 S 0 .
Apply U U U to S 0 S_0 S 0 .
If q = 0 q = 0 q = 0 , swap R 0 R_0 R 0 and S 0 S_0 S 0 again.
If q = 1 q = 1 q = 1 , XOR a a a into R 0 R_0 R 0 and d d d into S 0 S_0 S 0 .
Only reversible Boolean operations are controlled. For q = 1 q = 1 q = 1 , the amplitude from zero scratch to zero scratch is e i ϕ U U c , a U d , b e^{i\phi_U}U_{c,a}U_{d,b} e i ϕ U U c , a U d , b . For q = 0 q = 0 q = 0 , writing S S S for the swap, the entire scratch operation is
S ( I ⊗ U ) S ( e i ϕ U U † ⊗ I ) = e i ϕ U I . S(I \otimes U)S(e^{i\phi_U}U^\dagger\otimes I) = e^{i\phi_U}I. S ( I ⊗ U ) S ( e i ϕ U U † ⊗ I ) = e i ϕ U I .
Thus the inactive branch is a scalar identity on all coefficient scratch states, and the active branch has exactly the same scalar. This remains true with implementation helpers: keep those helpers separate from R 0 R_0 R 0 , S 0 S_0 S 0 , initialize them to zero, and return them to zero after each fixed gate circuit. Their zero subspace is invariant, even when the coefficient scratch is entangled with the address registers.
Enumerate all N 2 N^2 N 2 row–column pairs. At each pair compute its address equality bit q q q , apply the appropriate circuit, then uncompute q q q . Use shared coefficient scratch of constant width. A zero entry flips a separate scratch flag on its selected address; 1 does nothing, and a minus sign uses Z = H X H Z = HXH Z = H X H on q q q . At any fixed address exactly one circuit is active. All the other circuits are scalar identities on the coefficient scratch, including any nonzero scratch left by the active circuit. Moreover, each paired gate circuit is executed on every address and contributes its phase on both branches. Their product is therefore a common phase independent of the address, not a relative phase between entries. The resulting address-preserving unitary W W W satisfies
⟨ 0 r ∣ W i j ∣ 0 r ⟩ = e i θ A i j . \langle0^r|W_{ij}|0^r\rangle= e^{i\theta}A_{ij}. ⟨ 0 r ∣ W ij ∣ 0 r ⟩ = e i θ A ij .
Each address test uses O ( log N ) O(\log N) O ( log N ) Boolean gates and O ( log N ) O(\log N) O ( log N ) additional qubits returned to zero. There are N 2 N^2 N 2 tests, and the coefficient circuit at each address has constant size. Thus the gate count is O ( N 2 log N ) O(N^2\log N) O ( N 2 log N ) . The circuit generator enumerates addresses and computes their symbolic entry descriptions in logarithmic space; it never stores or approximates a complex matrix entry.
From entries to a matrix block. Figure 7 (a) shows the circuit described here. Start with a certificate in a column register J J J and a zero row register I I I , both of ℓ \ell ℓ qubits. Apply H ⊗ ℓ H^{\otimes\ell} H ⊗ ℓ to I I I , apply W W W controlled by the two addresses as just constructed, apply H ⊗ ℓ H^{\otimes\ell} H ⊗ ℓ to J J J , and swap I , J I,J I , J . Selecting zero coefficient scratch and zero old-column register gives
Figure 7. The unitary verifier constructed from the original QMAL1 _1 1 verifier. Merlin supplies one normalized history certificate ∣ h ⟩ |h\rangle ∣ h ⟩ in J J J . In (a), W W W implements the matrix entries of A A A exactly up to a common phase; S S S groups coefficient scratch and temporary helpers, and w w w comprises I I I and S S S . The zero-workspace output of V V V has probability ∥ A h ∥ 2 / N 2 \lVert Ah\rVert^2/N^2 ∥ A h ∥ 2 / N 2 and is the rejecting outcome. In (b), each controlled box swaps the displayed labels of L L L and fixes all other labels. The first records failure of the Q Q Q test; after V − 1 V^{-1} V − 1 , the second records failure of the P P P test. Conditions concern the whole workspace w w w , and their temporary helpers are returned to zero. The inverse of V V V is implemented up to global phase, which does not affect these tests. A fresh nonzero label is used at every test, so a recorded failure never returns to label zero. An honest certificate in ker A \ker A ker A passes every test with certainty; all operations before the final measurement are unitary.
e i θ N ∑ i , j A i j ∣ i ⟩ ⟨ j ∣ . \frac{e^{i\theta}}{N}\sum_{i,j} A_{ij}\lvert i\rangle\langle j\rvert. N e i θ i , j ∑ A ij ∣ i ⟩ ⟨ j ∣ .
which proves (25) . Here “selecting” specifies a subspace, not an intermediate measurement or postselection. The Hadamard layers and final swap add O ( log N ) O(\log N) O ( log N ) gates. ■
Define rejection to be the event that all this workspace is zero. For a normalized certificate h h h , the rejection probability is exactly
p r e j ( h ) = ∥ A h ∥ 2 N 2 . (27) p_{\mathrm{rej}}(h)=\frac{\lVert Ah\rVert^2}{N^2}. \tag*{(27)} p rej ( h ) = N 2 ∥ A h ∥ 2 . (27)
A reversible Boolean computation can put this zero test in a final output bit if desired. Equations (24) and (27) give perfect completeness and, on no-instances, rejection probability at least
γ = μ 2 N 2 = δ 2 9 D 2 d ( τ + 1 ) 2 N 2 ≥ 1 poly ( n ) . \gamma=\frac{\mu^2}{N^2}=\frac{\delta^2}{9D^2d(\tau+1)^2N^2}\geq\frac{1}{\operatorname{poly}(n)}. γ = N 2 μ 2 = 9 D 2 d ( τ + 1 ) 2 N 2 δ 2 ≥ poly ( n ) 1 .
Unitary amplification with one witness
We give the amplification explicitly to retain the exact gate conditions and perfect completeness. Space-efficient amplification for unitary computations with quantum witnesses was developed by Fefferman et al. [9 ] . Let P = I N ⊗ ∣ 0 a ⟩ ⟨ 0 a ∣ P=I_N\otimes\lvert0^a\rangle\langle0^a\rvert P = I N ⊗ ∣ 0 a ⟩ ⟨ 0 a ∣ project onto initialized verifier workspace, let Π a c c = I − P \Pi_{\mathrm{acc}}=I-P Π acc = I − P be the preliminary test’s accepting projector at the output of V V V , and put Q = V † Π a c c V Q=V^\dagger\Pi_{\mathrm{acc}}V Q = V † Π acc V . On the image of P P P , (25) gives
P Q P ≃ I N − A † A N 2 . (28) PQP\simeq I_N-\frac{A^\dagger A}{N^2}. \tag*{(28)} P QP ≃ I N − N 2 A † A . (28)
An initialized kernel witness is fixed by both P P P and Q Q Q . On a no-instance, 0 ⪯ P Q P ⪯ ( 1 − γ ) P 0\preceq PQP\preceq(1-\gamma)P 0 ⪯ P QP ⪯ ( 1 − γ ) P . Alternating a Q Q Q test and a P P P test for k k k pairs, accepting only if every test passes, would therefore have acceptance probability at most
∥ ( P Q P ) k ( h ⊗ ∣ 0 a ⟩ ) ∥ 2 ≤ ( 1 − γ ) 2 k ≤ e − 2 k γ . \left\lVert(PQP)^k(h\otimes\lvert0^a\rangle)\right\rVert^2\leq(1-\gamma)^{2k}\leq e^{-2k\gamma}. ( P QP ) k ( h ⊗ ∣ 0 a ⟩) 2 ≤ ( 1 − γ ) 2 k ≤ e − 2 k γ .
These tests can be performed coherently in logarithmic space. Figure 7 (b) shows one pair of tests and the final measurement. Introduce a failure-label register with labels 0 , 1 , … , 2 k 0,1,\ldots,2k 0 , 1 , … , 2 k , initially zero; any unused binary labels are left fixed. At test j j j , transpose labels 0 0 0 and j j j if that test fails. For a Q Q Q test apply V V V , condition the label transposition on Π a c c \Pi_{\mathrm{acc}} Π acc failing, and apply V † V^\dagger V † . For a P P P test condition it on nonzero verifier workspace. These are Boolean conditions in the computational basis between the unconditional calls to V V V and its inverse. Each predicate is computed and uncomputed using separate scratch. Before test j j j , label j j j has no amplitude: earlier tests touched only smaller labels. Thus an old failure never returns to label zero, and the label-zero component is exactly the product of the passing projectors applied so far. This proves the displayed probability bound for the fully unitary implementation and for arbitrary, possibly entangled certificates. Mixed witnesses follow by linearity.
Every gate of V V V has an inverse over G \mathcal{G} G up to a global phase. Reversing its circuit therefore implements V † V^\dagger V † up to a common phase, which does not affect either projector test. Extra helpers used to reverse primitive gates are returned to zero after each inverse circuit. No controlled-V V V operation is used. Take k = ⌈ 1 / γ ⌉ k=\lceil1/\gamma\rceil k = ⌈ 1/ γ ⌉ using the explicit rational bound above (with δ = 2 / 3 \delta=2/3 δ = 2/3 ). This is a logspace-computable polynomial bound. The final verifier accepts exactly when the failure label is zero, with perfect completeness and soundness at most e − 2 < 1 / 3 e^{-2}<1/3 e − 2 < 1/3 . It uses O ( log N + log k ) = O ( log n ) O(\log N+\log k)=O(\log n) O ( log N + log k ) = O ( log n ) witness and workspace qubits, polynomially many gates, and a fixed schedule on every input. This completes the proof of Theorem 4.1 .
Gate-set examples and comparison with reweighted doubling
Section 4.2 verifies the conditions for Γ = { H , T , C N O T } \Gamma=\{H,T,\mathrm{CNOT}\} Γ = { H , T , CNOT } ; see also the exact-synthesis characterization of Giles and Selinger [16 ] . Further examples are:
For any fixed finite collection U \mathcal{U} U of constant-arity unitaries whose entries satisfy the stated time and space bounds, { H , X , T o f f o l i } ∪ U ∪ U † \{H,X,\mathrm{Toffoli}\}\cup\mathcal{U}\cup\mathcal{U}^{\dagger} { H , X , Toffoli } ∪ U ∪ U † satisfies the theorem. Clifford+T T T universality is not needed.
For any fixed finite set Θ \Theta Θ of angles such that each e i θ e^{i\theta} e i θ can be computed within those bounds, Γ ∪ { P θ : θ ∈ Θ } \Gamma\cup\{P_\theta: \theta\in\Theta\} Γ ∪ { P θ : θ ∈ Θ } works, where P θ = diag ( 1 , e i θ ) P_\theta= \operatorname{diag}(1,e^{i\theta}) P θ = diag ( 1 , e i θ ) , since X P θ X = e i θ P θ † XP_\theta X = e^{i\theta}P_\theta^\dagger X P θ X = e i θ P θ † . The angles need not be rational multiples of π \pi π .
The set Γ ∪ { R 5 } \Gamma\cup\{R_5\} Γ ∪ { R 5 } works for
R 5 = ( 3 / 5 − 4 / 5 4 / 5 3 / 5 ) , Z R 5 Z = R 5 † . R_5 = \begin{pmatrix} 3/5 & -4/5 \\ 4/5 & 3/5 \end{pmatrix}, \qquad ZR_5Z = R_5^\dagger. R 5 = ( 3/5 4/5 − 4/5 3/5 ) , Z R 5 Z = R 5 † .
Its entries are outside Z [ 1 / 2 , i ] \mathbb{Z}[1/\sqrt{2},i] Z [ 1/ 2 , i ] , so this specified matrix has no exact Clifford+T T T implementation with extra qubits returned to zero [16 ] . The construction uses R 5 R_5 R 5 directly.
These are equalities within each qualifying gate set, not a claim that different such gate sets define the same perfectly complete class.
Both this construction and the RQL construction use vectorization and preserve an exact zero, but they simulate different operators. § 3.1 propagates a density operator forwards, reweights its doubled evolution, and keeps the left Kraus factors exact while approximating the right Kraus factors. Here we propagate a rejection observable backwards. Merlin supplies a history certificate, the verifier tests every history equation through one exact matrix block, and a bound on products of backward maps on observables supplies the inverse-polynomial gap. There are no reference states, square-root or inverse-square-root approximations, or invocations of BQL = BQUL in this proof. The first-failure label serves the same purpose as the earlier failure counter, but now enforces a sequence of alternating projector tests.
The exact condition also differs: RQL has perfect soundness on no-instances, whereas the present theorem preserves the existence of a perfectly accepted witness on yes-instances. It does not remove that witness or make completeness perfect when it was originally less than one. In particular, it does not establish QMAL = QMAL1 _1 1 or RQL = coQUMAL1 _1 1 , the distinct questions discussed by Fefferman and Remscrim [11 Open Problems 1–2] .
Comparison with perfect completeness for QMA. Grewal and Rudolph prove QMA = QMA1 _1 1 over { X , CNOT , Toffoli , H ⊗ H } \{X,\operatorname{CNOT},\operatorname{Toffoli},H \otimes H\} { X , CNOT , Toffoli , H ⊗ H } using an exact history constraint [14 Sections 3.1–3.3] . They first arrange that the acceptance operator E E E has dyadic rational entries with a known denominator. Merlin supplies an exact rational value Γ z = ⟨ z ∣ ( 2 E ) ∣ z ⟩ \Gamma_z = \langle z|(2E)|z\rangle Γ z = ⟨ z ∣ ( 2 E ) ∣ z ⟩ and a history whose final vector is mapped back to its first vector using Γ z − 1 \Gamma_z^{-1} Γ z − 1 . An exact matrix test rejects in proportion to the squared norm of the constraint residual. This is closely related to our use of a history certificate and an exact kernel test.
The space requirement separates the two results. Their certificate includes the numerator and denominator of Γ z \Gamma_z Γ z , with O ( h ℓ ) O(h\ell) O ( h ℓ ) bits when 2 h E 2^hE 2 h E is integral, and their implementation uses an index register of that order. Even for a logarithmic-size original witness, h h h can grow with the polynomial circuit length; the resulting space bound need not be logarithmic. Our construction instead uses the original perfect-completeness promise to obtain ker R ≠ { 0 } \ker R \ne\{0\} ker R = { 0 } and checks its backward history without a supplied rational scalar. Thus their theorem does not directly establish QMAL = QMAL1 _1 1 , and our theorem only removes measurements from verifiers that already have perfect completeness.
Connection to span programs
Span programs, introduced by Karchmer and Wigderson [21 ] , decide whether a fixed target vector t t t lies in the span of vectors made available by the input bits. In linear-map notation, a fixed map L : U → V L:\mathcal{U}\to\mathcal{V} L : U → V and an available subspace U ( x ) \mathcal{U}(x) U ( x ) accept x x x when L w = t Lw=t L w = t for some w ∈ U ( x ) w\in\mathcal{U}(x) w ∈ U ( x ) . Such a w w w is a positive witness ; a negative witness is a vector ω \omega ω with ⟨ ω , t ⟩ = 1 \langle\omega,t\rangle= 1 ⟨ ω , t ⟩ = 1 and ⟨ ω , L u ⟩ = 0 \langle\omega,Lu\rangle= 0 ⟨ ω , Lu ⟩ = 0 for every u ∈ U ( x ) u \in U(x) u ∈ U ( x ) . Witness norms underlie the connection to quantum query complexity [30 , 28 ] .
Our history test also describes a vector separating a target from a linear subspace. Writing F x F_x F x for the matrix in (23) and e j e_j e j for the standard basis of its domain, finite-dimensional linear algebra gives
ker F x = ( im F x † ) ⊥ , ker F x ≠ { 0 } ⟺ ∃ j : e j ∉ im F x † . \ker F_x = (\operatorname{im} F_x^{\dagger})^{\perp}, \qquad\ker F_x \ne\{0\} \Longleftrightarrow\exists j:\ e_j \notin\operatorname{im} F_x^{\dagger}. ker F x = ( im F x † ) ⊥ , ker F x = { 0 } ⟺ ∃ j : e j ∈ / im F x † .
Indeed, any nonzero Z ∈ ker F x Z \in\ker F_x Z ∈ ker F x has a nonzero coordinate and can be rescaled to separate the corresponding e j e_j e j from every column of F x † F_x^{\dagger} F x † . Thus a perfectly accepted history certificate supplies the same kind of separating vector as a negative span-program witness. On a no-instance, Lemma 4.2 instead makes F x † F_x^{\dagger} F x † invertible, and every equation F x † w = e j F_x^{\dagger}w=e_j F x † w = e j has a solution of norm at most 1 / μ 1/\mu 1/ μ .
There is also a spectral connection. Reichardt and Špalek use zero-eigenvalue witnesses in span-program formula evaluation [30 ] ; Reichardt’s reflection formulation gives query-optimal algorithms [29 ] . Belovs and Reichardt obtain logarithmic-space algorithms for s t st s t -connectivity [7 ] , while Ito and Jeffery develop approximate witnesses and their relation to spectral gaps [17 ] . In our test, (28) identifies the perfectly accepted certificates with the common fixed vectors of P P P and Q Q Q ; the singular-value bound for F x F_x F x gives the gap used in amplification.
The resource connection is particularly close to Jeffery’s bounds relating quantum space to the logarithm of span-program size, including approximate span programs for two-sided error [19 ] . Cornelissen, Jeffery, Ozols and Piedrafita also give conversions between quantum algorithms and span programs that preserve time up to polylogarithmic factors [8 ] . Here polynomial matrix dimension likewise permits a logarithmic-size quantum certificate. However, F x F_x F x depends on the full input, whereas a standard span program fixes its map and lets input bits select available vectors. The displayed identity is therefore a geometric connection, not by itself a construction of such a span program or an algorithm without a witness. Our theorem additionally requires Merlin to supply the certificate and the exact gate implementation in § 4.4 to preserve perfect completeness.
Conclusion
Under the gate assumptions of Theorem 3.3 , R Q L G = R Q U L G \mathrm{RQL}_{G} = \mathrm{RQUL}_{G} RQL G = RQUL G . Keeping the left Kraus factors exact preserves zero acceptance, while reference-state reweighting retains an inverse-polynomial accepting probability on yes-instances. Theorem 3.5 also identifies this class with the standard Clifford+T T T class under its CM-field assumptions.
Theorem 4.1 proves Q M A L 1 , G = Q M A L 1 , G \mathrm{QMAL}_{1,G} = \mathrm{Q}_{\mathrm{MAL}_{1,G}} QMAL 1 , G = Q MAL 1 , G under its stated gate assumptions. Here Merlin supplies a history certificate, and exact checks preserve perfect completeness. This construction uses neither reference-state reweighting nor the two-sided measurement-elimination theorem used by the RQL construction.
Several questions follow from these constructions.
Which gate sets support the simulation? Can the exact inverse assumption in Theorem 3.3 be removed while retaining its bounds on computing gate entries? Can the requirement to implement Clifford+T T T in Theorems 3.3 and 3.5 be removed? Can the gate-set independence theorem be extended beyond fixed CM-field gate sets? Approximate universality does not settle this issue: the standard gate-conversion argument preserves a bounded gap but can destroy an exact zero [34 , 22 ] .
Can both acceptance and rejection be exact? Define E Q L G \mathrm{EQL}_{G} EQL G and E Q U L G \mathrm{EQUL}_{G} EQUL G using the same absolutely halting, polynomial-time, logarithmic-space models, with a correct answer of probability one on every promised input. Whether E Q L G = E Q U L G \mathrm{EQ}_{\mathrm{LG}} = \mathrm{EQ}_{\mathrm{ULG}} EQ LG = EQ ULG remains open here. The missing requirement is an exact implementation of the operations used by an exact simulation.
One can remove a normalization obstacle at the level of ideal operators. For the pure initial state, take τ 0 = ρ 0 \tau_0 = \rho_0 τ 0 = ρ 0 and τ t = Φ t ( τ t − 1 ) + 3 I / ( d T ) \tau_t = \Phi_t(\tau_{t-1}) + 3I/(dT) τ t = Φ t ( τ t − 1 ) + 3 I / ( d T ) . The same doubled construction, with no inverse of τ 0 \tau_0 τ 0 , gives vec ( ρ T τ T − 1 / 2 ) \operatorname{vec}(\rho_T\tau_T^{-1/2}) vec ( ρ T τ T − 1/2 ) . Since Tr τ T = 4 \operatorname{Tr}\tau_T = 4 Tr τ T = 4 , pairing with vec ( τ T 1 / 2 ) / 2 \operatorname{vec}(\tau_T^{1/2})/2 vec ( τ T 1/2 ) /2 after copying the output gives amplitudes p b / 2 p_b/2 p b /2 for the original output probabilities p b p_b p b . For an exact source computation this would give success probability 1 / 4 1/4 1/4 , and one ordinary Grover iteration would suffice. Exact efficient implementations of the steps and final pairing over a fixed gate set are not supplied by our approximation arguments. Establishing such an implementation, possibly with different reweighting factors, is the open problem; no EQL equality follows from this observation.
What is the remaining role of a quantum witness? Theorem 4.1 removes intermediate measurements from perfectly complete verifiers but retains a quantum witness. The further equality R Q L = c o Q U M A L 1 \mathrm{RQL} = \mathrm{coQUMAL}_1 RQL = coQUMAL 1 posed by Fefferman and Remscrim is not automatic [11 Open Problem 1] . Can the argument that preserves exact rejection help eliminate witnesses in this perfect-completeness setting? Any such comparison must use compatible gate-set conventions for the verifier and the simulation. The separate question Q M A L = Q M A L 1 \mathrm{QMAL} = \mathrm{QMAL}_1 QMAL = QMAL 1 also remains: the history construction preserves an existing exact kernel and does not create one from a merely high-acceptance witness.
Can the reference-state computation be made cheaper? The reference states bound the norms of the doubled steps, but implementing their square roots and inverse square roots can dominate the cost of the simulation. Can structure in the source channels make it cheaper to access the reference states and implement their square roots and inverse square roots? Can these operations be implemented without using two-sided measurement elimination? For superlogarithmic space, the relevant target is an improved simultaneous time–space bound, not just polynomial time in the Hilbert-space dimension. The time–space trade-offs of Girish and Raz, together with Zhandry’s black-box lower bounds, provide benchmarks for this question [13 , 38 ] .
Implementing doubling
This appendix collects the circuit constructions for the reweighted doubled operators defined in the main text. The ideal clean-block construction is shared by the two simulations; the compiled construction makes explicit which factors remain exact in the one-sided case.
Implementation with exact controls and conjugation
The following gate assumptions give a direct generalization of § 3.2 . They also specify the interface used by Lemma 3.2 . § 3.3 removes the requirements for exact controlled gates and complex conjugates. We impose the following sufficient conditions on the fixed finite gate set G \mathcal{G} G . An exact implementation is a fixed finite circuit over G \mathcal{G} G , with a constant number of extra qubits initialized and returned to zero on every input. The circuit must implement the specified matrix exactly, including its phase.
Computing gate entries. For every U ∈ G U \in\mathcal{G} U ∈ G , its entries can be approximated to additive error 2 − b 2^{-b} 2 − b in deterministic space O ( b ) O(b) O ( b ) and time 2 O ( b ) 2^{O(b)} 2 O ( b ) . Only b = O ( log n ) b = O(\log n) b = O ( log n ) is used below.
Exact standard gates. There are exact implementations of H H H , T = diag ( 1 , e i π / 4 ) T = \operatorname{diag}(1,e^{i\pi/4}) T = diag ( 1 , e iπ /4 ) , and CNOT. In particular, reversible Boolean gates, computational-basis predicates, and their phase reflections can be implemented exactly.
Exact inverses and complex conjugates. For every U ∈ G U \in\mathcal{G} U ∈ G , there are exact implementations of U † U^\dagger U † and U ‾ \overline{U} U , where conjugation is in the computational basis.
Exact coherent control. For every U ∈ G U \in\mathcal{G} U ∈ G , there is an exact implementation of ∣ 0 ⟩ ⟨ 0 ∣ ⊗ I + ∣ 1 ⟩ ⟨ 1 ∣ ⊗ U \lvert0\rangle\langle0\rvert\otimes I + \lvert1\rangle\langle1\rvert\otimes U ∣ 0 ⟩ ⟨ 0 ∣ ⊗ I + ∣ 1 ⟩ ⟨ 1 ∣ ⊗ U . Further controls are obtained by computing their conjunction into clean scratch. In particular, this condition applies to the actual finite circuits implementing the right Kraus factors, not just their ideal targets.
These fixed circuits are independent of input length. Approximate scalar rotations are compiled using the exact implementations of Clifford+T T T and space-efficient synthesis [34 ] ; the phase-sensitive convention needed for controlled rotations is explained in Appendix § 6 .§ 4 . No exact synthesis of σ t 1 / 2 \sigma_t^{1/2} σ t 1/2 or σ t − 1 / 2 \sigma_t^{-1/2} σ t − 1/2 is assumed.
Theorem A.1 (Same-gate-set measurement elimination). Under conditions (1)–(4), the polynomial-time, logarithmic-space classes defined above satisfy
R Q L G = R Q U G . \mathrm{RQL}_{\mathcal{G}} = \mathrm{RQU}_{\mathcal{G}}. RQL G = RQU G . Proof. Under conditions (1)–(4), the construction in step 1 of Theorem 3.1 gives exact dilations D t D_t D t over G \mathcal{G} G . Lemma 3.2 supplies the right-factor circuits Q t Q_t Q t over the same gate set. Conditions (2)–(4) allow every inverse, control and Boolean reflection used there to be implemented exactly. The clean-block identity (10) and steps 3–5 of that proof therefore give an absolutely halting, polynomial-time unitary simulation in logarithmic space, with zero acceptance on no-instances and acceptance greater than 2/3 on yes-instances. The reverse inclusion follows from the definitions. ■
Corollary A.2 (Examples). The theorem applies to Γ = { H , T , C N O T } \Gamma= \{H,T,\mathrm{CNOT}\} Γ = { H , T , CNOT } and to
G θ = Γ ∪ { P θ , P − θ } , P θ = diag ( 1 , e i θ ) , \mathcal{G}_{\theta} = \Gamma\cup\{P_{\theta},P_{-\theta}\}, \qquad P_{\theta} = \operatorname{diag}(1,e^{i\theta}), G θ = Γ ∪ { P θ , P − θ } , P θ = diag ( 1 , e i θ ) , whenever the added entries satisfy condition (1), including θ = 1 \theta= 1 θ = 1 .
Proof. The exact inverse, conjugation and controlled circuits for Γ \Gamma Γ were given in step 1 of Theorem 3.1 . The two added phase gates are each other’s inverses and conjugates; the same AND–phase–uncompute construction controls each of them exactly. All numerical entries in these examples meet condition (1) . ■
The equality for G θ G_\theta G θ is over that same gate set on both sides. It does not assert gate-set independence for arbitrary finite gate sets, nor exact simulation of arbitrary channel matrices supplied without unitary dilations.
Doubling for BQL
Figure 8 expresses the ideal contraction C t C_t C t as a clean block of a unitary circuit. The unitary extension of W ‾ t \overline{W}_t W t in this diagram is an abstract operator, so the diagram alone does not assert exact synthesis over a fixed gate set. For bounded error, this operator may be approximated to the accuracy required by the full simulation. The compiled form in Appendix A.3 can also be used for BQL. Appendix B proves the acceptance bounds after reducing the original computation’s error. It also explains why implementing the right Kraus factors uses the known measurement-elimination theorem.
Vector (PDF) D t ( ∣ v ⟩ A ∣ 0 ⟩ E ) = ∑ a K t , a ∣ v ⟩ A ∣ a ⟩ E , D_t\left(|v\rangle_A|0\rangle_E\right)=\sum_a K_{t,a}|v\rangle_A|a\rangle_E, D t ( ∣ v ⟩ A ∣0 ⟩ E ) = a ∑ K t , a ∣ v ⟩ A ∣ a ⟩ E , U W ‾ t ( ∣ v ⟩ B ∣ 0 ⟩ E ) = W ‾ t ∣ v ⟩ , U_{\overline{W}_t}\left(|v\rangle_B|0\rangle_E\right)=\overline{W}_t|v\rangle, U W t ( ∣ v ⟩ B ∣0 ⟩ E ) = W t ∣ v ⟩ , C t = ⟨ 0 ∣ E ( U W ‾ t † ) B E ( D t ) A E ∣ 0 ⟩ E = ∑ a K t , a ⊗ J t , a † . C_t=\langle0|_E\left(U^\dagger_{\overline{W}_t}\right)_{BE}\left(D_t\right)_{AE}|0\rangle_E=\sum_a K_{t,a}\otimes J^\dagger_{t,a}. C t = ⟨ 0 ∣ E ( U W t † ) B E ( D t ) A E ∣0 ⟩ E = a ∑ K t , a ⊗ J t , a † . Figure 8. The ideal doubled step C t C_t C t . Gates run left to right on a possibly entangled input on A , B A,B A , B . The blue dilation writes the Kraus label into E E E ; the purple circuit acts on B , E B,E B , E to supply the right Kraus factors J t , a † J^\dagger_{t,a} J t , a † . The green E = 0 E=0 E = 0 tag selects the clean block, not a measurement. U W ‾ t U_{\overline{W}_t} U W t is an exact abstract unitary extension of W ‾ t \overline{W}_t W t , with no assumed exact synthesis over the gate set.
Doubling for RQL
For the one-sided simulation, Figure 9 replaces the ideal unitary for the right Kraus factors by a compiled circuit Q t Q_t Q t while retaining the exact unitary dilation D t D_t D t of the original channel. Thus the clean block C ^ t \widehat{C}_t C t retains the exact Kraus factors on the first data register, as required by the perfect-soundness argument in the main text. The gate-set implementation hypotheses stated there still apply.
Figure 9. The compiled doubled step C ^ t ≈ C t \widehat{C}_t \approx C_t C t ≈ C t . The purple box replaces the ideal inverse in Figure 8 by the inverse of the implemented circuit Q t Q_t Q t . The left Kraus factors K t , a K_{t,a} K t , a remain exact; the right Kraus factors H t , a † H^\dagger_{t,a} H t , a † act on B B B . Label sums include ∗ \ast ∗ and padding labels, with zero left Kraus factors. Green tags are clean-block conditions, not measurements: the physical output is C ^ t ∣ ψ ⟩ A B ∣ 00 ⟩ E Z \widehat{C}_t|\psi\rangle_{AB}|00\rangle_{EZ} C t ∣ ψ ⟩ A B ∣00 ⟩ E Z plus a component with nonzero E Z EZ E Z , retained coherently.
C ^ t = ⟨ 0 E 0 Z ∣ ( Q t † ) B E Z ( D t ) A E ∣ 0 E 0 Z ⟩ = ∑ a K t , a ⊗ H t , a † , H t , a = ⟨ a E 0 Z ∣ Q t ∣ 0 E 0 Z ⟩ , H t = ∑ a H t , a ⊗ ∣ a ⟩ , ∥ H t − W ‾ t ∥ ≤ ε ⟹ ∥ C ^ t − C t ∥ ≤ ε , ∥ C ^ t ∥ ≤ 1. \begin{aligned}
\widehat{C}_t &= \langle0_E0_Z | (Q_t^\dagger)_{BEZ}(D_t)_{AE} | 0_E0_Z\rangle= \sum_a K_{t,a} \otimes H^\dagger_{t,a}, \\
H_{t,a} &= \langle a_E0_Z | Q_t | 0_E0_Z\rangle,\qquad H_t = \sum_a H_{t,a} \otimes|a\rangle, \\
\lVert H_t-\overline{W}_t\rVert&\le\varepsilon\quad\Longrightarrow\quad\lVert\widehat{C}_t-C_t\rVert\le\varepsilon,\qquad\lVert\widehat{C}_t\rVert\le1.
\end{aligned} C t H t , a ∥ H t − W t ∥ = ⟨ 0 E 0 Z ∣ ( Q t † ) B E Z ( D t ) A E ∣ 0 E 0 Z ⟩ = a ∑ K t , a ⊗ H t , a † , = ⟨ a E 0 Z ∣ Q t ∣ 0 E 0 Z ⟩ , H t = a ∑ H t , a ⊗ ∣ a ⟩ , ≤ ε ⟹ ∥ C t − C t ∥ ≤ ε , ∥ C t ∥ ≤ 1.
We prove Lemma 3.2. A clean block is the compression of an actual unitary between specified input and output subspaces, with ancillary registers fixed to zero; the input and output subspaces may have different dimensions. Compression is only notation: every register is retained coherently. Throughout this proof, dimensions and running times are polynomial in n n n , and the required error tolerances are inverse polynomial.
Approximating rotations, including their phases. All variable one-qubit rotations can be taken in SU ( 2 ) \operatorname{SU}(2) SU ( 2 ) . There is a fixed, finite, inverse-closed set of determinant-one Clifford+T T T circuits whose generated subgroup is dense in SU ( 2 ) \operatorname{SU}(2) SU ( 2 ) . Indeed, the determinant map on the group generated by H H H , T T T has finite image, so its kernel is finitely generated and has finite index. Projective universality of H H H , T T T [6 ] implies that the projective closure of this kernel is all of the connected group PU ( 2 ) \operatorname{PU}(2) PU ( 2 ) ; its closure in SU ( 2 ) \operatorname{SU}(2) SU ( 2 ) is therefore SU ( 2 ) \operatorname{SU}(2) SU ( 2 ) . Apply the phase-sensitive version of space-efficient Solovay–Kitaev, [34 Theorem 4.5] , to this fixed set. It approximates the specified matrix in operator norm, including its phase, with O ( log ( 1 / ξ ) ) O(\log(1/\xi)) O ( log ( 1/ ξ )) generation space for error ξ \xi ξ . Scalar phases, when needed, can be realized on the zero state of a helper qubit using a determinant-one diagonal rotation; this helper is reused and required to be zero in the selected block. It is never reset: leakage from approximate rotations is included in the telescoping error bound for the full circuit relative to the ideal diagonal rotations. This also supplies phase-correct implementations of the controlled phase gates in a Fourier transform. All controls and inverses are formed after choosing the finite circuit that implements the approximation, using the exact gate implementations required by the theorem. The polynomially many gates used to implement the right Kraus factors can be approximated with a smaller inverse-polynomial error per gate, by the unitary telescoping bound.
Reference entries as two-sided computations. To implement the recurrence for σ t \sigma_t σ t , start in I / d I/d I / d . Apply each source channel, then replace the state by I / d I/d I / d with probability 1 / ( T + 1 ) 1/(T+1) 1/ ( T + 1 ) . For this reference-state experiment, the coin and all gates may be approximated sufficiently accurately. Their accumulated trace-distance error is bounded by the sum of the per-step errors. For a diagonal entry, or the real or imaginary part of an off-diagonal entry, measure the corresponding one- or two-coordinate Hermitian observable. Its norm is at most one, and it is implementable using reversible basis permutations and constant-dimensional rotations. Polynomially many independent trials with reused workspace and a classical sum estimate the entry to any inverse-polynomial additive accuracy, with constant error probability.
Thus, for an entry component y ∈ [ − 1 , 1 ] y \in[-1,1] y ∈ [ − 1 , 1 ] , the promise problem y ≥ z + h y \ge z+h y ≥ z + h versus y ≤ z − h y \le z-h y ≤ z − h is in BQL for inverse-polynomial h h h . The established BQL = BQUL theorem [11 Theorem 1] , followed by space-efficient unitary error reduction [9 Theorem 1.1 and Corollary 1.2] and two-sided gate approximation, supplies a uniform Clifford+T T T comparator with error at most any inverse-polynomial ζ \zeta ζ on promised inputs. It is a valid unitary circuit on every input, including thresholds in the promise gap; no correctness assertion there is needed. This is a quantum estimation argument, not an assertion that the entries of σ t \sigma_t σ t are classically computable in logarithmic space.
Representing the reference matrix in a unitary circuit. Let b z b_z b z be the actual acceptance probability of this comparator. Compute, apply the sign + 1 +1 + 1 on acceptance and − 1 -1 − 1 on rejection, and uncompute with its actual inverse. The all-zero work block is exactly 2 b z − 1 2b_z-1 2 b z − 1 . For a power-of-two grid of N N N midpoint thresholds in [ − 1 , 1 ] [-1,1] [ − 1 , 1 ] , prepare and unprepare a uniform grid register. The resulting scalar block a ( y ) a(y) a ( y ) obeys
∣ a ( y ) − y ∣ ≤ 2 h + 4 N + 2 ζ (29) |a(y)-y| \le2h+\frac{4}{N}+2\zeta \tag*{(29)} ∣ a ( y ) − y ∣ ≤ 2 h + N 4 + 2 ζ (29)
Indeed, the integral of sgn ( y − z ) \operatorname{sgn}(y-z) sgn ( y − z ) against the uniform measure is y y y ; the grid contributes at most 2 / N 2/N 2/ N , the thresholds within h h h of y y y contribute at most 2 h + 2 / N 2h+2/N 2 h + 2/ N , and comparator errors outside that interval contribute at most 2 ζ 2\zeta 2 ζ .
These scalar circuits can be addressed coherently without quantum access to a classical circuit generator. Enumerate all polynomially many tuples ( t , i , j , component , z ) (t,i,j,\text{component},z) ( t , i , j , component , z ) and emit the corresponding fixed-input comparison circuit controlled on equality with the address registers. The address is unchanged. Polynomial enumeration and recomputation use O ( log n ) O(\log n) O ( log n ) space.
An equal superposition of the real and imaginary constructions, with an exact phase i i i on the latter, gives a scalar entry block B i j / 2 B_{ij}/2 B ij /2 . Prepare a uniform row register, apply the scalar block controlled on row and input column, swap these two registers, and unprepare the old column. Its clean matrix block is B / ( 2 d ) B/(2d) B / ( 2 d ) : on column j j j the clean output is ( 2 d ) − 1 ∑ i B i j ∣ i ⟩ (2d)^{-1}\sum_i B_{ij}|i\rangle ( 2 d ) − 1 ∑ i B ij ∣ i ⟩ . A selector qubit in ∣ + ⟩ |+\rangle ∣ + ⟩ chooses between this circuit and its inverse. Selecting the ∣ + ⟩ |+\rangle ∣ + ⟩ output component gives the exact Hermitian block
A t = S t 2 d , S t = B + B † 2 , ∥ S t − σ t ∥ ≤ μ . A_t=\frac{S_t}{2d},\qquad S_t=\frac{B+B^\dagger}{2},\qquad\lVert S_t-\sigma_t\rVert\le\mu. A t = 2 d S t , S t = 2 B + B † , ∥ S t − σ t ∥ ≤ μ .
For example, take h = ζ = μ / ( 32 d ) h=\zeta=\mu/(32d) h = ζ = μ / ( 32 d ) and a power-of-two N ≥ 64 d / μ N\ge64d/\mu N ≥ 64 d / μ in (29) . The component errors are at most 3 μ / ( 16 d ) 3\mu/(16d) 3 μ / ( 16 d ) , so the complex entry errors and the bound ∥ B − σ t ∥ ≤ d max i j ∣ B i j − ( σ t ) i j ∣ \lVert B-\sigma_t\rVert\le d\max_{ij}|B_{ij}-(\sigma_t)_{ij}| ∥ B − σ t ∥ ≤ d max ij ∣ B ij − ( σ t ) ij ∣ give the displayed inequality. Choose μ ≤ λ / 2 \mu\le\lambda/2 μ ≤ λ /2 , where λ = 1 / ( d ( T + 1 ) ) \lambda=1/(d(T+1)) λ = 1/ ( d ( T + 1 )) . Then spec ( S t ) ⊆ [ λ / 2 , 2 ] \operatorname{spec}(S_t)\subseteq[\lambda/2,2] spec ( S t ) ⊆ [ λ /2 , 2 ] .
Square roots and inverse square roots without storing the matrix. Let U U U be the actual unitary with Hermitian clean block A t A_t A t , and let P P P be its zero-scratch projector. Define
R = ( 0 U U † 0 ) , P ′ = ∣ + ⟩ ⟨ + ∣ ⊗ P , Q = ( 2 P ′ − I ) R . R=\begin{pmatrix}0&U\\ U^\dagger&0\end{pmatrix},\qquad P'=|+\rangle\langle+|\otimes P,\qquad Q=(2P'-I)R. R = ( 0 U † U 0 ) , P ′ = ∣ + ⟩ ⟨ + ∣ ⊗ P , Q = ( 2 P ′ − I ) R .
R R R is a Hermitian unitary and its compression to P ′ P' P ′ is A t A_t A t . For an eigenvalue a a a of A t A_t A t , the two-reflection walk Q Q Q has phases ± arccos a \pm\arccos a ± arccos a on the associated invariant plane. Perform coherent phase estimation of Q Q Q , rotate a flag qubit so that its ∣ 0 ⟩ |0\rangle ∣0 ⟩ amplitude is f ( cos θ ) f(\cos\theta) f ( cos θ ) , and uncompute the phase estimation. If ∣ f ∣ ≤ 1 |f|\le1 ∣ f ∣ ≤ 1 and f f f has Lipschitz constant L L L , an estimate accurate to δ \delta δ except with probability ν \nu ν gives clean-block error at most L δ + 2 ν L\delta+2\nu L δ + 2 ν . Both phases in the invariant plane have the same cosine. With inverse-polynomial δ , ν \delta,\nu δ , ν , ordinary phase estimation uses O ( log n ) O(\log n) O ( log n ) qubits and polynomially many controlled powers of Q Q Q . The estimates are retained and uncomputed, never measured. Rotations depending on an estimate are implemented by enumerating its polynomially many bit strings and controlling each fixed rotation circuit on equality. The circuit generator therefore needs only classical addresses. For each flag rotation the entire SU ( 2 ) \operatorname{SU}(2) SU ( 2 ) matrix, including 1 − f 2 \sqrt{1-f^2} 1 − f 2 , is approximated to the prescribed gate accuracy. Quadratically finer scalar precision suffices near f = ± 1 f=\pm1 f = ± 1 and still uses only O ( log n ) O(\log n) O ( log n ) bits.
Put c ( x ) = min { 2 , max { λ / 2 , 2 d x } } c(x)=\min\{2,\max\{\lambda/2,2dx\}\} c ( x ) = min { 2 , max { λ /2 , 2 d x }} and choose
f + ( x ) = c ( x ) / 2 , f − ( x ) = λ / 2 / c ( x ) . f_+(x)=\sqrt{c(x)/2},\qquad f_-(x)=\sqrt{\lambda/2}/\sqrt{c(x)}. f + ( x ) = c ( x ) /2 , f − ( x ) = λ /2 / c ( x ) .
These functions are bounded, have polynomially bounded Lipschitz constants, and have values computable to inverse-polynomial accuracy in logarithmic space. Their clean blocks approximate S t 1 / 2 / 2 S_t^{1/2}/\sqrt{2} S t 1/2 / 2 and λ / 2 S t − 1 / 2 \sqrt{\lambda/2}S_t^{-1/2} λ /2 S t − 1/2 , respectively. For ∥ S t − σ t ∥ ≤ μ ≤ λ / 2 \lVert S_t-\sigma_t\rVert\le\mu\le\lambda/2 ∥ S t − σ t ∥ ≤ μ ≤ λ /2 ,
∥ S t 1 / 2 − σ t 1 / 2 ∥ ≤ μ λ , ∥ S t − 1 / 2 − σ t − 1 / 2 ∥ ≤ 2 μ λ 3 / 2 . (30) \left\lVert S_t^{1/2}-\sigma_t^{1/2}\right\rVert\le\frac{\mu}{\sqrt{\lambda}},\qquad
\left\lVert S_t^{-1/2}-\sigma_t^{-1/2}\right\rVert\le\frac{2\mu}{\lambda^{3/2}}. \tag*{(30)} S t 1/2 − σ t 1/2 ≤ λ μ , S t − 1/2 − σ t − 1/2 ≤ λ 3/2 2 μ . (30)
For the first bound, the difference of roots solves the Sylvester equation with coefficients S t 1 / 2 , σ t 1 / 2 S_t^{1/2},\sigma_t^{1/2} S t 1/2 , σ t 1/2 ; its integral solution has norm at most μ / ( λ / 2 + λ ) \mu/(\sqrt{\lambda}/2+\sqrt{\lambda}) μ / ( λ /2 + λ ) . The second follows by multiplying this root difference on the left and right by the inverse roots. Thus both unscaled root errors can meet any inverse-polynomial error tolerance. No eigenvectors are computed or stored.
Combining the factors to approximate W t W_t W t . The construction below combines a square root, the inverse of the unitary dilation D t D_t D t , and an inverse square root, as in the Petz-isometry implementation of Gilyén et al. [12 Eq. (9) and Theorem 1] . § 3.1 identifies the matching Kraus factors and the different completion used here. Our preceding reference construction supplies logarithmic-space uniform access; the exact left Kraus factors in the main simulation preserve exact rejection.
Pad the number of source Kraus labels to a power of two r r r . Prepare a uniform label L L L , copy it into the environment E E E , apply D t D_t D t to data and E E E , and require E = 0 E=0 E = 0 in the output block. The retained label gives exactly
F t r , F t = ∑ a K t , a † ⊗ ∣ a ⟩ , ∥ F t ∥ ≤ r . \frac{F_t}{\sqrt{r}}, \qquad F_t=\sum_a K_{t,a}^{\dagger}\otimes|a\rangle, \qquad\lVert F_t\rVert\le\sqrt{r}. r F t , F t = a ∑ K t , a † ⊗ ∣ a ⟩ , ∥ F t ∥ ≤ r .
Compose this block with the root blocks before and after it, and add a separate branch for J t , ∗ ⊗ ∣ ∗ ⟩ J_{t,*}\otimes|*\rangle J t , ∗ ⊗ ∣ ∗ ⟩ . For a sum, prepare a selector with amplitudes proportional to the square roots of the coefficient magnitudes, select the component unitary, and unprepare the selector. Compression yields the sum divided by the sum of those magnitudes. There are only constantly many branches here. Products of the constant number of constituent blocks use distinct clean scratch, or the failure-counter construction in the main proof. The resulting block is
s 0 ( W t + Δ ) , s 0 ≥ n − O ( 1 ) . s_0(W_t+\Delta), \qquad s_0\ge n^{-O(1)}. s 0 ( W t + Δ ) , s 0 ≥ n − O ( 1 ) .
All normalization factors are known scalar functions of d , T , r d,T,r d , T , r . For instance the ideal main-branch coefficient is 2 r / ( κ λ ) 2\sqrt{r}/(\kappa\lambda) 2 r / ( κλ ) and the star-branch coefficient is 2 \sqrt{2} 2 , using η / ( κ d ) = λ \eta/(\kappa d)=\lambda η / ( κ d ) = λ . The common scale is their sum’s reciprocal. Errors in roots and scalar rotations change the unscaled block by at most a polynomial factor times their errors: this follows by a constant-length product telescoping bound and ∥ F t ∥ ≤ r \lVert F_t\rVert\le\sqrt{r} ∥ F t ∥ ≤ r , ∥ σ t − 1 / 2 ∥ ≤ λ − 1 / 2 \lVert\sigma_t^{-1/2}\rVert\le\lambda^{-1/2} ∥ σ t − 1/2 ∥ ≤ λ − 1/2 . Consequently any specified inverse-polynomial bound on ∥ Δ ∥ \lVert\Delta\rVert ∥ Δ ∥ is attainable. Errors in preparing the selector are also bounded after division by the known normalization factor s 0 s_0 s 0 .
Removing the normalization factor. Choose a polynomially bounded integer m ≥ 1 m\ge1 m ≥ 1 for which s = sin ( π / ( 4 m + 2 ) ) ≤ min { s 0 , 1 / 2 } s=\sin(\pi/(4m+2))\le\min\{s_0,1/2\} s = sin ( π / ( 4 m + 2 )) ≤ min { s 0 , 1/2 } and reduce the selected block’s amplitude by a factor s / s 0 s/s_0 s / s 0 . First analyze an ideal rotation giving this factor. Rectangular oblivious amplitude amplification, using the input and output clean-subspace reflections, transforms the block s ( W t + Δ ) s(W_t+\Delta) s ( W t + Δ ) as follows. Write W t + Δ = V H W_t+\Delta=VH W t + Δ = V H in polar form. If ∥ Δ ∥ ≤ γ ≤ 1 / 4 \lVert\Delta\rVert\le\gamma\le1/4 ∥ Δ ∥ ≤ γ ≤ 1/4 , then
∥ V − W t ∥ ≤ 2 γ , spec ( H ) ⊆ [ 1 − γ , 1 + γ ] . \lVert V-W_t\rVert\le2\gamma,\qquad\operatorname{spec}(H)\subseteq[1-\gamma,1+\gamma]. ∥ V − W t ∥ ≤ 2 γ , spec ( H ) ⊆ [ 1 − γ , 1 + γ ] .
After m m m iterations the block is, with its known sign corrected,
V f ( H ) , f ( x ) = sin ( ( 2 m + 1 ) arcsin ( s x ) ) . Vf(H),\qquad f(x)=\sin\bigl((2m+1)\arcsin(sx)\bigr). V f ( H ) , f ( x ) = sin ( ( 2 m + 1 ) arcsin ( s x ) ) .
Here f ( 1 ) = 1 f(1)=1 f ( 1 ) = 1 and ∣ f ′ ( x ) ∣ < 3 \lvert f'(x)\rvert<3 ∣ f ′ ( x )∣ < 3 on that interval, since ( 2 m + 1 ) s ≤ π / 2 (2m+1)s\le\pi/2 ( 2 m + 1 ) s ≤ π /2 and s x ≤ 5 / 8 sx\le5/8 s x ≤ 5/8 . Thus ∥ V f ( H ) − W t ∥ ≤ 5 γ \lVert Vf(H)-W_t\rVert\le5\gamma ∥ V f ( H ) − W t ∥ ≤ 5 γ . Use γ ≤ ε / 20 \gamma\le\varepsilon/20 γ ≤ ε /20 . Approximate this extra rotation so that the complete amplified circuit changes by at most ε / 4 \varepsilon/4 ε /4 ; per-call error O ( ε / ( m + 1 ) ) O(\varepsilon/(m+1)) O ( ε / ( m + 1 )) suffices by unitary telescoping. The preceding approximation errors can be included in Δ \Delta Δ before amplification. The resulting block is within ε \varepsilon ε of W t W_t W t , with all Kraus labels retained and no additional normalization factor. Thus this implementation avoids a fixed loss at every source step.
Finally conjugate this actual circuit gate by gate. For Γ \Gamma Γ , use its exact complex-conjugation circuits; more generally, use condition (3) of Theorem A.1 , to obtain Q t Q_t Q t and its labelled block within ε \varepsilon ε of W t ‾ \overline{W_t} W t . The initial states and projectors selecting the block have real entries, so conjugation commutes with taking this block.
An explicit precision budget. The following choices make the error estimates quantitative. Let 0 < ε ≤ 1 0<\varepsilon\le1 0 < ε ≤ 1 be the desired error in the labelled block of Lemma 3.2 , and set
λ = 1 d ( T + 1 ) , K = 2 r κ λ + 2 = 1 s 0 , γ = ε 20 . \lambda=\frac{1}{d(T+1)},\qquad K=2\sqrt{\frac{r}{\kappa\lambda}+\sqrt{2}}=\frac{1}{s_0},\qquad\gamma=\frac{\varepsilon}{20}. λ = d ( T + 1 ) 1 , K = 2 κλ r + 2 = s 0 1 , γ = 20 ε .
Here r r r is the padded number of source Kraus labels. All tolerances in Table 1 may be rounded down to dyadic numbers within a factor of two of the stated bound. The grid size is rounded up to a power of two. These choices require only logarithmically many bits.
Table 1. One sufficient error budget for a single right Kraus isometry. M ≥ 1 M\ge1 M ≥ 1 bounds the number of variable-rotation occurrences in the complete amplified circuit before those rotations are synthesized. Repeated occurrences, including those in inverses and controlled circuits, are counted separately.
For the reference experiment, a trace-norm error of h / 4 h/4 h /4 changes the expectation of a norm-one observable by at most h / 4 h/4 h /4 . Hoeffding’s inequality gives empirical error at most h / 4 h/4 h /4 , except with probability at most 2 e − 4 < 1 / 3 2e^{-4}<1/3 2 e − 4 < 1/3 , using the stated number of trials. Thus a promised distance of at least h h h from the threshold leaves a constant-probability correct comparison. The required trace-norm bound follows by telescoping the implemented reference channels: for at most T T T channels, an error at most h / ( 4 T ) h/(4T) h / ( 4 T ) in diamond norm per channel suffices. For a reference trial with g g g approximated unitary gate occurrences, per-gate operator-norm error at most h / ( 8 g ) h/(8g) h / ( 8 g ) suffices; the intervening channels contract trace distance. Applying [11 Theorem 1] gives a unitary comparator with constant gap. Then [9 Corollary 1.2] , with p = ⌈ log 2 ( 2 / ζ ) ⌉ p=\lceil\log_2(2/\zeta)\rceil p = ⌈ log 2 ( 2/ ζ )⌉ , reduces its error to at most ζ / 2 \zeta/2 ζ /2 . A further two-sided synthesis error of at most ζ / 2 \zeta/2 ζ /2 in its acceptance probability gives the actual comparator error ζ \zeta ζ used above.
To check the root budget, both f + f_+ f + and f − f_- f − have Lipschitz constant at most 2 d / λ 2d/\lambda 2 d / λ : on the unclipped interval their derivatives are bounded respectively by d / λ d/\sqrt{\lambda} d / λ and 2 d / λ 2d/\lambda 2 d / λ , and clipping does not increase these bounds. Hence L δ + 2 ν ≤ γ / ( 8 K ) L\delta+ 2\nu\le\gamma/(8K) L δ + 2 ν ≤ γ / ( 8 K ) . Equation (30) changes either normalized root by at most 2 μ / λ ≤ γ / ( 8 K ) 2\mu/\lambda\le\gamma/(8K) 2 μ / λ ≤ γ / ( 8 K ) . Each implemented root block therefore differs from its block defined using σ t \sigma_t σ t by at most
ε r o o t = γ 4 K . \varepsilon_{\mathrm{root}} = \frac{\gamma}{4K}. ε root = 4 K γ .
Write a = 2 r / ( κ λ ) a = 2\sqrt{r/(\kappa\lambda)} a = 2 r / ( κλ ) and b = 2 b = \sqrt{2} b = 2 , so a + b = K a+b=K a + b = K . The main branch is a product of two normalized root blocks and the contraction F t / r F_t/\sqrt{r} F t / r ; the additional branch uses one normalized inverse root. Every factor is a contraction. Product telescoping therefore bounds the error in the unscaled sum by
∥ Δ ∥ ≤ ( 2 a + b ) ε r o o t ≤ 2 K ε r o o t = γ / 2. \lVert\Delta\rVert\le(2a+b)\varepsilon_{\mathrm{root}} \le2K\varepsilon_{\mathrm{root}} = \gamma/2. ∥ Δ ∥ ≤ ( 2 a + b ) ε root ≤ 2 K ε root = γ /2.
The polar-amplification bound proved above consequently applies. The chosen m = O ( K ) m=O(K) m = O ( K ) guarantees s ≤ s 0 s\le s_0 s ≤ s 0 and s ≤ 1 / 2 s\le1/2 s ≤ 1/2 .
In this calculation the comparator circuits are already finite Clifford+T T T circuits, while the remaining variable rotations are first analyzed as exact matrices. The number M M M of their occurrences is fixed by the preceding circuit construction and does not depend on their eventual synthesis accuracy. Approximate all of them, including the selector, Fourier-transform, root-flag and attenuation rotations, with the final tolerance ξ \xi ξ . The unitary telescoping bound adds at most M ξ ≤ ε / 4 M\xi\le\varepsilon/4 M ξ ≤ ε /4 to the amplified circuit’s error. Thus the total labelled-block error is at most ε / 2 \varepsilon/2 ε /2 , leaving slack within the required ε \varepsilon ε . In particular, the main simulation’s choice ε = 1 / ( 12 T d ) \varepsilon=1/(12Td) ε = 1/ ( 12 T d ) makes the accumulated doubled-step error at most T ε = 1 / ( 12 d ) T\varepsilon=1/(12d) T ε = 1/ ( 12 d ) .
The table specifies tolerances rather than claiming a particular polynomial degree for the imported two-sided simulator. The reference trials, address enumeration, phase-estimation powers and O ( K ) O(K) O ( K ) amplification calls each have length polynomial in n n n , d d d , T T T , r r r and 1 / ε 1/\varepsilon 1/ ε . For example, ordinary phase estimation can attain ( δ , ν ) (\delta,\nu) ( δ , ν ) with O ( 1 / ( δ ν ) ) O(1/(\delta\nu)) O ( 1/ ( δ ν )) controlled walk calls and O ( log ( 1 / ( δ ν ) ) ) O(\log(1/(\delta\nu))) O ( log ( 1/ ( δ ν ))) estimation qubits. The imported comparator has polynomial length and logarithmic space by the cited theorems. Consequently M M M and the fully synthesized circuit length are polynomial, while every address, counter, precision register and rotation generator uses O ( log n + log ( 1 / ε ) ) O(\log n+\log(1/\varepsilon)) O ( log n + log ( 1/ ε )) space. There are only constantly many nested constructions. For the inverse-polynomial tolerances used here, the total space is O ( log n ) O(\log n) O ( log n ) .
Time and space bounds. All lower bounds on eigenvalues and all error tolerances above are inverse polynomial. The number of address tuples, phase-estimation calls, amplification iterations, and gates is polynomial. Scalar calculations keep only a constant number of O ( log n ) O(\log n) O ( log n ) -bit registers; loop bodies and gate sequences are regenerated when needed. Only a constant number of constructions are nested: the two-sided comparison circuit, reference block, root block, construction of W t W_t W t , and amplification. Each level uses logarithmic workspace, hence their sum does also. Repeated powers are powers of full unitaries on the same registers and do not allocate new workspace on each call. The reference estimator uses the original measured computation; the two-sided measurement-elimination theorem is used as an established result. There is no recursive invocation of the one-sided simulator and no assumption of a classically accessible reference-state matrix. This proves Lemma 3.2 .
The conditional BQL application
Here BQL and BQUL refer to the measured and unitary polynomial-time, logarithmic-space models over Γ = { H , T , CNOT } \Gamma= \{H,T,\operatorname{CNOT}\} Γ = { H , T , CNOT } , with acceptance at least 2 / 3 2/3 2/3 on yes-instances and at most 1 / 3 1/3 1/3 on no-instances. We separate the two-sided correctness argument from the implementation of its clean blocks. The implementation of the right Kraus factors in Appendix § 6 .§ 4 uses the established equality BQL = BQUL; the result below is a conditional doubling simulation, rather than an independent proof of that equality.
Proposition B.1 (Conditional bounded-error simulation). Suppose that, for every polynomial-time, logarithmic-space source computation over Γ \Gamma Γ and every inverse-polynomial ε > 0 \varepsilon> 0 ε > 0 , there are polynomial-size, logspace-uniform unitary circuits V t V_t V t over Γ \Gamma Γ , on O ( log n ) O(\log n) O ( log n ) qubits, whose zero-scratch blocks C ^ t \widehat{C}_t C t satisfy
∥ C ^ t − C t ∥ ≤ ε . \left\lVert\widehat{C}_t-C_t \right\rVert\le\varepsilon. C t − C t ≤ ε . Then the reweighted doubling construction, preceded by measured source error reduction and followed by unitary amplification, simulates each BQL computation in BQUL.
Proof. Fix a source machine and an input of length n n n .
Reduce source error before doubling. Run 2 n + 1 2n+1 2 n + 1 independent repetitions of the original machine, resetting and reusing its workspace, and take their majority with a classical counter. Hoeffding’s bound gives error at most e − ( 2 n + 1 ) / 18 e^{-(2n+1)/18} e − ( 2 n + 1 ) /18 . The counter uses O ( log n ) O(\log n) O ( log n ) bits, and the running time remains polynomial. Let d d d be the padded power-of-two configuration dimension of this amplified source, and T ≥ 1 T \ge1 T ≥ 1 a polynomial bound on its running time. Both are polynomial in n n n . Therefore, for all sufficiently large n n n , its acceptance probability satisfies
p ≥ 2 / 3 on yes-instances , p ≤ δ : = 1 10 6 d 2 on no-instances . (31) p \ge2/3 \quad\text{on yes-instances}, \qquad p \le\delta:= \frac{1}{10^6d^2} \quad\text{on no-instances}. \tag*{(31)} p ≥ 2/3 on yes-instances , p ≤ δ := 1 0 6 d 2 1 on no-instances . (31)
The finitely many smaller input lengths can be handled directly. The repetition count is fixed before defining d d d , so this argument does not choose an accuracy circularly through the workspace it requires.
Compose the approximate contractions. Use ε = 1 / ( 1000 T d ) \varepsilon= 1/(1000Td) ε = 1/ ( 1000 T d ) . Since every C ^ t \widehat{C}_t C t is a block of an actual unitary, both C t C_t C t and C ^ t \widehat{C}_t C t are contractions. Consequently
∥ C ^ T ⋯ C ^ 1 − C T ⋯ C 1 ∥ ≤ T ε = : Δ = 1 1000 d . \left\lVert\widehat{C}_T \cdots\widehat{C}_1-C_T \cdots C_1 \right\rVert\le T\varepsilon=: \Delta= \frac{1}{1000d}. C T ⋯ C 1 − C T ⋯ C 1 ≤ T ε =: Δ = 1000 d 1 .
Give every step the same number of scratch qubits by adding unused qubits. To realize the product coherently, reuse this scratch and add a counter modulo a power of two larger than T T T . Apply every V t V_t V t unconditionally, then increment the counter if the scratch is nonzero. Expand the product using the projectors onto zero and nonzero scratch. Final counter zero selects exactly those terms with zero scratch after every step: the counter can increase at most T T T times and cannot wrap to zero. This is the construction proved in (13) .
The good subspace requires counter zero, scratch zero, and acceptance on the first data register. If its probability is q ^ \widehat{q} q , then
∣ q ^ − q ∗ ∣ ≤ Δ . \left|\sqrt{\widehat{q}}-\sqrt{q_*}\right| \le\Delta. q − q ∗ ≤ Δ.
By (6) and (31) ,
q ^ ≥ 1 3 d − 1 1000 d ≥ 1 4 d on yes-instances, q ^ ≤ ( δ + Δ ) 2 = 4 10 6 d 2 on no-instances. \begin{aligned}
\sqrt{\widehat{q}} &\ge\frac{1}{3\sqrt{d}}-\frac{1}{1000d}\ge\frac{1}{4\sqrt{d}} && \text{on yes-instances,}\\
\widehat{q} &\le(\sqrt{\delta}+\Delta)^2=\frac{4}{10^{6}d^2} && \text{on no-instances.}
\end{aligned} q q ≥ 3 d 1 − 1000 d 1 ≥ 4 d 1 ≤ ( δ + Δ ) 2 = 1 0 6 d 2 4 on yes-instances, on no-instances.
The first line uses p ≥ 2 / 3 p \ge2/3 p ≥ 2/3 and e < 4 e < 4 e < 4 .
Amplify with both errors controlled. Append a Hadamard coin and require coin one in the good predicate. The resulting preparation A A A has success q = q ^ / 2 ≤ 1 / 2 q=\widehat{q}/2\le1/2 q = q /2 ≤ 1/2 . Thus q ≥ 1 / ( 32 d ) q\ge1/(32d) q ≥ 1/ ( 32 d ) on yes-instances and q ≤ 2 / ( 10 6 d 2 ) q\le2/(10^{6}d^2) q ≤ 2/ ( 1 0 6 d 2 ) on no-instances. All zero-state and good-subspace reflections, controls, and actual inverses are exactly implementable over Γ \Gamma Γ .
Prepare and retain a uniform choice j ∈ { 0 , … , M − 1 } j\in\{0,\ldots,M-1\} j ∈ { 0 , … , M − 1 } , where M = 4 d M=4d M = 4 d , and apply j j j Grover iterations to A ∣ 0 ⟩ A\lvert0\rangle A ∣ 0 ⟩ [4 ] . For q = sin 2 θ > 0 q=\sin^2\theta>0 q = sin 2 θ > 0 , the averaged success is
1 M ∑ j = 0 M − 1 sin 2 ( ( 2 j + 1 ) θ ) = 1 2 − sin ( 4 M θ ) 4 M sin ( 2 θ ) . \frac{1}{M}\sum_{j=0}^{M-1}\sin^2((2j+1)\theta)=\frac{1}{2}-\frac{\sin(4M\theta)}{4M\sin(2\theta)}. M 1 j = 0 ∑ M − 1 sin 2 (( 2 j + 1 ) θ ) = 2 1 − 4 M sin ( 2 θ ) sin ( 4 M θ ) .
On yes-instances, q ∈ [ 1 / ( 32 d ) , 1 / 2 ] q\in[1/(32d),1/2] q ∈ [ 1/ ( 32 d ) , 1/2 ] gives sin ( 2 θ ) ≥ 1 / ( 4 d ) \sin(2\theta)\ge1/(4\sqrt{d}) sin ( 2 θ ) ≥ 1/ ( 4 d ) , so success is at least 1 / 4 1/4 1/4 . On no-instances, the bound ∣ sin ( k θ ) ∣ ≤ k ∣ sin θ ∣ |\sin(k\theta)|\le k|\sin\theta| ∣ sin ( k θ ) ∣ ≤ k ∣ sin θ ∣ for integer k ≥ 1 k\ge1 k ≥ 1 gives
sin 2 ( ( 2 j + 1 ) θ ) ≤ ( 2 j + 1 ) 2 q < ( 8 d ) 2 2 10 6 d 2 = 128 10 6 . \sin^2((2j+1)\theta)\le(2j+1)^2q<(8d)^2\frac{2}{10^{6}d^2}=\frac{128}{10^6}. sin 2 (( 2 j + 1 ) θ ) ≤ ( 2 j + 1 ) 2 q < ( 8 d ) 2 1 0 6 d 2 2 = 1 0 6 128 .
This also holds when q = 0 q=0 q = 0 . Four independent coherent copies followed by a reversible OR of their good predicates therefore accept with probability at least 1 − ( 3 / 4 ) 4 = 175 / 256 > 2 / 3 1-(3/4)^4=175/256>2/3 1 − ( 3/4 ) 4 = 175/256 > 2/3 on yes-instances, and less than 512 / 10 6 < 1 / 3 512/10^6<1/3 512/1 0 6 < 1/3 on no-instances. Only the final output qubit is measured.
The reused scratch, counter, choice register, and a constant number of copies require O ( log n ) O(\log n) O ( log n ) space. All repetition counts and circuit lengths are polynomial, and the loops and inverse circuits can be generated in logarithmic space. ■
Implementation and logical dependency. Lemma 3.2 and the clean-block construction in (10) supply the premise of Proposition B.1 for Γ \Gamma Γ . Their reference-entry comparators use the established two-sided measurement-elimination theorem of Fefferman and Remscrim [11 ] , as explained in Appendix § 6 .§ 4 . Thus the present implementation uses BQL = BQUL as an input. An independent doubling proof of that equality would require computing the reference entries and implementing the right Kraus factors without using that theorem. This dependence does not affect the one-sided theorems in the main text, which use the established two-sided result as a premise.
Further quantum-space background
This appendix expands the quantum-space background of § 1.1 . Figure 1 in that section summarizes the established containments.
The quantum space landscape. Watrous established the foundations of space-bounded quantum complexity and its classical simulation [35 , 37 ] . For standard finite algebraic gate sets, these results place bounded-error quantum logspace BQL inside classical polynomial time and deterministic O ( log 2 n ) O(\log^2 n) O ( log 2 n ) space; the corresponding unbounded-error quantum and probabilistic space classes coincide. These upper bounds leave room for quantum advantages over classical logarithmic space. One early example is Watrous’ unitary simulation of random walks, which placed undirected connectivity in RQUL ∩ \cap ∩ coRQUL [36 ] . A different characterization was obtained by Jozsa, Kraus, Miyake and Watrous: polynomial-size, logspace-uniform nearest-neighbour matchgate circuits have the same computational power as polynomial-time unitary quantum logspace [20 ] .
Linear algebra provides another useful description of this power. Ta-Shma gave quantum logspace algorithms for approximating inverses of polynomially well-conditioned matrices [33 ] . Fefferman and Lin obtained unitary algorithms and matching completeness results for suitably normalized matrix-inversion and minimum-eigenvalue problems [10 ] . The normalization and condition-number promises are essential: these results do not put unrestricted matrix inversion in quantum logspace. Space-efficient amplification is a further ingredient. Fefferman, Kobayashi, Lin, Morimae and Nishimura showed how to reduce error to 2 − p 2^{-p} 2 − p using only O ( log ( p / Δ ) ) O(\log(p/\Delta)) O ( log ( p /Δ )) additional qubits, where Δ \Delta Δ is the original completeness–soundness gap [9 ] . As a more recent application of quantum linear algebra, Apers and Edenhofer gave a quantum logspace procedure for counting directed s s s –t t t paths under polynomial bounds on the number of paths starting at s s s and ending at t t t [1 ] . The promise concerns these larger families of paths, not merely the number of s s s –t t t paths.
Removing measurements with two-sided error. Fefferman and Remscrim proved BQL = BQUL, and the analogous equality for space-constructible bounds S ≥ log n S \ge\log n S ≥ log n [11 Theorem 1] . Their result covers general computations, including classical control conditioned on measurement outcomes. The proof relates their acceptance probabilities to well-conditioned linear-algebraic problems that admit unitary space-efficient algorithms. Independently, Girish, Raz and Zhandry gave a unitary quantum logspace algorithm for powering contraction matrices [15 ] . They used it to simulate unitary quantum computations, including circuits with unitary gates and intermediate measurements but without a separate classical memory that stores and acts on the outcomes [15 Section 5] . These are distinct model assumptions: a reset channel, for example, is not unitary.
For S = O ( log n ) S = O(\log n) S = O ( log n ) and T = poly ( n ) T = \operatorname{poly}(n) T = poly ( n ) , these simulations have polynomial running time; their dependence on a general space bound is exponential in S S S . Girish and Raz obtained a different trade-off: for circuits with unitary operations and intermediate measurements, time T T T and space S ≥ log T S \ge\log T S ≥ log T can be replaced by time T poly ( S ) T\operatorname{poly}(S) T poly ( S ) and space O ( S log T ) O(S\log T) O ( S log T ) [13 ] . Zhandry proved lower bounds for black-box measurement-elimination procedures, showing limitations on simultaneously preserving time and space in that setting [38 ] . Postselection gives a related comparison: Le Gall, Nishimura and Yakaryılmaz proved PostBQL = PL, and Tani showed that intermediate measurements and intermediate postselections can be deferred in the space-bounded, bounded-error postselection model [23 , 32 ] . These results concern their respective computational models; postselection is not an operation available to an ordinary RQUL machine.
Why one-sided error is different. An additive approximation to an acceptance probability preserves a constant two-sided gap, but need not preserve perfect soundness. Fefferman and Remscrim explicitly isolated the remaining one-sided bounded-error question as Open Problem 1 [11 Section 6] . Their partial characterization includes
R Q U L ⊆ R Q L ⊆ c o Q U M A L 1 , \mathrm{RQUL} \subseteq\mathrm{RQL} \subseteq\mathrm{coQUMAL}_{1}, RQUL ⊆ RQL ⊆ coQUMAL 1 ,
where the last class is the complement of unitary quantum Merlin–Arthur logspace with perfect completeness [11 Theorem 32 and Lemma 36] . They also established equality between general and unitary quantum logspace with one-sided unbounded error [11 Theorem 41] ; allowing an arbitrarily small nonzero accepting probability is a different requirement from retaining an inverse-polynomial signal.
Le Gall, Liu and Wang subsequently found natural complete promise problems for c o R Q U L \mathrm{coRQUL} coRQUL : given descriptions of logarithmic-space state-preparation circuits, distinguish equality of the output states from inverse-polynomial separation in trace distance or squared Hilbert–Schmidt distance [22 Theorem 1.1] . Their algorithms use space-efficient quantum singular value transformation. Their gate-set convention is relevant here: they allow single-qubit gates with space-computable amplitudes and explicitly discuss the difficulty of changing gate sets under one-sided error [22 Remark 2.7] . For two-sided bounded error, the space-efficient Solovay–Kitaev theorem makes the class independent of the gate set under the usual universality and computability assumptions, with each gate’s inverse available [34 ] . It does not establish gate-set independence when zero acceptance must be preserved exactly. A same-gate-set statement must therefore specify which operations are synthesized exactly and which are approximated.
Machine-checked mathematical lemmas
The Lean project verifies the supporting lemmas in Table 2 , with the displayed assumptions. It does not formalize the complexity-class equalities.
Table 2. Scope of the Lean verification. The supplement’s formal/README.md gives the module and theorem names for each row.
Boundary of the verification. Quantum-machine semantics, the circuit compiler, the acceptance-probability bounds (6) , uniform reference access, square-root synthesis, the CM-field encoding, and the complete uniformity and resource analysis remain ordinary mathematical proofs. For the witness result, positivity and the analytic bounds for backward channel maps are also supplied as hypotheses. Passing the Lean check does not certify these interfaces or the resulting complexity-class equalities.
Reproducing the check. The supplement formal-verification-source.zip contains the formal/ project; VERIFY-MANIFEST.json records its source revision and file hashes. It pins Lean 4.30.0 and all library dependencies. After installing elan, run from formal/:
lake exe cache get
python3 verify.py
The checker rebuilds proofs, rejects placeholders and audits foundational axioms; its report records source hashes. The README gives setup details and verification boundaries. Preserve the supplied dependency manifest and rerun the check after edits.