Skip to content

Menu

WorksPhysics and Astronomy

Unitary Synthesis with a Unary Tracker

Download PDFView on arXiv

Ask your agent about this work

Your agent reads this work through Valency, with its citations and similar works. Paste this at the start of a chat.

Use the Valency MCP. Work: W_vgamjg95. Fetch it with get_paper_by_id, then find its nearest works with find_similar_papers and tell me what it adds.

Works with any MCP client. Not connected yet? Connect your agent

Abstract

This manuscript studies general unitary synthesis using unary-encoded ancillary register. Our first construction focuses on the TT-cost of unitary synthesis. We maintain a unary register that coherently tracks the computational-basis label of the data. This allows Boolean lookups to use only CNOTs and shares the precision-dependent synthesis cost across the branches of each cosine-sine decomposition (CSD) factor. For a classically specified nn-qubit unitary with KK mixing branches in its CSD, we obtain TT-count O(K+NL)O(K+NL) using N+O(L)N+O(L) clean ancillas, where N=2nN=2^n and L=n+log⁡(1/ε)L=n+\log(1/ε). We also give a related construction that directly applies the unitary onto a unary register to implement disjoint branches in parallel. Combining this with the quantum Shannon decomposition gives space-depth volume O(N2)O(N^2) using arbitrary single-qubit gates and CNOTs, which matches the asymptotically optimal bound.

Introduction

Unitary synthesis is the problem of constructing a circuit of elementary quantum gates that implements a classically specified unitary. Its circuit complexity measures the resources required to implement this transformation.

We work with the universal Clifford+TT gate set. In fault-tolerant quantum computing, TT gates can be substantially more expensive than Clifford gates because of the cost of magic-state distillation. The TT-count is therefore an important resource metric, and reducing it can be worthwhile even when this requires additional ancillas or Clifford operations [4, 2].

Fault-tolerant implementations also require physical qubits and repeated error correction throughout the computation. Their cost therefore depends on both the space occupied and the time for which it is needed, motivating space-depth volume, defined as the total number of qubits multiplied by the total circuit depth, as a resource metric [3].

With these resource metrics in mind, we study how the structure of a unitary affects its synthesis TT-count. We also consider how to reduce the ancilla requirements of our construction while retaining its asymptotic space-depth volume.

Prior work. An important ingredient in unitary synthesis is loading classically specified information into a quantum circuit. Low, Kliuchnikov, and Schaeffer studied how additional workspace can reduce the TT-cost of this lookup [4]. Gosset, Kothari, and Wu used boolean functions to select short single-qubit gate sequences, obtaining optimal T-counts for state preparation and diagonal unitary synthesis [2]. Tan applied this programming approach to general unitary synthesis using the cosine-sine decomposition (CSD), grouping bits together to reduce the cost of boolean function computation [9]. Other approaches use block flattening and dilation or block-sparse Hamiltonian simulation to improve the general upper bounds [10, 5].

Our construction follows the CSD and boolean function-based approach. The CSD writes an nn-qubit unitary as a sequence of multiplexed single-qubit operations: each multiplexer acts on one target qubit, while the other bits select which single-qubit matrix is applied [7, 9]. We call each selected single-qubit rotation a branch. There are O(2n)O(2^n) such factors, and Boolean lookups select the gate instructions for their branches. This makes the cost of these lookups an important part of the synthesis cost.

Our approach. The current lower bound is Ω(2n)\Omega(2^n) TT gates for general nn-qubit unitary synthesis at constant approximation error [2]. This motivates us to ask when the CSD approach can reach this scale, up to precision factors. Since there are O(2n)O(2^n) factors, our strategy is to make their Boolean lookups free in TT-count and account separately for the cost of maintaining the lookup addresses.

We keep a unary register that coherently tracks the computational-basis label of the data register. On a unary address, any classically specified Boolean function can be loaded using only CNOTs, so these lookups have zero TT-cost. We show the entire factor can be synthesized using O(log⁡(1/δ))O(\log(1/\delta)) TT gates for approximation error δ\delta. The question is then how to maintain this address throughout the entire CSD.

We observe that within each factor of the CSD, only one data bit can change. We therefore only need to update the pairs of unary wires corresponding to the two values of that target bit. A diagonal branch leaves the label unchanged. A purely off-diagonal branch flips the target bit, so an ordinary SWAP updates its unary label. A mixing branch can create a superposition of the two target values, and we use a constant number of Fredkin gates per mixing branch to remove the old target information and restore the new information.

The resulting TT-count has two contributions: implementing the programmed operations and maintaining the unary tracker. The first is paid once per CSD factor, while the second depends on the number of mixing branches. This brings the bound towards the 2n2^n scale, up to precision factors, when the supplied factorization has sufficiently few mixing branches.

Main result. Write N=2nN=2^n, L=n+log⁡1ϵL=n+\log\frac{1}{\epsilon} and let KK denote the number of mixing branches for the CSD of some unitary U∈U(N)U\in U(N). We obtain the following bound.

