Introduction
In fault tolerant quantum computing, non-Clifford gates are often substantially more expensive than Clifford gates. For example, implementations using surface codes [1 ] can supply the gate T = diag ( 1 , e i π / 4 ) T = \operatorname{diag}(1,e^{i\pi/4}) T = diag ( 1 , e iπ /4 ) through magic state distillation [2 ] . This motivates using the number of T T T gates as a resource measure, distinct from the total gate count, and has led to extensive optimization of small circuits [3 , 4 , 5 ] . Here we ask: how many T T T gates are needed to implement an arbitrary unitary on n n n qubits to accuracy ϵ \epsilon ϵ ?
For N = 2 n N = 2^n N = 2 n , a generic unitary has N 2 N^2 N 2 real parameters. The challenge is to incorporate these parameters into a Clifford+T T T circuit using few T T T gates. At constant precision, a polynomial gap remains between the known bounds on the number of T T T gates required in the worst case. Counting gives a lower bound of Ω ( N ) \Omega(N) Ω ( N ) [6 , 7 ] . Low et al. [8 ] give an upper bound O ~ ( N 3 / 2 ) \widetilde{O}(N^{3/2}) O ( N 3/2 ) . Tan [7 ] reduces the exponent to 4 / 3 4/3 4/3 by combining recursive cosine–sine decomposition with the synthesis of multiplexed diagonal unitaries. Yuan et al. [9 ] obtain exponent 5 / 4 5/4 5/4 through random block flattening, dilation, and singular value transformation. Fang et al. [10 ] use a different approach based on a logarithm to obtain bounds that depend on the target unitary, with O ~ ( N 3 / 2 ) \widetilde{O}(N^{3/2}) O ( N 3/2 ) T T T gates in the worst case.
Related work studies depth and ancilla tradeoffs using continuously parameterized gates [11 , 12 , 13 , 14 , 15 , 16 , 17 ] . Oracle formulations count Boolean queries as primitive operations [12 , 18 , 19 , 20 , 21 , 22 , 23 ] . A recent construction gives synthesis in polynomial time at constant error in the diamond norm, using a suitably chosen oracle that depends on the target [24 ] . Here we count the T T T gates needed to implement the complete circuit, including the synthesis of elementary gates and the implementation of data access.
We obtain the following bound by combining encodings of block-sparse matrices with Hamiltonian simulation and residual refinement.
Theorem 1 (Unitary synthesis, informal version of Theorems 3 and 4). Let N = 2 n N = 2^n N = 2 n and L = n + log 2 ( 1 / ϵ ) L = n + \log_2(1/\epsilon) L = n + log 2 ( 1/ ϵ ) , with 0 < ϵ < 1 / 2 0 < \epsilon< 1/2 0 < ϵ < 1/2 and L ≤ N L \le N L ≤ N . For sufficiently large n n n , every U ∈ U ( N ) U \in\mathrm{U}(N) U ∈ U ( N ) can be implemented to error at most ϵ \epsilon ϵ in operator norm by a Clifford+T T T circuit using
O ~ ( N 8 / 7 L 3 / 7 + N L ) (1) \widetilde{O}\left(N^{8/7}L^{3/7} + NL\right) \tag*{(1)} O ( N 8/7 L 3/7 + N L ) (1) T T T gates and O ~ ( N ) \widetilde{O}(N) O ( N ) clean ancillas. At constant precision, a separate choice of parameters gives O ~ ( N 8 / 7 ) \widetilde{O}(N^{8/7}) O ( N 8/7 ) T T T gates with O ~ ( N 6 / 7 ) \widetilde{O}(N^{6/7}) O ( N 6/7 ) ancillas.
The improvement shown in Table I comes from encoding block-sparse pieces separately, so each query accesses a smaller lookup table. In the construction of Yuan et al. [9 ] , each query addresses a lookup table containing data for all N 2 N^2 N 2 matrix entries. Singular value amplification uses this encoding repeatedly, so the lookup cost is paid at every query. We instead use separate encodings with smaller lookup tables. To do this, we represent U U U as evolution under a Hermitian logarithm and partition its generator into block-sparse Hermitian pieces. We construct these pieces using a random change of basis followed by a random partition that preserves Hermiticity.
To approximate evolution under the sum of these pieces, we use qDRIFT [25 , 26 ] , which applies short evolutions under randomly chosen pieces. More pieces give smaller lookup tables, but can require more such evolutions to achieve the same accuracy. We choose the block size and number of pieces to balance these costs, using O ~ ( N 8 / 7 ) \widetilde{O}(N^{8/7}) O ( N 8/7 ) T T T gates at constant precision.
For higher precision, we successively correct the remaining approximation error using residual refinement. Each correction involves a smaller generator, avoiding the costly precision dependence of a single qDRIFT approximation. All sampling is performed during classical preprocessing, and the sampled evolutions are compiled into a Clifford+T T T circuit.
Table 1. Number of T T T gates required in the worst case to implement an arbitrary unitary on n n n qubits with Clifford+T T T circuits, where N = 2 n N=2^n N = 2 n and L = n + log 2 ( 1 / ϵ ) L=n+\log_2(1/\epsilon) L = n + log 2 ( 1/ ϵ ) . Here, fixed ϵ \epsilon ϵ means a sufficiently small positive error tolerance independent of N N N . Theorem 3 gives a smaller ancilla bound at fixed error, while Theorem 4 improves the dependence on accuracy through residual refinement. Ancilla counts follow each reference’s conventions. Our constructions use clean ancillas, while Ref. [8 ] also allows dirty workspace. The lower bound in Theorem 5 concerns the cost in the sequential block-SELECT model under the stated limit on information stored in the unitaries between evolutions.
We also prove a matching lower bound in a restricted cost model that includes our construction. The model represents the target as a sequence of Hamiltonian evolutions, charging for matrix lookups, operations within each block, and simulation. It limits how much information about the target can be stored in the unitaries between evolutions. Within this model, called the sequential block-SELECT model, the exponent 8 / 7 8/7 8/7 is optimal in the worst case at constant precision, up to factors polynomial in n n n .
Theorem 2 (Optimality within the model, informal version of Theorem 5 ). At sufficiently small constant error in operator norm, the cost of unitary synthesis in the sequential block-SELECT model is Ω ~ ( N 8 / 7 ) \widetilde{\Omega}(N^{8/7}) Ω ( N 8/7 ) in the worst case.
The rest of the paper is organized as follows. Sec. II introduces the notation and error criterion and summarizes the tools for data loading and Hamiltonian simulation. Sec. III illustrates the construction and its cost balance. Sec. IV develops the flattening, partitioning, and encoding steps. § 1.4 bounds the resources for unitary synthesis using qDRIFT and QSVT, and § 1.5 improves the precision dependence through residual refinement. Sec. VII states the lower bound in the sequential block-SELECT model. These last three sections include proof sketches. Sec. VIII concludes the work. The appendices contain the complete proofs and an extension of the lower bound to mixed block sizes.
Preliminaries
We first set the notation and error criterion. The remaining subsections state the data-loading and simulation tools needed.
Notation
Let n n n be the number of data qubits and N = 2 n N=2^n N = 2 n . We order the computational basis lexicographically by bit strings x ∈ { 0 , 1 } n x\in\{0,1\}^n x ∈ { 0 , 1 } n . For a positive integer r r r , write [ r ] = { 1 , … , r } [r]=\{1,\ldots,r\} [ r ] = { 1 , … , r } .
The construction groups matrix entries into square blocks. The block size balances the cost of loading the data with the cost of implementing the quantum operations. Let b b b be the number of rows and columns in each square block, chosen as a power of two with b ≤ N b\le N b ≤ N . Then D = N / b D=N/b D = N / b is the number of block rows and block columns. For a matrix A ∈ C N × N A\in\mathbb{C}^{N\times N} A ∈ C N × N , group its rows and columns consecutively in sets of b b b . The block A I J A_{IJ} A I J is the b × b b\times b b × b submatrix in block row I I I and block column J J J , with I , J ∈ [ D ] I,J\in[D] I , J ∈ [ D ] .
For a row index x x x , write x = ( x h , x l ) x=(x_h,x_l) x = ( x h , x l ) . Here x h x_h x h identifies the block row and x l x_l x l the row within it. They consist of the first log 2 D \log_2D log 2 D and last log 2 b \log_2b log 2 b bits, respectively. The same convention applies to column indices. Figure 1 illustrates the partition and its bit labels.
Figure 1. An N = 8 N=8 N = 8 matrix partitioned into D = 4 D=4 D = 4 block rows and columns, with b = 2 b=2 b = 2 rows and columns per block. The shaded submatrix A 23 A_{23} A 23 contains rows 3–4 and columns 5–6. For the row label x = 011 x=011 x = 011 , the high bits 01 select row group I = 2 I=2 I = 2 , and the low bit 1 selects its second row.
We use ∥ ⋅ ∥ \lVert\cdot\rVert ∥ ⋅ ∥ for the operator norm and ∥ ⋅ ∥ F \lVert\cdot\rVert_{F} ∥ ⋅ ∥ F for the unnormalized Frobenius norm. Logarithms are natural unless written log 2 \log_{2} log 2 . Both O ~ ( ⋅ ) \widetilde{O}(\cdot) O ( ⋅ ) and Ω ~ ( ⋅ ) \widetilde{\Omega}(\cdot) Ω ( ⋅ ) hide factors polynomial in n n n only. Define F = H ⊗ n F=H^{\otimes n} F = H ⊗ n , where H H H is the Hadamard gate. F F F is real and symmetric, with F 2 = I F^{2}=I F 2 = I . For a sign vector σ ∈ { ± 1 } N \sigma\in\{\pm1\}^{N} σ ∈ { ± 1 } N , let S σ = diag ( σ ) S_{\sigma}=\operatorname{diag}(\sigma) S σ = diag ( σ ) denote the corresponding diagonal sign matrix.
Implementation with clean ancillas
We measure error on the full output, including the ancillas, using the standard convention of Ref. [7 ] .
Definition 1 (Approximate implementation with clean ancillas). A unitary U ~ \widetilde{U} U on n + m n+m n + m qubits implements U ∈ U ( 2 n ) U\in U(2^{n}) U ∈ U ( 2 n ) to error ϵ \epsilon ϵ if
∥ U ~ ( ∣ 0 m ⟩ ⊗ I ) − ∣ 0 m ⟩ ⊗ U ∥ ≤ ϵ . \left\lVert\widetilde{U}(\lvert0^{m}\rangle\otimes I)-\lvert0^{m}\rangle\otimes U\right\rVert\leq\epsilon. U (∣ 0 m ⟩ ⊗ I ) − ∣ 0 m ⟩ ⊗ U ≤ ϵ . where the ancillas are written first. The T T T -count of U ~ \widetilde{U} U is the number of T T T gates in a Clifford+T T T circuit for U ~ \widetilde{U} U , and m m m is its number of ancillas.
If U ~ j \widetilde{U}_{j} U j implements U j U_{j} U j to error ϵ j \epsilon_{j} ϵ j on a shared ancilla register, then U ~ 2 U ~ 1 \widetilde{U}_{2}\widetilde{U}_{1} U 2 U 1 implements U 2 U 1 U_{2}U_{1} U 2 U 1 to error ϵ 1 + ϵ 2 \epsilon_{1}+\epsilon_{2} ϵ 1 + ϵ 2 . This follows from the triangle inequality and unitary invariance of the operator norm.
Data loading with Clifford+T circuits
Lookup tables and classical descriptions of unitaries are inputs to the compiler. We count the T T T gates and ancillas required to access the data and apply the selected unitaries. Quantum lookup methods trade ancillary workspace for a lower T T T -count per lookup [8 , 27 ] . For example, at constant precision, the optimal worst-case T T T -count for n n n -qubit diagonal-unitary synthesis is Θ ( N 1 / 2 ) \Theta(N^{1/2}) Θ ( N 1/2 ) [6 ] . Related lookup-based sparsity and amplitude oracles reduce block-encoding gate counts for second-quantized fermionic Hamiltonians [28 ] .
The first primitive reads a table entry into an output register by bitwise XOR.
Lemma 1 (Boolean and diagonal sign oracles [6 , 8 ] ). Let f : { 0 , 1 } m → { 0 , 1 } r f:\{0,1\}^{m}\to\{0,1\}^{r} f : { 0 , 1 } m → { 0 , 1 } r be an arbitrary function. The Boolean oracle
O f : ∣ x ⟩ ∣ y ⟩ ↦ ∣ x ⟩ ∣ y ⊕ f ( x ) ⟩ O_{f}:\lvert x\rangle\lvert y\rangle\mapsto\lvert x\rangle\lvert y\oplus f(x)\rangle O f : ∣ x ⟩ ∣ y ⟩ ↦ ∣ x ⟩ ∣ y ⊕ f ( x )⟩ has an exact Clifford+T T T implementation with O ( r 2 m ) O(r2^{m}) O ( r 2 m ) T T T gates and ancillas.
For any σ ∈ { ± 1 } 2 m \sigma\in\{\pm1\}^{2^{m}} σ ∈ { ± 1 } 2 m , the diagonal sign oracle S σ : = diag ( σ ) S_{\sigma}:=\operatorname{diag}(\sigma) S σ := diag ( σ ) acts on computational basis states as S σ ∣ x ⟩ = σ x ∣ x ⟩ S_{\sigma}\lvert x\rangle=\sigma_{x}\lvert x\rangle S σ ∣ x ⟩ = σ x ∣ x ⟩ . We implement S σ S_{\sigma} S σ using the Boolean oracle O f O_{f} O f through phase kickback. Set r = 1 r=1 r = 1 and f ( x ) = ( 1 − σ x ) / 2 f(x)=(1-\sigma_{x})/2 f ( x ) = ( 1 − σ x ) /2 , and prepare the output qubit in ∣ − ⟩ = ( ∣ 0 ⟩ − ∣ 1 ⟩ ) / 2 \lvert-\rangle=(\lvert0\rangle-\lvert1\rangle)/\sqrt{2} ∣ − ⟩ = (∣ 0 ⟩ − ∣ 1 ⟩) / 2 . A bit flip multiplies ∣ − ⟩ \lvert-\rangle ∣ − ⟩ by − 1 -1 − 1 , so O f O_{f} O f acts as
∣ x ⟩ ∣ − ⟩ → O f ( − 1 ) f ( x ) ∣ x ⟩ ∣ − ⟩ = σ x ∣ x ⟩ ∣ − ⟩ . \lvert x\rangle\lvert-\rangle\xrightarrow{O_{f}} (-1)^{f(x)}\lvert x\rangle\lvert-\rangle=\sigma_{x}\lvert x\rangle\lvert-\rangle. ∣ x ⟩ ∣ − ⟩ O f ( − 1 ) f ( x ) ∣ x ⟩ ∣ − ⟩ = σ x ∣ x ⟩ ∣ − ⟩ . Thus O f O_{f} O f applies S σ S_{\sigma} S σ to the input register and preserves ∣ − ⟩ \lvert-\rangle ∣ − ⟩ on the output qubit. Preparing ∣ − ⟩ \lvert-\rangle ∣ − ⟩ and returning it to ∣ 0 ⟩ \lvert0\rangle ∣ 0 ⟩ use only Clifford gates, so S σ S_{\sigma} S σ has an exact implementation with O ( 2 m / 2 ) O(2^{m/2}) O ( 2 m /2 ) T T T gates and ancillas.
A SELECT oracle uses an address register to select and apply one of M M M unitaries acting on the same d d d -dimensional target space.
Lemma 2 (SELECT oracle [7 ] ). Let M = 2 μ M=2^{\mu} M = 2 μ , d = 2 κ d=2^{\kappa} d = 2 κ , and V x ∈ U ( d ) V_{x}\in U(d) V x ∈ U ( d ) be arbitrary. Define
W = ∑ x ∈ { 0 , 1 } μ ∣ x ⟩ ⟨ x ∣ ⊗ V x . (2) W=\sum_{x\in\{0,1\}^{\mu}}\lvert x\rangle\langle x\rvert\otimes V_{x}. \tag*{(2)} W = x ∈ { 0 , 1 } μ ∑ ∣ x ⟩ ⟨ x ∣ ⊗ V x . (2) For every δ ∈ ( 0 , 1 / 2 ) \delta\in(0,1/2) δ ∈ ( 0 , 1/2 ) there is a Clifford+T T T circuit that implements W W W to error δ \delta δ with O ( d M Λ + d 2 Λ ) O(d\sqrt{M\Lambda}+d^{2}\Lambda) O ( d M Λ + d 2 Λ ) T T T gates and ancillas, where Λ = κ + log 2 ( 1 / δ ) \Lambda=\kappa+\log_{2}(1/\delta) Λ = κ + log 2 ( 1/ δ ) .
Single-qubit synthesis. Single-qubit synthesis [4 ] supplies the variable-angle rotations used in simulation and the global phase of the target. Every V ∈ S U ( 2 ) V\in SU(2) V ∈ S U ( 2 ) has a Clifford+T T T circuit approximation V ~ \widetilde{V} V satisfying
∥ V ~ − V ∥ ≤ δ , T ( V ~ ) = O ( log ( 1 / δ ) ) , (3) \lVert\widetilde{V}-V\rVert\leq\delta,\qquad T(\widetilde{V})=O(\log(1/\delta)), \tag*{(3)} ∥ V − V ∥ ≤ δ , T ( V ) = O ( log ( 1/ δ )) , (3)
where T ( V ~ ) T(\widetilde{V}) T ( V ) denotes the circuit’s T T T -gate count.
In particular, a global phase e i φ e^{i\varphi} e i φ is implemented to error δ \delta δ by applying diag ( e i φ , e − i φ ) \operatorname{diag}(e^{i\varphi},e^{-i\varphi}) diag ( e i φ , e − i φ ) to a clean ancilla in state ∣ 0 ⟩ \lvert0\rangle ∣ 0 ⟩ .
Block encodings and Hamiltonian simulation
A block encoding places a scaled matrix in the zero-ancilla block of a larger unitary.
Definition 2 (Block encoding). A unitary U A U_{A} U A on a + n a+n a + n qubits is an ( α , a , η ) (\alpha,a,\eta) ( α , a , η ) -block encoding of A ∈ C N × N A\in\mathbb{C}^{N\times N} A ∈ C N × N if
∥ A − α ( ⟨ 0 a ∣ ⊗ I ) U A ( ∣ 0 a ⟩ ⊗ I ) ∥ ≤ η . \left\lVert A-\alpha(\langle0^{a}\rvert\otimes I)U_{A}(\lvert0^{a}\rangle\otimes I)\right\rVert\leq\eta. ∥ A − α (⟨ 0 a ∣ ⊗ I ) U A (∣ 0 a ⟩ ⊗ I ) ∥ ≤ η .
Here α \alpha α is the subnormalization factor, a a a is the number of encoding ancillas, and η \eta η bounds the matrix error after rescaling by α \alpha α . We count one application of U A U_{A} U A or its inverse U A † U_{A}^{\dagger} U A † , including their singly controlled versions, as one query to the block encoding. The total number of such queries is the query complexity.
An exact encoding of a Hermitian matrix can be used to simulate its evolution by quantum singular-value transformation (QSVT). The following lemma gives the implementation guarantee and query bound.
Lemma 3 (Hamiltonian simulation by QSVT [29 , 30 ] ). Let U A U_A U A be an ( α , a , 0 ) (\alpha,a,0) ( α , a , 0 ) -block encoding of a Hermitian matrix A A A , t ∈ R t \in\mathbb{R} t ∈ R , and δ ∈ ( 0 , 1 / 2 ) \delta\in(0,1/2) δ ∈ ( 0 , 1/2 ) . There is a circuit S t ( U A ) S_t(U_A) S t ( U A ) that implements e i A t e^{iAt} e i A t to error δ \delta δ in the sense of Definition 1. It makes Q t = O ( α ∣ t ∣ + log ( 1 / δ ) ) Q_t = O(\alpha|t| + \log(1/\delta)) Q t = O ( α ∣ t ∣ + log ( 1/ δ )) queries to U A U_A U A , U A † U_A^\dagger U A † , or their singly controlled versions.
For θ = e α ∣ t ∣ / 2 ∈ ( 0 , 1 ) \theta= e^{\alpha|t|/2} \in(0,1) θ = e α ∣ t ∣/2 ∈ ( 0 , 1 ) , the query complexity also satisfies
Q t = O ( 1 + log ( 1 / δ ) log ( 1 / θ ) ) . (4) Q_t = O\left(1+\frac{\log(1/\delta)}{\log(1/\theta)}\right). \tag*{(4)} Q t = O ( 1 + log ( 1/ θ ) log ( 1/ δ ) ) . (4) If each query, including controlled queries and inverses, has implementation error at most η \eta η , the overall implementation error is at most δ + Q t η \delta+ Q_t\eta δ + Q t η .
The query bounds follow from [29 ] , Theorem 58 and Lemma 59. We use block-encoding error δ ′ = δ 2 / 2 \delta' = \delta^2/2 δ ′ = δ 2 /2 : the corresponding full-output error is at most 2 δ ′ = δ \sqrt{2\delta'} = \delta 2 δ ′ = δ , as required by Definition 1. The general and small-time query bounds follow from Lemma 59 by choosing q = 1 q = 1 q = 1 and q = log ( 1 / θ ) q = \log(1/\theta) q = log ( 1/ θ ) , respectively. Errors in implementing the queries add by the composition rule in Sec. II.
Beyond the queries, the circuit uses O ( ( a + 1 ) Q t ) O((a+1)Q_t) O (( a + 1 ) Q t ) Clifford and Toffoli gates, O ( Q t ) O(Q_t) O ( Q t ) single-qubit rotations, and O ( a + 1 ) O(a+1) O ( a + 1 ) reusable clean workspace qubits for the zero-ancilla phase operations.
Random product formulas
To simulate a sum of Hermitian matrices, we combine short evolutions under the individual pieces. For A = ∑ k = 1 s A k A = \sum_{k=1}^{s} A_k A = ∑ k = 1 s A k , the randomized product formula qDRIFT [25 ] approximates e i A e^{iA} e i A by choosing these pieces at random (see also Ref. [31 ] for randomized orderings).
Assume that each A k A_k A k is nonzero and Hermitian, and let λ = ∑ k ∥ A k ∥ \lambda= \sum_k \lVert A_k\rVert λ = ∑ k ∥ A k ∥ . Choose a positive integer N q N_q N q . During classical preprocessing, sample independent indices K j ∈ [ s ] K_j \in[s] K j ∈ [ s ] for j = 1 , … , N q j = 1,\ldots,N_q j = 1 , … , N q and set the evolution times τ j \tau_j τ j by
Pr ( K j = k ) = ∥ A k ∥ λ , τ j = λ N q ∥ A K j ∥ . (5) \Pr(K_j=k)=\frac{\lVert A_k\rVert}{\lambda}, \qquad\tau_j=\frac{\lambda}{N_q\lVert A_{K_j}\rVert}. \tag*{(5)} Pr ( K j = k ) = λ ∥ A k ∥ , τ j = N q ∥ A K j ∥ λ . (5)
We call the exact evolution V j = e i τ j A K j V_j=e^{i\tau_j A_{K_j}} V j = e i τ j A K j a segment. Applying the segments in sequence gives V = V N q ⋯ V 1 V=V_{N_q}\cdots V_1 V = V N q ⋯ V 1 , with V 1 V_1 V 1 applied first. Thus N q N_q N q counts the sampled evolutions in the product. The same piece A k A_k A k may be selected more than once. We account separately for errors in implementing these segments.
For synthesis, we choose a fixed sequence of short evolutions whose product approximates e i A e^{iA} e i A in operator norm. Chen et al. [26 ] show that a randomly sampled sequence has this property with high probability when it contains sufficiently many segments. The following lemma gives the required segment count in terms of the target error and failure probability.
Lemma 4 (Concentration of qDRIFT [26 ] ). Let A = ∑ k = 1 s A k A=\sum_{k=1}^{s}A_k A = ∑ k = 1 s A k with nonzero Hermitian A k ∈ C d × d A_k\in\mathbb{C}^{d\times d} A k ∈ C d × d , and let λ = ∑ k ∥ A k ∥ \lambda=\sum_k\lVert A_k\rVert λ = ∑ k ∥ A k ∥ . For 0 < ϵ ≤ 4 λ 0<\epsilon\le4\lambda 0 < ϵ ≤ 4 λ and 0 < δ < 1 0<\delta<1 0 < δ < 1 , qDRIFT uses
N q = O ( λ 2 ϵ 2 log 2 d δ + λ 2 ϵ ) N_q=O\left(\frac{\lambda^2}{\epsilon^2}\log\frac{2d}{\delta}+\frac{\lambda^2}{\epsilon}\right) N q = O ( ϵ 2 λ 2 log δ 2 d + ϵ λ 2 ) segments to produce a product V V V that satisfies ∥ V − e i A ∥ ≤ ϵ \lVert V-e^{iA}\rVert\le\epsilon ∥ V − e i A ∥ ≤ ϵ with probability at least 1 − δ 1-\delta 1 − δ .
Overview of the construction
Our construction reduces the data addressed by each query to a piece’s block encoding. We use Tan’s SELECT oracle synthesis bound [7 ] (Lemma 2) for data access. Yuan et al. [9 ] encode the full unitary and repeatedly use that encoding for singular-value amplification. We simulate a Hermitian logarithm using s s s separately encoded block-sparse pieces, with few nonzero blocks per block row and column. Each piece has a smaller lookup table. qDRIFT [25 , 26 ] combines their evolutions. Balancing the cost per query against the number of queries yields the O ~ ( N 8 / 7 ) \widetilde{O}(N^{8/7}) O ( N 8/7 ) T T T -count at constant precision. Figure 2 compares the table access, cost per query, and total query count of the two constructions.
Figure 2. Schematic table access at fixed precision. Boxes in (a) denote queries to the dense block encoding of the target matrix in Yuan et al. [9 ] . Boxes in (b) denote queries to the block encodings U H k U_{H_k} U H k of our s s s pieces, illustrated with two piece tables. Each table has O ( D 2 / s ) O(D^2/s) O ( D 2 / s ) block slots in the parameter range used in the construction. Dashed arrows link queries to their tables. The query counts are totals over the respective circuits.
Cost of the dense block encoding
To identify where our construction can save T T T gates, we first examine the cost of encoding the target unitary as a whole. In the dense construction of Yuan et al. [9 ] , each query addresses a lookup table containing data for all D 2 D^2 D 2 blocks. Its T T T -count is O ~ ( N + b 2 ) \widetilde{O}(N+b^2) O ( N + b 2 ) by Lemma 2. The term N N N pays for the lookup, while b 2 b^2 b 2 pays for processing the selected block. Increasing the block size makes this processing more expensive.
Larger blocks also reduce the number of queries. At fixed accuracy, the construction uses O ~ ( N / b ) \widetilde{O}(\sqrt{N/b}) O ( N / b ) queries, so the two costs give
T = O ~ ( N / b ) ( N + b 2 ) . (6) T = \widetilde{O}\left(\sqrt{N/b}\right)\left(N+b^2\right). \tag*{(6)} T = O ( N / b ) ( N + b 2 ) . (6)
Choosing b = Θ ( N ) b=\Theta(\sqrt{N}) b = Θ ( N ) balances these effects: each query costs O ~ ( N ) \widetilde{O}(N) O ( N ) T T T gates, and O ~ ( N 1 / 4 ) \widetilde{O}(N^{1/4}) O ( N 1/4 ) queries suffice. Their product gives O ~ ( N 5 / 4 ) \widetilde{O}(N^{5/4}) O ( N 5/4 ) . The dense encoding’s subnormalization factor sets the amplification query scale. For typical target unitaries, this dense encoding requires a subnormalization factor Ω ( N / b ) \Omega(\sqrt{N/b}) Ω ( N / b ) . Appendix A 2 gives the cost derivation and this lower bound.
The opportunity for improvement is the repeated lookup cost. Every query pays the term N N N , even after the block size has been optimized. Our construction uses smaller lookup tables for separate matrix pieces. We choose the number of pieces to balance the lower cost per query against the additional queries needed to simulate their sum.
Block-sparse Hamiltonian simulation
We obtain smaller lookup tables by changing what we encode. Write U = e i H U=e^{iH} U = e i H , where H H H is the Hermitian logarithm with eigenvalues in ( − π , π ] (-\pi,\pi] ( − π , π ] . Implementing U U U is then equivalent to simulating H H H for time one. We will approximate this evolution using short evolutions under separate matrix pieces.
Before splitting the matrix, we separate its scalar part φ I \varphi I φ I , where φ = tr H / N \varphi=\operatorname{tr} H/N φ = tr H / N . This part contributes only the global phase e i φ e^{i\varphi} e i φ , which we apply on a clean ancilla. We then change basis using the random real orthogonal matrix P P P defined in Lemma 5:
H 0 = H − φ I , H ′ = P H 0 P T . (7) H_0 = H-\varphi I,\qquad H' = P H_0 P^{\mathsf{T}}. \tag*{(7)} H 0 = H − φ I , H ′ = P H 0 P T . (7)
This choice of P P P makes all block norms small with high probability. The scalar part is handled separately because it is unchanged by a change of basis. Once we simulate H ′ H' H ′ , the identity U = e i φ P T e i H ′ P U=e^{i\varphi}P^{\mathsf{T}}e^{iH'}P U = e i φ P T e i H ′ P recovers the target.
We now split H ′ H' H ′ into s s s matrices H 1 , … , H s H_1,\ldots,H_s H 1 , … , H s , called pieces. Each piece is still N × N N\times N N × N : it keeps its assigned blocks in their original positions and sets all other blocks to zero. Every block belongs to exactly one piece, so H ′ = ∑ k = 1 s H k H'=\sum_{k=1}^{s}H_k H ′ = ∑ k = 1 s H k .
Each piece must be Hermitian so that its short evolutions e i t H k e^{itH_k} e i t H k are unitary for real t t t . We enforce this by assigning each off-diagonal pair H I J ′ H'_{IJ} H I J ′ and H J I ′ = ( H I J ′ ) † H'_{JI}=(H'_{IJ})^\dagger H J I ′ = ( H I J ′ ) † together to one piece chosen uniformly at random. Diagonal blocks are already Hermitian and are assigned individually in the same way to one of the s s s pieces. Choices for distinct pairs and diagonal blocks are independent. This guarantees H k † = H k H_k^\dagger=H_k H k † = H k for every piece and every assignment. Figure 3 illustrates this assignment with two colors.
Figure 3. One possible assignment with D = 4 D=4 D = 4 and s = 2 s=2 s = 2 . Colored cells are nonzero b × b b\times b b × b blocks; blank cells are zero. Each block and its conjugate-transpose partner are assigned to the same piece, indicated by their shared color. The outlined blocks show one such pair. Thus H ′ = H 1 + H 2 H'=H_1+H_2 H ′ = H 1 + H 2 with Hermitian pieces.
We build a separate lookup table for each piece by listing the row indices of its nonzero blocks in each block column. Each list position is called a slot. A table address ( J , u ) (J,u) ( J , u ) specifies slot u u u in column J J J . For example, column J = 2 J=2 J = 2 of the blue piece H 1 H_1 H 1 in Figure 3 has row-index list ( 1 , 3 ) (1,3) ( 1 , 3 ) , so address ( J , u ) = ( 2 , 2 ) (J,u)=(2,2) ( J , u ) = ( 2 , 2 ) selects row I = 3 I=3 I = 3 and hence block ( H 1 ) 3 , 2 (H_1)_{3,2} ( H 1 ) 3 , 2 . Figure 4 shows the resulting table.
Figure 4. Lookup table for the blue piece H 1 H_1 H 1 in Figure 3 . Table rows correspond to block columns J J J , and table columns to slots u = 1 , 2 u=1,2 u = 1 , 2 . Numbers give block row indices I I I , while gray cells represent zero padding. The outlined blocks ( H 1 ) 3 , 2 (H_1)_{3,2} ( H 1 ) 3 , 2 and ( H 1 ) 2 , 3 (H_1)_{2,3} ( H 1 ) 2 , 3 are adjoints, with paired addresses ( 2 , 2 ) (2,2) ( 2 , 2 ) and ( 3 , 1 ) (3,1) ( 3 , 1 ) , respectively.
The column lists have different lengths, so we add dummy slots representing zero to give them a common length m m m . Here m = 2 m=2 m = 2 , so the first column’s list (2) becomes (2, pad). The table then has eight entries across four columns, including two padding entries, compared with sixteen for the dense table.
In each block column, the D D D possible blocks are assigned uniformly among s s s pieces, giving D / s D/s D / s assigned positions per piece on average. For our parameters, Lemma 6 bounds every column list by O ( D / s ) O(D/s) O ( D / s ) with high probability. We pad these lists to a common length m m m , rounding up to a power of two, which increases the required length by less than a factor of two. Thus m = O ( D / s ) m=O(D/s) m = O ( D / s ) , and each piece’s D D D column lists give M = D m = O ( D 2 / s ) M=Dm=O(D^2/s) M = D m = O ( D 2 / s ) table entries, compared with D 2 D^2 D 2 for the dense table.
Using the lookup tables and the entries of the matrix blocks, we construct a block encoding of each piece, as illustrated in Figure 5 . Let g > 0 g>0 g > 0 bound the operator norm of every b × b b\times b b × b block of H ′ H' H ′ . For each nonzero piece H k H_k H k , Lemma 7 gives an exact block encoding U H k U_{H_k} U H k with subnormalization factor α k = m g \alpha_k=mg α k = m g .
Figure 5. Building U H 1 U_{H_1} U H 1 from the lookup table in Figure 4 and the matrix entries. The solid outlines trace address ( J , u ) = ( 2 , 2 ) (J,u)=(2,2) ( J , u ) = ( 2 , 2 ) : its entry I = 3 I=3 I = 3 selects a unitary with encoded block ( H 1 ) 3 , 2 / g (H_1)_{3,2}/g ( H 1 ) 3 , 2 / g . Each selected unitary is constructed from the corresponding matrix block and g g g during classical preprocessing. SELECT applies that unitary for the corresponding address. The permutation Π \Pi Π changes the block label from input J = 2 J=2 J = 2 to output I = 3 I=3 I = 3 and the slot from u = 2 u=2 u = 2 to u ′ = 1 u'=1 u ′ = 1 . This branch therefore contributes to block ( 3 , 2 ) (3,2) ( 3 , 2 ) of the encoded matrix.
For each nonpadding slot address ( J , u ) (J,u) ( J , u ) with table entry I I I , we embed the corresponding scaled b × b b\times b b × b block ( H k ) I J / g (H_k)_{IJ}/g ( H k ) I J / g in a 2 b × 2 b 2b\times2b 2 b × 2 b unitary. Applying Lemma 2 with d = 2 b d=2b d = 2 b and M = D m M=Dm M = D m gives cost O ~ ( b M + b 2 ) \widetilde{O}(b\sqrt{M}+b^2) O ( b M + b 2 ) . Since M = O ( D 2 / s ) M=O(D^2/s) M = O ( D 2 / s ) , splitting reduces the lookup term from N N N to O ( N / s ) O(N/\sqrt{s}) O ( N / s ) while leaving the b 2 b^2 b 2 processing term unchanged. The block-label operations fit this bound, so the T T T -gate cost of one query to U H k U_{H_k} U H k is
c q u e r y = O ~ ( b M + b 2 ) = O ~ ( N / s + b 2 ) . (8) c_{\mathrm{query}}=\widetilde{O}(b\sqrt{M}+b^2)=\widetilde{O}(N/\sqrt{s}+b^2). \tag*{(8)} c query = O ( b M + b 2 ) = O ( N / s + b 2 ) . (8)
The total T T T -count also depends on the number of queries needed to approximate e i H ′ e^{iH'} e i H ′ . qDRIFT approximates this evolution by a product of short evolutions e i τ j H K j e^{i\tau_jH_{K_j}} e i τ j H K j , using the sampling rule in Eq. (5) with A k = H k A_k=H_k A k = H k and omitting zero pieces. For our parameters, Lemma 6 gives λ = ∑ k ∥ H k ∥ = O ~ ( s ) \lambda=\sum_k\lVert H_k\rVert=\widetilde{O}(\sqrt{s}) λ = ∑ k ∥ H k ∥ = O ( s ) , so Lemma 4 supplies N q = O ~ ( s ) N_q=\widetilde{O}(s) N q = O ( s ) segments at fixed target error ϵ \epsilon ϵ .
We implement each segment by QSVT using its corresponding block encoding U H K j U_{H_{K_j}} U H K j . At error ϵ / ( 4 N q ) \epsilon/(4N_q) ϵ / ( 4 N q ) per segment, Lemma 3 bounds the total query count by
Q = O ( ∑ j = 1 N q α K j τ j + N q log ( N q / ϵ ) ) . Q=O\left(\sum_{j=1}^{N_q}\alpha_{K_j}\tau_j+N_q\log(N_q/\epsilon)\right). Q = O j = 1 ∑ N q α K j τ j + N q log ( N q / ϵ ) .
To bound the first term, recall that m = O ( D / s ) m=O(D/s) m = O ( D / s ) and flattening gives g = O ~ ( 1 / D ) g=\widetilde{O}(1/\sqrt{D}) g = O ( 1/ D ) for ∥ H ′ ∥ = O ( 1 ) \lVert H'\rVert=O(1) ∥ H ′ ∥ = O ( 1 ) . Thus α k = m g = O ~ ( D / s ) \alpha_k=mg=\widetilde{O}(\sqrt{D}/s) α k = m g = O ( D / s ) , ∑ k α k = O ~ ( D ) \sum_k\alpha_k=\widetilde{O}(\sqrt{D}) ∑ k α k = O ( D ) (Corollary 1). Lemma 8 guarantees a sampled product meeting the required accuracy and satisfying
∑ j = 1 N q α K j τ j = O ( ∑ k α k ) = O ~ ( D ) . \sum_{j=1}^{N_q}\alpha_{K_j}\tau_j=O\left(\sum_k\alpha_k\right)=\widetilde{O}(\sqrt{D}). j = 1 ∑ N q α K j τ j = O ( k ∑ α k ) = O ( D ) .
Together with N q = O ~ ( s ) N_q=\widetilde{O}(s) N q = O ( s ) , this gives Q = O ~ ( D + s ) Q=\widetilde{O}(\sqrt{D}+s) Q = O ( D + s ) queries in total.
Multiplying this query complexity by the cost per query in Eq. (8) gives
T = O ~ ( ( D + s ) ( N / s + b 2 ) ) . (9) T=\widetilde{O}\left((\sqrt{D}+s)\left(N/\sqrt{s}+b^2\right)\right). \tag*{(9)} T = O ( ( D + s ) ( N / s + b 2 ) ) . (9)
Taking s s s of order D \sqrt{D} D , and substituting D = N / b D=N/b D = N / b gives
T = O ~ ( N 5 / 4 b − 1 / 4 + N 1 / 2 b 3 / 2 ) . (10) T=\widetilde{O}\left(N^{5/4}b^{-1/4}+N^{1/2}b^{3/2}\right). \tag*{(10)} T = O ( N 5/4 b − 1/4 + N 1/2 b 3/2 ) . (10)
The terms balance at b = Θ ( N 3 / 7 ) b=\Theta(N^{3/7}) b = Θ ( N 3/7 ) , yielding O ~ ( N 8 / 7 ) \widetilde{O}(N^{8/7}) O ( N 8/7 ) T T T gates.
Constructing block-sparse encodings
To prove the resource bounds used in Sec. III, we construct block encodings of the Hermitian pieces H k H_k H k . Similarity flattening (Sec. IV A) gives a common upper bound g g g on the operator norms ∥ H I J ′ ∥ \lVert H'_{IJ}\rVert ∥ H I J ′ ∥ of the b × b b \times b b × b blocks of H ′ H' H ′ . Random splitting (Sec. IV B) bounds the number of nonzero blocks in each block column of each piece, determining the padded number m m m of slots per block column and hence the D m Dm D m entries in that piece’s lookup table. It also bounds the piece norms ∥ H k ∥ \lVert H_k\rVert ∥ H k ∥ , whose sum controls the number of qDRIFT segments needed to approximate e i H ′ e^{iH'} e i H ′ . Finally, Sec. IV C constructs block encodings of the pieces with subnormalization factor α k = m g \alpha_k = mg α k = m g and bounds their T T T -gate cost per query.
Similarity flattening
To obtain the required subnormalization factor, we need a real orthogonal matrix P P P for which every block of H ′ = P H 0 P T H' = P H_0 P^T H ′ = P H 0 P T has norm O ~ ( ∥ H 0 ∥ / D ) \widetilde{O}(\lVert H_0\rVert/\sqrt{D}) O (∥ H 0 ∥ / D ) .
Let I d I_d I d denote the d × d d \times d d × d identity matrix. An orthogonal similarity transformation is a change of basis A ↦ P A P T A \mapsto P A P^T A ↦ P A P T , where P P P is real orthogonal and hence P T = P − 1 P^T = P^{-1} P T = P − 1 . It leaves the scalar part of H H H unchanged:
P ( φ I N ) P T = φ I N . P(\varphi I_N)P^T = \varphi I_N. P ( φ I N ) P T = φ I N .
Each diagonal b × b b \times b b × b block of this scalar matrix is φ I b \varphi I_b φ I b , with operator norm ∣ φ ∣ |\varphi| ∣ φ ∣ in every basis. We therefore remove the scalar part in Eq. (7) and apply flattening to the traceless matrix H 0 H_0 H 0 . The quantities we seek to make small are the operator norms ∥ ( P H 0 P T ) I J ∥ \lVert(PH_0P^T)_{IJ}\rVert ∥( P H 0 P T ) I J ∥ of its individual b × b b \times b b × b blocks.
A random sign layer means multiplication by a diagonal matrix S σ = diag ( σ ) S_\sigma= \operatorname{diag}(\sigma) S σ = diag ( σ ) , whose diagonal entries are independent and take the values + 1 +1 + 1 and − 1 -1 − 1 with equal probability. To see why one sign matrix may be insufficient, consider P 1 = F S σ F P_1 = F S_\sigma F P 1 = F S σ F with F = H ⊗ n F = H^{\otimes n} F = H ⊗ n . If F H 0 F F H_0 F F H 0 F is diagonal, it commutes with S σ S_\sigma S σ , so the signs cancel:
P 1 H 0 P 1 T = F S σ ( F H 0 F ) S σ F = H 0 . P_1H_0P_1^T = F S_\sigma(F H_0 F)S_\sigma F = H_0. P 1 H 0 P 1 T = F S σ ( F H 0 F ) S σ F = H 0 .
For such inputs, this random change of basis leaves every block unchanged. We therefore use two independent sign matrices, S σ S_\sigma S σ and S τ S_\tau S τ , separated by applications of F F F . The following lemma defines the resulting P P P and bounds every block’s operator norm with high probability for any fixed traceless Hermitian input.
Lemma 5 (Similarity flattening). Let H ∈ C N × N H \in\mathbb{C}^{N \times N} H ∈ C N × N be Hermitian with tr H = 0 \operatorname{tr} H = 0 tr H = 0 . For independent, uniformly random sign vectors σ , τ ∈ { ± 1 } N \sigma,\tau\in\{\pm1\}^N σ , τ ∈ { ± 1 } N , set
P = F S τ F S σ F . (11) P = F S_\tau F S_\sigma F. \tag*{(11)} P = F S τ F S σ F . (11)
Then P P P is a real orthogonal matrix and e i P H P T = P e i H P T e^{iPHP^T} = P e^{iH}P^T e i P H P T = P e i H P T . For every δ ∈ ( 0 , 1 / 2 ) \delta\in(0,1/2) δ ∈ ( 0 , 1/2 ) , with probability at least 1 − δ 1-\delta 1 − δ over σ , τ \sigma,\tau σ , τ ,
max I , J ∈ [ D ] ∥ ( P H P T ) I J ∥ ≤ C A ∥ H ∥ D log N δ , (12) \max_{I,J\in[D]}\lVert(PHP^T)_{IJ}\rVert\le\frac{C_A\lVert H\rVert}{\sqrt{D}}\log\frac{N}{\delta}, \tag*{(12)} I , J ∈ [ D ] max ∥( P H P T ) I J ∥ ≤ D C A ∥ H ∥ log δ N , (12)
where C A > 0 C_A > 0 C A > 0 is an absolute constant. Moreover, P P P and P T P^T P T each have an exact Clifford+T implementation with O ( N ) O(\sqrt{N}) O ( N ) T T T gates.
Proof. We defer the proof to Appendix B 1.
Theorem. The 1 / D 1/\sqrt{D} 1/ D dependence in Eq. (12) is optimal in the worst case, up to the logarithmic factor. To see this, consider the traceless Hermitian matrix H = diag ( I N / 2 , − I N / 2 ) H = \operatorname{diag}(I_{N/2},-I_{N/2}) H = diag ( I N /2 , − I N /2 ) , which has ∥ H ∥ = 1 \lVert H\rVert= 1 ∥ H ∥ = 1 and ∥ H ∥ F 2 = N \lVert H\rVert_F^2 = N ∥ H ∥ F 2 = N . A change of basis preserves the sum of squared magnitudes of the matrix entries, ∥ H ∥ F 2 \lVert H\rVert_F^2 ∥ H ∥ F 2 . Since ∥ B ∥ F 2 ≤ b ∥ B ∥ 2 \lVert B\rVert_F^2 \le b\lVert B\rVert^2 ∥ B ∥ F 2 ≤ b ∥ B ∥ 2 for every b × b b \times b b × b matrix B B B , every real orthogonal matrix P P P satisfies
N = ∥ H ∥ F 2 = ∑ I , J ∈ [ D ] ∥ ( P H P T ) I J ∥ F 2 ≤ b D 2 max I , J ∈ [ D ] ∥ ( P H P T ) I J ∥ 2 . N = \lVert H\rVert_F^2 = \sum_{I,J\in[D]}\lVert(PHP^T)_{IJ}\rVert_F^2
\le bD^2\max_{I,J\in[D]}\lVert(PHP^T)_{IJ}\rVert^2. N = ∥ H ∥ F 2 = I , J ∈ [ D ] ∑ ∥( P H P T ) I J ∥ F 2 ≤ b D 2 I , J ∈ [ D ] max ∥( P H P T ) I J ∥ 2 . Since N = b D N=bD N = b D , every such P P P leaves at least one block with
max I , J ∈ [ D ] ∥ ( P H P T ) I J ∥ ≥ 1 D . \max_{I,J\in[D]}\lVert(PHP^T)_{IJ}\rVert\ge\frac{1}{\sqrt{D}}. I , J ∈ [ D ] max ∥( P H P T ) I J ∥ ≥ D 1 . The upper bound in Eq. (12) is therefore within a factor C A log ( N / δ ) C_A\log(N/\delta) C A log ( N / δ ) of this lower bound.
Random block-sparse split
We split H ′ H' H ′ into s s s Hermitian pieces to obtain smaller lookup tables while controlling the piece norms. As in Figure 3 , each off-diagonal adjoint block pair and each diagonal block is assigned independently to a uniformly random piece. Thus E ( H k ) = H ′ / s \mathbb{E}(H_k)=H'/s E ( H k ) = H ′ / s , with D / s D/s D / s assigned block positions per piece in each block column on average.
To control the lookup cost per query, we bound the number of nonzero blocks per block column. This determines the padded length m m m and the D m Dm D m entries in each piece’s lookup table. We also bound the piece norms, since the qDRIFT segment bound in Lemma 4 is quadratic in λ = ∑ k ∥ H k ∥ \lambda=\sum_k\lVert H_k\rVert λ = ∑ k ∥ H k ∥ . The following lemma gives both bounds simultaneously for all pieces with high probability.
Lemma 6 (Random split). Let H ′ ∈ C N × N H' \in\mathbb{C}^{N \times N} H ′ ∈ C N × N be Hermitian with ∥ H I J ′ ∥ ≤ g \lVert H'_{IJ}\rVert\le g ∥ H I J ′ ∥ ≤ g for all I , J ∈ [ D ] I,J \in[D] I , J ∈ [ D ] . Let s ≥ 1 s \ge1 s ≥ 1 be an integer and δ ∈ ( 0 , 1 / 2 ) \delta\in(0,1/2) δ ∈ ( 0 , 1/2 ) , and put ℓ = log ( 8 N s / δ ) \ell=\log(8Ns/\delta) ℓ = log ( 8 N s / δ ) . Form H 1 , … , H s H_1,\ldots,H_s H 1 , … , H s by assigning each off-diagonal adjoint block pair and each diagonal block independently to a uniformly random piece, with zero blocks elsewhere. Then each H k H_k H k is Hermitian and ∑ k H k = H ′ \sum_k H_k=H' ∑ k H k = H ′ .
With probability at least 1 − δ 1-\delta 1 − δ , both of the following bounds hold for every k ∈ [ s ] k \in[s] k ∈ [ s ] . The piece norm satisfies
∥ H k ∥ ≤ ∥ H ′ ∥ / s + ∥ H ′ ∥ 2 ℓ / s + 2 3 g ℓ , (13) \lVert H_k\rVert\le\lVert H'\rVert/s+\lVert H'\rVert\sqrt{2\ell/s}+\frac{2}{3}g\ell, \tag*{(13)} ∥ H k ∥ ≤ ∥ H ′ ∥ / s + ∥ H ′ ∥ 2 ℓ / s + 3 2 g ℓ , (13)
and every block row and block column of H k H_k H k contains at most
m 0 : = D / s + 2 D ℓ / s + ℓ m_0 := D/s+\sqrt{2D\ell/s}+\ell m 0 := D / s + 2 D ℓ / s + ℓ
nonzero blocks. On the same event, if g ≤ ∥ H ′ ∥ / s ℓ g \le\lVert H'\rVert/\sqrt{s\ell} g ≤ ∥ H ′ ∥ / s ℓ then ∥ H k ∥ ≤ 4 ∥ H ′ ∥ ℓ / s \lVert H_k\rVert\le4\lVert H'\rVert\sqrt{\ell/s} ∥ H k ∥ ≤ 4 ∥ H ′ ∥ ℓ / s for all $k.
:::
Proof. We defer the proof to Appendix B 2.
Block encoding of a piece
We construct a block encoding U K U_K U K of a nonzero piece K = H k K=H_k K = H k using its lookup table (Figure 4 ). On the event in Lemma 6, pad each column’s list to length m m m , the smallest power of two at least m 0 m_0 m 0 .
Since ∥ K I J ∥ ≤ g \lVert K_{IJ}\rVert\leq g ∥ K I J ∥ ≤ g , each block admits an exact ( g , 1 , 0 ) (g,1,0) ( g , 1 , 0 ) -block encoding. For each nonpadding address ( J , u ) (J,u) ( J , u ) , the lookup table records I I I , and SELECT applies the corresponding unitary constructed from K I J K_{IJ} K I J and g g g during classical preprocessing. The circuit in Figure 6 prepares the slot register S S S in the uniform state 1 m ∑ z ∣ z ⟩ S \frac{1}{\sqrt{m}}\sum_z |z\rangle_S m 1 ∑ z ∣ z ⟩ S , applies SELECT, routes each block to row I I I and column J J J using Π \Pi Π , and unprepares the slot register. The resulting encoded block is
Figure 6. Block encoding U K U_K U K of a Hermitian piece K K K with b × b b\times b b × b blocks. For K = H 1 K=H_1 K = H 1 , this circuit implements the construction in Figure 5 . The data registers are B, holding the input block column J J J , and T, holding the position x 1 x_1 x 1 within a block. The encoding ancillas are S, holding one of m m m padded slots per column, and the single flag qubit F. The Hadamard layer F S = H ⊗ log 2 m F_S=H^{\otimes\log_2 m} F S = H ⊗ l o g 2 m prepares and unprepares the uniform slot state. For each nonpadding address ( J , u ) (J,u) ( J , u ) identifying row I I I , SELECT applies a unitary on F, T whose F = 0 block is K I J / g K_{IJ}/g K I J / g , where g g g bounds all block operator norms. Padding encodes zero. The permutation Π \Pi Π exchanges addresses ( J , u ) (J,u) ( J , u ) and ( I , u ′ ) (I,u') ( I , u ′ ) of adjoint blocks on S, B. The block with S = F = 0 on input and output is K / ( m g ) K/(mg) K / ( m g ) .
1 m K I J g 1 m = K I J m g . \frac{1}{\sqrt{m}}\frac{K_{IJ}}{g}\frac{1}{\sqrt{m}}=\frac{K_{IJ}}{mg}. m 1 g K I J m 1 = m g K I J .
Thus U K U_K U K is an exact ( m g , log 2 m + 1 , 0 ) (mg,\log_2 m+1,0) ( m g , log 2 m + 1 , 0 ) -block encoding of K K K .
The following lemma bounds the T T T -gate and ancilla costs of a query to U K U_K U K .
Lemma 7 (Sparse block encoding via SELECT). Let K ∈ C N × N K\in\mathbb{C}^{N\times N} K ∈ C N × N be a nonzero Hermitian matrix with ∥ K I J ∥ ≤ g \lVert K_{IJ}\rVert\leq g ∥ K I J ∥ ≤ g for all blocks, where g > 0 g>0 g > 0 . Suppose that every block column of K K K has at most m m m nonzero blocks, where m m m is a power of two. Then there is an ( m g , log 2 m + 1 , 0 ) (mg,\log_2m+1,0) ( m g , log 2 m + 1 , 0 ) -block encoding U K U_K U K of K K K . It consists of Hadamard gates, one SELECT oracle selecting among M = D m M=Dm M = D m unitaries of dimension d = 2 b d=2b d = 2 b , and a basis-state permutation Π \Pi Π defined as follows. List the row indices of each column’s nonzero blocks in m m m slots, adding dummy slots for zero blocks where needed. If slot u u u of column J J J records row I I I with K I J ≠ 0 K_{IJ}\ne0 K I J = 0 , let u ′ u' u ′ be the unique slot in column I I I recording row J J J of the adjoint block K J I = K I J † K_{JI}=K_{IJ}^{\dagger} K J I = K I J † . Define the address map
q ( J , u ) = ( I , u ′ ) . q(J,u)=(I,u'). q ( J , u ) = ( I , u ′ ) . For a padding address, set q ( J , u ) = ( J , u ) q(J,u)=(J,u) q ( J , u ) = ( J , u ) ; addresses of diagonal blocks are also fixed. The unitary Π \Pi Π permutes the basis states of the block-label and slot registers according to the q q q action as the identity on a flag qubit and the register for the position within a block. Hermiticity ensures that the adjoint partner exists and that q ( q ( J , u ) ) = ( J , u ) q(q(J,u))=(J,u) q ( q ( J , u )) = ( J , u ) , so Π − 1 = Π \Pi^{-1}=\Pi Π − 1 = Π .
For every η ∈ ( 0 , 1 / 2 ) \eta\in(0,1/2) η ∈ ( 0 , 1/2 ) , an ordinary or singly controlled query to U K U_K U K , or its inverse, can be implemented to error η \eta η in the sense of Definition 1 with
O ( b D m Λ + b 2 Λ + D m log ( 2 D m ) ) , (14) O\left(b\sqrt{Dm\Lambda}+b^2\Lambda+\sqrt{Dm\log(2Dm)}\right), \tag*{(14)} O ( b D m Λ + b 2 Λ + D m log ( 2 D m ) ) , (14) T T T gates and ancillas, where Λ = log 2 ( 2 b ) + log 2 ( 1 / η ) \Lambda=\log_2(2b)+\log_2(1/\eta) Λ = log 2 ( 2 b ) + log 2 ( 1/ η ) . The last term, which comes from the address permutation, is dominated by the first whenever b 2 Λ ≥ log ( 2 D m ) b^2\Lambda\geq\log(2Dm) b 2 Λ ≥ log ( 2 D m ) .
Proof. We defer the proof to Appendix C 1.
Recall from Lemma 6 that s s s counts all pieces and ℓ = log ( 8 N s / δ ) \ell=\log(8Ns/\delta) ℓ = log ( 8 N s / δ ) , where δ \delta δ is the allowed failure probability. When s ℓ ≤ D s\ell\leq D s ℓ ≤ D , the sparsity bound gives m 0 = O ( D / s ) m_0=O(D/s) m 0 = O ( D / s ) . Rounding m 0 m_0 m 0 up to a power of two then gives m = O ( D / s ) m=O(D/s) m = O ( D / s ) and D m = O ( D 2 / s ) Dm=O(D^2/s) D m = O ( D 2 / s ) lookup table entries per piece. Applying Lemma 7 gives the following bounds on the cost per query and the sum of subnormalization factors.
Corollary 1 (Sum of subnormalization factors and per-query cost). Suppose the conclusions of Lemma 6 hold with g > 0 g>0 g > 0 and s ℓ ≤ D s\ell\leq D s ℓ ≤ D . Discard zero pieces and encode the remaining H k H_k H k by Lemma 7, with m m m the smallest power of two that is at least m 0 m_0 m 0 . Then their subnormalization factors α k = m g \alpha_k=mg α k = m g satisfy ∑ k : H k ≠ 0 α k ≤ 7 D g \sum_{k:H_k\ne0}\alpha_k\leq7Dg ∑ k : H k = 0 α k ≤ 7 D g . If b 2 Λ ≥ log ( 2 D m ) b^2\Lambda\geq\log(2Dm) b 2 Λ ≥ log ( 2 D m ) , each query to a block encoding U H k U_{H_k} U H k , its inverse, or a singly controlled version of either costs O ( N Λ / s + b 2 Λ ) O(N\sqrt{\Lambda/s}+b^2\Lambda) O ( N Λ/ s + b 2 Λ ) T T T gates and ancillas. Here s s s counts all pieces, including those discarded as zero.
Proof. We defer the proof to Appendix C 1.
Choose a constant failure probability in Lemma 5. When its bound holds, we can take g = O ( ∥ H ′ ∥ log N / D ) g=O(\lVert H'\rVert\log N/\sqrt{D}) g = O (∥ H ′ ∥ log N / D ) , because H ′ H' H ′ has the same operator norm as H 0 H_0 H 0 . Under the assumptions of Corollary 1, including s ℓ ≤ D s\ell\leq D s ℓ ≤ D , this gives
∑ k : H k ≠ 0 α k ≤ 7 D g = O ( D log N ∥ H ′ ∥ ) . \sum_{k:H_k\ne0}\alpha_k\leq7Dg=O(\sqrt{D}\log N\lVert H'\rVert). k : H k = 0 ∑ α k ≤ 7 D g = O ( D log N ∥ H ′ ∥) .
In § 1.4 , we combine this bound with the piece-norm estimate to control the total number of block-encoding queries.
Unitary synthesis using qDRIFT and QSVT
We now combine qDRIFT and QSVT with the block encodings U H k U_{H_k} U H k from Sec. IV to implement U U U to target error ϵ \epsilon ϵ . These block encodings have subnormalization factors α k = m g \alpha_k=mg α k = m g and are used to approximate the evolution in
U = e i φ P T e i H ′ P , H ′ = ∑ k H k . U=e^{i\varphi P}Te^{iH'}P,\qquad H'=\sum_k H_k. U = e i φP T e i H ′ P , H ′ = k ∑ H k .
Discard zero pieces and set λ = ∑ k ∥ H k ∥ \lambda=\sum_k\lVert H_k\rVert λ = ∑ k ∥ H k ∥ . Since ∥ e i H ′ − I ∥ ≤ ∥ H ′ ∥ ≤ λ \lVert e^{iH'}-I\rVert\leq\lVert H'\rVert\leq\lambda ∥ e i H ′ − I ∥ ≤ ∥ H ′ ∥ ≤ λ , we can omit the evolution when λ < ϵ / 4 \lambda<\epsilon/4 λ < ϵ /4 . Otherwise, apply Lemma 4 at error ϵ / 4 \epsilon/4 ϵ /4 to choose the segment count N q N_q N q . Select a qDRIFT sample with piece indices K j K_j K j and durations τ j \tau_j τ j whose product satisfies
V = ∏ j = N q 1 e i τ j H K j , ∥ V − e i H ′ ∥ ≤ ϵ / 4. V=\prod_{j=N_q}^{1}e^{i\tau_jH_{K_j}},\qquad\lVert V-e^{iH'}\rVert\leq\epsilon/4. V = j = N q ∏ 1 e i τ j H K j , ∥ V − e i H ′ ∥ ≤ ϵ /4.
Then e i φ P T V P e^{i\varphi P}TVP e i φP T V P approximates U U U with the same error by unitary invariance.
To implement the selected product V V V , we simulate each segment by QSVT using its block encoding U H K j U_{H_{K_j}} U H K j . Treating these queries as exact, we allocate error ϵ / ( 4 N q ) \epsilon/(4N_q) ϵ / ( 4 N q ) to each segment, so the total simulation error is at most ϵ / 4. \epsilon/4. ϵ /4. Lemma 3 bounds the total query count by
Q = O ( ∑ j = 1 N q α K j τ j + N q log 4 N q ϵ ) . Q=O\left(\sum_{j=1}^{N_q}\alpha_{K_j}\tau_j+N_q\log\frac{4N_q}{\epsilon}\right). Q = O j = 1 ∑ N q α K j τ j + N q log ϵ 4 N q .
Let c q u e r y c_{\mathrm{query}} c query be the bound on the T T T -gate cost per query from Corollary 1. These queries contribute at most Q c q u e r y Qc_{\mathrm{query}} Q c query T T T gates. Appendix § 1.1.4 accounts for the remaining gate costs and errors from Clifford+T T T compilation.
To bound the total query count, we control the sampled product’s weighted simulation time ∑ j α K j τ j \sum_j\alpha_{K_j}\tau_j ∑ j α K j τ j . The sampling rule in Eq. (5) , applied to the nonzero pieces, gives
E [ ∑ j = 1 N q α K j τ j ] = ∑ k : H k ≠ 0 α k . \mathbb{E}\left[\sum_{j=1}^{N_q}\alpha_{K_j}\tau_j\right]=\sum_{k:H_k\ne0}\alpha_k. E j = 1 ∑ N q α K j τ j = k : H k = 0 ∑ α k .
The following lemma combines this identity with Markov’s inequality and qDRIFT concentration to bound the weighted simulation time and approximation error of the same sampled product. We apply it to the r r r nonzero pieces, reindexed as A 1 , … , A r A_1,\ldots,A_r A 1 , … , A r , with α k = m g \alpha_k=mg α k = m g .
Lemma 8 (Sampled-product accuracy and query complexity). Let A = ∑ k = 1 r A k A=\sum_{k=1}^{r}A_k A = ∑ k = 1 r A k with nonzero Hermitian A k ∈ C N × N A_k\in\mathbb{C}^{N\times N} A k ∈ C N × N , and set λ = ∑ k ∥ A k ∥ \lambda=\sum_k\lVert A_k\rVert λ = ∑ k ∥ A k ∥ . For each k k k , suppose an exact block encoding U A k U_{A_k} U A k of A k A_k A k with subnormalization factor α k > 0 \alpha_k>0 α k > 0 is given. For 0 < ϵ ≤ 4 λ 0<\epsilon\leq4\lambda 0 < ϵ ≤ 4 λ and p ∈ ( 0 , 1 ) p\in(0,1) p ∈ ( 0 , 1 ) , choose N q N_q N q using Lemma 4 with error ϵ \epsilon ϵ and failure probability p / 2 p/2 p /2 . A qDRIFT sample with indices K j K_j K j , durations τ j \tau_j τ j , and product V = ∏ j = N q 1 e i τ j A K j V=\prod_{j=N_q}^{1}e^{i\tau_jA_{K_j}} V = ∏ j = N q 1 e i τ j A K j satisfies
∥ V − e i A ∥ ≤ ϵ , T : = ∑ j α K j τ j ≤ 2 p ∑ k α k \lVert V-e^{iA}\rVert\leq\epsilon,\qquad T:=\sum_j\alpha_{K_j}\tau_j\leq\frac{2}{p}\sum_k\alpha_k ∥ V − e i A ∥ ≤ ϵ , T := j ∑ α K j τ j ≤ p 2 k ∑ α k with probability at least 1 − p 1-p 1 − p .
For any sample satisfying both inequalities above and any ξ ∈ ( 0 , 1 / 2 ) \xi\in(0,1/2) ξ ∈ ( 0 , 1/2 ) , QSVT implements V V V to error ξ \xi ξ using a total of
Q = O ( 1 p ∑ k α k + N q log ( N q / ξ ) ) Q=O\left(\frac{1}{p}\sum_k\alpha_k+N_q\log(N_q/\xi)\right) Q = O ( p 1 k ∑ α k + N q log ( N q / ξ ) ) queries to the block encodings U A k U_{A_k} U A k in total over all N q N_q N q segments, counting their inverses and singly controlled versions as well.
Proof. We defer the proof to Appendix § 1.1.4 .
The following theorem bounds the T T T -count and ancilla count as functions of N N N and ϵ \epsilon ϵ . We summarize the compiler in Algorithm 1 and the full procedure can be found in Algorithm 3.
Theorem 3 (Unitary synthesis using qDRIFT and QSVT). *There is an absolute constant C 0 C_0 C 0 such that the following holds for every U ∈ U ( N ) U\in U(N) U ∈ U ( N ) and every ϵ ∈ [ N − 1 / 8 n C 0 , 1 / 2 ] \epsilon\in[N^{-1/8}n^{C_0},1/2] ϵ ∈ [ N − 1/8 n C 0 , 1/2 ] . There is a Clifford+T T T circuit that implements U U U to error ϵ \epsilon ϵ with O ~ ( N 6 / 7 ϵ − 6 / 7 ) \widetilde{O}(N^{6/7}\epsilon^{-6/7}) O ( N 6/7 ϵ − 6/7 ) T T T gates and O ~ ( N 6 / 7 ϵ − 8 / 7 ) \widetilde{O}(N^{6/7}\epsilon^{-8/7}) O ( N 6/7 ϵ − 8/7 ) ancillas. The hidden factors are O ( n 2 L ) O(n^2L) O ( n 2 L ) and O ( n L ) O(nL) O ( n L ) respectively, with L = n + log 2 ( 1 / ϵ ) ≤ 2 n L=n+\log_2(1/\epsilon)\leq2n L = n + log 2 ( 1/ ϵ ) ≤ 2 n .
Proof sketch. Lemma 8 combines qDRIFT concentration with Markov’s inequality to select a product that meets both an accuracy test and a bound on weighted simulation time.
The parameter choice in Appendix § 1.1.4 has the scalings
b = Θ ( N 3 / 7 ϵ − 4 / 7 ) , s = Θ ( D ϵ 2 n 2 L ) . b=\Theta(N^{3/7}\epsilon^{-4/7}),\qquad s=\Theta\left(\frac{\sqrt{D}\epsilon^2}{n^2L}\right). b = Θ ( N 3/7 ϵ − 4/7 ) , s = Θ ( n 2 L D ϵ 2 ) .
The stated range of ϵ \epsilon ϵ ensures s ≥ 1 s\geq1 s ≥ 1 . With these choices, simulating all N q N_q N q sampled evolutions requires Q = O ( D n ) Q=O(\sqrt{D}n) Q = O ( D n ) queries in total to the block encodings U H k U_{H_k} U H k , including their inverses and singly controlled versions (Eq. (36) ). Multiplying Q Q Q by the T T T -gate cost of one such query from Corollary 1 gives the stated T T T -count. Reusing the ancillas across these sequential queries gives the ancilla bound. The full proof in Appendix § 1.1.4 verifies the parameter conditions and gives the error analysis for qDRIFT, QSVT, and the Clifford+T T T implementation.
Algorithm 1 Unitary synthesis using qDRIFT and QSVT for Theorem 3. Full procedure is in Algorithm 3.
Input: U ∈ U ( N ) U \in U(N) U ∈ U ( N ) and ϵ \epsilon ϵ in the range of Theorem 3.
Output: A fixed Clifford+T T T circuit implementing U U U to error ϵ \epsilon ϵ .
Choose b b b , s s s , ℓ \ell ℓ as in Appendix § 1.1.4 and separate the logarithm into φ I + H 0 \varphi I + H_0 φ I + H 0 . If H 0 = 0 H_0 = 0 H 0 = 0 , return the scalar-phase circuit.
Resample the similarity and Hermitian split until the bounds of Lemmas 5 and 6 hold. Discard zero pieces and set λ = ∑ k ∥ H k ∥ \lambda= \sum_k \lVert H_k\rVert λ = ∑ k ∥ H k ∥ . If λ < ϵ / 4 \lambda< \epsilon/4 λ < ϵ /4 , return the scalar-phase circuit.
Encode the pieces and select a qDRIFT product passing the accuracy and weighted-time tests of Lemma 8.
Compile its evolutions with QSVT, exact basis changes, and the scalar phase, using reusable clean workspace and the implementation tolerances specified in the error analysis of Appendix § 1.1.4 .
Unitary synthesis using residual refinement
For a fixed decomposition and failure probability, the qDRIFT segment bound in Lemma 4 grows as ϵ − 2 \epsilon^{-2} ϵ − 2 . To improve this precision dependence, we successively correct the remaining error, first using block-sparse generators and then the full residual generator.
Let W l − 1 W_{l-1} W l − 1 be the current unitary approximation to U U U , starting from W − 1 = I W_{-1}=I W − 1 = I . At block-sparse level l l l , define the residual R l = U W l − 1 † R_l=UW_{l-1}^{\dagger} R l = U W l − 1 † . Since R l W l − 1 = U R_lW_{l-1}=U R l W l − 1 = U , applying R l R_l R l after W l − 1 W_{l-1} W l − 1 would give the target exactly. We approximate this correction to obtain W l W_l W l . As W l − 1 W_{l-1} W l − 1 approaches U U U , R l R_l R l approaches the identity. Its principal Hermitian logarithm H ( l ) = − i log R l H^{(l)}=-i\log R_l H ( l ) = − i log R l , whose eigenvalues lie in ( − π , π ] (-\pi,\pi] ( − π , π ] , satisfies
∥ H ( l ) ∥ ≤ π 2 ∥ R l − I ∥ = π 2 ∥ U − W l − 1 ∥ . \lVert H^{(l)}\rVert\le\frac{\pi}{2}\lVert R_l-I\rVert= \frac{\pi}{2}\lVert U-W_{l-1}\rVert. ∥ H ( l ) ∥ ≤ 2 π ∥ R l − I ∥ = 2 π ∥ U − W l − 1 ∥ .
Thus a more accurate approximation gives a smaller generator for the next correction.
For each residual, we repeat the scalar-phase separation, flattening, and splitting used in § 1.4 . Let φ l \varphi_l φ l be its scalar phase, P l P_l P l its change of basis, and H ′ ( l ) = ∑ k H k ( l ) H'^{(l)}=\sum_k H_k^{(l)} H ′ ( l ) = ∑ k H k ( l ) its transformed generator, so R l = e i φ l P l T e i H ′ ( l ) P l R_l=e^{i\varphi_l}P_l^{\mathsf{T}}e^{iH'^{(l)}}P_l R l = e i φ l P l T e i H ′ ( l ) P l . For a residual requiring simulation, qDRIFT selects piece indices K l , u K_{l,u} K l , u and durations τ l , u \tau_{l,u} τ l , u for u = 1 , … , N q ( l ) u=1,\ldots,N_q^{(l)} u = 1 , … , N q ( l ) , using the unrounded pieces H k ( l ) H_k^{(l)} H k ( l ) (Lemma 8).
To simplify repeated block-encoding queries, we replace each selected piece H k ( l ) H_k^{(l)} H k ( l ) by a nearby Hermitian matrix K ~ k ( l ) \widetilde{K}_k^{(l)} K k ( l ) obtained by rounding its encoding angles. Using these rounded pieces, define
V l = ∏ u = N q ( l ) 1 e i τ l , u K ~ K l , u ( l ) , V_l=\prod_{u=N_q^{(l)}}^1 e^{i\tau_{l,u}\widetilde{K}_{K_{l,u}}^{(l)}}, V l = u = N q ( l ) ∏ 1 e i τ l , u K K l , u ( l ) ,
W l = e i φ l P l T V l P l W l − 1 . W_l=e^{i\varphi_l}P_l^{\mathsf{T}}V_lP_lW_{l-1}. W l = e i φ l P l T V l P l W l − 1 .
Here V l V_l V l approximates e i H ′ ( l ) e^{iH'^{(l)}} e i H ′ ( l ) , and W l W_l W l appends the resulting correction, including the basis changes and scalar phase, to W l − 1 W_{l-1} W l − 1 . The rightmost factor acts first. When a residual evolution is omitted because its generator is zero or sufficiently small, we set V l = I V_l=I V l = I , as specified in Algorithm 4. All choices of matrices, sample indices, and durations are made during classical preprocessing.
We call W l W_l W l the ideal product because its exponentials, basis changes, and scalar phases are evaluated exactly. Its difference from U U U includes qDRIFT and rounding errors, which enter the next residual. Circuit implementation errors are analyzed separately.
We next explain how rounding simplifies these queries. Round each encoding’s rotation and phase angles to the nearest multiples of 2 π / 2 B 2\pi/2^B 2 π / 2 B , where the integer B B B sets the angle precision. Given a fixed ( B + 1 ) (B+1) ( B + 1 ) -qubit state ∣ Ψ ⟩ \lvert\Psi\rangle ∣ Ψ ⟩ , controlled modular addition implements these phases exactly by phase kickback (Lemma 11). Each query returns ∣ Ψ ⟩ \lvert\Psi\rangle ∣ Ψ ⟩ unchanged and unentangled with the other registers, so we call it a catalyst and reuse it throughout the circuit. The following lemma gives the rounded Hermitian encoding and bounds its matrix error and the T T T -gate and ancilla costs per query.
Lemma 9 (Block encodings of rounded Hermitian matrices). Let K K K be Hermitian with blocks of norm at most g g g and at most m 0 m_0 m 0 nonzero blocks in each block column, and let m m m be the least power of two with m ≥ m 0 + 1 m\ge m_0+1 m ≥ m 0 + 1 . The extra slot accommodates diagonal-block symmetrization. For B ≥ log 2 ( 2 b ) + 2 B\ge\log_2(2b)+2 B ≥ log 2 ( 2 b ) + 2 , there is a Hermitian matrix K ~ \widetilde K K , determined by K K K , g g g , and B B B , with
∥ K ~ − K ∥ ≤ 16 π m g b 2 − B , (15) \lVert\widetilde K-K\rVert\le16\pi m g b 2^{-B}, \tag*{(15)} ∥ K − K ∥ ≤ 16 π m g b 2 − B , (15) and an ( m g , log 2 m + 1 , 0 ) (mg,\log_2m+1,0) ( m g , log 2 m + 1 , 0 ) -block encoding U K ~ U_{\widetilde K} U K of K ~ \widetilde K K . Queries to U K ~ U_{\widetilde K} U K , its inverse, and their singly controlled versions are implemented exactly, given ∣ Ψ ⟩ \lvert\Psi\rangle ∣ Ψ ⟩ , with the cost in Eq. (14) at Δ = B \Delta=B Δ = B .
Proof. We defer the proof to Appendix C3. □
The rounding-error bound in Lemma 9 scales with the subnormalization factor m g mg m g . During corrections using the full generator, m g mg m g shrinks with the residual, so a fixed angle precision gives progressively smaller absolute error bounds in Eq. (15) . Appendix E1 specifies a choice B = O ( n ) B=O(n) B = O ( n ) independent of the target precision L = n + log 2 ( 1 / ϵ ) L=n+\log_2(1/\epsilon) L = n + log 2 ( 1/ ϵ ) .
With this fixed B B B , all queries can share the same catalyst. Its product form is
∣ Ψ ⟩ = ⨂ j = 1 B + 1 ∣ 0 ⟩ + e − 2 π i / 2 j ∣ 1 ⟩ 2 , \lvert\Psi\rangle=\bigotimes_{j=1}^{B+1}\frac{\lvert0\rangle+e^{-2\pi i/2^j}\lvert1\rangle}{\sqrt{2}}, ∣ Ψ ⟩ = j = 1 ⨂ B + 1 2 ∣ 0 ⟩ + e − 2 π i / 2 j ∣ 1 ⟩ ,
with qubits ordered from most to least significant. This factorization follows from the binary expansion of the index in Appendix C2, and allows each qubit to be prepared separately.
Single-qubit synthesis (Eq. (3) ) therefore prepares the catalyst to error δ c \delta_c δ c using O ( B log ( B / δ c ) ) O(B\log(B/\delta_c)) O ( B log ( B / δ c )) T T T gates. Each query preserves the exact catalyst, so we prepare it once before the first query and unprepare it after the last. Comparing the complete circuit with an exactly initialized catalyst bounds the combined error by 2 δ c 2\delta_c 2 δ c , independently of the number of queries. Choosing δ c = ϵ / 16 \delta_c=\epsilon/16 δ c = ϵ /16 gives error at most ϵ / 8 \epsilon/8 ϵ /8 and total preparation and unpreparation cost O ( n L ) O(nL) O ( n L ) .
These block-encoding queries are then used within QSVT to approximate the chosen evolutions. QSVT truncation can leave ancillas nonzero, so we bound its full-output error separately from the ideal-product error (Appendix § 1.1.5 2). The following theorem accounts for these implementation costs and errors together with the query costs of both refinement stages.
Theorem 4 (Unitary synthesis using residual refinement). There is an absolute constant n 0 n_0 n 0 such that for every n ≥ n 0 n\ge n_0 n ≥ n 0 , every U ∈ U ( N ) U\in U(N) U ∈ U ( N ) , and every ϵ ∈ ( 0 , 1 / 2 ) \epsilon\in(0,1/2) ϵ ∈ ( 0 , 1/2 ) with L = n + log 2 ( 1 / ϵ ) ≤ N L=n+\log_2(1/\epsilon)\le N L = n + log 2 ( 1/ ϵ ) ≤ N , there is a Clifford+T T T circuit that implements U U U to error ϵ \epsilon ϵ with
O ( n 3 ( N 8 / 7 L 3 / 7 + N L ) ) (16) O\left(n^3\left(N^{8/7}L^{3/7}+NL\right)\right) \tag*{(16)} O ( n 3 ( N 8/7 L 3/7 + N L ) ) (16) T T T gates and O ( n N ) O(nN) O ( n N ) ancillas.
Proof sketch. Lemma 9 gives Hermitian rounded generators with a bound on the rounding error and encodings implemented exactly given a shared catalyst state. We form each residual from the corresponding ideal product, so later corrections address both qDRIFT error and data rounding. The block-sparse levels use geometrically decreasing error tolerances. As the generator shrinks, we reduce the number of pieces to control the additive precision cost per segment. The costs of these levels then sum geometrically.
When the piece count would fall below one, we correct each remaining residual using a block encoding of its full transformed and rounded generator G ~ e j \widetilde{G}_{e_j} G e j , where j j j indexes these corrections. QSVT simulates e i G ~ e j e^{i\widetilde{G}_{e_j}} e i G e j by querying that block encoding. The subnormalization factors of these block encodings decrease by at least a factor N 2 N^2 N 2 per correction, and the short-time simulation bound controls their query complexity. The two stages give the stated T T T -count with reusable workspace. Simulation truncation, rotation synthesis, catalyst preparation and unpreparation, and the phase are treated in a separate error analysis. We give the full proof in Appendix § 1.1.5 . □
For fixed n n n , the T T T -count bound grows at most linearly with the requested number of accuracy bits. This improves the ϵ − 6 / 7 \epsilon^{-6/7} ϵ − 6/7 dependence in Theorem 3. In particular, for ϵ ≥ 2 − poly ( n ) \epsilon\ge2^{-\operatorname{poly}(n)} ϵ ≥ 2 − poly ( n ) , the number of accuracy bits is polynomial in n n n , giving a T T T -count of 2 8 n / 7 poly ( n ) 2^{8n/7}\operatorname{poly}(n) 2 8 n /7 poly ( n ) for sufficiently large n n n . When N 1 / 4 ≤ L ≤ N N^{1/4}\le L\le N N 1/4 ≤ L ≤ N , the N L NL N L term in Eq. (16) dominates, so the bound simplifies to O ( n 3 N L ) O(n^3NL) O ( n 3 N L ) . The ancilla bound remains O ( n N ) O(nN) O ( n N ) throughout L ≤ N L\le N L ≤ N . Appendix § 1.1.5 3 compares this precision dependence with previous bounds. The compiler is summarized in Algorithm 2, with the full procedure in Algorithm 4.
Table 2.
Limits of the sequential block-SELECT model
We now ask whether a different choice of pieces or block size can improve the N 8 / 7 N^{8/7} N 8/7 scaling of the T T T -count in Theorem 3 when the target error ϵ \epsilon ϵ is fixed independently of N N N . The following theorem establishes a matching lower bound within the sequential block-SELECT model, subject to a bound on the information carried by the intervening unitaries.
The model represents the target by Hamiltonian evolutions separated by unitaries W j W_j W j , called interleavers. Durations are absorbed into the generators, and s s s counts exponential factors. Here s s s and W j W_j W j have local meanings, distinct from the split count and residual approximations used earlier.
Definition 3 (Sequential block-SELECT design). A design at block size b b b is a sequence D = ( W 0 , H 1 , W 1 , … , H s , W s ) \mathcal{D}=(W_0,H_1,W_1,\ldots,H_s,W_s) D = ( W 0 , H 1 , W 1 , … , H s , W s ) of unitaries W j W_j W j and Hermitian matrices H k H_k H k . It approximates U U U to error ϵ \epsilon ϵ if
∥ e i θ W s e i H s ⋯ W 1 e i H 1 W 0 − U ∥ ≤ ϵ (17) \left\|e^{i\theta W_s}e^{iH_s}\cdots W_1e^{iH_1}W_0-U\right\|\le\epsilon \tag*{(17)} e i θ W s e i H s ⋯ W 1 e i H 1 W 0 − U ≤ ϵ (17)
for some θ ∈ R \theta\in\mathbb{R} θ ∈ R .
The Hermitian generators H k H_k H k may depend arbitrarily on the target U U U . Let n k n_k n k count the nonzero blocks of H k H_k H k , and let m k m_k m k be their maximum count in a block row or column before padding. Set c k = max J ( ∑ J ∥ ( H k ) J ∥ 2 ) 1 / 2 c_k=\max_J\left(\sum_J\|(H_k)_J\|^2\right)^{1/2} c k = max J ( ∑ J ∥ ( H k ) J ∥ 2 ) 1/2 and β k = m k c k \beta_k=\sqrt{m_k}\,c_k β k = m k c k . For the sequence D \mathcal{D} D , we define the following model of the T T T -gate cost for implementing its Hamiltonian evolutions e i H 1 , … , e i H s e^{iH_1},\ldots,e^{iH_s} e i H 1 , … , e i H s :
cost ( D ) = ∑ k = 1 s max { 1 , β k } ( b n k + b 2 ) . (18) \operatorname{cost}(\mathcal{D})=\sum_{k=1}^{s}\max\{1,\beta_k\}\left(b\sqrt{n_k}+b^2\right). \tag*{(18)} cost ( D ) = k = 1 ∑ s max { 1 , β k } ( b n k + b 2 ) . (18)
The interleavers have zero model cost. To prevent them from storing the entire target unitary, we require the entire sequence ( W 0 , … , W s ) (W_0,\ldots,W_s) ( W 0 , … , W s ) to be specified by at most B W B_W B W bits. These bits may depend on U U U . A fixed decoding rule recovers the sequence for every target.
The model assigns a lookup charge b n k b\sqrt{n_k} b n k and a block-processing charge b 2 b^2 b 2 to each query to a block encoding of H k H_k H k . The multiplier max { 1 , β k } \max\{1,\beta_k\} max { 1 , β k } represents the simulation work for e i H k e^{iH_k} e i H k , with a minimum charge of one and linear growth for β k > 1 \beta_k>1 β k > 1 , motivated by the black-box query bounds of Ref. [32 ] . The interleaver budget allows at most 2 B W 2^{B_W} 2 B W sequences under the fixed decoding rule. Theorem 5 bounds the resulting model cost in Eq. (18) .
Theorem 5 (Optimality within the sequential block-S-ELECT model). There are absolute constants c , C c,C c , C with the following property. Let n n n be large enough and ϵ ∈ [ N − 3 , c ] \epsilon\in[N^{-3},c] ϵ ∈ [ N − 3 , c ] . Then, with probability at least 1 / 2 1/2 1/2 over a Haar-random U ∈ U ( N ) U\in U(N) U ∈ U ( N ) , the following holds simultaneously for every power-of-two block size b ≤ N b\le N b ≤ N , with D = N / b D=N/b D = N / b . Every design at block size b b b with B W ≤ 1 4 N 2 log 2 ( 1 / ϵ ) B_W\le\frac{1}{4}N^2\log_2(1/\epsilon) B W ≤ 4 1 N 2 log 2 ( 1/ ϵ ) that approximates U U U to error ϵ \epsilon ϵ satisfies
cost ( D ) ≥ c n C ( ϵ N D 1 / 4 + ϵ D b 2 ) . (19) \operatorname{cost}(D)\ge\frac{c}{nC}\left(\sqrt{\epsilon}ND^{1/4}+\epsilon\sqrt{D}b^2\right). \tag*{(19)} cost ( D ) ≥ n C c ( ϵ N D 1/4 + ϵ D b 2 ) . (19) Minimizing over b b b , every such design has cost Ω ~ ( ϵ 4 / 7 N 8 / 7 ) \widetilde{\Omega}(\epsilon^{4/7}N^{8/7}) Ω ( ϵ 4/7 N 8/7 ) .
Proof sketch. Szarek’s covering bound [33 ] shows that at least half of Haar-random targets require Ω ( N 2 log ( 1 / ϵ ) ) \Omega(N^2\log(1/\epsilon)) Ω ( N 2 log ( 1/ ϵ )) bits to be approximated within error O ( ϵ ) O(\epsilon) O ( ϵ ) under a fixed decoding rule. The interleaver budget leaves a fixed fraction of this information to the generators.
We compress a low-cost design by storing each generator’s blocks or a shorter sampled approximation (Lemma 12). Independent sampling controls the product error through the sum of squared error tolerances (Lemma 13). After rounding, each stored block uses O ( b 2 log N ) O(b^2\log N) O ( b 2 log N ) bits, and the total target error remains O ( ϵ ) O(\epsilon) O ( ϵ ) . The information bound requires Ω ( D 2 / log N ) \Omega(D^2/\log N) Ω ( D 2 / log N ) stored blocks (Lemma 14). Balancing direct storage against block sampling, whose required sample count grows with β k \beta_k β k , gives the lookup and block-processing contributions to Eq. (19) . Recording b b b in the same code covers all allowed block sizes. The full proof is in Appendix § 2.1 . □
At fixed target error ϵ \epsilon ϵ , Theorem 5 matches, up to factors polynomial in n n n , the model cost of the qDRIFT and QSVT construction in Theorem 3. The j j j th model generator is τ j H K j \tau_jH_{K_j} τ j H K j , with β j ≤ τ j α K j \beta_j\le\tau_j\alpha_{K_j} β j ≤ τ j α K j . The model cost is O ~ ( N 8 / 7 ) \widetilde{O}(N^{8/7}) O ( N 8/7 ) at b = N 3 / 7 b=N^{3/7} b = N 3/7 , up to power-of-two rounding. Appendix § 2.1 § 2.2.1 extends the exponent bound to mixed block sizes and larger interleaver budgets.
Discussion
We have constructed Clifford+T T T circuits for arbitrary n n n -qubit unitaries using O ~ ( N 8 / 7 ) \widetilde{O}(N^{8/7}) O ( N 8/7 ) T T T gates and O ~ ( N 6 / 7 ) \widetilde{O}(N^{6/7}) O ( N 6/7 ) clean ancillas at constant operator-norm error, where N = 2 n N=2^n N = 2 n . The construction combines random similarity flattening, a Hermitian block-sparse split, qDRIFT, and QSVT to reduce the lookup cost per query while controlling the total simulation work. Residual refinement gives O ~ ( N 8 / 7 L 3 / 7 + N L ) \widetilde{O}(N^{8/7}L^{3/7}+NL) O ( N 8/7 L 3/7 + N L ) T T T gates and O ~ ( N ) \widetilde{O}(N) O ( N ) clean ancillas for target error ϵ ∈ ( 0 , 1 / 2 ) \epsilon\in(0,1/2) ϵ ∈ ( 0 , 1/2 ) with L = n + log 2 ( 1 / ϵ ) ≤ N L=n+\log_2(1/\epsilon)\le N L = n + log 2 ( 1/ ϵ ) ≤ N . Within the sequential block-S-ELECT cost model, the exponent 8 / 7 8/7 8/7 is optimal at constant precision under its interleaver information restriction.
For synthesis using qDRIFT and QSVT at constant precision, the T T T -gate and ancilla bounds have product O ~ ( N 2 ) \widetilde{O}(N^2) O ( N 2 ) , matching Tan’s space–T T T -count tradeoff ( n + m a n c ) T = Ω ( N 2 ) (n+m_{\mathrm{anc}})T=\Omega(N^2) ( n + m anc ) T = Ω ( N 2 ) [7 ] up to factors polynomial in n n n . Compared with Tan’s construction, we use fewer T T T gates but more ancillas. This moves the costs closer to the balanced scale T ≈ m a n c ≈ N T\approx m_{\mathrm{anc}}\approx N T ≈ m anc ≈ N , though our upper bound remains above the general counting lower bound.
Oracle-based synthesis uses a different cost accounting. OpenAI’s recent draft [24 ] establishes unitary synthesis at constant diamond-norm error using polynomially many elementary gates, qubits, and queries to a suitably chosen Boolean oracle. The target-dependent Boolean function has unrestricted truth-table size and circuit complexity, and the polynomial resource bound excludes the cost of implementing its oracle calls. This distinction matters when comparing with the Clifford+T T T constructions of Tan [7 ] , Yuan et al. [9 ] , and this work. These constructions include the cost of quantum data access and achieve T T T -counts O ~ ( N 4 / 3 ) \widetilde{O}(N^{4/3}) O ( N 4/3 ) , O ~ ( N 5 / 4 ) \widetilde{O}(N^{5/4}) O ( N 5/4 ) , and O ~ ( N 8 / 7 ) \widetilde{O}(N^{8/7}) O ( N 8/7 ) , respectively. In the OpenAI theorem, p ( n ) p(n) p ( n ) bounds all resources, where m ( n ) ≤ p ( n ) m(n)\le p(n) m ( n ) ≤ p ( n ) denotes the oracle input length. A generic implementation uses O ( 2 m ( n ) / 2 ) O(2^{m(n)/2}) O ( 2 m ( n ) /2 ) T T T gates and ancillas per query, yielding a total T T T -count bounded by 2 m ( n ) / 2 / poly ( n ) 2^{m(n)/2}/\operatorname{poly}(n) 2 m ( n ) /2 / poly ( n ) . A polynomial bound on m ( n ) m(n) m ( n ) alone therefore does not determine an exponential scaling comparable with these synthesis bounds. For example, m ( n ) ≤ 2 n + O ( log n ) m(n)\le2n+O(\log n) m ( n ) ≤ 2 n + O ( log n ) would suffice to reach N poly ( n ) N\operatorname{poly}(n) N poly ( n ) through generic oracle compilation, but the draft does not establish this bound or a comparably efficient implementation of its particular oracle. A quantitative comparison consequently requires accounting for the oracle’s implementation cost and ancillary workspace.
Comparisons at finite size likewise require compiled resource estimates, because our bounds are asymptotic. Liu et al. [34 ] provide such estimates for state preparation, comparing rotation- and sampling-based methods after compilation in both T T T -count and total gate count. For our construction, compiled estimates must account for its large lookup tables and substantial workspace. When the data have structure, compressed tables can reduce data-loading costs, as compact alias tables do for real-amplitude state preparation with polynomial amplitudes [35 ] .
At constant target error, a polynomial gap remains between our O ~ ( N 8 / 7 ) \widetilde{O}(N^{8/7}) O ( N 8/7 ) upper bound on T T T -count and the general counting lower bound Ω ~ ( N ) \widetilde{\Omega}(N) Ω ( N ) . It remains open whether general Clifford+T T T circuits can achieve a smaller exponent and ultimately reach the counting scale. Our matching N 8 / 7 N^{8/7} N 8/7 lower bound relies on a counting argument within the sequential block-SELECT cost model under its interleaver information restriction. A complementary question is whether a worst-case lower bound of Ω ( N 1 + c ) \Omega(N^{1+c}) Ω ( N 1 + c ) T T T gates, for some fixed c > 0 c > 0 c > 0 , can be proved for general circuits with an unrestricted number of clean ancillas. Workspace raises a further question at higher precision, where residual refinement uses O ( n N ) O(nN) O ( n N ) clean ancillas throughout L ≤ N L \le N L ≤ N , independently of ϵ \epsilon ϵ . How much of its T T T -count improvement can be retained with fewer ancillas?
Similar questions arise beyond qubits. Approximate single-qutrit Clifford+R R R synthesis has been studied [36 ] . For arbitrary unitaries on many qudits, the optimal non-Clifford gate count at constant error remains open.
Acknowledgments
The authors thank Nathan Baker, Daan Camps, and Yu Tong for valuable discussions. D.L. and W.A.d.J. were supported by the U.S. Department of Energy, Office of Science, Office of Advanced Scientific Computing Research through the Accelerated Research in Quantum Computing program MACH-Q Project. S.Z., D.F. and C.Y. were supported by the U.S. Department of Energy, Office of Science, Office of Advanced Scientific Computing Research through Quantum Utility through Advanced Computational Quantum Algorithms and the Quantum System Accelerator projects.
We acknowledge the use of GPT-5.5 Pro, GPT 5.6 Sol, GPT-6 Astra to search for algorithm ideas, explore candidate proof strategies and to assist with initial manuscript preparation.
Simulation and subnormalization bounds
Single-realization qDRIFT
Proof of Lemma 4. We bound the bias of the average product and the fluctuations around that average separately. Choose N q N_q N q as the least positive integer satisfying
N q ≥ max { 44 λ 2 ϵ 2 log 2 d δ , 2 λ 2 ϵ } . (20) N_q \ge\max\left\{\frac{44\lambda^2}{\epsilon^2}\log\frac{2d}{\delta},\frac{2\lambda^2}{\epsilon}\right\}. \tag*{(20)} N q ≥ max { ϵ 2 44 λ 2 log δ 2 d , ϵ 2 λ 2 } . (20)
The two terms control fluctuations and bias, respectively. Draw independent indices K 1 , … , K N q K_1,\ldots,K_{N_q} K 1 , … , K N q with the same distribution and define the segments by
Pr ( K j = k ) = ∥ A k ∥ λ , \Pr(K_j=k)=\frac{\lVert A_k\rVert}{\lambda}, Pr ( K j = k ) = λ ∥ A k ∥ ,
V j = exp ( i N q A K j ∥ A K j ∥ ) . V_j=\exp\left(\frac{i}{N_q}\frac{A_{K_j}}{\lVert A_{K_j}\rVert}\right). V j = exp ( N q i ∥ A K j ∥ A K j ) .
Set V = V N q ⋯ V 1 V=V_{N_q}\cdots V_1 V = V N q ⋯ V 1 . Since ϵ ≤ 4 λ \epsilon\le4\lambda ϵ ≤ 4 λ , the first term in the threshold is bounded below by a positive constant. Rounding up therefore preserves the stated asymptotic bound.
Subnormalization factors for block encodings
We consider an exact block encoding of A ∈ C N × N A\in\mathbb{C}^{N\times N} A ∈ C N × N constructed in three steps. The data registers B and T hold the block label and the position within a block. The ancillary registers R and F hold an additional block label and a flag qubit. We write the registers in the order R, B, F, T and start with
∣ 0 ⟩ R ∣ J ⟩ B ∣ 0 ⟩ F ∣ ψ ⟩ T , ∣ ψ ⟩ ∈ C b . \lvert0\rangle_{\mathrm R}\lvert J\rangle_{\mathrm B}\lvert0\rangle_{\mathrm F}\lvert\psi\rangle_{\mathrm T},\qquad\lvert\psi\rangle\in\mathbb{C}^{b}. ∣ 0 ⟩ R ∣ J ⟩ B ∣ 0 ⟩ F ∣ ψ ⟩ T , ∣ ψ ⟩ ∈ C b .
We first describe preparations without padding.
A preparation P w P_w P w , controlled on the input block label J J J , prepares
P w ( J ) ∣ 0 ⟩ R = ∑ I w I J ∣ I ⟩ R . P_w^{(J)}\lvert0\rangle_{\mathrm R}=\sum_I w_{IJ}\lvert I\rangle_{\mathrm R}. P w ( J ) ∣ 0 ⟩ R = I ∑ w I J ∣ I ⟩ R .
The resulting state is
∑ I w I J ∣ I ⟩ R ∣ J ⟩ B ∣ 0 ⟩ F ∣ ψ ⟩ T . \sum_I w_{IJ}\lvert I\rangle_{\mathrm R}\lvert J\rangle_{\mathrm B}\lvert0\rangle_{\mathrm F}\lvert\psi\rangle_{\mathrm T}. I ∑ w I J ∣ I ⟩ R ∣ J ⟩ B ∣ 0 ⟩ F ∣ ψ ⟩ T .
A SELECT oracle applies C I J C_{IJ} C I J to F, T on address ( I , J ) (I,J) ( I , J ) , giving
∑ I w I J ∣ I ⟩ R ∣ J ⟩ B C I J ( ∣ 0 ⟩ F ∣ ψ ⟩ T ) . \sum_I w_{IJ}\lvert I\rangle_{\mathrm R}\lvert J\rangle_{\mathrm B}C_{IJ}\left(\lvert0\rangle_{\mathrm F}\lvert\psi\rangle_{\mathrm T}\right). I ∑ w I J ∣ I ⟩ R ∣ J ⟩ B C I J ( ∣ 0 ⟩ F ∣ ψ ⟩ T ) .
Swapping the two label registers then gives
∑ I w I J ∣ J ⟩ R ∣ I ⟩ B C I J ( ∣ 0 ⟩ F ∣ ψ ⟩ T ) . \sum_I w_{IJ}\lvert J\rangle_{\mathrm R}\lvert I\rangle_{\mathrm B}C_{IJ}\left(\lvert0\rangle_{\mathrm F}\lvert\psi\rangle_{\mathrm T}\right). I ∑ w I J ∣ J ⟩ R ∣ I ⟩ B C I J ( ∣ 0 ⟩ F ∣ ψ ⟩ T ) .
A second preparation P v P_v P v , controlled on the output block label I I I , is defined by
P v ( I ) ∣ 0 ⟩ R = ∑ J ′ v I J ′ ∣ J ′ ⟩ R . P_v^{(I)}\lvert0\rangle_{\mathrm R}=\sum_{J'}v_{IJ'}\lvert J'\rangle_{\mathrm R}. P v ( I ) ∣ 0 ⟩ R = J ′ ∑ v I J ′ ∣ J ′ ⟩ R .
We apply the estimates of Ref. [26 ] with H = − A H=-A H = − A and t = 1 t=1 t = 1 , so their evolution e − i t H e^{-itH} e − i t H is e i A e^{iA} e i A . Proposition 3.2 bounds the bias:
∥ e i A − E V ∥ ≤ λ 2 N q ≤ ϵ / 2. \left\lVert e^{iA}-\mathbb{E}V\right\rVert\le\frac{\lambda^2}{N_q}\le\epsilon/2. e i A − E V ≤ N q λ 2 ≤ ϵ /2.
The last inequality is the second condition on N q N_q N q . Proposition 3.3 bounds fluctuations about the average:
Pr ( ∥ V − E V ∥ ≥ ϵ / 2 ) ≤ 2 d e − N q ϵ 2 / ( 44 λ 2 ) ≤ δ . \Pr\left(\lVert V-\mathbb{E}V\rVert\ge\epsilon/2\right)\le2d e^{-N_q\epsilon^2/(44\lambda^2)}\le\delta. Pr ( ∥ V − E V ∥ ≥ ϵ /2 ) ≤ 2 d e − N q ϵ 2 / ( 44 λ 2 ) ≤ δ .
Here the last inequality is the first condition on N q N_q N q . Outside this exceptional event, the triangle inequality gives ∥ V − e i A ∥ ≤ ϵ \lVert V-e^{iA}\rVert\le\epsilon ∥ V − e i A ∥ ≤ ϵ . Applying its inverse gives the full output state
∣ o u t J ⟩ = ∑ I w I J ( P v ( I ) † ∣ J ⟩ R ) ∣ I ⟩ B ⊗ C I J ( ∣ 0 ⟩ F ∣ ψ ⟩ T ) . \lvert\mathrm{out}_{J}\rangle= \sum_{I} w_{IJ}(P_{v}^{(I)\dagger}\lvert J\rangle_{R})\lvert I\rangle_{B}
\otimes C_{IJ}(\lvert0\rangle_{F}\lvert\psi\rangle_{T}). ∣ out J ⟩ = I ∑ w I J ( P v ( I ) † ∣ J ⟩ R ) ∣ I ⟩ B ⊗ C I J (∣ 0 ⟩ F ∣ ψ ⟩ T ) .
Its overlap with the zero state of R is determined by
⟨ 0 ∣ R P v ( I ) † ∣ J ⟩ R = v ‾ I J . \langle0\lvert_{R}P_{v}^{(I)\dagger}\lvert J\rangle_{R}=\overline{v}_{IJ}. ⟨ 0 ∣ R P v ( I ) † ∣ J ⟩ R = v I J .
Define the encoded block of C I J C_{IJ} C I J by
( C I J ) 00 = ( ⟨ 0 ∣ F ⊗ I T ) C I J ( ∣ 0 ⟩ F ⊗ I T ) . (C_{IJ})_{00}=(\langle0\lvert_{F}\otimes I_{T})C_{IJ}(\lvert0\rangle_{F}\otimes I_{T}). ( C I J ) 00 = (⟨ 0 ∣ F ⊗ I T ) C I J (∣ 0 ⟩ F ⊗ I T ) .
The component of the output with both ancillary registers zero is
( ⟨ 0 ∣ R ⊗ I B ⊗ ⟨ 0 ∣ F ⊗ I T ) ∣ o u t J ⟩ = ∑ I v ‾ I J w I J ∣ I ⟩ B ( C I J ) 00 ∣ ψ ⟩ T . (21) (\langle0\lvert_{R}\otimes I_{B}\otimes\langle0\lvert_{F}\otimes I_{T})\lvert\mathrm{out}_{J}\rangle
=\sum_{I}\overline{v}_{IJ}w_{IJ}\lvert I\rangle_{B}(C_{IJ})_{00}\lvert\psi\rangle_{T}. \tag*{(21)} (⟨ 0 ∣ R ⊗ I B ⊗ ⟨ 0 ∣ F ⊗ I T ) ∣ out J ⟩ = I ∑ v I J w I J ∣ I ⟩ B ( C I J ) 00 ∣ ψ ⟩ T . (21)
For a block encoding of A A A with subnormalization factor α \alpha α , this component must equal ∑ I ∣ I ⟩ B ( A I J / α ) ∣ ψ ⟩ T \sum_{I}\lvert I\rangle_{B}(A_{IJ}/\alpha)\lvert\psi\rangle_{T} ∑ I ∣ I ⟩ B ( A I J / α ) ∣ ψ ⟩ T . Comparing the coefficients for each I I I and every ∣ ψ ⟩ \lvert\psi\rangle ∣ ψ ⟩ gives the block identity below. The full preparation states are normalized. Padding may add orthogonal branches whose selected unitaries have zero encoded blocks. These branches contribute nothing to Eq. (21) , so the block identity remains valid, while the squared amplitudes on physical addresses may sum to less than one. Thus
A I J α = v ‾ I J w I J ( C I J ) 00 , ∑ I ∣ w I J ∣ 2 ≤ 1 , ∑ J ∣ v I J ∣ 2 ≤ 1. (22) \frac{A_{IJ}}{\alpha}=\overline{v}_{IJ}w_{IJ}(C_{IJ})_{00},
\qquad
\sum_{I}\lvert w_{IJ}\rvert^{2}\leq1,
\qquad
\sum_{J}\lvert v_{IJ}\rvert^{2}\leq1. \tag*{(22)} α A I J = v I J w I J ( C I J ) 00 , I ∑ ∣ w I J ∣ 2 ≤ 1 , J ∑ ∣ v I J ∣ 2 ≤ 1. (22)
The first amplitude sum is for each fixed J J J and the second for each fixed I I I . Since C I J C_{IJ} C I J is unitary, ∥ ( C I J ) 00 ∥ ≤ 1 \lVert(C_{IJ})_{00}\rVert\leq1 ∥( C I J ) 00 ∥ ≤ 1 . The amplitudes may depend on A A A in an arbitrary way. The construction of Ref. [9] and Lemma 7 are of this form. In the latter, A = K A=K A = K . A nonpadding slot address ( J , u ) (J,u) ( J , u ) identifies the block pair ( I , J ) (I,J) ( I , J ) : slot u u u in column J J J contains K I J K_{IJ} K I J . Let u ′ u' u ′ be the slot in column I I I containing its adjoint K J I = K I J † K_{JI}=K_{IJ}^{\dagger} K J I = K I J † . The address map q ( J , u ) = ( I , u ′ ) q(J,u)=(I,u') q ( J , u ) = ( I , u ′ ) then gives
Π ∣ u ⟩ S ∣ J ⟩ B = ∣ u ′ ⟩ S ∣ I ⟩ B , \Pi\lvert u\rangle_{S}\lvert J\rangle_{B}=\lvert u'\rangle_{S}\lvert I\rangle_{B}, Π ∣ u ⟩ S ∣ J ⟩ B = ∣ u ′ ⟩ S ∣ I ⟩ B ,
where S S S is the slot register. Thus J ↦ I J\mapsto I J ↦ I routes K I J K_{IJ} K I J to output block I I I , while u ↦ u ′ u\mapsto u' u ↦ u ′ supplies the slot address used by the output unpreparation. This is the role of the explicit label swap above. Uniform slot preparations give w I J = v I J = 1 / m w_{IJ}=v_{IJ}=1/\sqrt{m} w I J = v I J = 1/ m on nonzero blocks. Together with ( C I J ) 00 = K I J / g (C_{IJ})_{00}=K_{IJ}/g ( C I J ) 00 = K I J / g , Eq. (22) therefore gives the encoded block K I J / ( m g ) K_{IJ}/(mg) K I J / ( m g ) .
Lemma 10 (Lower bound on the subnormalization factor). An exact block encoding of A A A satisfying Eq. (22) , with subnormalization factor α \alpha α , satisfies α ≥ 1 D ∑ I , J ∥ A I J ∥ \alpha\geq\frac{1}{D}\sum_{I,J}\lVert A_{IJ}\rVert α ≥ D 1 ∑ I , J ∥ A I J ∥ .
Proof. The block identity in Eq. (22) gives ∥ A I J ∥ ≤ α ∣ v I J ∣ ∣ w I J ∣ \lVert A_{IJ}\rVert\leq\alpha\lvert v_{IJ}\rvert\lvert w_{IJ}\rvert ∥ A I J ∥ ≤ α ∣ v I J ∣ ∣ w I J ∣ . Summing the preparation-amplitude bounds over the controlled labels bounds each total squared-amplitude sum by D D D . Cauchy–Schwarz therefore gives
∑ I , J ∥ A I J ∥ ≤ α ∑ I , J ∣ v I J ∣ ∣ w I J ∣ ≤ α ( ∑ I , J ∣ v I J ∣ 2 ) 1 / 2 ( ∑ I , J ∣ w I J ∣ 2 ) 1 / 2 ≤ α D . (23) \sum_{I,J}\lVert A_{IJ}\rVert\leq\alpha\sum_{I,J}\lvert v_{IJ}\rvert\lvert w_{IJ}\rvert
\leq\alpha\left(\sum_{I,J}\lvert v_{IJ}\rvert^{2}\right)^{1/2}\left(\sum_{I,J}\lvert w_{IJ}\rvert^{2}\right)^{1/2}
\leq\alpha D. \tag*{(23)} I , J ∑ ∥ A I J ∥ ≤ α I , J ∑ ∣ v I J ∣ ∣ w I J ∣ ≤ α I , J ∑ ∣ v I J ∣ 2 1/2 I , J ∑ ∣ w I J ∣ 2 1/2 ≤ α D . (23)
:::
Cost of the uniform dense block encoding. To justify the cost in Sec. III, we derive the subnormalization factor of the block encoding of the transformed target unitary U ′ U' U ′ and the resulting number of queries needed for oblivious amplitude amplification. We then apply Lemma 10 to Haar-random targets to show that the D \sqrt{D} D scale is necessary for block encodings of the form Eq. (22) .
Yuan et al. [9 ] use random input and output bases to obtain ∥ U I J ′ ∥ ≤ g = O ~ ( 1 / D ) \lVert U'_{IJ}\rVert\leq g=\widetilde{O}(1/\sqrt{D}) ∥ U I J ′ ∥ ≤ g = O ( 1/ D ) with high probability. Embed each contraction U I J ′ / g U'_{IJ}/g U I J ′ / g as the encoded block of a 2 b 2b 2 b -dimensional unitary C I J C_{IJ} C I J . Uniform preparation and unpreparation, w I J = v I J = 1 / D w_{IJ}=v_{IJ}=1/\sqrt{D} w I J = v I J = 1/ D , each supply one factor 1 / D 1/\sqrt{D} 1/ D , giving
1 D U I J ′ g 1 D = U I J ′ D g . (24) \frac{1}{\sqrt{D}}\frac{U'_{IJ}}{g}\frac{1}{\sqrt{D}}=\frac{U'_{IJ}}{Dg}. \tag*{(24)} D 1 g U I J ′ D 1 = D g U I J ′ . (24)
Thus the full encoded matrix is U ′ / α U'/\alpha U ′ / α , where α = D g = O ~ ( D ) \alpha=Dg=\widetilde{O}(\sqrt{D}) α = D g = O ( D ) . The subnormalization factor determines how many queries to this full block encoding of U ′ U' U ′ are needed for oblivious amplitude amplification. For any normalized input, the zero-ancilla component has squared norm p = 1 / α 2 p=1/\alpha^{2} p = 1/ α 2 because U ′ U' U ′ is unitary. Oblivious amplitude amplification, implemented through QSVT [29 ] , uses the block encoding of U ′ U' U ′ , its inverse, and zero-ancilla phase shifts; O ( 1 / p ) = O ( α ) = O ~ ( N / b ) O(1/\sqrt{p})=O(\alpha)=\widetilde{O}(\sqrt{N/b}) O ( 1/ p ) = O ( α ) = O ( N / b ) queries suffice at fixed accuracy. Selecting among D 2 D^{2} D 2 unitaries of dimension 2 b 2b 2 b costs O ~ ( N + b 2 ) \widetilde{O}(N+b^{2}) O ( N + b 2 ) T T T gates per query by Lemma 2, giving Eq. (6) .
For a Haar-random U U U and b > C log N b>C\sqrt{\log N} b > C log N , concentration of measure on U ( N ) U(N) U ( N ) [37 ] shows that, with high probability, every block satisfies ∥ U I J ∥ F ≥ b / ( 2 N ) \lVert U_{IJ}\rVert_{F}\geq b/(2\sqrt{N}) ∥ U I J ∥ F ≥ b / ( 2 N ) . Comparing the Frobenius and operator norms gives
∥ U I J ∥ ≥ ∥ U I J ∥ F b ≥ 1 2 b N . \lVert U_{IJ}\rVert\geq\frac{\lVert U_{IJ}\rVert_{F}}{\sqrt{b}}\geq\frac{1}{2}\sqrt{\frac{b}{N}}. ∥ U I J ∥ ≥ b ∥ U I J ∥ F ≥ 2 1 N b .
There are D 2 D^{2} D 2 blocks, so ∑ I , J ∥ U I J ∥ ≥ D 3 / 2 / 2 \sum_{I,J}\lVert U_{IJ}\rVert\geq D^{3/2}/2 ∑ I , J ∥ U I J ∥ ≥ D 3/2 /2 . Lemma 10 then gives α ≥ D / 2 \alpha\geq\sqrt{D}/2 α ≥ D /2 . This gives the scale of the subnormalization factor discussed in Sec. III.
For any additive split H ′ = ∑ k H k H'=\sum_{k}H_{k} H ′ = ∑ k H k whose pieces H k H_{k} H k are block encoded in this way, apply Lemma 10 to each piece and then use the triangle inequality: ∑ k α k ≥ ∑ I , J ∥ H I J ∥ / D \sum_{k}\alpha_{k}\geq\sum_{I,J}\lVert H_{IJ}\rVert/D ∑ k α k ≥ ∑ I , J ∥ H I J ∥ / D . Splitting reduces the data accessed per query, and the sum of subnormalization factors obeys the same lower bound.
Matrix preprocessing
Similarity flattening
We bound the diagonal contribution by Hanson–Wright and the off-diagonal contribution by decoupling and matrix Rademacher bounds. The required concentration inequalities are as follows.
Fact 1 (Hanson–Wright [38 ] ). Let σ \sigma σ be uniform on { ± 1 } N \{\pm1\}^{N} { ± 1 } N and A ∈ R N × N A \in\mathbb{R}^{N \times N} A ∈ R N × N . For all t ≥ 0 t \ge0 t ≥ 0 , Pr ( ∣ σ T A σ − tr A ∣ > t ) ≤ 2 exp ( − c min { t 2 ∥ A ∥ F 2 , t ∥ A ∥ } ) \Pr(|\sigma^{T}A\sigma-\operatorname{tr} A|>t)\le2\exp\left(-c\min\left\{\frac{t^{2}}{\lVert A\rVert_{F}^{2}},\frac{t}{\lVert A\rVert}\right\}\right) Pr ( ∣ σ T A σ − tr A ∣ > t ) ≤ 2 exp ( − c min { ∥ A ∥ F 2 t 2 , ∥ A ∥ t } ) .
Fact 2 (Matrix Rademacher series [39 ] ). Let B y ∈ C d 1 × d 2 B_y \in\mathbb{C}^{d_1 \times d_2} B y ∈ C d 1 × d 2 be fixed and τ y \tau_y τ y independent Rademacher signs. Put v = max { ∥ ∑ y B y B y † ∥ , ∥ ∑ y B y † B y ∥ } v=\max\left\{\left\lVert\sum_y B_yB_y^\dagger\right\rVert,\left\lVert\sum_y B_y^\dagger B_y\right\rVert\right\} v = max { ∑ y B y B y † , ∑ y B y † B y } . Then Pr ( ∥ ∑ y τ y B y ∥ ≥ t ) ≤ ( d 1 + d 2 ) e − t 2 / ( 2 v ) \Pr\left(\left\lVert\sum_y\tau_yB_y\right\rVert\ge t\right)\le(d_1+d_2)e^{-t^2/(2v)} Pr ( ∑ y τ y B y ≥ t ) ≤ ( d 1 + d 2 ) e − t 2 / ( 2 v ) .
Fact 3 (Decoupling [40 , 41 ] ). Let τ \tau τ be a vector of independent random variables and τ ′ \tau' τ ′ an independent copy of it. Let f y z f_{yz} f y z be measurable maps into a separable Banach space. There is an absolute constant C d e c C_{\mathrm{dec}} C dec such that for all t > 0 t>0 t > 0 ,
Pr ( ∥ ∑ y ≠ z f y z ( τ y , τ z ) ∥ > t ) ≤ C d e c Pr ( C d e c ∥ ∑ y ≠ z f y z ( τ y , τ z ′ ) ∥ > t ) . \Pr\left(\left\lVert\sum_{y\ne z}f_{yz}(\tau_y,\tau_z)\right\rVert>t\right)\le C_{\mathrm{dec}}\Pr\left(C_{\mathrm{dec}}\left\lVert\sum_{y\ne z}f_{yz}(\tau_y,\tau'_z)\right\rVert>t\right). Pr y = z ∑ f y z ( τ y , τ z ) > t ≤ C dec Pr C dec y = z ∑ f y z ( τ y , τ z ′ ) > t .
Fact 2 is Theorem 4.1.1 of Ref. [39 ] ; for Fact 3, see also Theorem 3.4.1 of Ref. [41 ] .
Proof of Lemma 5. P P P is real orthogonal, so e i P H P T = P e i H P T e^{iPHP^{T}}=Pe^{iHP^{T}} e i P H P T = P e i H P T . The applications of F = H ⊗ n F=H^{\otimes n} F = H ⊗ n use only Clifford gates, and the two sign layers cost O ( N ) O(\sqrt{N}) O ( N ) T T T gates by Lemma 1, for either P P P or P T P^{T} P T . For the norm bound, the case H = 0 H=0 H = 0 is straightforward. Otherwise, assume ∥ H ∥ = 1 \lVert H\rVert=1 ∥ H ∥ = 1 without loss of generality, as we can rescale the matrix H H H . Put G = F H F G=FHF G = F H F and K = F S σ G S σ F K=FS_{\sigma}GS_{\sigma}F K = F S σ G S σ F , so P H P T = F S τ K S τ F PHP^{T}=FS_{\tau}KS_{\tau}F P H P T = F S τ K S τ F . We separate its diagonal part diag ( K ) \operatorname{diag}(K) diag ( K ) from its remaining entries; the second sign layer leaves diag ( K ) \operatorname{diag}(K) diag ( K ) unchanged.
Diagonal part. Each K y y K_{yy} K y y has the distribution of N − 1 σ T Re ( G ) σ N^{-1}\sigma^{T}\operatorname{Re}(G)\sigma N − 1 σ T Re ( G ) σ , since every entry of F F F is ± N − 1 / 2 \pm N^{-1/2} ± N − 1/2 . The real symmetric matrix Re ( G ) \operatorname{Re}(G) Re ( G ) has trace zero, operator norm at most 1 1 1 , and Frobenius norm at most N \sqrt{N} N . Set ℓ = log ( N / δ ) \ell=\log(N/\delta) ℓ = log ( N / δ ) . By Fact 1 and ∥ Re ( G ) ∥ F 2 ≤ N \lVert\operatorname{Re}(G)\rVert_{F}^{2}\le N ∥ Re ( G ) ∥ F 2 ≤ N , with failure probability at most δ / 2 \delta/2 δ /2 ,
∥ diag ( K ) ∥ ≤ C ( ℓ N + ℓ N ) ≤ 2 C ℓ N . (25) \lVert\operatorname{diag}(K)\rVert\le C\left(\sqrt{\frac{\ell}{N}}+\frac{\ell}{N}\right)\le\frac{2C\ell}{\sqrt{N}}. \tag*{(25)} ∥ diag ( K )∥ ≤ C ( N ℓ + N ℓ ) ≤ N 2 C ℓ . (25)
Every block of F diag ( K ) F F\operatorname{diag}(K)F F diag ( K ) F has norm at most this bound.
Off-diagonal part. Condition on σ \sigma σ and set A = K − diag ( K ) A=K-\operatorname{diag}(K) A = K − diag ( K ) . Then ∥ A ∥ ≤ 2 \lVert A\rVert\le2 ∥ A ∥ ≤ 2 and ∑ z ∣ A y z ∣ 2 ≤ 1 \sum_z\lvert A_{yz}\rvert^2\le1 ∑ z ∣ A y z ∣ 2 ≤ 1 for every y y y . Let R I R_I R I contain the b b b rows of F F F in block I I I , with columns r y I r_y^I r y I for y ∈ [ N ] y\in[N] y ∈ [ N ] . Thus R I R I T = I b R_IR_I^{T}=I_b R I R I T = I b and ∥ r y I ∥ 2 = b / N \lVert r_y^I\rVert^2=b/N ∥ r y I ∥ 2 = b / N . Fix I , J I,J I , J and write X = R I S τ A S τ R J T X=R_IS_{\tau}AS_{\tau}R_J^{T} X = R I S τ A S τ R J T . To use Fact 3, introduce an independent copy τ ′ \tau' τ ′ and write the decoupled block as
V = A S τ ′ R J T , Y = R I S τ V = ∑ y τ y B y , V=AS_{\tau'}R_J^{T},\qquad Y=R_IS_{\tau}V=\sum_y\tau_yB_y, V = A S τ ′ R J T , Y = R I S τ V = y ∑ τ y B y ,
where v y T v_y^{T} v y T is the y y y -th row of V V V and B y = r y I v y T B_y=r_y^Iv_y^{T} B y = r y I v y T .
Put η = δ / ( 2 C d e c D 2 ) \eta=\delta/(2C_{\mathrm{dec}}D^2) η = δ / ( 2 C dec D 2 ) . Each v y v_y v y is a vector Rademacher series with variance parameter at most ( b / N ) ∑ z ∣ A y z ∣ 2 ≤ b / N (b/N)\sum_z\lvert A_{yz}\rvert^2\le b/N ( b / N ) ∑ z ∣ A y z ∣ 2 ≤ b / N . By Fact 2 and a union bound over y y y , max y ∥ v y ∥ 2 ≤ C ( b / N ) ℓ \max_y\lVert v_y\rVert^2\le C(b/N)\ell max y ∥ v y ∥ 2 ≤ C ( b / N ) ℓ except with probability η / 2 \eta/2 η /2 ; here log ( N ( b + 1 ) / η ) = O ( ℓ ) \log(N(b+1)/\eta)=O(\ell) log ( N ( b + 1 ) / η ) = O ( ℓ ) . For any such τ ′ \tau' τ ′ , the conditional matrix variance is controlled by
∑ y B y B y † ⪯ max y ∥ v y ∥ 2 I b , \sum_yB_yB_y^\dagger\preceq\max_y\lVert v_y\rVert^2I_b, y ∑ B y B y † ⪯ y max ∥ v y ∥ 2 I b ,
∑ y B y † B y = b N V † V ⪯ 4 b N I b . (26) \sum_yB_y^\dagger B_y=\frac{b}{N}V^\dagger V\preceq\frac{4b}{N}I_b. \tag*{(26)} y ∑ B y † B y = N b V † V ⪯ N 4 b I b . (26)
where the last inequality uses ∥ V ∥ ≤ ∥ A ∥ < 2 \lVert V\rVert\le\lVert A\rVert<2 ∥ V ∥ ≤ ∥ A ∥ < 2 . A second application of Fact 2, now to τ \tau τ , gives ∥ Y ∥ ≤ C b / N ℓ \lVert Y\rVert\le C\sqrt{b/N}\,\ell ∥ Y ∥ ≤ C b / N ℓ except with an additional probability η / 2 \eta/2 η /2 . Including the bad choices of τ ′ \tau' τ ′ , the failure probability is at most η \eta η .
Decoupling therefore gives Pr ( ∥ X ∥ > C d e c b / N ℓ ) ≤ C d e c η \Pr(\lVert X\rVert>C_{\mathrm{dec}}\sqrt{b/N}\,\ell)\le C_{\mathrm{dec}}\eta Pr (∥ X ∥ > C dec b / N ℓ ) ≤ C dec η , absorbing its constant factor into C C C . A union bound over the D 2 D^2 D 2 block pairs yields, with failure probability at most δ / 2 \delta/2 δ /2 ,
max I , J ∥ ( F S τ A S τ F ) I J ∥ ≤ C b N ℓ . (27) \max_{I,J}\lVert(FS_{\tau}AS_{\tau}F)_{IJ}\rVert\le C\sqrt{\frac{b}{N}}\,\ell. \tag*{(27)} I , J max ∥( F S τ A S τ F ) I J ∥ ≤ C N b ℓ . (27)
This estimate holds for every σ \sigma σ . Combining the two parts, using b ≥ 1 b\ge1 b ≥ 1 , and restoring ∥ H ∥ \lVert H\rVert ∥ H ∥ proves Eq. (12) with total failure probability at most δ \delta δ . □ \square □
Random block-sparse split
Proof of Lemma 6. Let B p B_p B p retain one adjoint block pair of H ′ H' H ′ (one block for a diagonal pair), with zero elsewhere. Then H ′ = ∑ p B p H'=\sum_p B_p H ′ = ∑ p B p , each B p B_p B p is Hermitian, and ∥ B p ∥ ≤ g \lVert B_p\rVert\le g ∥ B p ∥ ≤ g . For a fixed class k k k , H k − H ′ / s = ∑ p ( ξ p − 1 / s ) B p H_k-H'/s=\sum_p(\xi_p-1/s)B_p H k − H ′ / s = ∑ p ( ξ p − 1/ s ) B p , where the assignment indicators ξ p \xi_p ξ p are independent Bernoulli( 1 / s ) (1/s) ( 1/ s ) variables. Each summand has norm at most g g g , and
∥ ∑ p E ( ξ p − 1 / s ) 2 B p 2 ∥ ≤ 1 s ∥ ⨁ I ( H ′ 2 ) I I ∥ ≤ ∥ H ′ ∥ 2 s . \left\lVert\sum_p\mathbb{E}(\xi_p-1/s)^2B_p^2\right\rVert\le\frac{1}{s}\left\lVert\bigoplus_I(H'^2)_{II}\right\rVert\le\frac{\lVert H'\rVert^2}{s}. p ∑ E ( ξ p − 1/ s ) 2 B p 2 ≤ s 1 I ⨁ ( H ′2 ) I I ≤ s ∥ H ′ ∥ 2 .
Here ∑ p B p 2 = ⨁ I ( H ′ 2 ) I I \sum_pB_p^2=\bigoplus_I(H'^2)_{II} ∑ p B p 2 = ⨁ I ( H ′2 ) I I , whose blocks are compressions of H ′ 2 H'^2 H ′2 .
Recall that the matrix Bernstein inequality [42 ] applies to independent, mean-zero Hermitian matrices Z p ∈ C N × N Z_p\in\mathbb{C}^{N\times N} Z p ∈ C N × N satisfying ∥ Z p ∥ ≤ R \lVert Z_p\rVert\le R ∥ Z p ∥ ≤ R almost surely. With variance parameter v = ∥ ∑ p E Z p 2 ∥ v=\left\lVert\sum_p\mathbb{E}Z_p^2\right\rVert v = ∑ p E Z p 2 , it gives, for every t > 0 t>0 t > 0 ,
Pr ( ∥ ∑ p Z p ∥ > t ) ≤ 2 N exp ( − t 2 2 ( v + R t / 3 ) ) . \Pr\left(\left\lVert\sum_pZ_p\right\rVert>t\right)\le2N\exp\left(-\frac{t^2}{2(v+Rt/3)}\right). Pr ( p ∑ Z p > t ) ≤ 2 N exp ( − 2 ( v + R t /3 ) t 2 ) .
For v > 0 v>0 v > 0 , the choice t = 2 v u + 2 3 R u t=\sqrt{2vu}+\frac{2}{3}Ru t = 2 v u + 3 2 R u satisfies t 2 ≥ 2 u ( v + R t / 3 ) t^2\ge2u(v+Rt/3) t 2 ≥ 2 u ( v + R t /3 ) , and hence
Pr ( ∥ ∑ p Z p ∥ > 2 v u + 2 3 R u ) ≤ 2 N e − u . \Pr\left(\left\lVert\sum_pZ_p\right\rVert>\sqrt{2vu}+\frac{2}{3}Ru\right)\le2Ne^{-u}. Pr ( p ∑ Z p > 2 v u + 3 2 R u ) ≤ 2 N e − u .
We apply this bound with Z p = ( ξ p − 1 / s ) B p Z_p = (\xi_p - 1/s)B_p Z p = ( ξ p − 1/ s ) B p . For the fixed matrix H ′ H' H ′ and class k k k , these matrices are independent and Hermitian, with E Z p = 0 \mathbb{E}Z_p = 0 E Z p = 0 and ∥ Z p ∥ ≤ ∥ B p ∥ ≤ g \lVert Z_p\rVert\le\lVert B_p\rVert\le g ∥ Z p ∥ ≤ ∥ B p ∥ ≤ g . The variance estimate above allows us to use R = g R = g R = g and v ≤ ∥ H ′ ∥ 2 / s v \le\lVert H'\rVert^2/s v ≤ ∥ H ′ ∥ 2 / s . Taking u = ℓ u = \ell u = ℓ and using ∑ p Z p = H k − H ′ / s \sum_p Z_p = H_k - H'/s ∑ p Z p = H k − H ′ / s therefore yields
Pr ( ∥ H k − H ′ / s ∥ > ∥ H ′ ∥ 2 ℓ / s + 2 3 g ℓ ) ≤ 2 N e − ℓ . \Pr\left(\lVert H_k - H'/s\rVert> \lVert H'\rVert\sqrt{2\ell/s} + \frac{2}{3}g\ell\right) \le2Ne^{-\ell}. Pr ( ∥ H k − H ′ / s ∥ > ∥ H ′ ∥ 2 ℓ / s + 3 2 g ℓ ) ≤ 2 N e − ℓ .
The triangle inequality yields Eq. (13) .
The D D D potential blocks in a fixed row belong to distinct pairs, so its occupancy is at most a Binomial( D , 1 / s ) (D,1/s) ( D , 1/ s ) variable. The scalar Chernoff bound gives occupancy at most m 0 = D / s + 2 D ℓ / s + ℓ m_0 = D/s + \sqrt{2D\ell/s} + \ell m 0 = D / s + 2 D ℓ / s + ℓ except with probability e − ℓ e^{-\ell} e − ℓ . Hermiticity gives the same bound for columns. A union bound over s s s norm events and s D sD sD row events costs at most ( 2 N s + s D ) e − ℓ ≤ δ (2Ns+sD)e^{-\ell} \le\delta ( 2 N s + sD ) e − ℓ ≤ δ .
Finally, ℓ ≥ 1 \ell\ge1 ℓ ≥ 1 and the assumed bound on g g g imply ∥ H ′ ∥ / s , g ℓ ≤ ∥ H ′ ∥ ℓ / s \lVert H'\rVert/s,g\ell\le\lVert H'\rVert\sqrt{\ell/s} ∥ H ′ ∥ / s , g ℓ ≤ ∥ H ′ ∥ ℓ / s . Thus Eq. (13) is at most ( 1 + 2 + 2 / 3 ) ∥ H ′ ∥ ℓ / s < 4 ∥ H ′ ∥ ℓ / s (1+\sqrt{2}+2/3)\lVert H'\rVert\sqrt{\ell/s}<4\lVert H'\rVert\sqrt{\ell/s} ( 1 + 2 + 2/3 ) ∥ H ′ ∥ ℓ / s < 4 ∥ H ′ ∥ ℓ / s .
Sparse and rounded block encodings
We first construct a block encoding of a block-sparse Hermitian matrix K K K , then an exact block encoding of its rounded approximation K ~ \widetilde{K} K , including inverse and controlled queries.
Block encoding of K and controlled queries
Proof of Lemma 7. Construction. We trace the circuit in Figure 6 to verify that it is a block encoding of K K K with subnormalization factor m g mg m g . The data register B holds one of the D = N / b D=N/b D = N / b block labels and contains log 2 D = log 2 ( N / b ) \log_2 D=\log_2(N/b) log 2 D = log 2 ( N / b ) qubits. The data register T holds the position within a b × b b\times b b × b block and contains log 2 b \log_2 b log 2 b qubits. Together, B,T contain the n = log 2 N n=\log_2 N n = log 2 N data qubits. The ancillas required for post-selection are the log 2 m \log_2 m log 2 m -qubit slot register S and the flag qubit F. List each column’s nonzero blocks in m m m slots, adding padding where needed, and let N ( J ) \mathcal{N}(J) N ( J ) be the set of nonpadding slots in column J J J . For u ∈ N ( J ) u\in\mathcal{N}(J) u ∈ N ( J ) , let I = I ( J , u ) I=I(J,u) I = I ( J , u ) be the recorded row and set A J , u = K I J / g A_{J,u}=K_{IJ}/g A J , u = K I J / g ; for padding, set A J , u = 0 A_{J,u}=0 A J , u = 0 .
Since ∥ A J , u ∥ ≤ 1 \lVert A_{J,u}\rVert\le1 ∥ A J , u ∥ ≤ 1 , the Halmos dilation [43 ]
V J , u = ( A J , u I − A J , u A J , u † I − A J , u † A J , u − A J , u † ) V_{J,u} =
\begin{pmatrix}
A_{J,u} & \sqrt{I-A_{J,u}A_{J,u}^{\dagger}} \\
\sqrt{I-A_{J,u}^{\dagger}A_{J,u}} & -A_{J,u}^{\dagger}
\end{pmatrix} V J , u = A J , u I − A J , u † A J , u I − A J , u A J , u † − A J , u †
is a unitary on F,T, with the block rows and columns indexed by the flag. In particular,
V J , u ∣ 0 ⟩ F ∣ ψ ⟩ T = ∣ 0 ⟩ F A J , u ∣ ψ ⟩ T + ∣ 1 ⟩ F I − A J , u † A J , u ∣ ψ ⟩ T . V_{J,u}|0\rangle_F|\psi\rangle_T
=|0\rangle_F A_{J,u}|\psi\rangle_T
+|1\rangle_F\sqrt{I-A_{J,u}^{\dagger}A_{J,u}}|\psi\rangle_T. V J , u ∣0 ⟩ F ∣ ψ ⟩ T = ∣0 ⟩ F A J , u ∣ ψ ⟩ T + ∣1 ⟩ F I − A J , u † A J , u ∣ ψ ⟩ T .
Thus the encoded block applies K I J / g K_{IJ}/g K I J / g for a nonpadding slot. For padding, V J , u = X F ⊗ I T V_{J,u}=X_F\otimes I_T V J , u = X F ⊗ I T , so this component vanishes. These unitaries are constructed during classical preprocessing, and SELECT applies V J , u V_{J,u} V J , u controlled by ( J , u ) (J,u) ( J , u ) , leaving the address registers unchanged.
Let Π \Pi Π be the permutation defined in Lemma 7, which acts on the slot and block-label registers S, B according to the address map q q q . For a nonpadding address ( J , u ) (J,u) ( J , u ) recording row I I I , let u ′ u' u ′ be the slot of column I I I recording row J J J . Hermiticity gives K J I = K I J † K_{JI}=K_{IJ}^{\dagger} K J I = K I J † , so this partner exists, and
Π ∣ u ⟩ S ∣ J ⟩ B = ∣ u ′ ⟩ S ∣ I ⟩ B . \Pi|u\rangle_S|J\rangle_B=|u'\rangle_S|I\rangle_B. Π∣ u ⟩ S ∣ J ⟩ B = ∣ u ′ ⟩ S ∣ I ⟩ B .
The partner maps back to ( J , u ) (J,u) ( J , u ) ; padding and diagonal-block addresses are fixed. Hence q 2 = i d q^2=\mathrm{id} q 2 = id and Π \Pi Π is unitary. Updating the slot together with the block label makes this routing reversible. The registers F, T are unchanged. With F S = H ⊗ log 2 m F_S=H^{\otimes\log_2 m} F S = H ⊗ l o g 2 m acting on the slot register, set
U K = F S Π SELECT F S . (28) U_K=F_S\Pi\operatorname{SELECT}F_S. \tag*{(28)} U K = F S Π SELECT F S . (28)
To compute this encoded block, take an arbitrary input ∣ J ⟩ B ∣ ψ ⟩ T |J\rangle_B|\psi\rangle_T ∣ J ⟩ B ∣ ψ ⟩ T and initialize both ancillary registers to zero. The first Hadamard layer prepares
1 m ∑ u ∣ u ⟩ S ∣ 0 ⟩ F ∣ J ⟩ B ∣ ψ ⟩ T . \frac{1}{\sqrt{m}}\sum_u|u\rangle_S|0\rangle_F|J\rangle_B|\psi\rangle_T. m 1 u ∑ ∣ u ⟩ S ∣0 ⟩ F ∣ J ⟩ B ∣ ψ ⟩ T .
After SELECT, the component with flag F = 0 is
1 m ∑ u ∈ N ( J ) ∣ u ⟩ S ∣ 0 ⟩ F ∣ J ⟩ B K I J g ∣ ψ ⟩ T , \frac{1}{\sqrt{m}}\sum_{u\in\mathcal{N}(J)}|u\rangle_S|0\rangle_F|J\rangle_B\frac{K_{IJ}}{g}|\psi\rangle_T, m 1 u ∈ N ( J ) ∑ ∣ u ⟩ S ∣0 ⟩ F ∣ J ⟩ B g K I J ∣ ψ ⟩ T ,
where I = I ( J , u ) I=I(J,u) I = I ( J , u ) in each summand. The remaining component has flag F = 1 and cannot contribute to the zero-ancilla corner, since neither Π \Pi Π nor the final Hadamard layer changes the flag. Applying Π \Pi Π routes the displayed component to
1 m ∑ u ∈ N ( J ) ∣ u ′ ⟩ S ∣ 0 ⟩ F ∣ I ⟩ B K I J g ∣ ψ ⟩ T , \frac{1}{\sqrt{m}}\sum_{u\in\mathcal{N}(J)}|u'\rangle_S|0\rangle_F|I\rangle_B\frac{K_{IJ}}{g}|\psi\rangle_T, m 1 u ∈ N ( J ) ∑ ∣ u ′ ⟩ S ∣0 ⟩ F ∣ I ⟩ B g K I J ∣ ψ ⟩ T ,
where u ′ u' u ′ is the partner slot associated with ( J , u ) (J,u) ( J , u ) . For every output slot,
⟨ 0 log 2 m ∣ S F S ∣ u ′ ⟩ S = 1 m . \langle0^{\log_2 m}|_S F_S|u'\rangle_S=\frac{1}{\sqrt{m}}. ⟨ 0 l o g 2 m ∣ S F S ∣ u ′ ⟩ S = m 1 .
Consequently, after the final Hadamard layer, the component with both ancillary registers zero is
∣ 0 log 2 m ⟩ S ∣ 0 ⟩ F ⊗ 1 m g ∑ u ∈ N ( J ) ∣ I ⟩ B K I J ∣ ψ ⟩ T = ∣ 0 log 2 m ⟩ S ∣ 0 ⟩ F ⊗ K m g ( ∣ J ⟩ B ∣ ψ ⟩ T ) . \begin{aligned}
|0^{\log_2 m}\rangle_S|0\rangle_F\otimes\frac{1}{mg}\sum_{u\in\mathcal{N}(J)}|I\rangle_BK_{IJ}|\psi\rangle_T \\
&=|0^{\log_2 m}\rangle_S|0\rangle_F\otimes\frac{K}{mg}\left(|J\rangle_B|\psi\rangle_T\right).
\end{aligned} ∣ 0 l o g 2 m ⟩ S ∣0 ⟩ F ⊗ m g 1 u ∈ N ( J ) ∑ ∣ I ⟩ B K I J ∣ ψ ⟩ T = ∣ 0 l o g 2 m ⟩ S ∣0 ⟩ F ⊗ m g K ( ∣ J ⟩ B ∣ ψ ⟩ T ) .
Here we used that each nonzero block in column J J J occurs in exactly one slot and that K = ∑ I , J ∣ I ⟩ B ⟨ J ∣ B ⊗ K I J K=\sum_{I,J}|I\rangle_B\langle J|_B\otimes K_{IJ} K = ∑ I , J ∣ I ⟩ B ⟨ J ∣ B ⊗ K I J . The preparation and unpreparation each contribute a factor 1 / m 1/\sqrt{m} 1/ m . The final layer need not return the slot register to zero with certainty; the calculation extracts its zero-output component. By linearity,
( ⟨ 0 log 2 m ∣ S ⟨ 0 ∣ F ⊗ I B T ) × U K ( ∣ 0 log 2 m ⟩ S ∣ 0 ⟩ F ⊗ I B T ) = K m g . (29) \left(\langle0^{\log_2 m}|_S\langle0|_F \otimes I_{\mathrm{BT}}\right)
\times U_K\left(|0^{\log_2 m}\rangle_S|0\rangle_F \otimes I_{\mathrm{BT}}\right)=\frac{K}{mg}. \tag*{(29)} ( ⟨ 0 l o g 2 m ∣ S ⟨ 0 ∣ F ⊗ I BT ) × U K ( ∣ 0 l o g 2 m ⟩ S ∣0 ⟩ F ⊗ I BT ) = m g K . (29)
Here I B T I_{\mathrm{BT}} I BT is the identity on the data registers. This proves that U K U_K U K is an exact ( m g , log 2 m + 1 , 0 ) (mg,\log_2 m+1,0) ( m g , log 2 m + 1 , 0 ) -block encoding of K K K .
Compilation. We first bound the cost of SELECT and the address permutation Π \Pi Π , then explain how to implement the controlled and inverse queries required by QSVT. There are D m Dm D m addresses ( J , u ) (J,u) ( J , u ) , one for each block column and slot. For each address, the selected unitary V J , u V_{J,u} V J , u acts on the flag qubit F F F and the b b b -dimensional register T T T , so its dimension is 2 b 2b 2 b . Substituting M = D m M=Dm M = D m and d = 2 b d=2b d = 2 b into Lemma 2 gives O ( b D m Λ + b 2 Λ ) O(b\sqrt{Dm}\Lambda+b^2\Lambda) O ( b D m Λ + b 2 Λ ) T T T gates and ancilla qubits, where Λ = log 2 ( 2 b ) + log 2 ( 1 / η ) \Lambda=\log_2(2b)+\log_2(1/\eta) Λ = log 2 ( 2 b ) + log 2 ( 1/ η ) . The error η \eta η bounds the implementation of the entire SELECT oracle.
To implement Π \Pi Π , write x = ( J , u ) x=(J,u) x = ( J , u ) and let r = log 2 ( D m ) r=\log_2(Dm) r = log 2 ( D m ) be the number of address qubits. Introduce a second r r r -qubit register initialized to ∣ 0 r ⟩ |0^r\rangle ∣ 0 r ⟩ . Compute q ( x ) q(x) q ( x ) into this register, swap the two registers, and use a second Boolean lookup to erase the old address:
∣ x ⟩ ∣ 0 r ⟩ ⟼ ∣ x ⟩ ∣ q ( x ) ⟩ |x\rangle|0^r\rangle\longmapsto|x\rangle|q(x)\rangle ∣ x ⟩ ∣ 0 r ⟩ ⟼ ∣ x ⟩ ∣ q ( x )⟩
⟼ ∣ q ( x ) ⟩ ∣ x ⟩ \longmapsto|q(x)\rangle|x\rangle ⟼ ∣ q ( x )⟩ ∣ x ⟩
⟼ ∣ q ( x ) ⟩ ∣ x ⊕ q ( q ( x ) ) ⟩ = ∣ q ( x ) ⟩ ∣ 0 r ⟩ . \begin{aligned}
\longmapsto|q(x)\rangle|x\oplus q(q(x))\rangle\\
&=|q(x)\rangle|0^r\rangle.
\end{aligned} ⟼ ∣ q ( x )⟩ ∣ x ⊕ q ( q ( x ))⟩ = ∣ q ( x )⟩ ∣ 0 r ⟩ .
Here ⊕ \oplus ⊕ denotes bitwise XOR, and the last equality uses q 2 = id q^2=\operatorname{id} q 2 = id . This computation also applies to superpositions of addresses by linearity. Each lookup has D m Dm D m entries with r r r output bits, so the two lookups together cost O ( D m log ( 2 D m ) ) O(\sqrt{Dm}\log(2Dm)) O ( D m log ( 2 D m )) T T T gates and ancilla qubits by Lemma 1. They are exact and introduce no additional error. The Hadamard layers and the register swap use only Clifford gates. Adding the costs proves Eq. (14) .
For a controlled query, introduce a control qubit. We describe the circuit for each computational-basis state ∣ c ⟩ |c\rangle ∣ c ⟩ , where c ∈ { 0 , 1 } c\in\{0,1\} c ∈ { 0 , 1 } ; its action on superpositions follows by linearity. For every address ( J , u ) (J,u) ( J , u ) , select the identity I F T I_{FT} I F T when c = 0 c=0 c = 0 and V J , u V_{J,u} V J , u when c = 1 c=1 c = 1 . Denote this operation by SELECT c \operatorname{SELECT}_c SELECT c . Likewise, let Π c \Pi_c Π c leave ( J , u ) (J,u) ( J , u ) unchanged when c = 0 c=0 c = 0 and apply q q q when c = 1 c=1 c = 1 . Both operations leave the control state ∣ c ⟩ |c\rangle ∣ c ⟩ unchanged. Applying both Hadamard layers gives, when the control is in ∣ c ⟩ |c\rangle ∣ c ⟩ ,
F S Π c SELECT c F S = { F S 2 = I , c = 0 , U K , c = 1. F_S\Pi_c\operatorname{SELECT}_cF_S=
\begin{cases}
F_S^2=I, & c=0,\\
U_K, & c=1.
\end{cases} F S Π c SELECT c F S = { F S 2 = I , U K , c = 0 , c = 1.
Thus, when c = 0 c=0 c = 0 , the middle operations leave all registers unchanged, and the two unconditional applications of F S F_S F S then cancel. This cancellation holds for every state of the slot register.
Including c c c in the lookup address doubles the table sizes from D m Dm D m to 2 D m 2Dm 2 D m , which changes the cost by only a constant factor. The resulting compiled circuit approximates this controlled unitary to error η \eta η . Reversing the gate order and replacing each gate by its adjoint implements the inverse of either query with the same T T T -gate and ancilla costs. Unitary invariance of the norm also preserves the implementation error in Definition 1.
To use the block encoding U K U_K U K in QSVT, we distinguish its block-encoding ancillas from the additional ancilla qubits used to compile the circuit. The block-encoding ancillas are the slot register S S S and flag qubit F F F , totaling log 2 m + 1 \log_2m+1 log 2 m + 1 qubits. They are part of the input to U K U_K U K and may be nonzero, in superposition, or entangled with the data registers during QSVT. The implementation guarantee therefore applies to every input state on S , F , B , T S,F,B,T S , F , B , T . Let W W W denote the compiler workspace, a register of w w w additional ancilla qubits initialized to ∣ 0 w ⟩ W |0^w\rangle_W ∣ 0 w ⟩ W . For every normalized joint state ∣ Φ ⟩ S F B T |\Phi\rangle_{SFBT} ∣Φ ⟩ S F B T , the compiled circuit U ~ K \widetilde{U}_K U K satisfies
∥ U ~ K ( ∣ 0 w ⟩ W ∣ Φ ⟩ S F B T ) − ∣ 0 w ⟩ W U K ∣ Φ ⟩ S F B T ∥ ≤ η . \left\|\widetilde{U}_K\left(|0^w\rangle_W|\Phi\rangle_{SFBT}\right)-|0^w\rangle_WU_K|\Phi\rangle_{SFBT}\right\|\leq\eta. U K ( ∣ 0 w ⟩ W ∣Φ ⟩ S F B T ) − ∣ 0 w ⟩ W U K ∣Φ ⟩ S F B T ≤ η .
The controlled and inverse queries satisfy the corresponding guarantees.
QSVT reflections apply a phase flip conditioned on the log 2 m + 1 \log_2m+1 log 2 m + 1 qubits in S , F S,F S , F being zero, with O ( 1 ) O(1) O ( 1 ) additional control qubits. Computing this condition with Toffoli gates, applying the phase flip, and uncomputing the condition uses O ( 1 + log m ) O(1+\log m) O ( 1 + log m ) T T T gates and temporary ancilla qubits. Single-qubit rotations are counted separately, as in Lemma 3.
The ideal queries and reflections return their temporary ancillas to zero. Approximate queries may leave residual errors in these ancillas, which are included in the full error analysis above. The composition rule in Sec. II therefore permits these ancillas to be reused without resetting them, with the Q t Q_t Q t queries contributing at most Q t η Q_t\eta Q t η to the total error.
□ \square □
Proof of Corollary 1. Since s ℓ ≤ D s\ell\leq D s ℓ ≤ D and m ≤ 2 m 0 m\leq2m_0 m ≤ 2 m 0 ,
s m ≤ 2 ( D + 2 D s ℓ + s ℓ ) ≤ ( 4 + 2 2 ) D < 7 D . sm\leq2(D+\sqrt{2D}s\ell+s\ell)\leq(4+2\sqrt{2})D<7D. s m ≤ 2 ( D + 2 D s ℓ + s ℓ ) ≤ ( 4 + 2 2 ) D < 7 D .
There are at most s s s nonzero pieces, so ∑ k α k ≤ s m g ≤ 7 D g \sum_k\alpha_k\leq smg\leq7Dg ∑ k α k ≤ s m g ≤ 7 D g . Substitute D m ≤ 7 D 2 / s Dm\leq7D^2/s D m ≤ 7 D 2 / s and b D = N bD=N b D = N into Eq. (14) ; the assumed b 2 Λ ≥ log ( 2 D m ) b^2\Lambda\geq\log(2Dm) b 2 Λ ≥ log ( 2 D m ) absorbs the permutation term.
□ \square □
Exact rounded select oracles
Lemma 11 (Exact rounded SELECT oracles). Let M = 2 μ M=2^\mu M = 2 μ , d = 2 κ d=2^\kappa d = 2 κ , and B ≥ κ + 2 B\geq\kappa+2 B ≥ κ + 2 , and let W = ∑ x ∣ x ⟩ ⟨ x ∣ ⊗ V x W=\sum_x|x\rangle\langle x|\otimes V_x W = ∑ x ∣ x ⟩ ⟨ x ∣ ⊗ V x with V x ∈ U ( d ) V_x\in U(d) V x ∈ U ( d ) . There are unitaries V ~ x \widetilde{V}_x V x with ∥ V ~ x − V x ∥ ≤ 2 2 − B π d \|\widetilde{V}_x-V_x\|\leq2^{2-B}\pi d ∥ V x − V x ∥ ≤ 2 2 − B π d , a fixed ( B + 1 ) (B+1) ( B + 1 ) -qubit state ∣ Ψ ⟩ |\Psi\rangle ∣Ψ ⟩ , and a Clifford+$T
circuit C C C with O ( d M B + d 2 B ) O(d\sqrt{MB}+d^{2}B) O ( d M B + d 2 B ) T T T gates and ancillas such that
C ( ∣ x ⟩ ∣ ψ ⟩ ∣ 0 w ⟩ ∣ Ψ ⟩ ) = ∣ x ⟩ V ~ x ∣ ψ ⟩ ∣ 0 w ⟩ ∣ Ψ ⟩ (30) C(\lvert x\rangle\lvert\psi\rangle\lvert0^{w}\rangle\lvert\Psi\rangle)=\lvert x\rangle\widetilde{V}_{x}\lvert\psi\rangle\lvert0^{w}\rangle\lvert\Psi\rangle \tag*{(30)} C (∣ x ⟩ ∣ ψ ⟩ ∣ 0 w ⟩ ∣ Ψ ⟩) = ∣ x ⟩ V x ∣ ψ ⟩ ∣ 0 w ⟩ ∣ Ψ ⟩ (30)
for all x x x and ψ \psi ψ . The same holds, at the same cost, for the inverse, for the singly controlled version, and when some branches carry V ~ x † \widetilde{V}_{x}^{\dagger} V x † in place of V ~ x \widetilde{V}_{x} V x .
Proof of Lemma 11. For d ≥ 2 d \ge2 d ≥ 2 , decompose each V x V_{x} V x using the same sequence of d − 1 d-1 d − 1 uniformly controlled single-qubit gates [7 ] . For each setting of the control qubits, the selected single-qubit unitary has the form e i ω 0 R z ( ω 1 ) R y ( ω 2 ) R z ( ω 3 ) e^{i\omega_{0}}R_{z}(\omega_{1})R_{y}(\omega_{2})R_{z}(\omega_{3}) e i ω 0 R z ( ω 1 ) R y ( ω 2 ) R z ( ω 3 ) , with angles depending on x x x and the control values. Round each angle to the nearest multiple of 2 π 2 − B 2\pi2^{-B} 2 π 2 − B . This changes each uniformly controlled gate by at most 4 π 2 − B 4\pi2^{-B} 4 π 2 − B in operator norm. Summing the errors over the d − 1 d-1 d − 1 gates gives ∥ V ~ x − V x ∥ ≤ 4 π ( d − 1 ) 2 − B \lVert\widetilde{V}_{x}-V_{x}\rVert\le4\pi(d-1)2^{-B} ∥ V x − V x ∥ ≤ 4 π ( d − 1 ) 2 − B .
The fixed catalyst state
∣ Ψ ⟩ = 2 − ( B + 1 ) / 2 ∑ k = 0 2 B + 1 − 1 e − 2 π i k / 2 B + 1 ∣ k ⟩ \lvert\Psi\rangle=2^{-(B+1)/2}\sum_{k=0}^{2^{B+1}-1}e^{-2\pi i k/2^{B+1}}\lvert k\rangle ∣ Ψ ⟩ = 2 − ( B + 1 ) /2 k = 0 ∑ 2 B + 1 − 1 e − 2 π ik / 2 B + 1 ∣ k ⟩
implements each rounded angle exactly by phase kickback [44 ] . Adding an integer a a a modulo 2 B + 1 2^{B+1} 2 B + 1 to the catalyst register multiplies the state by e 2 π i a / 2 B + 1 e^{2\pi ia/2^{B+1}} e 2 π ia / 2 B + 1 and leaves the catalyst unchanged. For a rounded angle θ = 2 π q / 2 B \theta=2\pi q/2^{B} θ = 2 π q / 2 B , with q ∈ Z q\in\mathbb{Z} q ∈ Z , first add − q -q − q , then add 2 q 2q 2 q conditioned on the target qubit being ∣ 1 ⟩ \lvert1\rangle ∣ 1 ⟩ . The target states ∣ 0 ⟩ \lvert0\rangle ∣ 0 ⟩ and ∣ 1 ⟩ \lvert1\rangle ∣ 1 ⟩ acquire phases e − i θ / 2 e^{-i\theta/2} e − i θ /2 and e i θ / 2 e^{i\theta/2} e i θ /2 , respectively, which implements R z ( θ ) R_{z}(\theta) R z ( θ ) . Clifford conjugation gives R y ( θ ) = S H R z ( θ ) H S † R_{y}(\theta)=SHR_{z}(\theta)HS^{\dagger} R y ( θ ) = S H R z ( θ ) H S † , where S = diag ( 1 , i ) S=\operatorname{diag}(1,i) S = diag ( 1 , i ) . Adding 2 q 2q 2 q without the target control implements e i θ e^{i\theta} e i θ . For d = 1 d=1 d = 1 , only this scalar phase is needed; rounding it gives error at most π 2 − B \pi2^{-B} π 2 − B and cost O ( M B + B ) O(\sqrt{MB}+B) O ( M B + B ) .
For each address x x x , the angle table contains O ( d ) O(d) O ( d ) angles for each of O ( d ) O(d) O ( d ) uniformly controlled phase and rotation gates, hence O ( d 2 B ) O(d^{2}B) O ( d 2 B ) bits. Lemma 1 loads and erases this table at cost O ( d M B ) O(d\sqrt{MB}) O ( d M B ) , following the lookup scheme in [7 Lemma 4.1] . For each uniformly controlled gate, reversibly selecting the appropriate angle from its table costs O ( d B ) O(dB) O ( d B ) Toffoli gates, and the modular additions cost O ( B ) O(B) O ( B ) [45 ] . Uncomputing the selected angle has the same selection cost. Summing over the O ( d ) O(d) O ( d ) gates gives total cost O ( d M B + d 2 B ) O(d\sqrt{MB}+d^{2}B) O ( d M B + d 2 B ) .
Reversing the circuit and adjointing its gates implements the inverse. For a controlled query, include the control bit in the lookup address and select either the original angle table or an all-zero table, which implements the identity. This doubles the number of addresses and preserves the cost bound. For adjoint pairs, let θ x \theta_{x} θ x denote the ordered list of rounded angles in the elementary phase and rotation gates implementing V ~ x \widetilde{V}_{x} V x . Append the same elementary gate sequence in reverse order. Using the concatenated angle lists ( θ x , 0 ) (\theta_{x},0) ( θ x , 0 ) and ( 0 , − θ x r e v ) (0,-\theta_{x}^{\mathrm{rev}}) ( 0 , − θ x rev ) for the two branches implements V ~ x \widetilde{V}_{x} V x and V ~ x † \widetilde{V}_{x}^{\dagger} V x † , respectively. Here r e v \mathrm{rev} rev reverses the angle list, and 0 0 0 is a zero list of the same length. The zero angles make one half the identity; reversing the gate order and negating the angles in the other half gives the adjoint. This doubles the sequence length and preserves the asymptotic cost.
Block encodings of rounded Hermitian matrices
Proof of Lemma 9. If K = 0 K=0 K = 0 , set K ~ = 0 \widetilde{K}=0 K = 0 . Applying a Pauli X X X gate to the flag qubit F F F gives an exact block encoding of the zero matrix, since ⟨ 0 ∣ X ∣ 0 ⟩ = 0 \langle0\lvert X\lvert0\rangle=0 ⟨ 0 ∣ X ∣ 0 ⟩ = 0 . For K ≠ 0 K\ne0 K = 0 , modify the lookup tables in Lemma 7 as follows. For each off-diagonal pair, round the dilation of K I J / g K_{IJ}/g K I J / g using Lemma 11 and place its exact adjoint at the adjoint block’s address. Hence K ~ J I = K ~ I J † \widetilde{K}_{JI}=\widetilde{K}_{IJ}^{\dagger} K J I = K I J † .
For a nonzero diagonal block, use two fixed slots carrying a rounded dilation V ~ \widetilde{V} V of K J J / ( 2 g ) K_{JJ}/(2g) K J J / ( 2 g ) and its exact adjoint. Let A ~ \widetilde{A} A denote the encoded b × b b\times b b × b block of V ~ \widetilde{V} V . The two slots then contribute
K ~ J J = g ( A ~ + A ~ † ) , \widetilde{K}_{JJ}=g(\widetilde{A}+\widetilde{A}^{\dagger}), K J J = g ( A + A † ) ,
which is Hermitian. Each block column contains at most one diagonal block, so replacing its single slot by two slots uses at most m 0 + 1 ≤ m m_{0}+1\le m m 0 + 1 ≤ m slots in that column. At every unused slot, select X F ⊗ I T X_{F}\otimes I_{T} X F ⊗ I T and let Π \Pi Π fix its address. This operation maps the flag from ∣ 0 ⟩ \lvert0\rangle ∣ 0 ⟩ to ∣ 1 ⟩ \lvert1\rangle ∣ 1 ⟩ , so the slot contributes zero diagonal matrix. To implement these branches exactly, use zero angle words at unused addresses in the rounded multiplexer, making it act as the identity there. Compute a bit indicating whether the address is unused, apply X F X_{F} X F conditioned on this bit, and uncompute the bit. By Lemma 1, this additional lookup costs O ( D m ) O(\sqrt{Dm}) O ( D m ) T T T gates and ancilla qubits.
By Lemma 11 with d = 2 b d=2b d = 2 b , rounding changes each dilation by at most 8 π g 2 − B 8\pi g2^{-B} 8 π g 2 − B in operator norm. Taking its block with flag F = 0 F=0 F = 0 on input and output cannot increase this error. After multiplying by g g g , each off-diagonal block therefore has error at most 8 π g 2 − B 8\pi g2^{-B} 8 π g 2 − B . For a diagonal block, write A = K J J / ( 2 g ) = A ~ † A=K_{JJ}/(2g)=\widetilde{A}^{\dagger} A = K J J / ( 2 g ) = A † . Its error satisfies
∥ K ~ J J − K J J ∥ = g ∥ ( A ~ − A ) + ( A ~ − A ) † ∥ ≤ 2 g ∥ A ~ − A ∥ ≤ 16 π g 2 − B . \lVert\widetilde{K}_{JJ}-K_{JJ}\rVert
=g\lVert(\widetilde{A}-A)+(\widetilde{A}-A)^{\dagger}\rVert
\le2g\lVert\widetilde{A}-A\rVert
\le16\pi g2^{-B}. ∥ K J J − K J J ∥ = g ∥( A − A ) + ( A − A ) † ∥ ≤ 2 g ∥ A − A ∥ ≤ 16 π g 2 − B .
Let E = K ~ − K E=\widetilde{K}-K E = K − K . The unused slots contribute exactly zero, so E I J = 0 E_{IJ}=0 E I J = 0 whenever K I J = 0 K_{IJ}=0 K I J = 0 . Since E E E is Hermitian, it has at most m 0 ≤ m m_{0}\le m m 0 ≤ m nonzero blocks in each block row as well as in each block column. For a Hermitian block matrix, the operator norm is bounded by the largest sum of block norms in a row. Hence
∥ E ∥ ≤ max I ∑ J ∥ E I J ∥ ≤ 16 π m g 2 − B , \lVert E\rVert\le\max_{I}\sum_{J}\lVert E_{IJ}\rVert\le16\pi mg2^{-B}, ∥ E ∥ ≤ I max J ∑ ∥ E I J ∥ ≤ 16 π m g 2 − B ,
which proves Eq. (15) . To see the first inequality, write a vector x x x in blocks x I x_{I} x I and bound ∣ ⟨ x , E x ⟩ ∣ \lvert\langle x,Ex\rangle\rvert ∣⟨ x , E x ⟩∣ by ∑ I , J ∥ E I J ∥ ∥ x I ∥ ∥ x J ∥ \sum_{I,J}\lVert E_{IJ}\rVert\lVert x_{I}\rVert\lVert x_{J}\rVert ∑ I , J ∥ E I J ∥ ∥ x I ∥ ∥ x J ∥ . Using 2 ∥ x I ∥ ∥ x J ∥ ≤ ∥ x I ∥ 2 + ∥ x J ∥ 2 2\lVert x_{I}\rVert\lVert x_{J}\rVert\le\lVert x_{I}\rVert^{2}+\lVert x_{J}\rVert^{2} 2 ∥ x I ∥ ∥ x J ∥ ≤ ∥ x I ∥ 2 + ∥ x J ∥ 2 and ∥ E I J ∥ = ∥ E J I ∥ \lVert E_{IJ}\rVert=\lVert E_{JI}\rVert ∥ E I J ∥ = ∥ E J I ∥ gives the stated bound.
Use these slot unitaries in the circuit U ~ K = F S Π S E L E C T F S \widetilde{U}_{K}=F_{S}\Pi_{\mathrm{SELECT}}F_{S} U K = F S Π SELECT F S , where S E L E C T \mathrm{SELECT} SELECT denotes the resulting selection oracle. Given the catalyst ∣ Ψ ⟩ |\Psi\rangle ∣Ψ ⟩ , Lemma 11 implements the rounded multiplexer exactly at cost O ( b D m B + b 2 B ) O(b\sqrt{DmB}+b^{2}B) O ( b D m B + b 2 B ) . The additional lookup for unused slots is absorbed in this cost. The Hadamard layers and the address permutation are exact; the latter costs O ( D m log ( 2 D m ) ) O(\sqrt{Dm}\log(2Dm)) O ( D m log ( 2 D m )) as shown in the proof of Lemma 7. Together these circuits implement the block encoding U ~ K ~ \widetilde{U}_{\widetilde{K}} U K of K ~ \widetilde{K} K exactly with the T T T -gate and ancilla costs in Eq. (14) at Λ = B \Lambda=B Λ = B . They return the catalyst unchanged and all additional ancilla qubits to ∣ 0 ⟩ |0\rangle ∣0 ⟩ .
Reversing the circuit and replacing each gate by its adjoint implements U ~ K ~ † \widetilde{U}_{\widetilde{K}}^{\dagger} U K † . For a singly controlled query, condition both S E L E C T \mathrm{SELECT} SELECT and Π \Pi Π on the control qubit, leaving the two Hadamard layers unconditional. When the control is ∣ 0 ⟩ |0\rangle ∣0 ⟩ , the middle operations are the identity and F S 2 = I F_{S}^{2}=I F S 2 = I ; when it is ∣ 1 ⟩ |1\rangle ∣1 ⟩ , the circuit applies U ~ K ~ \widetilde{U}_{\widetilde{K}} U K . Including the control bit in the lookup addresses at most doubles the table sizes, preserving the asymptotic cost. Reversing this circuit gives the singly controlled inverse.
Unitary synthesis using qDRIFT and QSVT
We prove the shared selection lemma, then establish the parameter and resource bounds for the compiler in Algorithm 3, summarized in Algorithm 1.
Proof of Lemma 8. We first bound the weighted simulation time of the sampled product. For each segment j j j , Eq. (5) gives
E [ α K j τ j ] = ∑ k = 1 r ∥ A k ∥ λ α k λ N q ∥ A k ∥ = 1 N q ∑ k = 1 r α k . \mathbb{E}[\alpha_{K_j}\tau_j]=\sum_{k=1}^{r}\frac{\lVert A_k\rVert}{\lambda}\frac{\alpha_k\lambda}{N_q\lVert A_k\rVert}
=\frac{1}{N_q}\sum_{k=1}^{r}\alpha_k. E [ α K j τ j ] = k = 1 ∑ r λ ∥ A k ∥ N q ∥ A k ∥ α k λ = N q 1 k = 1 ∑ r α k .
Summing over the N q N_q N q segments yields
E T = ∑ j = 1 N q E [ α K j τ j ] = ∑ k = 1 r α k . (31) \mathbb{E}\mathcal{T}=\sum_{j=1}^{N_q}\mathbb{E}[\alpha_{K_j}\tau_j]=\sum_{k=1}^{r}\alpha_k. \tag*{(31)} E T = j = 1 ∑ N q E [ α K j τ j ] = k = 1 ∑ r α k . (31)
Since T ≥ 0 \mathcal{T}\ge0 T ≥ 0 , Markov’s inequality gives
Pr ( T > 2 p ∑ k α k ) ≤ E T ( 2 / p ) ∑ k α k = p 2 . \Pr\left(\mathcal{T}>\frac{2}{p}\sum_k\alpha_k\right)\le\frac{\mathbb{E}\mathcal{T}}{(2/p)\sum_k\alpha_k}=\frac{p}{2}. Pr ( T > p 2 k ∑ α k ) ≤ ( 2/ p ) ∑ k α k E T = 2 p .
The choice of N q N_q N q in Lemma 4 also ensures
Pr ( ∥ V − e i A ∥ > ε ) ≤ p 2 . \Pr\left(\lVert V-e^{iA}\rVert>\varepsilon\right)\le\frac{p}{2}. Pr ( ∥ V − e i A ∥ > ε ) ≤ 2 p .
By the union bound, the probability that either requirement fails is at most p p p . Thus the same sampled product satisfies both the accuracy bound and the bound on T \mathcal{T} T with probability at least 1 − p 1-p 1 − p .
Now fix any sample satisfying both bounds. Apply Lemma 3 to segment e i τ j A K j e^{i\tau_jA_{K_j}} e i τ j A K j using queries to U A K j U_{A_{K_j}} U A K j at simulation error ξ / N q \xi/N_q ξ / N q . This error lies in ( 0 , 1 / 2 ) (0,1/2) ( 0 , 1/2 ) , as required by the lemma. Use a common clean ancilla register for all segments, adding unused ancillas where necessary. The composition rule in Sec. II bounds the implementation error of the product by ∑ j = 1 N q ξ / N q = ξ \sum_{j=1}^{N_q}\xi/N_q=\xi ∑ j = 1 N q ξ / N q = ξ , including the error on the ancillas.
For segment j j j , the query count is
Q j = O ( α K j τ j + log N q ξ ) . Q_j=O\left(\alpha_{K_j}\tau_j+\log\frac{N_q}{\xi}\right). Q j = O ( α K j τ j + log ξ N q ) .
Summing over all segments and using the accepted bound on T \mathcal{T} T gives
Q = ∑ j = 1 N q Q j = O ( T + N q log N q ξ ) = O ( 1 p ∑ k α k + N q log N q ξ ) . \begin{aligned}
Q=\sum_{j=1}^{N_q}Q_j=O\left(\mathcal{T}+N_q\log\frac{N_q}{\xi}\right) \\
&=O\left(\frac{1}{p}\sum_k\alpha_k+N_q\log\frac{N_q}{\xi}\right).
\end{aligned} Q = j = 1 ∑ N q Q j = O ( T + N q log ξ N q ) = O ( p 1 k ∑ α k + N q log ξ N q ) .
These counts include queries to the block encodings U A k U_{A_k} U A k of A k A_k A k , their inverses, and their singly controlled versions, as in Lemma 3.
Proof of Theorem 3. Parameters. Set L = n + log 2 ( 1 / ϵ ) L=n+\log_2(1/\epsilon) L = n + log 2 ( 1/ ϵ ) . Choose b b b , a power of 2, satisfying
1 2 N 3 / 7 ϵ − 4 / 7 ≤ b ≤ 2 N 3 / 7 ϵ − 4 / 7 . \frac{1}{2}N^{3/7}\epsilon^{-4/7}\le b\le2N^{3/7}\epsilon^{-4/7}. 2 1 N 3/7 ϵ − 4/7 ≤ b ≤ 2 N 3/7 ϵ − 4/7 .
Put D = N / b D=N/b D = N / b and set
s = ⌈ c s D ϵ 2 n 2 L ⌉ , ℓ = log ( 64 N s ) , (32) s=\left\lceil\frac{c_s\sqrt{D}\epsilon^2}{n^2L}\right\rceil,\qquad\ell=\log(64N_s), \tag*{(32)} s = ⌈ n 2 L c s D ϵ 2 ⌉ , ℓ = log ( 64 N s ) , (32)
with a sufficiently small absolute constant c s > 0 c_s>0 c s > 0 . For sufficiently large C 0 C_0 C 0 and N N N , the stated range of ϵ \epsilon ϵ ensures s ≥ 1 s\ge1 s ≥ 1 and s ℓ log 2 ( 8 N ) ≤ D / C s\ell\log^2(8N)\le D/C s ℓ log 2 ( 8 N ) ≤ D / C .
Write U = e i H U=e^{iH} U = e i H , choosing the Hermitian logarithm H H H with eigenvalues in ( − π , π ] (-\pi,\pi] ( − π , π ] ; this is our convention for the principal Hermitian logarithm. Set φ = tr H / N \varphi=\operatorname{tr}H/N φ = tr H / N and H 0 = H − φ I H_0=H-\varphi I H 0 = H − φ I . Since ∥ H ∥ ≤ π \lVert H\rVert\le\pi ∥ H ∥ ≤ π and ∣ φ ∣ ≤ π |\varphi|\le\pi ∣ φ ∣ ≤ π ,
∥ H 0 ∥ ≤ ∥ H ∥ + ∣ φ ∣ ≤ 2 π . \lVert H_0\rVert\le\lVert H\rVert+|\varphi|\le2\pi. ∥ H 0 ∥ ≤ ∥ H ∥ + ∣ φ ∣ ≤ 2 π .
If H 0 = 0 H_0=0 H 0 = 0 , then U = e i φ I U=e^{i\varphi}I U = e i φ I , so only the scalar-phase circuit is needed. Otherwise, for an accepted choice of P P P , Lemma 5 with d = 1 / 8 d=1/8 d = 1/8 bounds the operator norm of every b × b b\times b b × b block of H ′ = P H 0 P T H'=PH_0P^{\mathsf T} H ′ = P H 0 P T by
∥ H I J ′ ∥ ≤ g : = C A ∥ H 0 ∥ log ( 8 N ) D , I , J ∈ [ D ] . \lVert H'_{IJ}\rVert\le g:=\frac{C_A\lVert H_0\rVert\log(8N)}{\sqrt{D}},\qquad I,J\in[D]. ∥ H I J ′ ∥ ≤ g := D C A ∥ H 0 ∥ log ( 8 N ) , I , J ∈ [ D ] .
The parameter condition s ℓ log 2 ( 8 N ) ≤ D / C s\ell\log^2(8N)\le D/C s ℓ log 2 ( 8 N ) ≤ D / C , with C ≥ C A 2 C\ge C_A^2 C ≥ C A 2 , and the identity ∥ H ′ ∥ = ∥ H 0 ∥ \lVert H'\rVert=\lVert H_0\rVert ∥ H ′ ∥ = ∥ H 0 ∥ imply g ≤ ∥ H ′ ∥ / s ℓ g\le\lVert H'\rVert/\sqrt{s\ell} g ≤ ∥ H ′ ∥ / s ℓ ,
Algorithm 3 Detailed classical preprocessing and circuit assembly for Theorem 3.
Input: U ∈ U ( N ) U \in U(N) U ∈ U ( N ) and ϵ \epsilon ϵ in the range of Theorem 3.
Output: A fixed Clifford+T T T circuit implementing U U U to error ϵ \epsilon ϵ .
Setup: From N N N and ϵ \epsilon ϵ , choose the block size b b b , set D = N / b D=N/b D = N / b , and choose the number s s s of partition classes and the split parameter ℓ \ell ℓ as in Appendix § 1.1.4 .
Stage I: Preprocessing.
Compute the principal Hermitian logarithm of U U U and separate its scalar part φ I \varphi I φ I and traceless part H 0 H_0 H 0 .
if H 0 = 0 H_0=0 H 0 = 0 then
return a phase circuit implementing e i φ I e^{i\varphi}I e i φ I with error ϵ / 8 \epsilon/8 ϵ /8 .
end if
repeat \hfill ▹ \triangleright ▹ Success per trial ≥ 3 / 4 \ge3/4 ≥ 3/4 .
Draw a fresh similarity P P P and form H ′ = P H 0 P T H'=PH_0P^{T} H ′ = P H 0 P T .
Sample a fresh partition of H ′ H' H ′ into s s s Hermitian pieces H k H_k H k . \hfill ▹ \triangleright ▹ Preserve Hermitian block pairs.
until all block-norm, piece-norm, and sparsity bounds hold at failure parameter 1 / 8 1/8 1/8 (Lemmas 5 and 6).
Discard zero pieces and set λ = ∑ k ∥ H k ∥ \lambda=\sum_k\lVert H_k\rVert λ = ∑ k ∥ H k ∥ .
if λ < ϵ / 4 \lambda<\epsilon/4 λ < ϵ /4 then \hfill ▹ \triangleright ▹ ∥ e i H ′ − I ∥ ≤ λ \lVert e^{iH'}-I\rVert\le\lambda ∥ e i H ′ − I ∥ ≤ λ .
return a phase circuit implementing e i φ I e^{i\varphi}I e i φ I with error ϵ / 8 \epsilon/8 ϵ /8 .
end if
Build a block encoding U H k U_{H_k} U H k of each remaining piece H k H_k H k , with subnormalization factor α k \alpha_k α k (Corollary 1).
Stage II: qDRIFT certification.
Use Lemma 8 with ϵ = ϵ / 4 \epsilon=\epsilon/4 ϵ = ϵ /4 , p = 1 / 2 p=1/2 p = 1/2 , and N q N_q N q from Eq. (35) .
repeat \hfill ▹ \triangleright ▹ Success per trial ≥ 1 / 2 \ge1/2 ≥ 1/2 .
Sample fresh piece indices K j K_j K j and durations τ j \tau_j τ j ; form their ideal product V V V .
until the accuracy and weighted-time tests pass (Lemma 8).
Stage III: Circuit assembly.
Implement the sampled evolutions with QSVT.
Compile the queries to U H k U_{H_k} U H k , their inverses and singly controlled versions, and the single-qubit rotations to the tolerances specified in the error analysis of Appendix § 1.1.4 .
Assemble the following circuit, using exact P P P , P T P^T P T and reusable clean workspace:
e i φ P T ( ∏ j = N q 1 S τ j ( U H K j ) ) P . (33) e^{i\varphi}P^T\left(\prod_{j=N_q}^{1}S_{\tau_j}(U_{H_{K_j}})\right)P . \tag*{(33)} e i φ P T j = N q ∏ 1 S τ j ( U H K j ) P . (33)
return the compiled circuit.
as required by Lemma 6. Applying Lemma 6 with δ = 1 / 8 \delta=1/8 δ = 1/8 and then Corollary 1 gives
λ ≤ 8 π s ℓ , ∑ k α k ≤ 7 D g = O ( D n ) . (34) \lambda\le8\pi\sqrt{s\ell},\qquad\sum_k\alpha_k\le7Dg=O(\sqrt{D}\,n). \tag*{(34)} λ ≤ 8 π s ℓ , k ∑ α k ≤ 7 D g = O ( D n ) . (34)
Here s s s includes classes whose pieces were discarded as zero. The similarity and split pass jointly with probability at least 3 / 4 3/4 3/4 , giving a constant expected trial count. If λ < ϵ / 4 \lambda<\epsilon/4 λ < ϵ /4 , the phase alone suffices since ∥ e i H ′ − I ∥ ≤ λ \lVert e^{iH'}-I\rVert\le\lambda ∥ e i H ′ − I ∥ ≤ λ .
Selection and queries. For λ ≥ ϵ / 4 \lambda\ge\epsilon/4 λ ≥ ϵ /4 , choose
N q = ⌈ 704 λ 2 ϵ 2 log ( 8 N ) + 8 λ 2 ϵ ⌉ . (35) N_q=\left\lceil\frac{704\lambda^2}{\epsilon^2}\log(8N)+\frac{8\lambda^2}{\epsilon}\right\rceil. \tag*{(35)} N q = ⌈ ϵ 2 704 λ 2 log ( 8 N ) + ϵ 8 λ 2 ⌉ . (35)
Apply Lemma 8 with A k = H k A_k=H_k A k = H k , ϵ = ξ = ϵ / 4 \epsilon=\xi=\epsilon/4 ϵ = ξ = ϵ /4 , and p = 1 / 2 p=1/2 p = 1/2 . Each trial passes the accuracy and weighted-time tests with probability at least 1 / 2 1/2 1/2 , and the accepted product has QSVT implementation error ϵ / 4 \epsilon/4 ϵ /4 . Now N q = O ( s n 2 / ϵ 2 ) N_q=O(sn^2/\epsilon^2) N q = O ( s n 2 / ϵ 2 ) and log ( N q / ϵ ) = O ( L ) \log(N_q/\epsilon)=O(L) log ( N q / ϵ ) = O ( L ) . Substituting Eq. (32) gives
Q = O ( D n + s n 2 L / ϵ 2 ) = O ( D n ) . (36) Q=O(\sqrt{D}\,n+sn^2L/\epsilon^2)=O(\sqrt{D}\,n). \tag*{(36)} Q = O ( D n + s n 2 L / ϵ 2 ) = O ( D n ) . (36)
Implement each query to U H k U_{H_k} U H k , its inverse, or a singly controlled version with error at most η = ϵ / ( 8 Q ) \eta=\epsilon/(8Q) η = ϵ / ( 8 Q ) , so Λ = O ( L ) \Lambda=O(L) Λ = O ( L ) . Since b = Ω ( N 3 / 7 ) b=\Omega(N^{3/7}) b = Ω ( N 3/7 ) and m ≤ 7 D m\le7D m ≤ 7 D , the domination condition in Corollary 1 holds, giving per-query cost Q q u e r y = O ( N L / s + b 2 L ) Q_{\mathrm{query}}=O(N\sqrt{L/s}+b^2L) Q query = O ( N L / s + b 2 L ) T T T gates and reusable clean ancillas.
Error and resources. The basis changes and reflections are exact. Allocate ϵ / 8 \epsilon/8 ϵ /8 each to the combined errors from implementing the queries to U H k U_{H_k} U H k , all O ( Q ) O(Q) O ( Q ) rotations, and the scalar phase, synthesizing the rotations and the phase by the single-qubit synthesis bound in Eq. (3) . Together with the qDRIFT and QSVT errors, the composition rule gives
ϵ / 4 + ϵ / 4 + ϵ / 8 + ϵ / 8 + ϵ / 8 = 7 ϵ / 8. \epsilon/4+\epsilon/4+\epsilon/8+\epsilon/8+\epsilon/8=7\epsilon/8. ϵ /4 + ϵ /4 + ϵ /8 + ϵ /8 + ϵ /8 = 7 ϵ /8.
The O ( N ) O(\sqrt{N}) O ( N ) basis-change cost, O ( n Q ) O(nQ) O ( n Q ) reflection cost, O ( Q L ) O(QL) O ( Q L ) rotation cost, and O ( L ) O(L) O ( L ) phase cost are all lower order. Thus
T = O ( n 2 L ( N D 1 / 4 ϵ + D b 2 ) ) . (37) T=O\left(n^2L\left(\frac{ND^{1/4}}{\epsilon}+\sqrt{D}\,b^2\right)\right). \tag*{(37)} T = O ( n 2 L ( ϵ N D 1/4 + D b 2 ) ) . (37)
Substituting b = Θ ( N 3 / 7 ϵ − 4 / 7 ) b=\Theta(N^{3/7}\epsilon^{-4/7}) b = Θ ( N 3/7 ϵ − 4/7 ) and D = N / b D=N/b D = N / b makes both terms Θ ( N 8 / 7 ϵ − 6 / 7 ) \Theta(N^{8/7}\epsilon^{-6/7}) Θ ( N 8/7 ϵ − 6/7 ) . Sequential queries reuse workspace, so the ancilla count is O ( Q q u e r y ) = O ( n L N 6 / 7 ϵ − 8 / 7 ) O(Q_{\mathrm{query}})=O(nLN^{6/7}\epsilon^{-8/7}) O ( Q query ) = O ( n L N 6/7 ϵ − 8/7 ) , including the smaller logical registers and sign-oracle workspace. □ \square □
Remark 1 (Deterministic product formulas). Replacing qDRIFT by second-order Strang splitting uses a deterministic product formula, but gives the weaker exponent 7 / 6 7/6 7/6 . The similarity and partition still involve classical randomness; both compilers output fixed circuits. The commutator bounds of [46 ] bound the error after r r r steps by O ~ ( s / r 2 ) \widetilde{O}(\sqrt{s}/r^2) O ( s / r 2 ) . This uses ∥ H j ∥ = O ~ ( s − 1 / 2 ) \lVert H_j\rVert=\widetilde{O}(s^{-1/2}) ∥ H j ∥ = O ( s − 1/2 ) from Lemma 6, and ∥ ∑ k > j H k ∥ = O ~ ( 1 ) \lVert\sum_{k>j}H_k\rVert=\widetilde{O}(1) ∥ ∑ k > j H k ∥ = O ( 1 ) from the same Bernstein argument applied to unions of classes. The resulting product formula is fixed once the classical similarity and partition are chosen. At constant accuracy, the error bound requires r = O ~ ( s 1 / 4 ) r=\widetilde{O}(s^{1/4}) r = O ( s 1/4 ) , so its 2 r s 2rs 2 r s segments number O ~ ( s 5 / 4 ) \widetilde{O}(s^{5/4}) O ( s 5/4 ) .
Keeping this number of order D \sqrt{D} D , as for qDRIFT, gives s ≈ D 2 / 5 s\approx D^{2/5} s ≈ D 2/5 . Balancing the resulting lookup and processing costs gives b ≈ N 4 / 9 b\approx N^{4/9} b ≈ N 4/9 and T = O ~ ( N 7 / 6 ) T=\widetilde{O}(N^{7/6}) T = O ( N 7/6 ) . The smaller qDRIFT exponent follows because its segment count depends on the pieces only through the bound λ 2 = O ~ ( s ) \lambda^2=\widetilde{O}(s) λ 2 = O ( s ) .
Proof of unitary synthesis using residual refinement
We prove Theorem 4 for Algorithm 4, summarized in Algorithm 2. Appendix § 1.1.5 1 specifies the parameters, residual data, and acceptance tests. Appendix § 1.1.5 2 proves residual contraction, termination, and the final error bound. These estimates give the T T T -count and ancilla bounds in Appendix § 1.1.5 3, followed by a comparison of precision dependence. Finally, Appendix § 1.1.5 4 gives a terminating classical compiler for computably specified targets with the quantum resource bounds of either Theorem 3 or Theorem 4.
Parameters and residual data
Constants C , c C,c C , c are absolute, and n ≥ n 0 n\ge n_0 n ≥ n 0 is sufficiently large.
For the pieces of Lemma 6, s m ≤ s ( 2 m 0 + 2 ) ≤ 9 D s_m\le s(2m_0+2)\le9D s m ≤ s ( 2 m 0 + 2 ) ≤ 9 D when s ℓ ≤ D s\ell\le D s ℓ ≤ D . So the subnormalization factors satisfy ∑ k α k ≤ 9 D g \sum_k\alpha_k\le9Dg ∑ k α k ≤ 9 D g , and each query to the block encoding of a rounded piece costs O ( N B / s + b 2 B ) O(N\sqrt{B/s}+b^2B) O ( N B / s + b 2 B ) , as in Corollary 1, whenever b 2 B ≥ log ( 2 D m ) b^2B\ge\log(2Dm) b 2 B ≥ log ( 2 D m ) . The word length below satisfies this condition.
Parameters. Use the word length
B = 3 n + ⌈ log 2 ( 9216 π 2 C A log ( 8 N ) ) ⌉ . (38) B=3n+\left\lceil\log_2\left(9216\pi^2 C_A\log(8N)\right)\right\rceil. \tag*{(38)} B = 3 n + ⌈ log 2 ( 9216 π 2 C A log ( 8 N ) ) ⌉ . (38)
The block encodings of the rounded pieces and full rounded residual generators use Lemma 9, with words relative to the current block scale, and share one state ∣ Ψ ⟩ \lvert\Psi\rangle ∣ Ψ ⟩ . Since b D = N b ≤ N b\sqrt{D}=\sqrt{Nb}\le N b D = N b ≤ N , this choice gives 9216 π 2 C A b D log ( 8 N ) 2 − B ≤ N − 2 9216\pi^2C_A b\sqrt{D}\log(8N)2^{-B}\le N^{-2} 9216 π 2 C A b D log ( 8 N ) 2 − B ≤ N − 2 with B = O ( n ) B=O(n) B = O ( n ) . We use this inequality in both stages.
Let L 0 = c 0 N 1 / 4 n − 7 / 8 L_0=c_0N^{1/4}n^{-7/8} L 0 = c 0 N 1/4 n − 7/8 , with c 0 c_0 c 0 small enough for the level stage to be nonempty when L ≤ L 0 L\le L_0 L ≤ L 0 . Choose the block size once: if L ≤ L 0 L\le L_0 L ≤ L 0 , take b b b to be a power of two in the range [ 1 2 , 2 ] ⋅ N 3 / 7 L 2 / 7 [\frac{1}{2},2]\cdot N^{3/7}L^{2/7} [ 2 1 , 2 ] ⋅ N 3/7 L 2/7 and put D = N / b D=N/b D = N / b . Run the qDRIFT levels, then correct the remaining residual by block-encoding and simulating its full rounded generator. If L > L 0 L>L_0 L > L 0 , take D D D to be the least power of two at least max { N , 2 n L 2 } \max\{N,2^nL^2\} max { N , 2 n L 2 } and put b = N / D b=N/D b = N / D ; in this regime, run only the corrections.
For L ≤ L 0 L\le L_0 L ≤ L 0 , Appendix § 1.1.5 3 bounds the total lookup cost of the qDRIFT levels by O ( n 2 N D 1 / 4 L ) O(n^2N D^{1/4}\sqrt{L}) O ( n 2 N D 1/4 L ) and their total block-processing cost by O ( n 2 D b 2 ) O(n^2\sqrt{D}\,b^2) O ( n 2 D b 2 ) . Substituting D = N / b D=N/b D = N / b and balancing these contributions gives b 7 / 4 = Θ ( N 3 / 4 / L ) b^{7/4}=\Theta(N^{3/4}/\sqrt{L}) b 7/4 = Θ ( N 3/4 / L ) , hence the choice b = Θ ( N 3 / 7 L 2 / 7 ) b=\Theta(N^{3/7}L^{2/7}) b = Θ ( N 3/7 L 2/7 ) . Both contributions are then O ( n 2 N 8 / 7 L 3 / 7 ) O(n^2N^{8/7}L^{3/7}) O ( n 2 N 8/7 L 3/7 ) .
For L > L 0 L>L_0 L > L 0 , the first correction starts from a traceless generator of norm at most 2 π 2\pi 2 π . By Lemmas 5 and 9, the block encoding of its full rounded generator has subnormalization factor O ( n D ) O(n\sqrt{D}) O ( n D ) . The chosen D D D satisfies D ≤ 2 n 2 L 2 D\le2n^2L^2 D ≤ 2 n 2 L 2 , so this factor is O ( n 2 L ) O(n^2L) O ( n 2 L ) . Moreover, if D < N D<N D < N , then D ≥ n 2 L 2 D\ge n^2L^2 D ≥ n 2 L 2 gives
b 2 B ≤ N 2 B n 4 L 4 = O ( N B n ) = O ( N B ) , b^2B\le\frac{N^2B}{n^4L^4}=O\left(\frac{NB}{\sqrt{n}}\right)=O(N\sqrt{B}), b 2 B ≤ n 4 L 4 N 2 B = O ( n N B ) = O ( N B ) ,
where we used L > L 0 L>L_0 L > L 0 and B = Θ ( n ) B=\Theta(n) B = Θ ( n ) . If D = N D=N D = N , then b = 1 b=1 b = 1 and the same bound holds. Thus the block-processing cost O ( b 2 B ) O(b^2B) O ( b 2 B ) is at most the order of the lookup cost O ( N B ) O(N\sqrt{B}) O ( N B ) , and each query to the block encoding of a full rounded correction generator costs O ( N B ) O(N\sqrt{B}) O ( N B ) in this regime.
For the level stage, put e l = 2 − l / 4 e_l=2^{-l/4} e l = 2 − l /4 , a 0 = 2 π a_0=2\pi a 0 = 2 π , and a l = 4 e l − 1 a_l=4e_{l-1} a l = 4 e l − 1 for l ≥ 1 l\ge1 l ≥ 1 , and define
s l = ⌊ c s D a l n L ⌋ . (39) s_l=\left\lfloor\frac{c_s\sqrt{D}\,a_l}{nL}\right\rfloor. \tag*{(39)} s l = ⌊ n L c s D a l ⌋ . (39)
a l a_l a l bounds the level’s generator norm, with a l ≤ 8 π e l a_l\le8\pi e_l a l ≤ 8 π e l . The tolerances halve for l ≥ 1 l\ge1 l ≥ 1 , so qDRIFT needs only constant relative precision. When L ≤ L 0 L\le L_0 L ≤ L 0 , let l ∗ l_* l ∗ be the first index with s l ∗ = 0 s_{l_*}=0 s l ∗ = 0 ; then 1 ≤ l ∗ = O ( n ) 1\le l_*=O(n) 1 ≤ l ∗ = O ( n ) . When L > L 0 L>L_0 L > L 0 , set l ∗ = 0 l_*=0 l ∗ = 0 , so the level loop is empty. Indeed, at l = 0 l=0 l = 0 the argument of the floor in Eq. (39) is Θ ( c s N 2 / 7 L − 8 / 7 / n ) \Theta(c_sN^{2/7}L^{-8/7}/n) Θ ( c s N 2/7 L − 8/7 / n ) , at least one for L ≤ L 0 L\le L_0 L ≤ L 0 when c 0 c_0 c 0 is sufficiently small.
Residual data. For a residual unitary R R R , the routine Residual ( R ) = ( H , φ , H 0 ) \operatorname{Residual}(R)=(H,\varphi,H_0) Residual ( R ) = ( H , φ , H 0 ) computes
H = − i log R , φ = tr H N , H 0 = H − φ I . H=-i\log R,\qquad\varphi=\frac{\operatorname{tr}H}{N},\qquad H_0=H-\varphi I. H = − i log R , φ = N tr H , H 0 = H − φ I .
We choose the eigenvalues of H H H in ( − π , π ] (-\pi,\pi] ( − π , π ] , including π \pi π at eigenvalue − 1 -1 − 1 of R R R , as in Eq. (7) . Thus R = e i φ e i H 0 R=e^{i\varphi}e^{iH_0} R = e i φ e i H 0 and H 0 H_0 H 0 is traceless.
At level l l l , the current ideal approximation is W l − 1 W_{l-1} W l − 1 , with W − 1 = I W_{-1}=I W − 1 = I , and the residual is R l = U W l − 1 − 1 R_l=UW_{l-1}^{-1} R l = U W l − 1 − 1 . Apply the routine above to obtain ( H ( l ) , φ l , H 0 ( l ) ) (H^{(l)},\varphi_l,H_0^{(l)}) ( H ( l ) , φ l , H 0 ( l ) ) . If H 0 ( l ) = 0 H_0^{(l)}=0 H 0 ( l ) = 0 , set P l = V l = I P_l=V_l=I P l = V l = I , H ( l ) = 0 H^{(l)}=0 H ( l ) = 0 , and λ l = 0 \lambda_l=0 λ l = 0 ; the phase update is exactly. For H 0 ( l ) ≠ 0 H_0^{(l)}\ne0 H 0 ( l ) = 0 , choose a real orthogonal P l P_l P l and a split satisfying the bounds of Lemmas 5 and 6, each with failure parameter 1 / 8 1/8 1/8 , as in
Algorithm 4. Let H ′ ( l ) = P l H 0 ( l ) P l T H'^{(l)} = P_l H_0^{(l)} P_l^T H ′ ( l ) = P l H 0 ( l ) P l T and write its split as H ′ ( l ) = ∑ k ∈ I l H k ( l ) H'^{(l)} = \sum_{k \in I_l} H_k^{(l)} H ′ ( l ) = ∑ k ∈ I l H k ( l ) , where I l I_l I l indexes only nonzero pieces. The parameter s l s_l s l counts all pieces in the original random split, including those that are zero, so ∣ I l ∣ ≤ s l |I_l| \le s_l ∣ I l ∣ ≤ s l . The largest block norm is g l = max I , J ∥ ( H ′ ( l ) ) I J ∥ g_l = \max_{I,J} \lVert(H'^{(l)})_{IJ}\rVert g l = max I , J ∥( H ′ ( l ) ) I J ∥ , and the total piece norm is λ l = ∑ k ∈ I l ∥ H k ( l ) ∥ \lambda_l = \sum_{k \in I_l} \lVert H_k^{(l)}\rVert λ l = ∑ k ∈ I l ∥ H k ( l ) ∥ . Each subnormalization factor is α k ( l ) = m l g l \alpha_k^{(l)} = m_l g_l α k ( l ) = m l g l , where m l m_l m l is the least power of two at least m 0 , l + 1 m_{0,l} + 1 m 0 , l + 1 and m 0 , l m_{0,l} m 0 , l is the sparsity bound of Lemma 6. Let K ~ k ( l ) \widetilde{K}_k^{(l)} K k ( l ) be the rounded pieces supplied by Lemma 9. Since m l ≥ m 0 , l m_l \ge m_{0,l} m l ≥ m 0 , l , Lemma 7 also supplies exact block encodings of the unrounded pieces H k ( l ) H_k^{(l)} H k ( l ) with the same subnormalization factors α k ( l ) \alpha_k^{(l)} α k ( l ) . Thus the sampling and weighted-time bounds in Lemma 8 apply to these pieces. The simulation circuits use the rounded pieces K ~ k ( l ) \widetilde{K}_k^{(l)} K k ( l ) instead.
When λ l ≥ ϵ l / 4 \lambda_l \ge\epsilon_l/4 λ l ≥ ϵ l /4 , the qDRIFT sampling law and durations are
Pr ( K l , u = k ) = ∥ H k ( l ) ∥ λ l , τ l , u = λ l N q ( l ) ∥ H K l , u ( l ) ∥ . (40) \Pr(K_{l,u}=k)=\frac{\lVert H_k^{(l)}\rVert}{\lambda_l},
\qquad
\tau_{l,u}=\frac{\lambda_l}{N_q^{(l)}\lVert H_{K_{l,u}}^{(l)}\rVert}. \tag*{(40)} Pr ( K l , u = k ) = λ l ∥ H k ( l ) ∥ , τ l , u = N q ( l ) ∥ H K l , u ( l ) ∥ λ l . (40)
Keep the unrounded and rounded products distinct:
V l t r u e = ∏ u = N q ( l ) 1 e i τ l , u H K l , u ( l ) , (41) V_l^{\mathrm{true}}=\prod_{u=N_q^{(l)}}^{1}e^{i\tau_{l,u}H_{K_{l,u}}^{(l)}}, \tag*{(41)} V l true = u = N q ( l ) ∏ 1 e i τ l , u H K l , u ( l ) , (41)
V l = ∏ u = N q ( l ) 1 e i τ l , u K ~ K l , u ( l ) . V_l=\prod_{u=N_q^{(l)}}^{1}e^{i\tau_{l,u}\widetilde{K}_{K_{l,u}}^{(l)}}. V l = u = N q ( l ) ∏ 1 e i τ l , u K K l , u ( l ) .
Products act from right to left. The classical qDRIFT acceptance test uses V l t r u e V_l^{\mathrm{true}} V l true ; the next residual and compiled segments use V l V_l V l . When λ l ≥ ϵ l / 4 \lambda_l \ge\epsilon_l/4 λ l ≥ ϵ l /4 , we sample until both of the following tests pass, using Lemma 8 with ϵ = ϵ l / 2 \epsilon=\epsilon_l/2 ϵ = ϵ l /2 and p = 1 / 2 p=1/2 p = 1/2 :
∥ V l t r u e − e i H ′ ( l ) ∥ ≤ ϵ l / 2 , ∑ u α K l , u ( l ) τ l , u ≤ 4 ∑ k α k ( l ) . (42) \left\lVert V_l^{\mathrm{true}}-e^{iH'^{(l)}}\right\rVert\le\epsilon_l/2,
\qquad
\sum_u\alpha_{K_{l,u}}^{(l)}\tau_{l,u}\le4\sum_k\alpha_k^{(l)}. \tag*{(42)} V l true − e i H ′ ( l ) ≤ ϵ l /2 , u ∑ α K l , u ( l ) τ l , u ≤ 4 k ∑ α k ( l ) . (42)
The first test bounds the qDRIFT approximation error. The second bounds the sum of simulation times weighted by the block-encoding subnormalization factors. This sum controls both the query count and the error introduced when the sampled generators are rounded (Eq. (46) ). If λ l < ϵ l / 4 \lambda_l < \epsilon_l/4 λ l < ϵ l /4 , the algorithm sets V l = I V_l=I V l = I and skips sampling at that level.
The correction stage starts from the rounded ideal product W ( 0 ) = W l ∗ − 1 W^{(0)}=W_{l_* -1} W ( 0 ) = W l ∗ − 1 produced by the levels; when no levels are used, W ( 0 ) = I W^{(0)}=I W ( 0 ) = I . At correction j ≥ 1 j\ge1 j ≥ 1 , the transformation needed to turn the current approximation W ( j − 1 ) W^{(j-1)} W ( j − 1 ) into U U U is
R ( j ) = U ( W ( j − 1 ) ) − 1 , R^{(j)}=U(W^{(j-1)})^{-1}, R ( j ) = U ( W ( j − 1 ) ) − 1 ,
so R ( j ) W ( j − 1 ) = U R^{(j)}W^{(j-1)}=U R ( j ) W ( j − 1 ) = U . Apply the same residual decomposition to define
G j = − i log R ( j ) , χ j = tr G j N , G_j=-i\log R^{(j)},\qquad
\chi_j=\frac{\operatorname{tr}G_j}{N}, G j = − i log R ( j ) , χ j = N tr G j ,
G 0 , j = G j − χ j I . G_{0,j}=G_j-\chi_j I. G 0 , j = G j − χ j I .
Thus R ( j ) = e i χ j e i G 0 , j R^{(j)}=e^{i\chi_j}e^{iG_{0,j}} R ( j ) = e i χ j e i G 0 , j : χ j \chi_j χ j is the scalar phase, and G 0 , j G_{0,j} G 0 , j is the traceless generator to be simulated. The notation Residual ( R ( j ) ) = ( G j , χ j , G 0 , j ) \operatorname{Residual}(R^{(j)})=(G_j,\chi_j,G_{0,j}) Residual ( R ( j ) ) = ( G j , χ j , G 0 , j ) in Algorithm 4 refers to these definitions.
For G 0 , j ≠ 0 G_{0,j}\ne0 G 0 , j = 0 , choose a real orthogonal matrix P j c P_j^c P j c satisfying the flattening bound of Lemma 5, by resampling with failure parameter 1 / 4 1/4 1/4 until the bound holds. The superscript c identifies a change of basis used in the correction stage. Set
G j ′ = P j c G 0 , j ( P j c ) T , g j = max I , J ∥ ( G j ′ ) I J ∥ . G'_j=P_j^cG_{0,j}(P_j^c)^T,
\qquad
g_j=\max_{I,J}\left\lVert(G'_j)_{IJ}\right\rVert. G j ′ = P j c G 0 , j ( P j c ) T , g j = I , J max ( G j ′ ) I J .
This choice bounds the norm of every block of G j ′ G'_j G j ′ by C A ∥ G 0 , j ∥ log ( 4 N ) / D C_A\lVert G_{0,j}\rVert\log(4N)/\sqrt{D} C A ∥ G 0 , j ∥ log ( 4 N ) / D . Apply Lemma 9 to the full matrix G j ′ G'_j G j ′ , using word length B B B and m = 2 D m=2D m = 2 D , to obtain a Hermitian matrix G ~ j \widetilde{G}_j G j and an exact block encoding of G ~ j \widetilde{G}_j G j . Here m = 2 D m=2D m = 2 D accommodates the at most D D D nonzero blocks in each block column and the additional slot for diagonal-block symmetrization. Define the subnormalization factor of this block encoding and the error from rounding the generator by
α j = 2 D g j , ρ j = ∥ G ~ j − G j ′ ∥ . (43) \alpha_j=2Dg_j,\qquad
\rho_j=\left\lVert\widetilde{G}_j-G'_j\right\rVert. \tag*{(43)} α j = 2 D g j , ρ j = G j − G j ′ . (43)
The correction first applies P j c P_j^c P j c , simulates G ~ j \widetilde{G}_j G j for time one, and then applies ( P j c ) T (P_j^c)^T ( P j c ) T and the scalar phase. The resulting ideal update is
W ( j ) = e i χ j ( P j c ) T e i G ~ j P j c W ( j − 1 ) . (44) W^{(j)}=e^{i\chi_j}(P_j^c)^Te^{i\widetilde{G}_j}P_j^cW^{(j-1)}. \tag*{(44)} W ( j ) = e i χ j ( P j c ) T e i G j P j c W ( j − 1 ) . (44)
We stop when ρ j ≤ ϵ / 8 \rho_j\le\epsilon/8 ρ j ≤ ϵ /8 ; the next subsection proves that ∥ U − W ( j ) ∥ ≤ ρ j \lVert U-W^{(j)}\rVert\le\rho_j ∥ U − W ( j ) ∥ ≤ ρ j . If G 0 , j = 0 G_{0,j}=0 G 0 , j = 0 , set P j c = I P_j^c=I P j c = I , G ~ j = 0 \widetilde{G}_j=0 G j = 0 , and α j = ρ j = 0 \alpha_j=\rho_j=0 α j = ρ j = 0 . Then the scalar phase alone gives W ( j ) = U W^{(j)}=U W ( j ) = U , and no Hamiltonian simulation is needed.
Accuracy and termination
Proof of Theorem 4: accuracy. The products W l W_l W l and W ( j ) W^{(j)} W ( j ) use exact exponentials of rounded generators, so their error includes qDRIFT and generator rounding. After bounding this error and proving termination, we add the circuit-implementation errors.
Level contraction. We prove by induction that level l l l produces ∥ U − W l ∥ = ∥ R l + 1 − I ∥ ≤ ϵ l \lVert U-W_l\rVert=\lVert R_{l+1}-I\rVert\le\epsilon_l ∥ U − W l ∥ = ∥ R l + 1 − I ∥ ≤ ϵ l . Initially ∥ H 0 ( 0 ) ∥ ≤ 2 π = a 0 \lVert H_0^{(0)}\rVert\le2\pi=a_0 ∥ H 0 ( 0 ) ∥ ≤ 2 π = a 0 ; for l ≥ 1 l\ge1 l ≥ 1 , the induction hypothesis ∥ R l − I ∥ ≤ ϵ l − 1 ≤ 1 / 4 \lVert R_l-I\rVert\le\epsilon_{l-1}\le1/4 ∥ R l − I ∥ ≤ ϵ l − 1 ≤ 1/4 bounds every principal eigenphase in absolute value by π ϵ l − 1 / 2 \pi\epsilon_{l-1}/2 π ϵ l − 1 /2 , giving ∥ H 0 ( l ) ∥ ≤ 2 ∥ H ( l ) ∥ ≤ π ϵ l − 1 < a l \lVert H_0^{(l)}\rVert\le2\lVert H^{(l)}\rVert\le\pi\epsilon_{l-1}<a_l ∥ H 0 ( l ) ∥ ≤ 2 ∥ H ( l ) ∥ ≤ π ϵ l − 1 < a l .
Algorithm 4. Detailed classical preprocessing and circuit assembly for Theorem 4.
Input: U ∈ U ( N ) U \in U(N) U ∈ U ( N ) and ϵ \epsilon ϵ in the range of Theorem 4.
Output: A fixed Clifford+T T T circuit implementing U U U to error ϵ \epsilon ϵ .
Setup: From N N N and ϵ \epsilon ϵ , choose the block size b b b , word length B B B , number l ∗ l_* l ∗ of block-sparse levels, level tolerances ϵ l \epsilon_l ϵ l , generator-norm bounds a l a_l a l , and piece counts s l s_l s l ; set D = N / b D=N/b D = N / b (Appendix § 1.1.5 1).
Stage I: Refinement levels.
Set W − 1 = I W_{-1}=I W − 1 = I .
for l = 0 , … , l ∗ − 1 l=0,\ldots,l_*-1 l = 0 , … , l ∗ − 1 do
Form R l = U W l − 1 − 1 R_l=UW_{l-1}^{-1} R l = U W l − 1 − 1 and ( H ( l ) , ϕ l , H 0 ( l ) ) = Residual ( R l ) (H^{(l)},\phi_l,H_0^{(l)})=\operatorname{Residual}(R_l) ( H ( l ) , ϕ l , H 0 ( l ) ) = Residual ( R l ) ; set P l = V l = I P_l=V_l=I P l = V l = I .
if H 0 ( l ) ≠ 0 H_0^{(l)}\ne0 H 0 ( l ) = 0 then
repeat
Draw a fresh similarity P l P_l P l and split H ′ ( l ) = P l H 0 ( l ) P l T H'^{(l)}=P_lH_0^{(l)}P_l^T H ′ ( l ) = P l H 0 ( l ) P l T into s l s_l s l Hermitian pieces.
until the block-norm, piece-norm, and sparsity bounds hold at failure parameter 1 / 8 1/8 1/8 (Lemmas 5 and 6). ▷ Success per trial ≥ 3 / 4 \ge3/4 ≥ 3/4 .
Discard zero pieces; compute their norm sum λ l \lambda_l λ l and construct block encodings of the rounded pieces K ~ k ( l ) \widetilde{K}^{(l)}_k K k ( l ) with subnormalization factors α k ( l ) \alpha_k^{(l)} α k ( l ) (Lemma 9).
if λ l ≥ ϵ l / 4 \lambda_l\ge\epsilon_l/4 λ l ≥ ϵ l /4 then
Use Lemma 8 with ε = ϵ l / 2 \varepsilon=\epsilon_l/2 ε = ϵ l /2 and p = 1 / 2 p=1/2 p = 1/2 , choosing the least sufficient N q ( l ) N_q^{(l)} N q ( l ) from Eq. (20) .
repeat
Sample a fresh unrounded product V t r u e V^{\mathrm{true}} V true (Eqs. (40) and (41) ).
until the accuracy and weighted-time tests pass (Eq. (42) ).
Replace its generators by the rounded ones to form V l V_l V l (Eq. (41) ). ▷ Include rounding in the residual.
end if
end if
Set W l = e i ϕ l P l T V l P l W l − 1 W_l=e^{i\phi_l}P_l^TV_lP_lW_{l-1} W l = e i ϕ l P l T V l P l W l − 1 .
end for
Stage II: Corrections using the full residual generator.
Set W ( 0 ) = W l ∗ − 1 W^{(0)}=W_{l_*-1} W ( 0 ) = W l ∗ − 1 and j = 0 j=0 j = 0 .
repeat ▷ O ( 1 + L / n ) O(1+L/n) O ( 1 + L / n ) corrections suffice.
Increase j j j by one; form R ( j ) = U ( W ( j − 1 ) ) − 1 R^{(j)}=U(W^{(j-1)})^{-1} R ( j ) = U ( W ( j − 1 ) ) − 1 and ( G j , χ j , G 0 , j ) = Residual ( R ( j ) ) (G_j,\chi_j,G_{0,j})=\operatorname{Residual}(R^{(j)}) ( G j , χ j , G 0 , j ) = Residual ( R ( j ) ) .
if G 0 , j = 0 G_{0,j}=0 G 0 , j = 0 then
Set P j c = I P_j^c=I P j c = I , G ~ j = 0 \widetilde{G}_j=0 G j = 0 , and α j = ρ j = 0 \alpha_j=\rho_j=0 α j = ρ j = 0 . ▷ Only the scalar phase remains.
else
Resample P j c P_j^c P j c until the flattening bound holds at failure parameter 1 / 4 1/4 1/4 (Lemma 5). ▷ Success per trial ≥ 3 / 4 \ge3/4 ≥ 3/4 .
Form the full rounded generator G ~ j \widetilde{G}_j G j and construct its block encoding with subnormalization factor α j \alpha_j α j ; compute its rounding error ρ j \rho_j ρ j (Lemma 9 and Eq. (43) ).
end if
Set W ( j ) = e i χ j ( P j c ) T e i G ~ j P j c W ( j − 1 ) W^{(j)}=e^{i\chi_j}(P_j^c)^T e^{i\widetilde{G}_j}P_j^cW^{(j-1)} W ( j ) = e i χ j ( P j c ) T e i G j P j c W ( j − 1 ) .
until ρ j ≤ ϵ / 8 \rho_j\le\epsilon/8 ρ j ≤ ϵ /8 .
Set J = j J=j J = j .
Stage III: Circuit assembly.
Set the tolerances for simulation, rotations, catalyst preparation and unpreparation, and the phase as specified in the error analysis of Appendix § 1.1.5 2.
Prepare ∣ Ψ ⟩ \lvert\Psi\rangle ∣ Ψ ⟩ ; compile P l T V l P l P_l^TV_lP_l P l T V l P l , then ( P j c ) T e i G ~ j P j c (P_j^c)^T e^{i\widetilde{G}_j}P_j^c ( P j c ) T e i G j P j c , in increasing index order (Lemmas 3 and 11).
Apply the phase Φ = ∑ l = 0 l ∗ − 1 ϕ l + ∑ j = 1 J χ j \Phi=\sum_{l=0}^{l_*-1}\phi_l+\sum_{j=1}^{J}\chi_j Φ = ∑ l = 0 l ∗ − 1 ϕ l + ∑ j = 1 J χ j , unprepare ∣ Ψ ⟩ \lvert\Psi\rangle ∣ Ψ ⟩ , and return the circuit.
If H 0 ( l ) = 0 H_0^{(l)}=0 H 0 ( l ) = 0 , the phase update gives W l = U W_l=U W l = U . If H 0 ( l ) ≠ 0 H_0^{(l)}\ne0 H 0 ( l ) = 0 but λ l < ϵ l / 4 \lambda_l<\epsilon_l/4 λ l < ϵ l /4 , setting V l = I V_l=I V l = I gives
∥ V l − e i H ′ ( l ) ∥ ≤ ∥ H ′ ( l ) ∥ ≤ λ l < ϵ l / 4. \lVert V_l-e^{iH'^{(l)}}\rVert\le\lVert H'^{(l)}\rVert\le\lambda_l<\epsilon_l/4. ∥ V l − e i H ′ ( l ) ∥ ≤ ∥ H ′ ( l ) ∥ ≤ λ l < ϵ l /4.
For sampled levels, λ l ≥ ϵ l / 4 \lambda_l\ge\epsilon_l/4 λ l ≥ ϵ l /4 and s l ≤ N s_l\le N s l ≤ N , so ζ = log ( 64 N 2 ) = O ( n ) \zeta=\log(64N^2)=O(n) ζ = log ( 64 N 2 ) = O ( n ) bounds the logarithmic factor in Lemma 6 at failure parameter 1 / 8 1/8 1/8 . The bounds s l = O ( D / ( n L ) ) s_l=O(\sqrt{D}/(nL)) s l = O ( D / ( n L )) and D = Ω ( N 1 / 4 ) \sqrt{D}=\Omega(N^{1/4}) D = Ω ( N 1/4 ) give s l ζ log 2 ( 8 N ) ≤ D / C A 2 s_l\zeta\log^2(8N)\le D/C_A^2 s l ζ log 2 ( 8 N ) ≤ D / C A 2 and s l ζ ≤ D s_l\zeta\le D s l ζ ≤ D , so the accepted flattening and splitting bounds yield λ l ≤ 4 a l s l ζ \lambda_l\le4a_l\sqrt{s_l\zeta} λ l ≤ 4 a l s l ζ and
∑ k α k ( l ) ≤ 9 C A a l D log ( 8 N ) . (45) \sum_k\alpha_k^{(l)}\le9C_Aa_l\sqrt{D}\log(8N). \tag*{(45)} k ∑ α k ( l ) ≤ 9 C A a l D log ( 8 N ) . (45)
Since ϵ l / 2 ≤ 4 λ l \epsilon_l/2\le4\lambda_l ϵ l /2 ≤ 4 λ l and a l / ϵ l ≤ 8 π a_l/\epsilon_l\le8\pi a l / ϵ l ≤ 8 π , Lemma 8 with A k = H k ( l ) A_k=H_k^{(l)} A k = H k ( l ) , subnormalization factors α k ( l ) \alpha_k^{(l)} α k ( l ) , ε = ϵ l / 2 \varepsilon=\epsilon_l/2 ε = ϵ l /2 , and p = 1 / 2 p=1/2 p = 1/2 uses N q ( l ) = O ( s l n 2 ) N_q^{(l)}=O(s_ln^2) N q ( l ) = O ( s l n 2 ) segments, with the accepted product satisfying ∥ V l t r u e − e i H ′ ( l ) ∥ ≤ ϵ l / 2 \lVert V_l^{\mathrm{true}}-e^{iH'^{(l)}}\rVert\le\epsilon_l/2 ∥ V l true − e i H ′ ( l ) ∥ ≤ ϵ l /2 . The generator-rounding bound from Lemma 9 is
∥ K ~ k ( l ) − H k ( l ) ∥ ≤ 16 π α k ( l ) b 2 − B . \lVert\widetilde{K}_k^{(l)}-H_k^{(l)}\rVert\le16\pi\alpha_k^{(l)}b2^{-B}. ∥ K k ( l ) − H k ( l ) ∥ ≤ 16 π α k ( l ) b 2 − B .
Duhamel’s formula and product telescoping therefore give
∥ V l − e i H ′ ( l ) ∥ ≤ ϵ l 2 + 16 π b 2 − B ∑ u α K l , u ( l ) τ l , u ≤ ϵ l . (46) \begin{aligned}
\lVert V_l-e^{iH'^{(l)}}\rVert\le\frac{\epsilon_l}{2}+16\pi b2^{-B}\sum_u\alpha_{K_{l,u}}^{(l)}\tau_{l,u} \\
&\le\epsilon_l. \tag*{(46)}
\end{aligned} ∥ V l − e i H ′ ( l ) ∥ ≤ 2 ϵ l + 16 π b 2 − B u ∑ α K l , u ( l ) τ l , u ≤ ϵ l . (46)
The last inequality follows by bounding the weighted-time sum by 4 ∑ k α k ( l ) 4\sum_k \alpha_k^{(l)} 4 ∑ k α k ( l ) and applying Eqs. (38) and (45) with a l ≤ 8 π ϵ l a_l \le8\pi\epsilon_l a l ≤ 8 π ϵ l .
In every branch, substituting W l = e i φ l P l T V l P l W l − 1 W_l=e^{i\varphi_l}P_l^T V_lP_lW_{l-1} W l = e i φ l P l T V l P l W l − 1 and R l = e i φ l P l T e i H ′ ( l ) P l R_l=e^{i\varphi_l}P_l^T e^{iH^{\prime(l)}}P_l R l = e i φ l P l T e i H ′ ( l ) P l into R l + 1 = U W l − 1 R_{l+1}=UW_l^{-1} R l + 1 = U W l − 1 gives
R l + 1 = P l T e i H ′ ( l ) V l − 1 P l . (47) R_{l+1}=P_l^T e^{iH^{\prime(l)}}V_l^{-1}P_l. \tag*{(47)} R l + 1 = P l T e i H ′ ( l ) V l − 1 P l . (47)
Hence ∥ U − W l ∥ = ∥ R l + 1 − I ∥ = ∥ e i H ′ ( l ) − V l ∥ ≤ ϵ l \lVert U-W_l\rVert=\lVert R_{l+1}-I\rVert=\lVert e^{iH^{\prime(l)}}-V_l\rVert\le\epsilon_l ∥ U − W l ∥ = ∥ R l + 1 − I ∥ = ∥ e i H ′ ( l ) − V l ∥ ≤ ϵ l , closing the induction. This bounds the entire residual, including the errors of preceding levels.
Corrections and stopping. If G 0 , j = 0 G_{0,j}=0 G 0 , j = 0 , the phase update gives W ( j ) = U W^{(j)}=U W ( j ) = U and the algorithm stops. Otherwise Lemmas 5 and 9 give
α j ≤ 2 C A D ∥ G 0 , j ∥ log ( 8 N ) , \alpha_j\le2C_A\sqrt{D}\lVert G_{0,j}\rVert\log(8N), α j ≤ 2 C A D ∥ G 0 , j ∥ log ( 8 N ) ,
ρ j ≤ 16 π α j b 2 − B . \rho_j\le16\pi\alpha_j b2^{-B}. ρ j ≤ 16 π α j b 2 − B .
Using Eq. (44) and R ( j ) = e i χ j ( P j c ) T e i G j ′ P j c R^{(j)}=e^{i\chi_j}(P_j^c)^T e^{iG_j^{\prime}}P_j^c R ( j ) = e i χ j ( P j c ) T e i G j ′ P j c , the next residual is
R ( j + 1 ) = U ( W ( j ) ) − 1 = ( P j c ) T e i G j ′ e − i G ~ j ′ P j c . (48) \begin{aligned}
R^{(j+1)}=U(W^{(j)})^{-1} \\
&=(P_j^c)^T e^{iG_j^{\prime}}e^{-i\widetilde{G}_j^{\prime}}P_j^c. \tag*{(48)}
\end{aligned} R ( j + 1 ) = U ( W ( j ) ) − 1 = ( P j c ) T e i G j ′ e − i G j ′ P j c . (48)
Unitary invariance and Duhamel’s formula then imply
∥ U − W ( j ) ∥ = ∥ R ( j + 1 ) − I ∥ = ∥ e i G j ′ − e i G ~ j ′ ∥ ≤ ρ j . \begin{aligned}
\lVert U-W^{(j)}\rVert=\lVert R^{(j+1)}-I\rVert\\
&=\lVert e^{iG_j^{\prime}}-e^{i\widetilde{G}_j^{\prime}}\rVert\le\rho_j.
\end{aligned} ∥ U − W ( j ) ∥ = ∥ R ( j + 1 ) − I ∥ = ∥ e i G j ′ − e i G j ′ ∥ ≤ ρ j .
Thus ρ j ≤ ϵ / 8 \rho_j\le\epsilon/8 ρ j ≤ ϵ /8 guarantees ∥ U − W ( j ) ∥ ≤ ϵ / 8 \lVert U-W^{(j)}\rVert\le\epsilon/8 ∥ U − W ( j ) ∥ ≤ ϵ /8 .
If levels were used, s l ∗ = 0 s_{l_*}=0 s l ∗ = 0 gives ∥ G 0 , 1 ∥ ≤ a l ∗ < n L / ( c s D ) \lVert G_{0,1}\rVert\le a_{l_*}<nL/(c_s\sqrt{D}) ∥ G 0 , 1 ∥ ≤ a l ∗ < n L / ( c s D ) ; otherwise ∥ G 0 , 1 ∥ ≤ 2 π \lVert G_{0,1}\rVert\le2\pi ∥ G 0 , 1 ∥ ≤ 2 π and D ≤ 2 n L \sqrt{D}\le\sqrt{2}nL D ≤ 2 n L . In both cases, the flattening bound gives α 1 = O ( n 2 L ) \alpha_1=O(n^2L) α 1 = O ( n 2 L ) . By Eq. (38) , ρ j ≤ N − 2 α j \rho_j\le N^{-2}\alpha_j ρ j ≤ N − 2 α j , so ρ 1 < 1 \rho_1<1 ρ 1 < 1 for sufficiently large n n n because L ≤ N L\le N L ≤ N .
Whenever ρ j < 1 \rho_j<1 ρ j < 1 , the eigenphase bound for ∥ R ( j + 1 ) − I ∥ ≤ ρ j \lVert R^{(j+1)}-I\rVert\le\rho_j ∥ R ( j + 1 ) − I ∥ ≤ ρ j gives ∥ G 0 , j + 1 ∥ ≤ π ρ j \lVert G_{0,j+1}\rVert\le\pi\rho_j ∥ G 0 , j + 1 ∥ ≤ π ρ j ; combining this with the flattening and rounding bounds yields
α j + 1 ≤ 32 π 2 C A b D log ( 8 N ) 2 − B α j ≤ N − 2 α j . (49) \begin{aligned}
\alpha_{j+1}\le32\pi^2C_A b\sqrt{D}\log(8N)2^{-B\alpha_j} \\
&\le N^{-2}\alpha_j. \tag*{(49)}
\end{aligned} α j + 1 ≤ 32 π 2 C A b D log ( 8 N ) 2 − B α j ≤ N − 2 α j . (49)
The last inequality uses Eq. (38) , and induction gives α j ≤ N − 2 ( j − 1 ) α 1 \alpha_j\le N^{-2(j-1)}\alpha_1 α j ≤ N − 2 ( j − 1 ) α 1 and ρ j ≤ N − 2 j α 1 < 1 \rho_j\le N^{-2j}\alpha_1<1 ρ j ≤ N − 2 j α 1 < 1 until the algorithm stops. For α 1 > 0 \alpha_1>0 α 1 > 0 , the stopping test is satisfied whenever j ≥ 1 j\ge1 j ≥ 1 and 2 j log N ≥ log ( 8 α 1 / ϵ ) 2j\log N\ge\log(8\alpha_1/\epsilon) 2 j log N ≥ log ( 8 α 1 / ϵ ) . Together with α 1 ≤ C n 2 N \alpha_1\le Cn^2N α 1 ≤ C n 2 N and L = n + log 2 ( 1 / ϵ ) L=n+\log_2(1/\epsilon) L = n + log 2 ( 1/ ϵ ) , this gives J = O ( 1 + L / n ) J=O(1+L/n) J = O ( 1 + L / n ) ; a zero traceless generator stops the algorithm immediately.
Error analysis. The ideal-product error is at most ϵ / 8 \epsilon/8 ϵ /8 ; allocate ϵ / 8 \epsilon/8 ϵ /8 each to simulation truncation, rotation synthesis, catalyst preparation and unpreparation, and phase synthesis.
Let N s i m N_{\mathrm{sim}} N sim count the sampled level evolutions and correction evolutions that are not skipped. For N s i m > 0 N_{\mathrm{sim}}>0 N sim > 0 , applying Lemma 3 with δ = ϵ / ( 8 N s i m ) \delta=\epsilon/(8N_{\mathrm{sim}}) δ = ϵ / ( 8 N sim ) per call gives total full-output error at most ϵ / 8 \epsilon/8 ϵ /8 , including ancilla leakage. The bounds l ∗ = O ( n ) l_*=O(n) l ∗ = O ( n ) , N q ( l ) = O ( s l n 2 ) N_q^{(l)}=O(s_l n^2) N q ( l ) = O ( s l n 2 ) , and J = O ( 1 + L / n ) J=O(1+L/n) J = O ( 1 + L / n ) make N s i m N_{\mathrm{sim}} N sim polynomial in N N N , so log ( 1 / δ ) = O ( L ) \log(1/\delta)=O(L) log ( 1/ δ ) = O ( L ) whenever simulations occur.
If the QSVT circuits use N r o t > 0 N_{\mathrm{rot}}>0 N rot > 0 variable-angle rotations, synthesize each to operator-norm error ϵ / ( 8 N r o t ) \epsilon/(8N_{\mathrm{rot}}) ϵ / ( 8 N rot ) , giving total error at most ϵ / 8 \epsilon/8 ϵ /8 by gate telescoping. The query bounds in Lemma 3 make N r o t N_{\mathrm{rot}} N rot polynomial in N N N , so each rotation costs O ( L ) O(L) O ( L ) by Eq. (3) . Synthesize the accumulated phase Φ = ∑ l = 0 l ∗ − 1 φ l + ∑ j = 1 J χ j \Phi=\sum_{l=0}^{l_*-1}\varphi_l+\sum_{j=1}^{J}\chi_j Φ = ∑ l = 0 l ∗ − 1 φ l + ∑ j = 1 J χ j to error ϵ / 8 \epsilon/8 ϵ /8 using Eq. (3) . The changes of basis, address permutations, and zero-ancilla reflections have exact Clifford+T T T implementations.
With the exact catalyst ∣ Ψ ⟩ \lvert\Psi\rangle ∣ Ψ ⟩ , queries to the block encodings of K ~ k ( l ) \widetilde{K}_k^{(l)} K k ( l ) and G ~ j \widetilde{G}_j G j are exact and preserve ∣ Ψ ⟩ \lvert\Psi\rangle ∣ Ψ ⟩ . Preparing ∣ Ψ ⟩ \lvert\Psi\rangle ∣ Ψ ⟩ to error δ c = ϵ / 16 \delta_c=\epsilon/16 δ c = ϵ /16 and reversing the preparation after all queries contributes at most 2 δ c = ϵ / 8 2\delta_c=\epsilon/8 2 δ c = ϵ /8 , by comparison with the exact-catalyst circuit, independently of the number of queries. Together with the ideal-product error, these contributions give total full-output error at most 5 ϵ / 8 < ϵ 5\epsilon/8<\epsilon 5 ϵ /8 < ϵ by the composition rule following Definition 1.
Classical trials. At a level requiring random choices, the joint flattening and splitting test succeeds with probability at least 3 / 4 3/4 3/4 , by a union bound for two failure parameters 1 / 8 1/8 1/8 . Conditional on acceptance, the qDRIFT accuracy and weighted-time tests succeed together with probability at least 1 / 2 1/2 1/2 (Lemma 8); each correction’s flattening test succeeds with probability at least 3 / 4 3/4 3/4 . Thus each test takes a constant expected number of fresh trials, giving O ( n + L / n ) O(n+L/n) O ( n + L / n ) trials over O ( n ) O(n) O ( n ) levels and O ( 1 + L / n ) O(1+L/n) O ( 1 + L / n ) corrections.
Resource bounds
Proof of Theorem 4: resources. Levels. At each sampled level 0 ≤ l < l ∗ 0\le l<l_* 0 ≤ l < l ∗ , Lemma 3 implements the N q ( l ) N_q^{(l)} N q ( l ) evolutions e i τ l , u K ~ l , u ( l ) e^{i\tau_{l,u}\widetilde{K}_{l,u}^{(l)}} e i τ l , u K l , u ( l ) , each to error δ = ϵ / ( 8 N s i m ) \delta=\epsilon/(8N_{\mathrm{sim}}) δ = ϵ / ( 8 N sim ) , using a total of
Q l = O ( ∑ u = 1 N q ( l ) α K l , u ( l ) τ l , u + N q ( l ) log ( 1 / δ ) ) . Q_l=O\left(\sum_{u=1}^{N_q^{(l)}}\alpha_{K_{l,u}}^{(l)}\tau_{l,u}+N_q^{(l)}\log(1/\delta)\right). Q l = O u = 1 ∑ N q ( l ) α K l , u ( l ) τ l , u + N q ( l ) log ( 1/ δ ) .
queries to the block encodings of K ~ k ( l ) \widetilde{K}_k^{(l)} K k ( l ) . The weighted-time test in Eq. (42) , log ( 1 / δ ) = O ( L ) \log(1/\delta)=O(L) log ( 1/ δ ) = O ( L ) , N q ( l ) = O ( s l n 2 ) N_q^{(l)}=O(s_l n^2) N q ( l ) = O ( s l n 2 ) , and Eqs. (39) and (45) give
Q l = O ( ∑ k ∈ I l α k ( l ) + N q ( l ) L ) = O ( a l D n ) , Q_l=O\left(\sum_{k\in\mathcal{I}_l}\alpha_k^{(l)}+N_q^{(l)}L\right)=O(a_l\sqrt{D}n), Q l = O ( k ∈ I l ∑ α k ( l ) + N q ( l ) L ) = O ( a l D n ) ,
while identity levels use no queries. Since s l ≥ 1 s_l\ge1 s l ≥ 1 implies s l ≥ c s D a l / ( 2 n L ) s_l\ge c_s\sqrt{D a_l}/(2nL) s l ≥ c s D a l / ( 2 n L ) , the per-query cost O ( n B / s l + b 2 B ) O(n\sqrt{B/s_l}+b^2B) O ( n B / s l + b 2 B ) with B = O ( n ) B=O(n) B = O ( n ) gives the level cost
O ( n 2 N D 1 / 4 a l L + n 2 a l D b 2 ) . (50) O\left(n^2ND^{1/4}\sqrt{a_lL}+n^2a_l\sqrt{D}b^2\right). \tag*{(50)} O ( n 2 N D 1/4 a l L + n 2 a l D b 2 ) . (50)
Summing over 0 ≤ l < l ∗ 0 \le l < l_* 0 ≤ l < l ∗ , with ∑ l a l , ∑ l a l = O ( 1 ) \sum_l \sqrt{a_l},\sum_l a_l=O(1) ∑ l a l , ∑ l a l = O ( 1 ) , gives
O ( n 2 ( N D 1 / 4 L + D b 2 ) ) . O\left(n^2\left(ND^{1/4}\sqrt{L}+\sqrt{D}b^2\right)\right). O ( n 2 ( N D 1/4 L + D b 2 ) ) .
Balancing these terms with b = Θ ( N 3 / 7 L 2 / 7 ) b=\Theta(N^{3/7}L^{2/7}) b = Θ ( N 3/7 L 2/7 ) gives O ( n 2 N 8 / 7 L 3 / 7 ) O(n^2N^{8/7}L^{3/7}) O ( n 2 N 8/7 L 3/7 ) .
Corrections. Simulating e i G ~ 1 e^{i\widetilde{G}_1} e i G 1 requires O ( α 1 + L ) = O ( n 2 L ) O(\alpha_1+L)=O(n^2L) O ( α 1 + L ) = O ( n 2 L ) queries to the block encoding of G ~ 1 \widetilde{G}_1 G 1 . For 2 ≤ j ≤ J 2\le j\le J 2 ≤ j ≤ J with G 0 , j ≠ 0 G_{0,j}\ne0 G 0 , j = 0 , Eq. (49) gives e α j / 2 ≤ C n 2 N 3 − 2 j < 1 e^{\alpha_j/2}\le Cn^2N^{3-2j}<1 e α j /2 ≤ C n 2 N 3 − 2 j < 1 and log ( 2 / ( e α j ) ) = Ω ( ( j − 1 ) n ) \log(2/(e\alpha_j))=\Omega((j-1)n) log ( 2/ ( e α j )) = Ω (( j − 1 ) n ) . The short-time simulation bound in Lemma 3 therefore gives O ( 1 + L / ( ( j − 1 ) n ) ) O(1+L/((j-1)n)) O ( 1 + L / (( j − 1 ) n )) queries to the block encoding of G ~ j \widetilde{G}_j G j , totaling O ( 1 + ( L / n ) log L ) O(1+(L/n)\log L) O ( 1 + ( L / n ) log L ) over 2 ≤ j ≤ J = O ( 1 + L / n ) 2\le j\le J=O(1+L/n) 2 ≤ j ≤ J = O ( 1 + L / n ) ; zero generators require no queries. At O ( N B + b 2 B ) O(\sqrt{N}\sqrt{B}+b^2B) O ( N B + b 2 B ) per query, all corrections cost O ( n 5 / 2 N L + n 3 b 2 L ) O(n^{5/2}NL+n^3b^2L) O ( n 5/2 N L + n 3 b 2 L ) .
For L ≤ L 0 L\le L_0 L ≤ L 0 , the chosen block size gives
b 2 L ≤ 4 N 6 / 7 L 11 / 7 ≤ 4 N 8 / 7 L 3 / 7 , b^2L\le4N^{6/7}L^{11/7}\le4N^{8/7}L^{3/7}, b 2 L ≤ 4 N 6/7 L 11/7 ≤ 4 N 8/7 L 3/7 ,
using L ≤ N 1 / 4 L\le N^{1/4} L ≤ N 1/4 . For L > L 0 L>L_0 L > L 0 , either D = N D=N D = N and b = 1 b=1 b = 1 , or b 2 B ≤ N 2 B / ( n 4 L 4 ) = O ( N N ) b^2B\le N^2B/(n^4L^4)=O(N\sqrt{N}) b 2 B ≤ N 2 B / ( n 4 L 4 ) = O ( N N ) by the definition of L 0 L_0 L 0 . Thus in both regimes the correction cost is O ( n 5 / 2 N L + n 3 N 8 / 7 L 3 / 7 ) O(n^{5/2}NL+n^3N^{8/7}L^{3/7}) O ( n 5/2 N L + n 3 N 8/7 L 3/7 ) .
Remaining resources. QSVT uses O ( 1 ) O(1) O ( 1 ) variable-angle rotations per query to the block encoding of a rounded piece K ~ ( l ) \widetilde{K}^{(l)} K ( l ) or correction generator G ~ j \widetilde{G}_j G j , each costing O ( L ) O(L) O ( L ) by Eq. (3) ; their total cost is
O ( n D L + n 2 L 2 ) = O ( n 3 N L ) , O(n\sqrt{D}L+n^2L^2)=O(n^3NL), O ( n D L + n 2 L 2 ) = O ( n 3 N L ) ,
using L ≤ N L\le N L ≤ N . The changes of basis cost O ( ( n + L / n ) N ) O((n+L/n)\sqrt{N}) O (( n + L / n ) N ) , reflections O ( n ) O(n) O ( n ) per query, catalyst preparation and unpreparation O ( n L ) O(nL) O ( n L ) , and the accumulated phase O ( L ) O(L) O ( L ) , all within the T T T -count in Eq. (16) . Sequential queries reuse O ( N B + b 2 B ) = O ( n N ) O(N\sqrt{B}+b^2B)=O(nN) O ( N B + b 2 B ) = O ( n N ) ancilla qubits, which also suffice for the catalyst, logical registers, and sign oracle.
Comparison of precision dependence. For L = N γ + o ( 1 ) ≤ N L=N^{\gamma+o(1)}\le N L = N γ + o ( 1 ) ≤ N with fixed γ ≥ 0 \gamma\ge0 γ ≥ 0 , Theorem 4 has a smaller leading power of N N N than Tan’s bound [7 ] when γ < 1 \gamma<1 γ < 1 and that of Ref. [9 ] when γ < 2 / 3 \gamma<2/3 γ < 2/3 , ignoring polynomial factors in n n n . Including these factors, L = o ( N 2 / 3 / n 16 / 3 ) L=o(N^{2/3}/n^{16/3}) L = o ( N 2/3 / n 16/3 ) suffices for improvement over the latter bound, which is smaller among those compared here for N 2 / 3 < L ≤ N N^{2/3}<L\le N N 2/3 < L ≤ N . Theorem 4 covers L ≤ N L\le N L ≤ N , and Tan’s bound also applies for L > N L>N L > N .
For N 1 / 4 ≤ L ≤ N N^{1/4}\le L\le N N 1/4 ≤ L ≤ N , our bound is O ( n 3 N L ) O(n^3NL) O ( n 3 N L ) , with the O ~ ( N L ) \widetilde{O}(NL) O ( N L ) term arising from the first correction’s O ( n 2 L ) O(n^2L) O ( n 2 L ) queries to the block encoding of G ~ 1 \widetilde{G}_1 G 1 . The gap to the counting scale Ω ( N L ) \Omega(N\sqrt{L}) Ω ( N L ) is a factor L \sqrt{L} L , up to polynomial factors in n n n ; here L = Θ ( log 2 ( 1 / ϵ ) ) L=\Theta(\log_2(1/\epsilon)) L = Θ ( log 2 ( 1/ ϵ )) .
Effective classical compilation
The constructions underlying Theorems 3 and 4 treat matrix logarithms, exponentials, norms, comparisons, rounding, and sampling from exact finite distributions as oracle operations. Their probability estimates bound the expected number of resampling trials by a constant for the constant-precision construction and by O ( n + L / n ) O(n+L/n) O ( n + L / n ) in total for the refined construction. These trial counts do not bound classical running time: the oracles need not have unit cost on a rational-arithmetic RAM, and certified entry approximations alone may not decide zero tests or rounding ties.
Finite circuit search avoids these decisions by using the strict error margins in the existence proofs. It yields the following computability guarantee, with no polynomial bound on classical compilation time.
Proposition 1 (Effective compilation). Suppose that n ≥ 1 n\ge1 n ≥ 1 , the entries of U ∈ U ( N ) U\in U(N) U ∈ U ( N ) are supplied by algorithms returning certified rational approximations to any requested accuracy, and ϵ > 0 \epsilon>0 ϵ > 0 is rational or supplied by such an algorithm. Given a choice of Theorems 3 and 4 and a promise that ( n , ϵ ) (n,\epsilon) ( n , ϵ ) lies in its parameter range, a deterministic algorithm terminates with a finite Clifford+T T T circuit with full-output implementation error strictly less than ϵ \epsilon ϵ and the selected theorem’s asymptotic T T T - and ancilla bounds. The compiler relies on the parameter-range promise and requires only computability, with no bound on the time to approximate the entries.
Proof. We use H, S, CNOT, T T T on specified wires, retaining their matrix phases and replacing T † T^\dagger T † by S † T S^\dagger T S † T without changing the T T T -count. All auxiliary registers start in ∣ 0 ⟩ |0\rangle ∣0 ⟩ , as in Definition 1.
Strict witnesses at the original precision. The proof in Appendix § 1.1.4 allocates errors ϵ / 4 , ϵ / 4 , ϵ / 8 , ϵ / 8 , ϵ / 8 \epsilon/4,\epsilon/4,\epsilon/8,\epsilon/8,\epsilon/8 ϵ /4 , ϵ /4 , ϵ /8 , ϵ /8 , ϵ /8 , whose sum is 7 ϵ / 8 7\epsilon/8 7 ϵ /8 ; its early exits have no larger error. The proof in Appendix § 1.1.5 .2 allocates five contributions of at most ϵ / 8 \epsilon/8 ϵ /8 , whose sum is 5 ϵ / 8 5\epsilon/8 5 ϵ /8 . Thus either proof establishes the existence of a circuit with full-output error at most 7 ϵ / 8 7\epsilon/8 7 ϵ /8 and the stated quantum resources, even if its exact-data choices are not computable. These witnesses use the original ϵ \epsilon ϵ , preserving both the lower endpoint in Theorem 3 and the endpoint L = N L=N L = N in Theorem 4.
Computable resource scales. With L = n + log 2 ( 1 / ϵ ) L=n+\log_2(1/\epsilon) L = n + log 2 ( 1/ ϵ ) , define the comparison scales ( F T , F A ) (F_T,F_A) ( F T , F A ) for Theorems 3 and 4 by
F T = n 2 L N 8 / 7 ϵ − 6 / 7 , F A = n L N 6 / 7 ϵ − 8 / 7 , F_T=n^2LN^{8/7}\epsilon^{-6/7},\qquad F_A=nLN^{6/7}\epsilon^{-8/7}, F T = n 2 L N 8/7 ϵ − 6/7 , F A = n L N 6/7 ϵ − 8/7 ,
F T = n 3 ( N 8 / 7 L 3 / 7 + N L ) , F A = n N , F_T=n^3(N^{8/7}L^{3/7}+NL),\qquad F_A=nN, F T = n 3 ( N 8/7 L 3/7 + N L ) , F A = n N ,
respectively. These scales are at least one on the stated parameter ranges, and the witnesses satisfy T ≤ c T F T T\le c_TF_T T ≤ c T F T and m ≤ c A F A m\le c_AF_A m ≤ c A F A for fixed absolute constants c T , c A c_T,c_A c T , c A . The compiler uses rationally computed integer budgets and increases them to accommodate these constants.
First choose a positive rational r r r such that
31 32 ϵ < r < ϵ . \frac{31}{32}\epsilon<r<\epsilon. 32 31 ϵ < r < ϵ .
For computable real ϵ \epsilon ϵ , refine certified rational bounds 0 < l ≤ ϵ ≤ u 0<l\le\epsilon\le u 0 < l ≤ ϵ ≤ u until ( 31 / 32 ) u < l (31/32)u<l ( 31/32 ) u < l , and choose r r r strictly between ( 31 / 32 ) u (31/32)u ( 31/32 ) u and l l l . Let p p p be the least nonnegative integer such that r 2 p ≥ 1 r2^p \ge1 r 2 p ≥ 1 , found by rational comparisons, and put L ‾ = n + p \overline{L}=n+p L = n + p . Since ϵ / 2 < r < ϵ ≤ 1 \epsilon/2 < r < \epsilon\le1 ϵ /2 < r < ϵ ≤ 1 , minimality gives
log 2 ( 1 / ϵ ) ≤ p < log 2 ( 1 / ϵ ) + 2 , L ≤ L ‾ ≤ 3 L . \log_2(1/\epsilon) \le p < \log_2(1/\epsilon)+2,\qquad L \le\overline{L} \le3L. log 2 ( 1/ ϵ ) ≤ p < log 2 ( 1/ ϵ ) + 2 , L ≤ L ≤ 3 L .
The search uses L ‾ \overline{L} L only to set resource budgets; it may exceed N N N at L = N L=N L = N , since the witness still uses the original ϵ \epsilon ϵ and L L L .
For nonnegative rational x x x , let R 7 ( x ) R_7(x) R 7 ( x ) be the least nonnegative integer j j j with x ≤ j 7 x \le j^7 x ≤ j 7 , found by rational comparisons; then
x 1 / 7 ≤ R 7 ( x ) < x 1 / 7 + 1. x^{1/7} \le R_7(x) < x^{1/7}+1. x 1/7 ≤ R 7 ( x ) < x 1/7 + 1.
For Theorem 3, define the integer budgets by
t = n 2 L ‾ R 7 ( N 8 / r 6 ) , t=n^2\overline{L}R_7(N^8/r^6), t = n 2 L R 7 ( N 8 / r 6 ) ,
a = n L ‾ R 7 ( N 6 / r 8 ) . a=n\overline{L}R_7(N^6/r^8). a = n L R 7 ( N 6 / r 8 ) .
For Theorem 4, instead use
t = n 3 ( R 7 ( N 8 L ‾ 3 ) + N L ‾ ) , t=n^3\left(R_7(N^8\overline{L}^3)+N\overline{L}\right), t = n 3 ( R 7 ( N 8 L 3 ) + N L ) ,
All arguments of R 7 R_7 R 7 are rational. Using r > ϵ / 2 r>\epsilon/2 r > ϵ /2 , L ≤ L ‾ ≤ 3 L L\le\overline{L}\le3L L ≤ L ≤ 3 L , and the fact that the relevant root factors are at least one gives
F T ≤ t ≤ 9 F T , F A ≤ a ≤ 15 F A for xref‘Theorem 3‘, F_T\le t\le9F_T,\qquad F_A\le a\le15F_A\qquad\text{for {xref}`Theorem 3`,} F T ≤ t ≤ 9 F T , F A ≤ a ≤ 15 F A for xref ‘Theorem 3‘,
and
F T ≤ t ≤ 3 F T , a = F A for xref‘Theorem 4‘. F_T\le t\le3F_T,\qquad a=F_A\qquad\text{for {xref}`Theorem 4`.} F T ≤ t ≤ 3 F T , a = F A for xref ‘Theorem 4‘.
Thus the rational-arithmetic budgets satisfy F T ≤ t ≤ 15 F T F_T\le t\le15F_T F T ≤ t ≤ 15 F T and F A ≤ a ≤ 15 F A F_A\le a\le15F_A F A ≤ a ≤ 15 F A in either regime.
A finite family at each resource budget. For each fixed number q q q of wires, the group C q C_q C q generated by the elementary Clifford gates H, S, CNOT is finite as a group of matrices with their scalar phases retained. Conjugation permutes the finite set of signed Hermitian Pauli matrices. A matrix in the kernel commutes with all single-wire X X X and Z Z Z matrices and is therefore z I zI z I . Each elementary Clifford generator has determinant in { 1 , − 1 , i , − i } \{1,-1,i,-i\} { 1 , − 1 , i , − i } , so this scalar kernel satisfies z 4 ⋅ 2 q = 1 z^ {4\cdot2^q}=1 z 4 ⋅ 2 q = 1 ; the finite image and kernel imply that C q C_q C q is finite. Its entries lie in Q ( e i π / 4 ) \mathbb{Q}(e^{i\pi/4}) Q ( e iπ /4 ) , where exact arithmetic and equality are decidable, so breadth-first closure under the generators terminates with a finite gate word for each element of C q C_q C q .
For integer budgets A , B A,B A , B , set q = n + A q=n+A q = n + A and enumerate the finite set of matrix products
C h T i h C h − 1 ⋯ T i 1 C 0 , C_hT_{i_h}C_{h-1}\cdots T_{i_1}C_0, C h T i h C h − 1 ⋯ T i 1 C 0 ,
where 0 ≤ h ≤ B 0\le h\le B 0 ≤ h ≤ B , C j ∈ C q C_j\in C_q C j ∈ C q , and 1 ≤ i j ≤ q 1\le i_j\le q 1 ≤ i j ≤ q . Grouping consecutive Clifford gates puts every circuit with at most B B B occurrences of T T T in this finite family, regardless of its Clifford-word length. Circuits with fewer than A A A ancillas are included by adding unused clean ancillas, preserving their T T T -count and full-output error.
A terminating test for every candidate. Write d = 2 n + A d=2^{n+A} d = 2 n + A , let J A = ∣ 0 A ⟩ ⊗ I N : C N ⟶ C d J_A=\lvert0^A\rangle\otimes I_N:\mathbb{C}^N\longrightarrow\mathbb{C}^d J A = ∣ 0 A ⟩ ⊗ I N : C N ⟶ C d , and for a candidate matrix C C C put
E C = C J A − J A U , e C = ∥ E C ∥ . E_C=CJ_A-J_AU,\qquad e_C=\lVert E_C\rVert. E C = C J A − J A U , e C = ∥ E C ∥ .
This full-output error map includes leakage out of the clean-ancilla subspace. For any positive rational η \eta η , compute a rational upper bound u C u_C u C satisfying
e C ≤ u C ≤ e C + η e_C\le u_C\le e_C+\eta e C ≤ u C ≤ e C + η
in finite time as follows. Compute a rational complex matrix Q Q Q approximating every entry of E C E_C E C to within η / ( 4 d N ) \eta/(4dN) η / ( 4 d N ) . Then ∥ E C − Q ∥ ≤ ∥ E C − Q ∥ F ≤ η / 4 \lVert E_C-Q\rVert\le\lVert E_C-Q\rVert_F\le\eta/4 ∥ E C − Q ∥ ≤ ∥ E C − Q ∥ F ≤ η /4 . Starting with j = 0 j=0 j = 0 , test the rational numbers s j = j η / 2 s_j=j\eta/2 s j = j η /2 until s j 2 I N − Q † Q s_j^2I_N-Q^\dagger Q s j 2 I N − Q † Q is positive semidefinite. Each test checks that all principal minors of this rational Hermitian matrix are nonnegative. The loop terminates at a number s s s satisfying ∥ Q ∥ ≤ s < ∥ Q ∥ + η / 2 \lVert Q\rVert\le s<\lVert Q\rVert+\eta/2 ∥ Q ∥ ≤ s < ∥ Q ∥ + η /2 , except that s = ∥ Q ∥ = 0 s=\lVert Q\rVert=0 s = ∥ Q ∥ = 0 is also possible. Hence u C = s + η / 4 u_C=s+\eta/4 u C = s + η /4 satisfies the stated error certificate using only rational comparisons.
Use this test with η = r / 64 \eta=r/64 η = r /64 , and accept a candidate precisely when the resulting rational upper bound satisfies u C < r u_C<r u C < r . Every candidate receives a finite accept-or-reject test; acceptance certifies e C < r < ϵ e_C<r<\epsilon e C < r < ϵ , and every witness with e C ≤ 7 ϵ / 8 e_C\le7\epsilon/8 e C ≤ 7 ϵ /8 is accepted because
u C ≤ 7 8 ϵ + r 64 < 57 64 ϵ < 31 32 ϵ < r . u_C\le\frac{7}{8}\epsilon+\frac{r}{64}<\frac{57}{64}\epsilon<\frac{31}{32}\epsilon<r. u C ≤ 8 7 ϵ + 64 r < 64 57 ϵ < 32 31 ϵ < r .
Search, termination, and resources. For k = 1 , 2 , … k=1,2,\ldots k = 1 , 2 , … , set A = k a A=ka A = k a and B = k t B=kt B = k t , enumerate the finite normal-form family above, and apply the finite test to every candidate, returning the first one accepted and otherwise exhausting the stage before proceeding. Fix any integer K ≥ max { 1 , c T , c A } K\ge\max\{1,c_T,c_A\} K ≥ max { 1 , c T , c A } . Each stage terminates, and stage K K K contains a witness with unused clean ancillas added if needed, so the search returns a circuit at some k ≤ K k\le K k ≤ K with
T ≤ K t = O ( F T ) , m ≤ K a = O ( F A ) . T\le Kt=O(F_T),\qquad m\le Ka=O(F_A). T ≤ K t = O ( F T ) , m ≤ K a = O ( F A ) .
The constants are uniform in U , n , ϵ U,n,\epsilon U , n , ϵ , although the compiler need not know K K K ; its output uses finitely many Clifford gates, whose number is unrestricted by the theorems. The full matrix norm retains scalar phase, and the ancilla bound includes the phase-synthesis ancilla from the existence proofs. The compiler uses certified input approximations, finite circuit enumeration, and rational error certificates. □ \square □
Lower bounds in the sequential block-SELECT model
The proof of Theorem 5 uses three ingredients. Lemma 12 compresses each generator by sampling blocks. Lemma 13 controls the resulting product error. Together they supply the compression used in Lemma 14, which bounds the description length required by a typical target. In Appendix § 2.1 4, we optimize the allocation to turn this information bound into a cost lower bound.
Unbiased block sparsification
Lemma 12 (Unbiased block sparsification). Let K = H k ≠ 0 K=H_k\ne0 K = H k = 0 be a Hermitian generator with the block parameters of Definition 3, and put w k = ∑ I , J ∥ K I J ∥ w_k=\sum_{I,J}\lVert K_{IJ}\rVert w k = ∑ I , J ∥ K I J ∥ . For ϵ k > 0 \epsilon_k>0 ϵ k > 0 , δ ∈ ( 0 , 1 ) \delta\in(0,1) δ ∈ ( 0 , 1 ) , and any integer
t ≥ t k ( ϵ k , δ ) : = 3 D ( 1 + β k 2 ϵ k 2 ) log 2 N δ , (51) t\ge t_k(\epsilon_k,\delta):=3D\left(1+\frac{\beta_k^2}{\epsilon_k^2}\right)\log\frac{2N}{\delta}, \tag*{(51)} t ≥ t k ( ϵ k , δ ) := 3 D ( 1 + ϵ k 2 β k 2 ) log δ 2 N , (51)
there is a Hermitian estimator K ^ \widehat{K} K formed from t t t independent sampled adjoint block pairs, each of norm at most w k / t w_k/t w k / t . It satisfies E K ^ = K \mathbb{E}\widehat{K}=K E K = K , ∥ K ^ ∥ ≤ w k ≤ D β k \lVert\widehat{K}\rVert\le w_k\le D\beta_k ∥ K ∥ ≤ w k ≤ D β k , and Pr ( ∥ K ^ − K ∥ ≤ ϵ k ) ≥ 1 − δ \Pr(\lVert\widehat{K}-K\rVert\le\epsilon_k)\ge1-\delta Pr (∥ K − K ∥ ≤ ϵ k ) ≥ 1 − δ .
Proof. Rowwise Cauchy–Schwarz and the block Schur test give
max I ∑ J ∥ K I J ∥ ≤ β k , ∥ K ∥ ≤ β k , w k ≤ D β k . (52) \max_I\sum_J\lVert K_{IJ}\rVert\le\beta_k,\qquad\lVert K\rVert\le\beta_k,\qquad w_k\le D\beta_k. \tag*{(52)} I max J ∑ ∥ K I J ∥ ≤ β k , ∥ K ∥ ≤ β k , w k ≤ D β k . (52)
Sample t t t unordered block pairs independently. Pair { I , J } \{I,J\} { I , J } with I < J I<J I < J has probability 2 ∥ K I J ∥ / w k 2\lVert K_{IJ}\rVert/w_k 2 ∥ K I J ∥ / w k , and the diagonal pair { I , I } \{I,I\} { I , I } has probability ∥ K I I ∥ / w k \lVert K_{II}\rVert/w_k ∥ K I I ∥ / w k . Here E I J E_{IJ} E I J is the D × D D\times D D × D matrix with a 1 in position ( I , J ) (I,J) ( I , J ) and zeros elsewhere. A sampled pair contributes
w k 2 t ( E I J ⊗ V I J + E J I ⊗ V I J † ) (53) \frac{w_k}{2t}\left(E_{IJ}\otimes V_{IJ}+E_{JI}\otimes V_{IJ}^{\dagger}\right) \tag*{(53)} 2 t w k ( E I J ⊗ V I J + E J I ⊗ V I J † ) (53)
for I < J I<J I < J , or w k t E I I ⊗ V I I \frac{w_k}{t}E_{II}\otimes V_{II} t w k E I I ⊗ V I I for a diagonal pair, with V I J = K I J / ∥ K I J ∥ V_{IJ}=K_{IJ}/\lVert K_{IJ}\rVert V I J = K I J / ∥ K I J ∥ for a sampled nonzero block. Their sum K ^ \widehat{K} K is Hermitian, unbiased, and has ∥ K ^ ∥ ≤ w k \lVert\widehat{K}\rVert\le w_k ∥ K ∥ ≤ w k . Centered sample norms are at most 2 w k / t 2w_k/t 2 w k / t . The I I I -th block of a sample’s second moment is at most ( w k / t 2 ) ∑ J ∥ K I J ∥ (w_k/t^2)\sum_J\lVert K_{IJ}\rVert ( w k / t 2 ) ∑ J ∥ K I J ∥ , giving total variance at most w k β k / t w_k\beta_k/t w k β k / t . Matrix Bernstein [42 ] , with w k ≤ D β k w_k\le D\beta_k w k ≤ D β k and 2 β k / ϵ k ≤ 1 + β k 2 / ϵ k 2 2\beta_k/\epsilon_k\le1+\beta_k^2/\epsilon_k^2 2 β k / ϵ k ≤ 1 + β k 2 / ϵ k 2 , gives the claimed tail bound for Eq. (51) . □ \square □
Composition of sparsification errors
For a design, an allocation consists of a subset O ⊆ { k : H k ≠ 0 } \mathcal{O}\subseteq\{k:H_k\ne0\} O ⊆ { k : H k = 0 } and a parameter a > 0 a>0 a > 0 . Each selected generator receives the positive error tolerance
ϵ k 2 = ν β k / a , ν : = ϵ 2 72 log ( 4 N ) . (54) \epsilon_k^2=\nu\beta_k/a,\qquad\nu:=\frac{\epsilon^2}{72\log(4N)}. \tag*{(54)} ϵ k 2 = ν β k / a , ν := 72 log ( 4 N ) ϵ 2 . (54)
The allocation is valid if ∑ k ∈ O β k ≤ a \sum_{k\in\mathcal{O}}\beta_k\le a ∑ k ∈ O β k ≤ a , so that ∑ k ∈ O ϵ k 2 ≤ ν \sum_{k\in\mathcal{O}}\epsilon_k^2\le\nu ∑ k ∈ O ϵ k 2 ≤ ν .
Lemma 13 (Composition of sparsification errors). Fix a design with product X = W s e i H s ⋯ W 1 e i H 1 W 0 X=W_s e^{iH_s}\cdots W_1e^{iH_1}W_0 X = W s e i H s ⋯ W 1 e i H 1 W 0 , an error 0 < ϵ ≤ 1 / 2 0<\epsilon\le1/2 0 < ϵ ≤ 1/2 , and a valid allocation ( O , a ) (\mathcal{O},a) ( O , a ) . For k ∈ O k\in\mathcal{O} k ∈ O , draw independent estimators from Lemma 12 with δ k = min { 1 / 2 , ν / ( 4 D a ) } \delta_k=\min\{1/2,\nu/(4Da)\} δ k = min { 1/2 , ν / ( 4 D a )} and ⌈ t k ( ϵ k , δ k ) ⌉ \lceil t_k(\epsilon_k,\delta_k)\rceil ⌈ t k ( ϵ k , δ k )⌉ samples; denote this integer count by t ~ k \tilde{t}_k t ~ k . Condition each estimator separately on G k = { ∥ H ^ k − H k ∥ ≤ ϵ k } G_k=\{\lVert\widehat{H}_k-H_k\rVert\le\epsilon_k\} G k = {∥ H k − H k ∥ ≤ ϵ k } . Keeping H k H_k H k for k ∉ O k\notin\mathcal{O} k ∈ / O , let X ^ \widehat{X} X be the resulting product. Under these conditioned laws,
Pr ( ∥ X ^ − X ∥ ≤ 2 ϵ ) ≥ 1 / 2. \Pr(\lVert\widehat{X}-X\rVert\le2\epsilon)\ge1/2. Pr (∥ X − X ∥ ≤ 2 ϵ ) ≥ 1/2.
Proof. Write Δ k = H ^ k − H k \Delta_k=\widehat{H}_k-H_k Δ k = H k − H k for k ∈ O k\in\mathcal{O} k ∈ O ; expectations use the independent conditioned laws. Before conditioning, each error has mean zero and norm at most 2 D β k 2D\beta_k 2 D β k by Lemma 12. The acceptance probability is at least 1 − δ k ≥ 1 / 2 1-\delta_k\ge1/2 1 − δ k ≥ 1/2 , so
∥ E Δ k ∥ ≤ 2 δ k D β k 1 − δ k ≤ 4 δ k D β k ≤ ϵ k 2 . \lVert\mathbb{E}\Delta_k\rVert\le\frac{2\delta_kD\beta_k}{1-\delta_k}\le4\delta_kD\beta_k\le\epsilon_k^2. ∥ E Δ k ∥ ≤ 1 − δ k 2 δ k D β k ≤ 4 δ k D β k ≤ ϵ k 2 .
The second-order Duhamel expansion has a linear term bounded by ∥ E Δ k ∥ \lVert\mathbb{E}\Delta_k\rVert ∥ E Δ k ∥ and a remainder bounded by 1 2 E ∥ Δ k ∥ 2 \frac{1}{2}\mathbb{E}\lVert\Delta_k\rVert^2 2 1 E ∥ Δ k ∥ 2 , so
∥ e i ( H k + Δ k ) − e i H k ∥ ≤ ∥ E Δ k ∥ + 1 2 E ∥ Δ k ∥ 2 ≤ 2 ϵ k 2 . (55) \left\lVert e^{i(H_k+\Delta_k)}-e^{iH_k}\right\rVert
\le\lVert\mathbb{E}\Delta_k\rVert+\frac{1}{2}\mathbb{E}\lVert\Delta_k\rVert^2
\le2\epsilon_k^2. \tag*{(55)} e i ( H k + Δ k ) − e i H k ≤ ∥ E Δ k ∥ + 2 1 E ∥ Δ k ∥ 2 ≤ 2 ϵ k 2 . (55)
The unitary factors make this estimate uniform in H k H_k H k . List the sampled generator indices as k 1 , … , k ∣ O ∣ k_1,\ldots,k_{|\mathcal{O}|} k 1 , … , k ∣ O ∣ in product order, and let X j X_j X j replace the first j j j of them. Write X j − X j − 1 = Z j + d j X_j-X_{j-1}=Z_j+d_j X j − X j − 1 = Z j + d j , where d j d_j d j is its conditional mean given previous samples. Unitary prefixes and suffixes preserve the bounds ∥ d j ∥ ≤ 2 ϵ k j 2 \lVert d_j\rVert\le2\epsilon_{k_j}^2 ∥ d j ∥ ≤ 2 ϵ k j 2 and ∥ X j − X j − 1 ∥ ≤ ϵ k j \lVert X_j-X_{j-1}\rVert\le\epsilon_{k_j} ∥ X j − X j − 1 ∥ ≤ ϵ k j , hence ∥ Z j ∥ ≤ 3 ϵ k j \lVert Z_j\rVert\le3\epsilon_{k_j} ∥ Z j ∥ ≤ 3 ϵ k j , since ϵ < 1 \epsilon<1 ϵ < 1 . Matrix Azuma [42 ] , applied to the Hermitian dilations of the martingale differences Z j Z_j Z j , gives with probability at least 1 / 2 1/2 1/2
∥ ∑ j Z j ∥ ≤ 72 ∑ j ϵ k j 2 log ( 4 N ) ≤ ϵ . \left\lVert\sum_j Z_j\right\rVert\le\sqrt{72\sum_j\epsilon_{k_j}^2\log(4N)}\le\epsilon. j ∑ Z j ≤ 72 j ∑ ϵ k j 2 log ( 4 N ) ≤ ϵ .
The drift is at most ∑ j ∥ d j ∥ ≤ 2 ν \sum_j\lVert d_j\rVert\le2\nu ∑ j ∥ d j ∥ ≤ 2 ν , so on the same event ∥ X ^ − X ∥ ≤ ϵ + 2 ν ≤ 2 ϵ \lVert\widehat{X}-X\rVert\le\epsilon+2\nu\le2\epsilon ∥ X − X ∥ ≤ ϵ + 2 ν ≤ 2 ϵ . □ \square □
A counting argument
Lemma 14 (Information bound for compressed designs). Fix the interleaver decoding rule of Definition 3. There are absolute constants c , C > 0 c,C>0 c , C > 0 such that, for sufficiently large n n n and ϵ ∈ [ N − c , 1 ] \epsilon\in[N^{-c},1] ϵ ∈ [ N − c , 1 ] , with probability at least 1 / 2 1/2 1/2 over a Haar-random U ∈ U ( N ) U\in U(N) U ∈ U ( N ) , the following holds simultaneously for every power-of-two block size b ≤ N b\le N b ≤ N . Every design at block size b b b approximating U U U to error ϵ \epsilon ϵ with cost ( D ) ≤ N 3 \operatorname{cost}(D)\le N^3 cost ( D ) ≤ N 3 , s log N ≤ N 2 / C s\log N\le N^2/C s log N ≤ N 2 / C , and B W ≤ 1 4 N 2 log 2 ( 1 / ϵ ) B_W\le\frac{1}{4}N^2\log_2(1/\epsilon) B W ≤ 4 1 N 2 log 2 ( 1/ ϵ ) satisfies
∑ k ∉ O n k + ∑ k ∈ O min { n k , t ~ k } ≥ I 0 : = c D 2 log N . (56) \sum_{k\notin\mathcal{O}}n_k+\sum_{k\in\mathcal{O}}\min\{n_k,\tilde{t}_k\}\ge I_0:=\frac{cD^2}{\log N}. \tag*{(56)} k ∈ / O ∑ n k + k ∈ O ∑ min { n k , t ~ k } ≥ I 0 := log N c D 2 . (56)
for every valid allocation ( O , a ) (\mathcal{O},a) ( O , a ) with a ≤ N 3 a \le N^3 a ≤ N 3 . Here t k t_k t k is the integer sample count in Lemma 13.
Proof. Fix a target, a design, and an allocation satisfying the hypotheses. Among the selected generators, store those with n k ≤ t k n_k \le t_k n k ≤ t k directly. The remaining sampled set is a valid allocation with the same a a a , so Lemma 13 gives a product within 2 ϵ 2\epsilon 2 ϵ of the design. The hypotheses imply s , ∑ k β k ≤ N 3 s,\sum_k \beta_k \le N^3 s , ∑ k β k ≤ N 3 , log ( 1 / δ k ) = O ( log N ) \log(1/\delta_k)=O(\log N) log ( 1/ δ k ) = O ( log N ) , and t k ≤ N 15 t_k \le N^{15} t k ≤ N 15 for large n n n .
All stored blocks have norm at most N 4 N^4 N 4 : sampled blocks are bounded by w k ≤ D β k w_k \le D\beta_k w k ≤ D β k from Lemma 12, and directly stored blocks by β k ≤ N 3 \beta_k \le N^3 β k ≤ N 3 . Use an absolute operator-norm net of mesh ϵ ′ ′ = ϵ / N 20 \epsilon''=\epsilon/N^{20} ϵ ′′ = ϵ / N 20 in this ball, with Hermitian diagonal blocks and exact adjoint partners. Rounding preserves Hermiticity, so the resulting product remains unitary. The net has at most ( 3 N 4 / ϵ ′ ′ ) 2 b 2 (3N^4/\epsilon'')^{2b^2} ( 3 N 4 / ϵ ′′ ) 2 b 2 points, costing O ( b 2 log N ) O(b^2\log N) O ( b 2 log N ) bits per block since ϵ ≥ N − 3 \epsilon\ge N^{-3} ϵ ≥ N − 3 .
Fix one target-independent prefix-free decoder. Its header records log 2 b \log_2 b log 2 b , s s s , O \mathcal{O} O , block counts, and θ \theta θ to precision ϵ \epsilon ϵ , using O ( log n + s log N + log ( 1 / ϵ ) ) O(\log n+s\log N+\log(1/\epsilon)) O ( log n + s log N + log ( 1/ ϵ )) bits. Append the B W B_W B W interleaver bits and each block’s position (2 log 2 D 2\log_2 D 2 log 2 D bits) and rounded value. Directly stored generators need only their upper triangle; sampled blocks include their scale. Block counts and values capture the dependence on the allocation parameter a a a .
There are at most N 15 N^{15} N 15 stored blocks per generator and N 3 N^3 N 3 generators, so rounding changes the product by at most 2 N 18 ϵ ′ ′ ≤ ϵ 2N^{18}\epsilon'' \le\epsilon 2 N 18 ϵ ′′ ≤ ϵ . The code length satisfies
L ≤ C b 2 log N ( ∑ k ∉ O n k + ∑ k ∈ O min { n k , t k } ) + B W + O ( log n + s log N + log ( 1 / ϵ ) ) . (57) \mathcal{L}\le Cb^2\log N\left(\sum_{k\notin\mathcal{O}}n_k+\sum_{k\in\mathcal{O}}\min\{n_k,t_k\}\right)
+B_W+O(\log n+s\log N+\log(1/\epsilon)). \tag*{(57)} L ≤ C b 2 log N k ∈ / O ∑ n k + k ∈ O ∑ min { n k , t k } + B W + O ( log n + s log N + log ( 1/ ϵ )) . (57)
Design error, sampling, rounding, and phase error total ϵ + 2 ϵ + ϵ + ϵ = 5 ϵ \epsilon+2\epsilon+\epsilon+\epsilon=5\epsilon ϵ + 2 ϵ + ϵ + ϵ = 5 ϵ .
Szarek’s bound. We next bound the description length required to approximate a typical target. For an absolute c 1 > 0 c_1>0 c 1 > 0 , the covering numbers of U ( N ) U(N) U ( N ) in operator norm are at least ( c 1 / r ) N 2 (c_1/r)^{N^2} ( c 1 / r ) N 2 [33 ] . A maximal family of disjoint radius-r r r balls has centers forming a 2 r 2r 2 r -net, so it contains at least ( c 1 / ( 2 r ) ) N 2 (c_1/(2r))^{N^2} ( c 1 / ( 2 r ) ) N 2 balls. By unitary invariance, these balls have equal Haar measure; disjointness therefore bounds the measure of each by ( C 1 r ) N 2 (C_1r)^{N^2} ( C 1 r ) N 2 for an absolute C 1 ≥ 1 C_1\ge1 C 1 ≥ 1 .
Fewer than 2 L + 1 2^{\mathcal{L}+1} 2 L + 1 words of this fixed code have length at most L \mathcal{L} L , and each decodes uniquely [47 ] . Their 5 ϵ 5\epsilon 5 ϵ neighborhoods have total measure at most 2 L + 1 ( 5 C 1 ϵ ) N 2 2^{\mathcal{L}+1}(5C_1\epsilon)^{N^2} 2 L + 1 ( 5 C 1 ϵ ) N 2 . Thus at least half of Haar targets require N 2 log 2 ( 1 / ( 5 C 1 ϵ ) ) − 2 N^2\log_2(1/(5C_1\epsilon))-2 N 2 log 2 ( 1/ ( 5 C 1 ϵ )) − 2 bits. Because the header records the block size, subset, and counts, this single Haar event covers all target-dependent choices of designs, block sizes, and valid allocations.
Choose c ≤ 1 / 2 c\le1/2 c ≤ 1/2 so that log 2 ( 1 / ( 5 C 1 ϵ ) ) ≥ 3 2 log 2 ( 1 / ϵ ) \log_2(1/(5C_1\epsilon))\ge\frac{3}{2}\log_2(1/\epsilon) log 2 ( 1/ ( 5 C 1 ϵ )) ≥ 2 3 log 2 ( 1/ ϵ ) , and C C C so that the header term in Eq. (57) is at most 1 12 N 2 log 2 ( 1 / ϵ ) \frac{1}{12}N^2\log_2(1/\epsilon) 12 1 N 2 log 2 ( 1/ ϵ ) for large n n n . Subtracting this term and the interleaver budget from the required description length gives Eq. (56) , after reducing c c c .
Optimizing the error allocation
Proof of Theorem 5. Use the constant C C C and the Haar event of probability at least 1 / 2 1/2 1/2 from Lemma 14. Designs with cost ( D ) > N 3 \operatorname{cost}(\mathcal{D})>N^3 cost ( D ) > N 3 or s log N > N 2 / C s\log N>N^2/C s log N > N 2 / C have cost Ω ( N 2 / log N ) \Omega(N^2/\log N) Ω ( N 2 / log N ) , which implies Eq. (19) since its target scales sum to at most 2 N 2 2N^2 2 N 2 . For the remaining designs, the lemma gives Eq. (56) for every valid allocation. We choose an allocation for which the selected generators have sampled descriptions with fewer blocks than direct storage. This connects the information bound to the model cost.
Let C ′ = 4 log ( 8 D N 4 / ν ) = O ( log N ) C'=4\log(8DN^4/\nu)=O(\log N) C ′ = 4 log ( 8 D N 4 / ν ) = O ( log N ) . By Lemmas 12 and 13, the rounded sample counts satisfy t k ≤ C ′ D ( 1 + a β k / ν ) t_k\le C'D(1+a\beta_k/\nu) t k ≤ C ′ D ( 1 + a β k / ν ) . Call a generator small if n k ≤ 2 C ′ D n_k\le2C'D n k ≤ 2 C ′ D and big otherwise. For a > 0 a>0 a > 0 let
O ( a ) = { k big : n k > 2 C ′ D β k a / ν } . (58) \mathcal{O}(a)=\{k\text{ big}:n_k>2C'D\beta_k a/\nu\}. \tag*{(58)} O ( a ) = { k big : n k > 2 C ′ D β k a / ν } . (58)
and put A ( a ) = ∑ k ∈ O ( a ) β k A(a)=\sum_{k\in\mathcal{O}(a)}\beta_k A ( a ) = ∑ k ∈ O ( a ) β k . Selected generators satisfy t k < n k / 2 + n k / 2 = n k t_k<n_k/2+n_k/2=n_k t k < n k /2 + n k /2 = n k . If all generators are small, use O = ∅ \mathcal{O}=\varnothing O = ∅ and any 0 < a ≤ N 3 0<a\le N^3 0 < a ≤ N 3 ; Eq. (56) gives case (a) below. Otherwise the non-increasing, right-continuous function A A A crosses the line a a a at a ∗ = inf { a > 0 : A ( a ) ≤ a } ∈ ( 0 , N 3 ] a_*= \inf\{a>0:A(a)\le a\}\in(0,N^3] a ∗ = inf { a > 0 : A ( a ) ≤ a } ∈ ( 0 , N 3 ] . Thus A ( a ∗ ) ≤ a ∗ A(a_*)\le a_* A ( a ∗ ) ≤ a ∗ , while A ( a ∗ − ) ≥ a ∗ A(a_*^-)\ge a_* A ( a ∗ − ) ≥ a ∗ says that the big generators with n k ≥ 2 C ′ D β k a ∗ / ν n_k\ge2C'D\beta_k a_*/\nu n k ≥ 2 C ′ D β k a ∗ / ν have total weight at least a ∗ a_* a ∗ . We call these the closed-threshold group.
Inserting the allocation ( O ( a ∗ ) , a ∗ ) (\mathcal{O}(a_*),a_*) ( O ( a ∗ ) , a ∗ ) into Eq. (56) ,
∑ s m a l l n k + # { b i g } ⋅ C ′ D + ∑ b i g ∖ O ( a ∗ ) n k + C ′ D a ∗ A ( a ∗ ) ν ≥ I 0 . (59) \sum_{\mathrm{small}}n_k+\#\{\mathrm{big}\}\cdot C'D
+\sum_{\mathrm{big}\setminus\mathcal{O}(a_*)}n_k+\frac{C'Da_*A(a_*)}{\nu}\ge I_0. \tag*{(59)} small ∑ n k + # { big } ⋅ C ′ D + big ∖ O ( a ∗ ) ∑ n k + ν C ′ D a ∗ A ( a ∗ ) ≥ I 0 . (59)
The second term bounds the additive sampling allowance using the number of big generators. One of the four terms must be at least I 0 / 4 I_0/4 I 0 /4 . Split the cost into
cost l o o k = ∑ k max { 1 , β k } b n k , \operatorname{cost}_{\mathrm{look}}=\sum_k\max\{1,\beta_k\}b\sqrt{n_k}, cost look = k ∑ max { 1 , β k } b n k ,
cost p r o c = ∑ k max { 1 , β k } b 2 , \operatorname{cost}_{\mathrm{proc}}=\sum_k\max\{1,\beta_k\}b^2, cost proc = k ∑ max { 1 , β k } b 2 ,
so cost = = = cost l o o k + cost p r o c \operatorname{cost}_{\mathrm{look}}+\operatorname{cost}_{\mathrm{proc}} cost look + cost proc . The target scales are
Γ l o o k : = ϵ N D 1 / 4 , Γ p r o c : = ϵ D b 2 . (60) \Gamma_{\mathrm{look}}:=\sqrt{\epsilon}\,N D^{1/4},\qquad
\Gamma_{\mathrm{proc}}:=\epsilon\sqrt{D}\,b^2. \tag*{(60)} Γ look := ϵ N D 1/4 , Γ proc := ϵ D b 2 . (60)
We prove both bounds for whichever term of Eq. (59) is large.
Case (a): small generators. If ∑ s m a l l n k ≥ I 0 / 4 \sum_{\mathrm{small}}n_k\ge I_0/4 ∑ small n k ≥ I 0 /4 , there are at least I 0 / ( 8 C ′ D ) = Ω ~ ( D ) I_0/(8C'D)=\widetilde{\Omega}(D) I 0 / ( 8 C ′ D ) = Ω ( D ) such generators. Their block-processing cost is Ω ~ ( D b 2 ) \widetilde{\Omega}(D b^2) Ω ( D b 2 ) , and
cost l o o k ≥ b ∑ s m a l l n k 2 C ′ D = Ω ~ ( b D 3 / 2 ) ≥ Ω ~ ( Γ l o o k ) . \operatorname{cost}_{\mathrm{look}}\ge b\sum_{\mathrm{small}}\frac{n_k}{\sqrt{2C'D}}=\widetilde{\Omega}(bD^{3/2})\ge\widetilde{\Omega}(\Gamma_{\mathrm{look}}). cost look ≥ b small ∑ 2 C ′ D n k = Ω ( b D 3/2 ) ≥ Ω ( Γ look ) .
Case (b): many big generators. At least I 0 / ( 4 C ′ D ) I_0/(4C'D) I 0 / ( 4 C ′ D ) big generators, each with n k > 2 C ′ D n_k>2C'D n k > 2 C ′ D , give the same two bounds. Since N = b D N=bD N = b D , D ≥ 1 D\ge1 D ≥ 1 , and ϵ ≤ 1 \epsilon\le1 ϵ ≤ 1 , these dominate Γ l o o k \Gamma_{\mathrm{look}} Γ look and Γ p r o c \Gamma_{\mathrm{proc}} Γ proc .
Case (c): directly stored big generators. Suppose ∑ b i g O ( a ∗ ) n k ≥ I 0 / 4 \sum_{\mathrm{big}\mathcal{O}(a_*)}n_k\ge I_0/4 ∑ big O ( a ∗ ) n k ≥ I 0 /4 . These generators have β k ≥ n k ν / ( 2 C ′ D a ∗ ) \beta_k\ge n_k\nu/(2C'Da_*) β k ≥ n k ν / ( 2 C ′ D a ∗ ) . Their lookup cost is at least b I 0 / 4 bI_0/4 b I 0 /4 times
min x > 0 max { 1 , x ν / ( 2 C ′ D a ∗ ) } x = ν 2 C ′ D a ∗ , (61) \min_{x>0}\frac{\max\{1,x\nu/(2C'Da_*)\}}{\sqrt{x}}=\sqrt{\frac{\nu}{2C'Da_*}}, \tag*{(61)} x > 0 min x max { 1 , xν / ( 2 C ′ D a ∗ )} = 2 C ′ D a ∗ ν , (61)
and their block-processing cost is at least b 2 ν I 0 / ( 8 C ′ D a ∗ ) b^2\nu I_0/(8C'Da_*) b 2 ν I 0 / ( 8 C ′ D a ∗ ) .
The closed-threshold group has weight at least a ∗ a_* a ∗ and n k ≥ 2 C ′ D a ∗ / ( ν β k ) \sqrt{n_k}\ge\sqrt{2C'Da_*}/(\nu\sqrt{\beta_k}) n k ≥ 2 C ′ D a ∗ / ( ν β k ) . Since max { 1 , β k } β k ≥ β k \max\{1,\beta_k\}\sqrt{\beta_k}\ge\beta_k max { 1 , β k } β k ≥ β k , it gives lookup cost at least b 2 C ′ D / ν a ∗ 3 / 2 b\sqrt{2C'D/\nu}\,a_*^{3/2} b 2 C ′ D / ν a ∗ 3/2 and block-processing cost at least b 2 a ∗ b^2a_* b 2 a ∗ . The groups may overlap at the threshold, so combine their bounds by taking the maximum. Minimizing each maximum over a ∗ > 0 a_*>0 a ∗ > 0 gives
cost l o o k ≥ c b I 0 3 / 4 ( ν C ′ D ) 1 / 4 , \operatorname{cost}_{\mathrm{look}}\ge cbI_0^{3/4}\left(\frac{\nu}{C'D}\right)^{1/4}, cost look ≥ c b I 0 3/4 ( C ′ D ν ) 1/4 ,
cost p r o c ≥ c b 2 ν I 0 C ′ D . \operatorname{cost}_{\mathrm{proc}}\ge cb^2\sqrt{\frac{\nu I_0}{C'D}}. cost proc ≥ c b 2 C ′ D ν I 0 .
Substituting I 0 I_0 I 0 and ν \nu ν gives Ω ~ ( b D 5 / 4 ν 1 / 4 ) = Ω ~ ( Γ l o o k ) \widetilde{\Omega}(bD^{5/4}\nu^{1/4})=\widetilde{\Omega}(\Gamma_{\mathrm{look}}) Ω ( b D 5/4 ν 1/4 ) = Ω ( Γ look ) and Ω ~ ( b 2 ν D ) = Ω ~ ( Γ p r o c ) \widetilde{\Omega}(b^2\sqrt{\nu D})=\widetilde{\Omega}(\Gamma_{\mathrm{proc}}) Ω ( b 2 ν D ) = Ω ( Γ proc ) , respectively.
Case (d): sampled big generators. Suppose C ′ D a ∗ A ( a ∗ ) / ν ≥ I 0 / 4 C'Da_*A(a_*)/\nu\ge I_0/4 C ′ D a ∗ A ( a ∗ ) / ν ≥ I 0 /4 . Since A ( a ∗ ) ≤ a ∗ A(a_*)\le a_* A ( a ∗ ) ≤ a ∗ , we get a ∗ ≥ ν I 0 / ( 4 C ′ D ) = Ω ~ ( ϵ D ) a_*\ge\sqrt{\nu I_0/(4C'D)}=\widetilde{\Omega}(\epsilon\sqrt{D}) a ∗ ≥ ν I 0 / ( 4 C ′ D ) = Ω ( ϵ D ) . Use the same closed-threshold group as in case (c). Its block-processing and lookup bounds now give directly cost p r o c ≥ b 2 a ∗ = Ω ~ ( Γ p r o c ) \operatorname{cost}_{\mathrm{proc}}\ge b^2a_*=\widetilde{\Omega}(\Gamma_{\mathrm{proc}}) cost proc ≥ b 2 a ∗ = Ω ( Γ proc ) and cost l o o k ≥ b 2 C ′ D / ν a ∗ 3 / 2 = Ω ~ ( b D 5 / 4 ν 1 / 4 ) = Ω ~ ( Γ l o o k ) \operatorname{cost}_{\mathrm{look}}\ge b\sqrt{2C'D/\nu}\,a_*^{3/2}=\widetilde{\Omega}(bD^{5/4}\nu^{1/4})=\widetilde{\Omega}(\Gamma_{\mathrm{look}}) cost look ≥ b 2 C ′ D / ν a ∗ 3/2 = Ω ( b D 5/4 ν 1/4 ) = Ω ( Γ look ) .
In every case cost = Ω ~ ( Γ l o o k + Γ p r o c ) \operatorname{cost}=\widetilde{\Omega}(\Gamma_{\mathrm{look}}+\Gamma_{\mathrm{proc}}) cost = Ω ( Γ look + Γ proc ) , where all hidden factors are powers of log N \log N log N . This proves Eq. (19) .
Minimizing over b b b . Substituting D = N / b D=N/b D = N / b , the sum ϵ N 5 / 4 b − 1 / 4 + ϵ N 1 / 2 b 3 / 2 \sqrt{\epsilon N^{5/4}b^{-1/4}}+\epsilon N^{1/2}b^{3/2} ϵ N 5/4 b − 1/4 + ϵ N 1/2 b 3/2 has unrestricted minimum Θ ( ϵ 4 / 7 N 8 / 7 ) \Theta(\epsilon^{4/7}N^{8/7}) Θ ( ϵ 4/7 N 8/7 ) at b = Θ ( ϵ − 2 / 7 N 3 / 7 ) b=\Theta(\epsilon^{-2/7}N^{3/7}) b = Θ ( ϵ − 2/7 N 3/7 ) . The same lower bound holds when b b b is restricted to the allowed powers of two.
Mixed block sizes and larger interleaver budgets
We extend Theorem 5 to mixed block sizes and larger interleaver budgets. A mixed-block design is a sequence D = ( W 0 , H 1 , W 1 , … , H s , W s ) D=(W_0,H_1,W_1,\ldots,H_s,W_s) D = ( W 0 , H 1 , W 1 , … , H s , W s ) as in Definition 3, except that each generator H k H_k H k carries its own power-of-two block size b k ≤ N b_k\le N b k ≤ N , which may be chosen after seeing U U U . The parameters n k n_k n k , m k m_k m k , c k c_k c k , and β k \beta_k β k of generator k k k are computed in the partition of Sec. II into blocks of size b k b_k b k , and
cost ( D ) = ∑ k = 1 s max { 1 , β k } ( b k n k + b k 2 ) . (62) \operatorname{cost}(\mathcal{D})=\sum_{k=1}^{s}\max\{1,\beta_k\}\left(b_k\sqrt{n_k}+b_k^2\right). \tag*{(62)} cost ( D ) = k = 1 ∑ s max { 1 , β k } ( b k n k + b k 2 ) . (62)
A design at block size b b b is the special case in which b k = b b_k=b b k = b for all k k k .
Theorem 6 (Mixed block sizes and larger interleaver budgets). There are absolute constants c c c , c 0 c_0 c 0 , C > 0 C>0 C > 0 with the following property. Let n n n be large enough, γ ∈ ( 0 , 3 / 4 ] \gamma\in(0,3/4] γ ∈ ( 0 , 3/4 ] , and ϵ ∈ [ N − 3 , c 0 1 / γ ] \epsilon\in[N^{-3},c_0^{1/\gamma}] ϵ ∈ [ N − 3 , c 0 1/ γ ] . Then, with probability at least 1 / 2 1/2 1/2 over a Haar-random U ∈ U ( N ) U\in U(N) U ∈ U ( N ) , every mixed-block design with B W ≤ ( 1 − γ ) N 2 log 2 ( 1 / ϵ ) B_W\le(1-\gamma)N^2\log_2(1/\epsilon) B W ≤ ( 1 − γ ) N 2 log 2 ( 1/ ϵ ) that approximates U U U to error ϵ \epsilon ϵ satisfies
cost ( D ) ≥ c γ C n ϵ 4 / 7 N 8 / 7 . (63) \operatorname{cost}(\mathcal{D})\ge\frac{c\gamma}{C n}\epsilon^{4/7}N^{8/7}. \tag*{(63)} cost ( D ) ≥ C n c γ ϵ 4/7 N 8/7 . (63)
For γ = 3 / 4 \gamma=3/4 γ = 3/4 the interleaver budget is that of Theorem 5. The condition ϵ ≤ c 0 1 / γ \epsilon\le c_0^{1/\gamma} ϵ ≤ c 0 1/ γ reads γ ≥ log ( 1 / c 0 ) / log ( 1 / ϵ ) \gamma\ge\log(1/c_0)/\log(1/\epsilon) γ ≥ log ( 1/ c 0 ) / log ( 1/ ϵ ) . Within the model, a worst-case cost guarantee smaller than ϵ 4 / 7 N 8 / 7 \epsilon^{4/7}N^{8/7} ϵ 4/7 N 8/7 by a fixed power of N N N therefore requires an interleaver budget allowing all but a fraction O ( 1 / log ( 1 / ϵ ) ) O(1/\log(1/\epsilon)) O ( 1/ log ( 1/ ϵ )) of the N 2 log 2 ( 1 / ϵ ) N^2\log_2(1/\epsilon) N 2 log 2 ( 1/ ϵ ) description bits. At ϵ = N − 3 \epsilon=N^{-3} ϵ = N − 3 , this fraction is O ( 1 / n ) O(1/n) O ( 1/ n ) .
Proof. Group generators by G r = { k : b k = 2 r } G_r=\{k:b_k=2^r\} G r = { k : b k = 2 r } , with b ( r ) = 2 r b^{(r)}=2^r b ( r ) = 2 r and D r = N / b ( r ) D_r=N/b^{(r)} D r = N / b ( r ) , keeping their original product order. As before assume cost ≤ N 3 \operatorname{cost}\le N^3 cost ≤ N 3 , so s , ∑ k β k ≤ N 3 s,\sum_k\beta_k\le N^3 s , ∑ k β k ≤ N 3 . Here γ \gamma γ is the interleaver-budget fraction.
Joint compression. Give each class an allocation ( O r , a r ) (\mathcal{O}_r,a_r) ( O r , a r ) satisfying a r > 0 a_r>0 a r > 0 , O r ⊆ { k ∈ G r : H k ≠ { 0 } } \mathcal{O}_r\subseteq\{k\in G_r:H_k\ne\{0\}\} O r ⊆ { k ∈ G r : H k = { 0 }} , and ∑ k ∈ O r β k ≤ a r ≤ N 3 \sum_{k\in\mathcal{O}_r}\beta_k\le a_r\le N^3 ∑ k ∈ O r β k ≤ a r ≤ N 3 . Assign it the share ν r = ν / ( n + 1 ) \nu_r=\nu/(n+1) ν r = ν / ( n + 1 ) of the total squared-error tolerance ν \nu ν . Zero generators contribute identically zero and are kept exact. Every sampled generator has β k > 0 \beta_k>0 β k > 0 and ϵ k > 0 \epsilon_k>0 ϵ k > 0 . Apply Lemma 12 using ϵ k 2 = ν r β k / a r \epsilon_k^2=\nu_r\beta_k/a_r ϵ k 2 = ν r β k / a r and δ k = min { 1 / 2 , ν r / ( 4 D r a r ) } \delta_k=\min\{1/2,\nu_r/(4D_ra_r)\} δ k = min { 1/2 , ν r / ( 4 D r a r )} . The conditioning estimate in the proof of Lemma 13 gives ∥ Δ k ∥ ≤ ϵ k 2 \lVert\Delta_k\rVert\le\epsilon_k^2 ∥ Δ k ∥ ≤ ϵ k 2 . Its martingale argument applies across all classes because ∑ k ϵ k 2 ≤ ∑ r ν r = ν \sum_k\epsilon_k^2\le\sum_r\nu_r=\nu ∑ k ϵ k 2 ≤ ∑ r ν r = ν , giving a jointly sparsified product within 2 ϵ 2\epsilon 2 ϵ of the original.
The fixed code in the proof of Lemma 14 adds O ( s log n ) O(s\log n) O ( s log n ) header bits for the b k b_k b k . Each class-r r r block costs O ( ( b ( r ) ) 2 log N ) O((b^{(r)})^2\log N) O (( b ( r ) ) 2 log N ) bits including its position. The counts and values capture the class’s allocation choices. Thus the same counting event covers every mixed design and allocation.
Put c 0 = ( 5 C 1 ) − 2 c_0=(5C_1)^{-2} c 0 = ( 5 C 1 ) − 2 . Then ϵ ≤ c 0 1 / γ \epsilon\le c_0^{1/\gamma} ϵ ≤ c 0 1/ γ gives
log 2 ( 1 / ( 5 C 1 ϵ ) ) ≥ ( 1 − γ / 2 ) log 2 ( 1 / ϵ ) . \log_2(1/(5C_1\epsilon))\ge(1-\gamma/2)\log_2(1/\epsilon). log 2 ( 1/ ( 5 C 1 ϵ )) ≥ ( 1 − γ /2 ) log 2 ( 1/ ϵ ) .
At least half of Haar targets therefore require ( 1 − γ / 2 ) N 2 log 2 ( 1 / ϵ ) − 2 (1-\gamma/2)N^2\log_2(1/\epsilon)-2 ( 1 − γ /2 ) N 2 log 2 ( 1/ ϵ ) − 2 bits. Designs with s log N > γ N 2 / C s\log N>\gamma N^2/C s log N > γ N 2 / C satisfy Eq. (63) because cost ≥ s \operatorname{cost}\ge s cost ≥ s . We therefore assume s log N ≤ γ N 2 / C s\log N\le\gamma N^2/C s log N ≤ γ N 2 / C . Subtracting the interleaver and header budgets leaves at least γ N 2 log 2 ( 1 / ϵ ) / 4 \gamma N^2\log_2(1/\epsilon)/4 γ N 2 log 2 ( 1/ ϵ ) /4 bits for blocks, hence
∑ r = 0 n ( b ( r ) ) 2 q r ≥ c γ N 2 log N , (64) \sum_{r=0}^{n}(b^{(r)})^2q_r\ge\frac{c\gamma N^2}{\log N}, \tag*{(64)} r = 0 ∑ n ( b ( r ) ) 2 q r ≥ log N c γ N 2 , (64)
where q r = ∑ k ∈ G r ∖ O r n k + ∑ k ∈ O r min { n k , t k } q_r=\sum_{k\in G_r\setminus\mathcal{O}_r}n_k+\sum_{k\in\mathcal{O}_r}\min\{n_k,t_k\} q r = ∑ k ∈ G r ∖ O r n k + ∑ k ∈ O r min { n k , t k } is the number of stored blocks of class r r r . Allocation. Use the threshold allocation of Appendix § 2.1 .4 in each class, with D r D_r D r , ν r \nu_r ν r , and C r ′ = C'_r= C r ′ = 4 log ( 8 D r N 4 / ν r ) 4 \log(8D_rN^4/\nu_r) 4 log ( 8 D r N 4 / ν r ) ; classes of small generators use O r = ∅ \mathcal{O}_r = \varnothing O r = ∅ and any 0 < a r ≤ N 3 0 < a_r \le N^3 0 < a r ≤ N 3 . By Eq. (64) and ( b ( r ) ) 2 D r 2 = N 2 (b^{(r)})^2D_r^2 = N^2 ( b ( r ) ) 2 D r 2 = N 2 , some class has
q r ≥ I r : = c γ D r 2 ( n + 1 ) log N . (65) q_r \ge I_r := \frac{c\gamma D_r^2}{(n+1)\log N}. \tag*{(65)} q r ≥ I r := ( n + 1 ) log N c γ D r 2 . (65)
Apply the four deterministic cost cases to this class. Cases (a,b) are linear in I r I_r I r ; in cases (c,d), lookup scales as I r 3 / 4 ν r 1 / 4 I_r^{3/4}\nu_r^{1/4} I r 3/4 ν r 1/4 and processing as ( I r ν r ) 1 / 2 (I_r\nu_r)^{1/2} ( I r ν r ) 1/2 . Factors of n + 1 n+1 n + 1 are polynomial in n n n , while γ 3 / 4 , γ ≥ γ \gamma^{3/4}, \sqrt{\gamma} \ge\gamma γ 3/4 , γ ≥ γ . Thus this class, and hence the full design, costs at least ( c γ / n C ) ( ϵ N D r 1 / 4 + ϵ D r ( b ( r ) ) 2 ) (c\gamma/n^C)(\sqrt{\epsilon}ND_r^{1/4}+\epsilon\sqrt{D_r}(b^{(r)})^2) ( c γ / n C ) ( ϵ N D r 1/4 + ϵ D r ( b ( r ) ) 2 ) . Minimizing over b ( r ) b^{(r)} b ( r ) gives Eq. (63) .
Treating classes separately charges the other exponentials as interleavers. Coarsening by a factor q q q can raise the block-processing charge by q 2 q^2 q 2 , while refining can increase m k m_k m k and β k \beta_k β k polynomially. Joint counting preserves the original interleaver budget and each generator’s block size.
References