Theorem 1.1 (Mixing-sensitive unitary synthesis). Let n>1n>1 and 0<ϵ<1/20<\epsilon<1/2. Given a classically specified U∈U(N)U\in U(N) with KK mixing branches in its CSD, there is a measurement-free Clifford+TT circuit CC using a=N+O(L)a=N+O(L) ancillas and TT-count

T(C)=O(K+NL).(1)T(C)=O(K+NL). \tag*{(1)}

For every normalized input ∣ψ⟩|\psi\rangle, it satisfies

∥C(∣ψ⟩∣0a⟩)−(U∣ψ⟩)∣0a⟩∥≤ϵ.(2)\left\lVert C\left(|\psi\rangle|0^a\rangle\right)-\left(U|\psi\rangle\right)|0^a\rangle\right\rVert\le\epsilon. \tag*{(2)}

We assume access to an ideal phase-gradient catalytic state.

The count KK depends on the supplied factorization, rather than being an invariant of the unitary. When KK is small, the tracker updates are inexpensive. However, for a dense factorization, KK can be Θ(N2)\Theta(N^2), so the bound does not give a general O(2n)O(2^n) synthesis algorithm, nor a general asymptotic improvement over SOTA.

Compared with synthesizing each CSD branch separately, our construction shares the precision-dependent cost across all branches of a factor. This replaces the naive bound O(N2L)O(N^2L) with O(K+NL)O(K+NL). Even for the worst-case K∈Θ(N2)K \in\Theta(N^2), the precision factor therefore multiplies NN rather than N2N^2.

This reduction in TT-count comes at the cost of O(N)O(N) ancillas, and the CNOT lookups can still require substantial circuit depth. We therefore consider a variant that uses a smaller reusable unary register and study how its depth changes with the available workspace.

Space-depth volume. In this variant, we transfer the quantum state itself into unary form, rather than keeping a unary tracker alongside the binary data. Operations on disjoint pairs of unary wires can then run in parallel.

Encoding the entire state in unary form still requires NN wires. To reduce this requirement, we instead decompose the unitary into smaller blocks and use unary encoding only within each block. We use the quantum Shannon decomposition (QSD), which builds on the CSD to express a unitary in terms of smaller uncontrolled unitaries and multiplexed single-qubit rotations [7]. We stop the recursion when the blocks fit within the available workspace.

Each block is encoded, implemented, and decoded back into binary form, leaving the unary register empty for the next block. A smaller register therefore saves ancillas but requires more blocks to be executed sequentially. Counting these steps together with the rotations between blocks gives the following tradeoff.

Theorem 1.2 (Space-depth tradeoff). Let N=2nN = 2^n and n≤a≤Nn \le a \le N. Our construction uses at most aa ancillas to implement any nn-qubit unitary. With arbitrary single-qubit gates and CNOTs, and assuming unrestricted connectivity, the implementation is exact and has depth and space-depth volume

D=O(N2a),V=O(N2),D = O\left(\frac{N^2}{a}\right), \qquad V = O(N^2),

respectively.

This variant attains the known asymptotically optimal space-depth volume over this ancilla range [8, 11].

The remainder of this manuscript proceeds as follows. In Sec. 2, we introduce the notation and the lookup and synthesis ingredients. These building blocks are combined to prove Theorem 1.1 in Sec. 3. Theorem 1.2 is then proved in Sec. 4. We provide a few open questions in Sec. 5 for future work.

Preliminaries

Throughout, let U∈U(2n)U \in U(2^n) be classically specified, and write N=2nN = 2^n. The data register D contains an arbitrary state

∣ψ⟩=∑x∈{0,1}nαx∣x⟩.(3)|\psi\rangle= \sum_{x \in\{0,1\}^n} \alpha_x |x\rangle. \tag*{(3)}

Unary tracking and classical lookup

Definition 2.1 (Unary tracker). For x∈{0,1}nx \in\{0,1\}^{n}, let ex∈{0,1}Ne_x \in\{0,1\}^{N} be a register of Hamming weight 1, with the excitation in bit position xx. An NN-qubit register A coherently tracks the data when their joint state has the form

∑xαx∣x⟩D∣ex⟩A(4)\sum_x \alpha_x |x\rangle_D |e_x\rangle_A \tag*{(4)}

The motivation for keeping this register is that it makes classical lookup free in the TT-count model, as will be described in Lemma 2.2.

Lemma 2.2 (Free boolean functions). For any classically specified boolean function f:{0,1}n→{0,1}wf : \{0,1\}^{n} \to\{0,1\}^{w}, the map

∣ex⟩∣y⟩⟼∣ex⟩∣y⊕f(x)⟩|e_x\rangle|y\rangle\longmapsto|e_x\rangle|y \oplus f(x)\rangle

on inputs of Hamming weight 1 can be implemented using only CNOTs. The output can be erased by reversing the same gates if the unary address is unchanged.

Proof. For each output bit, apply a CNOT from unary wire xx exactly when the corresponding bit of f(x)f(x) is 1. Only one unary wire is occupied, so the accumulated XOR is precisely f(x)f(x). The address is untouched, and the same CNOTs reverse the map.

We use this lemma to load two tables: the gate instructions for a single-qubit SU(2)SU(2) rotation, and a binary approximation of a phase. The tables are computed classically from UU. Their lookups may use many CNOTs, but no TT gates.

The CSD and its branches

Definition 2.3 (Multiplexed single-qubit unitary). A unitary with target qubit tt is multiplexed if

V=∑z∈{0,1}n−1∣z⟩⟨z∣tˉ⊗Vz,Vz∈U(2),V = \sum_{z \in\{0,1\}^{n-1}} |z\rangle\langle z|_{\bar{t}} \otimes V_z,\qquad V_z \in U(2),

where tˉ\bar{t} denotes the other data qubits. We call VzV_z a branch and zz its control string.

The cosine-sine decomposition (CSD) gives a factorization of any arbitrary unitary U∈U(2n)U \in U(2^n) as follows:

U=VN−1⋯V1,(5)U = V_{N-1} \cdots V_1, \tag*{(5)}

where each factor is a multiplexed single-qubit unitary [7]. For iteration jj of the CSD, we write the multiplexor as

Vj=∑z∈{0,1}n−1∣z⟩⟨z∣tˉj⊗Vj,z.(6)V_j = \sum_{z \in\{0,1\}^{n-1}} |z\rangle\langle z|_{\bar{t}_j} \otimes V_{j,z}. \tag*{(6)}

The target qubit is the tjt_jth least significant bit in DD, the controls of the multiplexor acts on all bits but tjt_j, namely tˉj\bar{t}_j, and the branches are labeled as Vj,zV_{j,z}. Within an iteration jj, we rewrite our data register as ∣zj,sj⟩|z_j,s_j\rangle, with control string zjz_j and target bit sjs_j. The corresponding pair of unary wires are ∣qzj,0⟩|q_{z_j,0}\rangle and ∣qzj,1⟩|q_{z_j,1}\rangle.

Definition 2.4 (Mixing branch count). A branch is mixing if its matrix has both nonzero diagonal and nonzero off-diagonal entries. Let Kj,z∈{0,1}K_{j,z} \in\{0,1\} be a binary indicator that equals 1 if Vj,zV_{j,z} is a mixing branch. The total number of mixing branches is therefore

K=∑j=1N−1∑z∈{0,1}n−1Kj,z.(7)K = \sum_{j=1}^{N-1} \sum_{z \in\{0,1\}^{n-1}} K_{j,z}. \tag*{(7)}

This count refers to the supplied factorization (5).

We label each unitary U∈U(2)U \in U(2) diagonal, off-diagonal, or mixing. Diagonal branches change phases without changing the target bit. Off-diagonal branches flip the bit and may also change phases. Mixing branches can create a superposition of both target values. The following factorization lets us handle these cases separately.

Lemma 2.5 (Separating target operations from phases). Each branch can be written as a target operation followed by a phase correction:

Vj,z=Dj,zRj,z,(8)V_{j,z} = D_{j,z}R_{j,z}, \tag*{(8)}

where Dj,z∈U(2)D_{j,z} \in U(2) is diagonal. For a diagonal, off-diagonal, or mixing branch, we take Rj,zR_{j,z} to be II, XX, or an element of SU(2)SU(2), respectively. In the mixing case, the phase correction is just Dj,z=eiϕj,zID_{j,z} = e^{i\phi_{j,z}} I for some real ϕj,z\phi_{j,z}.

Proof. For a diagonal branch, no target operation is needed: take Rj,z=IR_{j,z} = I and Dj,z=Vj,zD_{j,z} = V_{j,z}. For an off-diagonal branch, multiplying by XX makes the matrix diagonal. Thus take Rj,z=XR_{j,z} = X and Dj,z=Vj,zXD_{j,z} = V_{j,z}X. Since X2=IX^2 = I, we have Dj,zRj,z=Vj,zD_{j,z}R_{j,z} = V_{j,z}.

For a mixing branch, we remove a single phase to make the determinant one. Since Vj,zV_{j,z} is unitary, write det⁡Vj,z=e2iϕj,z\det V_{j,z} = e^{2i\phi_{j,z}} and set

Rj,z=e−iϕj,zVj,z,Dj,z=eiϕj,zI.R_{j,z} = e^{-i\phi_{j,z}}V_{j,z}, \qquad D_{j,z} = e^{i\phi_{j,z}}I.

Then Dj,zRj,z=Vj,zD_{j,z}R_{j,z} = V_{j,z}, and

det⁡Rj,z=e−2iϕj,z⋅det⁡Vj,z=1.\det R_{j,z} = e^{-2i\phi_{j,z}} \cdot\det V_{j,z} = 1.

Hence Rj,z∈SU(2)R_{j,z} \in SU(2).

For each factor, write Vj=DjRjV_j = D_jR_j, where

Rj=∑z∣z⟩⟨z∣tˉj⊗Rj,z(9)R_j = \sum_z |z\rangle\langle z|_{\bar t_j} \otimes R_{j,z} \tag*{(9)}
Dj=∑z∣z⟩⟨z∣tˉj⊗Dj,z.(10)D_j = \sum_z |z\rangle\langle z|_{\bar t_j} \otimes D_{j,z}. \tag*{(10)}

Thus, U=(DN−1RN−1)⋯(D1R1)U = (D_{N-1}R_{N-1})\cdots(D_1R_1).

Single-qubit synthesis

We now describe how to implement a multiplexed single-qubit unitary using a Boolean function. For each control string zz, the function gives a string of HH and TT instructions and a binary approximation of the remaining phase. We load this description, apply the instructions and phase correction, and then uncompute the description. Throughout, we assume access to ideal phase-gradient states.

Lemma 2.6 (Programmed single-qubit synthesis). For a classically specified multiplexed single-qubit unitary

V=∑z∈{0,1}m∣z⟩⟨z∣⊗VzV = \sum_{z \in\{0,1\}^{m}} |z\rangle\langle z| \otimes V_z

and error bound 0<δ<1/20 < \delta< 1/2, there is a Boolean function f:{0,1}m→{0,1}Lf : \{0,1\}^{m} \to\{0,1\}^{L}, with L=O(log⁡(1/δ))L = O(\log(1/\delta)), describing the single-qubit operation for each branch. Given a Clifford+TT circuit UfU_f implementing

∣z⟩∣0L⟩⟼∣z⟩∣f(z)⟩,|z\rangle|0^L\rangle\longmapsto|z\rangle|f(z)\rangle,

we can synthesize a δ\delta-approximation of VV in operator norm using 2T(Uf)+O(log⁡(1/δ))2T(U_f) + O(\log(1/\delta)) TT gates and O(log⁡(1/δ))O(\log(1/\delta)) clean ancillas.

Proof. First, write each branch as Vz=eiϕzRzV_z = e^{i\phi_z}R_z, where Rz∈SU(2)R_z \in SU(2). By single-qubit synthesis, we can approximate RzR_z using a string R~z\widetilde{R}_z of O(log⁡(1/δ))O(\log(1/\delta)) HH and TT gates, up to a known phase γz\gamma_z [6]:

∥R~z−eiγzRz∥≤δ/2.\lVert\widetilde{R}_z - e^{i\gamma_z}R_z\rVert\le\delta/2.

We correct this extra phase when applying the remaining phase of VzV_z.

Let ℓ=O(log⁡(1/δ))\ell= O(\log(1/\delta)) be a common bound on the string lengths. By inserting identity instructions, we can write each string as

R~z=Tb2ℓ−1(z)Hb2ℓ−2(z)⋯Tb1(z)Hb0(z),bi(z)∈{0,1}.\widetilde{R}_z = T^{b_{2\ell-1}(z)}H^{b_{2\ell-2}(z)}\cdots T^{b_1(z)}H^{b_0(z)}, \qquad b_i(z) \in\{0,1\}.

Each bit of b(z)b(z) tells us whether to apply its corresponding gate: 1 means apply HH or TT, and 0 applies the identity. Thus, a bitstring b(z)b(z) of length 2ℓ2\ell programs the rotation.

We also need to apply the phase ϕz−γz\phi_z-\gamma_z, which we approximate with bitstring pzp_z. Let q=⌈log⁡(2π/δ)⌉q = \lceil\log(2\pi/\delta)\rceil and choose a qq-bit integer pzp_z such that

∣e2πipz/2q−ei(ϕz−γz)∣≤δ/2.\left|e^{2\pi i p_z/2^q} - e^{i(\phi_z-\gamma_z)}\right| \le\delta/2.

We define f(z)=b(z)pzf(z)=b(z)p_z, where pzp_z is appended to the end of bzb_z, so its output has length L=2ℓ+q=O(log⁡(1/δ))L=2\ell+q=O(\log(1/\delta)).

The circuit proceeds as follows:

  1. Compute the description. Apply UfU_f to load b(z)b(z) and pzp_z. This costs T(Uf)T(U_f) TT gates.

  1. Apply the rotation. For i=0,…,ℓ−1i=0,\ldots,\ell-1, apply HH controlled on b2i(z)b_{2i}(z), followed by TT controlled on b2i+1(z)b_{2i+1}(z). This step costs O(ℓ)O(\ell) TT gates.

  1. Apply the phase. Add pzp_z into the phase-gradient register

∣ψPG⟩=2−q/2∑y=02q−1e−2πiy/2q∣y⟩|\psi_{\mathrm{PG}}\rangle= 2^{-q/2}\sum_{y=0}^{2^q-1}e^{-2\pi iy/2^q}|y\rangle

to produce a phase-kickback:

ADD⁡pz∣ψPG⟩=e2πipz/2q∣ψPG⟩.\operatorname{ADD}_{p_z}|\psi_{\mathrm{PG}}\rangle= e^{2\pi i p_z/2^q}|\psi_{\mathrm{PG}}\rangle.

The addition costs O(q)O(q) TT gates [1].

  1. Uncompute the description. Apply Uf~†\widetilde{U_f}^{\dagger}, costing another T(Uf)T(U_f) TT gates. Since neither zz nor the description bits have changed, the description register returns to zero exactly.

On branch zz, we have implemented V~z=e2πipz/2qR~z\widetilde{V}_z=e^{2\pi i p_z/2^q}\widetilde{R}_z. The rotation and phase errors are each at most δ/2\delta/2, so

∥V~z−Vz∥≤δ.\lVert\widetilde{V}_z-V_z\rVert\leq\delta.

The error of the multiplexed unitary is the maximum branch error, rather than their sum, since it is block diagonal. Computing and uncomputing the boolean function costs 2T(Uf)2T(U_f), and applying the rotation and phase costs O(ℓ+q)=O(log⁡(1/δ))O(\ell+q)=O(\log(1/\delta)) TT gates.

The Unary-Tracking Construction

We now prove Theorem 1.1, which we restate below for convenience.

Theorem 1.1. Let n≥1n\geq1 and 0<ϵ<1/20<\epsilon<1/2. Given a classically specified U∈U(N)U\in U(N) with KK mixing branches in a supplied CSD factorization, there is a measurement-free Clifford+TT circuit CC using a=N+O(L)a=N+O(L) clean ancillas and TT-count

T(C)=O(K+NL).T(C)=O(K+NL).

For every normalized input ∣ψ⟩\lvert\psi\rangle, it satisfies

∥C(∣ψ⟩∣0a⟩)−(U∣ψ⟩)∣0a⟩∥≤ϵ.\lVert C(\lvert\psi\rangle\lvert0^a\rangle)-(U\lvert\psi\rangle)\lvert0^a\rangle\rVert\leq\epsilon.

We assume access to an ideal phase-gradient catalytic state.

Proof. We combine the unary lookup from Lemma 2.2 with the programmed single-qubit synthesis from Lemma 2.6. We keep one NN-qubit unary register AA that tracks the data at the start of each CSD iteration. The lookups are free in terms of TT-cost, and updating AA throughout the CSD requires two Fredkin gates per mixing branch.

Preparing the tracker

First, compute the unary label of the input data into AA:

∑xαx∣x⟩D∣0N⟩A⟼∑xαx∣x⟩D∣ex⟩A.(11)\sum_x\alpha_x\lvert x\rangle_D\lvert0^N\rangle_A\longmapsto\sum_x\alpha_x\lvert x\rangle_D\lvert e_x\rangle_A. \tag*{(11)}

Start with an excitation on unary wire 0 and read the data bits one at a time. At each level, Toffolis and CNOTs move the excitation to the wire for the corresponding binary prefix. There are N−1N-1 splits, each costing O(1)O(1) TT gates, so initialization costs O(N)O(N) TT gates. We reverse this circuit at the end to clear the tracker.

One CSD iteration

Fix an iteration and write tt for its target qubit. For control string zz, the unary wires (Az,0,Az,1)(A_{z,0},A_{z,1}) correspond to target values 0 and 1. Using Lemma 2.5, write the branch as Vz=DzRzV_z=D_zR_z. We implement it in the following steps.

  1. Fold the tracker. For each mixing branch, apply a Fredkin gate to (Az,0,Az,1)(A_{z,0}, A_{z,1}), controlled on the data target tt. If the target is 0, the excitation is already on Az,0A_{z,0}. If it is 1, the swap moves the excitation from Az,1A_{z,1} to Az,0A_{z,0}. Thus,

αz,0∣z,0⟩D∣ez,0⟩A+αz,1∣z,1⟩D∣ez,1⟩A⟼(αz,0∣z,0⟩+αz,1∣z,1⟩)D∣ez,0⟩A.(12)\alpha_{z,0}|z,0\rangle_D|e_{z,0}\rangle_A+\alpha_{z,1}|z,1\rangle_D|e_{z,1}\rangle_A \longmapsto(\alpha_{z,0}|z,0\rangle+\alpha_{z,1}|z,1\rangle)_D|e_{z,0}\rangle_A. \tag*{(12)}

A Fredkin gate on an unoccupied pair does nothing. Diagonal and off-diagonal branches skip this step.

  1. Load and apply the single-qubit operation. Using Lemma 2.6, choose the gate instructions and phase correction for each branch to accuracy δ\delta. On diagonal and off-diagonal branches, use exact target operations II and XX, respectively.

The gate instructions depend only on zz, so we load them using CNOTs from the corresponding unary wire. The phase correction is also loaded from the tracker. For off-diagonal branches, we load the phase corresponding to the new target value. Next, we apply the programmed gates and phase-gradient addition, and then reverse the lookups. Since the tracker is unchanged throughout this step, the register containing the boolean function output gets cleaned up without garbage. The total cost is O(log⁡(1/δ))O(\log(1/\delta)) TT gates.

  1. Restore the full unary label. We now update AA to match the new data. On a diagonal branch, no update is needed. On an off-diagonal branch, apply an ordinary SWAP to (Az,0,Az,1)(A_{z,0}, A_{z,1}), since XX has flipped the target. On a mixing branch, apply a Fredkin gate to the same pair, controlled on the new target value.

Writing βz,0\beta_{z,0} and βz,1\beta_{z,1} for the amplitudes after the implemented rotation, the mixing-branch update gives

(βz,0∣z,0⟩+βz,1∣z,1⟩)D∣ez,0⟩A⟼βz,0∣z,0⟩D∣ez,0⟩A+βz,1∣z,1⟩D∣ez,1⟩A.(13)(\beta_{z,0}|z,0\rangle+\beta_{z,1}|z,1\rangle)_D|e_{z,0}\rangle_A \longmapsto\beta_{z,0}|z,0\rangle_D|e_{z,0}\rangle_A+\beta_{z,1}|z,1\rangle_D|e_{z,1}\rangle_A. \tag*{(13)}

The tracker therefore matches the data exactly for the rotation actually implemented, even when that rotation approximates the desired one.

At the end of the iteration, AA tracks the updated data, and all intermediate registers are clean. We can therefore repeat the procedure for the next CSD factor.

Completing the construction and counting resources

After all M=N−1M=N-1 factors, reverse the initial tracker computation to clear AA. All temporary workspace is cleared exactly, and the supplied phase-gradient state is unchanged.

Each mixing branch uses two Fredkin gates, each with O(1)O(1) TT-cost. The lookups and ordinary swaps use only Clifford gates. The programmed rotation and phase addition together cost O(log⁡(1/δ))O(\log(1/\delta)) TT gates per factor. For some iteration jj, the TT-cost is therefore O(Kj+log⁡(1/δ))O(K_j+\log(1/\delta)).

Choose δ=ϵ/M\delta=\epsilon/M. By Lemma 2.6, each factor has error at most δ\delta, including its phase correction. The errors add across the MM factors, giving total error at most ϵ\epsilon.

Initializing and uncomputing the unary tracker costs O(N)O(N) TT gates. Iterating through the whole CSD gives TT-count:

T(C)=O(K+N+Mlog⁡1δ)=O(K+2n(n+log⁡1ϵ)).(14)\begin{aligned} T(C)&=O\left(K+N+M\log\frac{1}{\delta}\right)\\ &=O\left(K+2^n\left(n+\log\frac{1}{\epsilon}\right)\right). \tag*{(14)} \end{aligned}

The construction uses one NN-qubit tracker and O(log⁡(1/δ))=O(L)O(\log(1/\delta)) = O(L) clean temporary qubits, in addition to the supplied phase-gradient register. This gives N+O(L)N + O(L) clean ancillas and O(K+NL)O(K + NL) TT-count.

Space-Depth Volume Construction

We now prove Theorem 1.2. We transfer the quantum state into unary form so that different branches can run in parallel. To use fewer ancillas, we decompose the unitary into smaller blocks and implement each using the same reusable unary register.

Theorem 1.2. Let N=2nN = 2^n and n≤a≤Nn \le a \le N. Our construction uses at most aa ancillas to implement any nn-qubit unitary exactly, using arbitrary single-qubit gates and CNOTs, and assuming unrestricted connectivity. Its depth and space-depth volume respectively are

D=O(N2/a),V=(n+a)D=O(N2).D = O(N^2/a), \qquad V = (n+a)D = O(N^2).

Proof. We first describe the unary implementation of a small block, then use the quantum Shannon decomposition to reduce the workspace required. We count the depth of all elementary one- and two-qubit gates, with gates in the same layer acting on disjoint qubits.

Implementing a block in unary form

Consider a kk-qubit block and let B=2kB = 2^k. First, compute the unary label into a BB-qubit register:

∑xαx∣x⟩D∣0B⟩A⟼∑xαx∣x⟩D∣ex⟩A.\sum_x \alpha_x |x\rangle_D |0^B\rangle_A \longmapsto\sum_x \alpha_x |x\rangle_D |e_x\rangle_A.

We then clear the binary data using just CNOTs, so the state is now entirely held in the unary register:

∑xαx∣x⟩D∣ex⟩A⟼∣0k⟩D∑xαx∣ex⟩A.\sum_x \alpha_x |x\rangle_D |e_x\rangle_A \longmapsto|0^k\rangle_D \sum_x \alpha_x |e_x\rangle_A.

Computing the unary label takes O(B)O(B) depth and clearing the binary data register also takes O(B)O(B) depth.

We implement each branch Vj,zV_{j,z} directly on its pair of unary wires (qz,0,qz,1)(q_{z,0}, q_{z,1}). In this order, the required operation is

∣10⟩⟼(Vj,z)00∣10⟩+(Vj,z)10∣01⟩,|10\rangle\longmapsto(V_{j,z})_{00}|10\rangle+ (V_{j,z})_{10}|01\rangle,
∣01⟩⟼(Vj,z)01∣10⟩+(Vj,z)11∣01⟩.|01\rangle\longmapsto(V_{j,z})_{01}|10\rangle+ (V_{j,z})_{11}|01\rangle.

First, apply a CNOT from qz,1q_{z,1} to qz,0q_{z,0}. This maps

∣10⟩⟼∣10⟩,∣01⟩⟼∣11⟩.|10\rangle\longmapsto|10\rangle, \qquad|01\rangle\longmapsto|11\rangle.

On both states, qz,0q_{z,0} is now 1, while qz,1q_{z,1} holds the target value. We can therefore apply Vj,zV_{j,z} to qz,1q_{z,1}, controlled on qz,0q_{z,0}. Reversing the CNOT returns the result to unary form.

For an unoccupied pair, the state is ∣00⟩|00\rangle, so the controlled operation does nothing. Similarly, on input ∣11⟩|11\rangle, the first CNOT flips the control bit to 0 so no operation is performed. This procedure uses O(1)O(1) gates and has depth O(1)O(1).

Within a CSD factor, the pairs are disjoint and can run in parallel. There are B−1B - 1 factors, so implementing the block takes O(B)O(B) depth. Including encoding and decoding, one block therefore has depth O(B)O(B). We maintain the unary register throughout so it can be uncomputed back into the data register at the end of the procedure.

Reducing the workspace using QSD

The quantum Shannon decomposition (QSD) writes a jj-qubit unitary as

U=(I⊗W1)Mz(1)(I⊗W2)My(I⊗W3)Mz(2)(I⊗W4),(15)U = (I \otimes W_1)M_z^{(1)}(I \otimes W_2)M_y(I \otimes W_3)M_z^{(2)}(I \otimes W_4), \tag*{(15)}

where each WiW_i is an uncontrolled (j−1)(j-1)-qubit unitary and MzM_z and MyM_y are multiplexors with the same j−1j-1 qubits as the control string and the target is the remaining qubit [7]. We recursively decompose each WiW_i, stopping when the smaller blocks fit within our qubit budget.

Given an ancilla budget aa, choose

k=⌊log⁡a⌋,B=2k,k = \lfloor\log a \rfloor,\qquad B = 2^k,

and use a BB-qubit unary register, which is ≤a\leq a.

We stop the QSD recursion at kk-qubit blocks. Each level produces four smaller blocks, so after n−kn-k levels there are

4n−k=(N/B)2(16)4^{n-k} = (N/B)^2 \tag*{(16)}

blocks. For each block, we encode its kk data qubits into a BB-qubit unary, implement the block following the procedure from the previous subsection, and decode back into binary form. Decoding clears the unary register, allowing us to reuse the same BB qubits for the next block.

Each block, including encoding and decoding, takes O(B)O(B) depth. Executing all blocks sequentially therefore contributes

O((N/B)2B)=O(N2/B)O\left((N/B)^2B\right) = O(N^2/B)

depth. We count the multiplexed rotations between the blocks separately below.

Counting depth and volume

We also include the multiplexed rotations between the blocks. At a jj-qubit QSD node, the three rotations can be implemented on the binary data using O(2j)O(2^j) depth and no additional ancillas [7]. There are 4n−j4^{n-j} such nodes, giving total rotation depth

O(∑j=k+1n4n−j2j)=O(N2/B).O\left(\sum_{j=k+1}^{n}4^{n-j}2^j\right) = O(N^2/B).

Combining this with the block implementations, including every encoding and decoding, gives

D∈O(N2/B)⊆O(N2/a).D \in O(N^2/B) \subseteq O(N^2/a).

The circuit uses nn data qubits and at most aa ancillas. Since a≥na \geq n, its space-depth volume is

V=(n+a)D=O((n+a)N2a)=O(N2).V = (n+a)D = O\left((n+a)\frac{N^2}{a}\right) = O(N^2).

The unary register is cleared after every block, and the intervening rotations require no additional workspace. All ancillas therefore return to zero exactly.

This volume is asymptotically optimal in the worst case. A generic nn-qubit unitary requires Ω(N2)\Omega(N^2) continuous parameters, while each elementary gate supplies only O(1)O(1) parameters [7]. Since a layer contains at most O(n+a)O(n+a) gates, the worst-case space-depth volume is Ω(N2)\Omega(N^2).

Conclusion

We presented a unitary synthesis construction using a unary register to track the computational-basis label of the data. This makes Boolean lookups free in TT-count and lets us share the precision-dependent synthesis cost across all branches of a CSD factor. Assuming access to ideal phase-gradient states, the construction uses N+O(L)N+O(L) clean ancillas and O(K+NL)O(K+NL) TT gates, where KK counts the mixing branches in the CSD of the unitary we are synthesizing.

We also described a variant that directly applies the unitary onto a unary register and applies the disjoint branches in parallel. Using QSD to divide the unitary into smaller blocks lets us reuse a smaller unary register. With arbitrary single-qubit gates and CNOTs, this gives depth O(N2/a)O(N^2/a) and space-depth volume O(N2)O(N^2) for n≤a≤Nn \leq a \leq N, matching the known asymptotically optimal volume bound.

The usefulness of the mixing-sensitive bound depends on finding factorizations with small KK. An interesting direction is to identify classes of unitaries that admit such factorizations, or to develop methods for reducing KK. It would also be useful to characterize this construction in terms of its concrete fault-tolerant resource costs for practical applications.

For the TT-count construction, the main open question is whether the unary tracker can be updated more cheaply. Our procedure uses O(Kj)O(K_j) TT gates in factor jj. Can we reduce this to a cost polynomial in nn, while preserving the zero-TT Boolean lookups and exact cleanup? This may require a different encoding or a way to update many unary pairs together. Solving this open question would achieve an O~(2n)\widetilde{O}(2^n) TT-count bound for general unitary synthesis.

A related question is whether there exists a more efficient fault-tolerant implementation of the updating to the unary tracker. In the worst case, each factor of the CSD requires 2n−12^{n-1} Fredkin gates to update. However, these Fredkins are all controlled on the same qubit, but act on disjoint pairs. An interesting direction to explore is whether this Wide Fredkin admits a more efficient decomposition than directly implementing each gate independently. Exploiting this structure could reduce the TT-count or the cost of the required magic-state factories, even without changing the tracker.

Acknowledgments

The author thanks Richard Cleve, Gregory Rosenthal, Luke Schaeffer, Kewen Wu, Guillermo Alonso-Linaje, and David Wierichs for the many insightful discussions that helped motivate this project. This work was supported in part by an Undergraduate Research Assistantship (URA) from the University of Waterloo.

Use of Generative AI

The author used OpenAI’s ChatGPT to assist with editing the manuscript and checking mathematical arguments. All ideas and constructions were independently developed by the author. The author takes full responsibility for the final results and conclusions.

References

  1. [1]Steven A. Cuccaro, Thomas G. Draper, Samuel A. Kutin, and David Petrie Moulton. A new quantum ripple-carry addition circuit, 2004.DOI
  2. [2]David Gosset, Robin Kothari, and Kewen Wu. Quantum state preparation with optimal T-count. Quantum, 10:2168, 2026.
  3. [3]Daniel Litinski. A Game of Surface Codes: Large-Scale Quantum Computing with Lattice Surgery. Quantum, 3:128, March 2019.
  4. [4]Guang Hao Low, Vadym Kliuchnikov, and Luke Schaeffer. Trading T gates for dirty qubits in state preparation and unitary synthesis. Quantum, 8:1375, 2024.DOI
  5. [5]Diyi Liu, Shuchen Zhu, Wibe Albert de Jong, Di Fang, David Williams-Young, and Chao Yang. T-efficient unitary synthesis via block-sparse Hamiltonian simulation, 2026.arxiv.org/abs/2610.18589
  6. [6]Neil J. Ross and Peter Selinger. Optimal ancilla-free Clifford+T approximation of Z-rotations, 2016.arxiv.org/abs/1403.2975
  7. [7]V.V. Shende, S.S. Bullock, and I.L. Markov. Synthesis of quantum-logic circuits. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 25(6):1000–1010, 2006.
  8. [8]Xiaoming Sun, Guojing Tian, Shuai Yang, Pei Yuan, and Shengyu Zhang. Asymptotically Optimal Circuit Depth for Quantum State Preparation and General Unitary Synthesis, 2023.arxiv.org/abs/2108.06150
  9. [9]Xinyu Tan. Unitary synthesis with fewer T gates, 2025.
  10. [10]Pei Yuan, Shengyu Zhang, and Wei Zi. Quantum Circuit for General Unitary: Improved T-count via Block Flattening and Dilation, 2026.arxiv.org/abs/2608.17846
  11. [11]Pei Yuan, Wei Zi, and Shengyu Zhang. Exact Unitary Synthesis: Simultaneously Optimal in Size and Depth-Ancilla Tradeoff, 2026.arxiv.org/abs/2610.07010

AI tools statement

This work lists 1 AI tool.

  • OpenAI’s ChatGPT · AI tool

    Roles
    Formal AnalysisWriting — review & editing
    Verification
    self-declared at submission

Recorded on the work at submission, not per version. Names and roles are shown as submitted; roles use the CRediT taxonomy.

How AI tools are recorded

Paper details

Cite this paper

Publication

Published
Version
Latest

Data & code

No code, data or supplementary files were declared for this version.

Pick where to look, or just type