WorksPhysics and Astronomy
Mid-circuit measurements and feedforward implement every unitary exactly in constant depth
Abstract
Mid-circuit measurements with feedforward reduce the optimal worst-case quantum depth for exact -qubit unitary synthesis from to , using arbitrary one- and two-qubit gates and unrestricted ancillary space. Measurements and resets without feedforward remain subject to the circuit causal-cone bound. Our deterministic construction uses single-qubit measurements, rounds of parity feedforward, and total qubits, with all ancillas starting and ending in . Classical processing is not counted in quantum depth. We teleport only the matrix error of an approximation by Nehoran and Yuen. An exactly prepared ancillary state encodes this error, whose action is added back by coherent interference. At operator-norm error , one step of amplitude amplification suffices. Coherent fanout circuits achieve the same constant-depth bound, while circuits using only one- and two-qubit gates attain depth with gates. Generic targets require qubits at depth , even under unrestricted classical control. Our depth-width trade-offs meet this bound within a factor for .
Introduction
Mid-circuit measurements with feedforward allow entangled ancillas and classical corrections to replace sequential quantum operations. Teleportation and measurement-based computation provide familiar examples [1, 2, 3, 4]. Measurements with feedforward also prepare long-range entangled states in shallow circuits [5, 6, 7] and underlie dynamic-circuit experiments [8]. Measurements also reduce the depth of commuting circuits [9] and provide non-Gaussian resources for fermionic sampling [10]. A generic -qubit unitary requires exponentially many gates [11], but ancillary qubits allow many of them to run in parallel, as quantified by depth–ancilla trade-offs [12, 13, 14]. We ask whether feedforward of measurement outcomes can reduce exact synthesis of an arbitrary unitary on an unknown input to constant quantum depth, given unrestricted ancillary space.
We work first with coherent circuits that allow fanout (a CNOT with many targets), then replace each fanout gate by a constant-depth gadget using measurements and parity feedforward [15, 16, 17]. Exact constant-depth state preparation is known for circuits with generalized Toffoli gates, with or without fanout [18, 19, 20], and for circuits with measurements and feedforward [17]. Unitary synthesis must transform every unknown input superposition coherently. For arbitrary unitaries, Rosenthal obtained exact depth with one- and two-qubit gates and with fanout and generalized Toffoli gates [18], where suppresses logarithmic factors. Strelchuk, Subramanian, and Weisz gave exact constant-depth constructions for permutations and diagonal unitaries, leaving the general case open [20]. Nehoran and Yuen showed that every unitary can be approximated at constant depth with fanout [21]. Replacing fanout by measurements and feedforward gives the corresponding approximate adaptive implementation. For , their width is , so accuracy still needs only qubits [21 Theorem 5.1]. Here we give exact implementations at finite width, allowing arbitrary continuous gate parameters as in unitary synthesis [22].
The block of a circuit is the operator obtained by fixing all ancilla inputs and outputs to . Gate teleportation through the Choi state of requires a correction for a Bell outcome labeled by the Pauli operator [2]. For a general , this correction need not be local. Coherently retaining the identity-outcome component gives the block [23 Sec. 7.2], so standard amplitude amplification takes rounds [24, 25]. We teleport only the residual of an approximation. If its block satisfies , the residual satisfies
For , teleportation yields the block . Combining and coherently with relative coefficients and produces . The repaired block is exactly proportional to , with normalization and the same success amplitude for every input. A flag sets this amplitude to , so one amplification step succeeds on every input superposition (Figure 1). The residual-state preparation is independent of the input. Its cost accounts for the leading width in our construction. We call this procedure residual repair.
Figure 1. Residual repair. (a) Schematic picture of the blocks. Direct Choi encoding (dotted route) requires amplification rounds. Adding the residual instead produces , which a flag rescales to before one exact amplification step. (b) The circuit and the amplifier. The selector chooses between the approximate circuit (open control) and the residual circuit (closed control). Inside , the preparation circuit satisfies ; preparation work is omitted from the drawing. The circuit then applies the inverse Bell transform to and the data, and swaps into the data position. All registers except the data start in . The operator in Eq. (8) flips the phase of the joint state of all non-data qubits, including preparation work.
Without feedforward, an output depends only on operations in its backward circuit causal cone. The cone grows at most exponentially with depth, limiting how many parameters can influence the output. Feedforward supplies additional classical control paths between quantum layers, while parameter counting still limits the total circuit size. With unrestricted ancillary space, the optimal worst-case exact depth is without feedforward, even when measurements and resets are allowed. Parity feedforward reduces it to . The ordinary-circuit upper bound answers Rosenthal’s Question 1.2 and meets the joint size and depth goals of Question 1.8 [18]. Together, these results settle the exact versions of the ordinary and fanout questions in Open Problem 17 [26]. Combined with the fanout elimination of Ref. [20], they also resolve the unrestricted-size question of Strelchuk, Subramanian, and Weisz. Applying the construction to smaller unitaries in a cosine–sine decomposition gives depth–width trade-offs.
Model and main result
We consider input qubits and ancillas (work qubits) initialized in . We allow arbitrary one- and two-qubit gates with all-to-all connectivity and continuous parameters specified exactly. A layer consists of operations on disjoint supports. The quantum depth counts gate and single-qubit measurement layers, including resource preparation, corrections, and resetting; the width counts all qubits, including the input. Classical processing of measurement outcomes is not charged to quantum depth. Our adaptive constructions use a fixed gate and measurement schedule; outcomes determine only Pauli corrections and resets through affine parities, called parity feedforward below. Our measurements are in the computational basis; the lower bounds allow arbitrary single-qubit measurement bases. Without feedforward, all operations and the choice of output qubits are independent of the measurement record; unconditional resets are still allowed. The general width lower bound also allows outcome-dependent schedules and arbitrary classical processing. Synthesis is nonuniform: the target and gate parameters are specified classically, with no bound on classical compilation time.
An adaptive implementation of a unitary is exact and deterministic if, conditioned on any measurement record of nonzero probability, it implements the target unitary channel and resets all work qubits to . A coherent circuit is clean if it maps to for every . By linearity, both notions cover inputs entangled with a reference. Besides one- and two-qubit gates, coherent circuits may use the fanout gate
and generalized Toffoli gates with arbitrarily many controls and one target. Coherent circuits using only one- and two-qubit gates are called ordinary; allowing fanout gives fanout circuits [27, 28]. We build coherent circuits with generalized Toffoli gates and then compile them into fanout or adaptive circuits. We write and use and for the operator and Frobenius norms.
Theorem 1 (Exact constant-depth synthesis). Every -qubit unitary has an exact deterministic implementation of quantum depth using one- and two-qubit gates, single-qubit measurements, rounds of parity feedforward, and qubits; all ancillas start and end in . The same width suffices for an exact clean constant-depth fanout circuit. Conversely, for Haar-almost every unitary, an exact constant-depth implementation in either model requires qubits, even if the classical controller is unrestricted.
§ 3 and § 4 give the construction; Proposition 5 gives the lower bound. With the same local gates and product-state ancillas, measurements without feedforward still require depth for generic targets, as shown in Theorem 7.
For a chain of qubits, every nearest-neighbor circuit of depth has an exact constant-depth implementation in the all-to-all model with parity feedforward and qubits (Corollary S7). Its gates can be grouped into two layers of disjoint -qubit blocks, to which Theorem 1 applies. This covers periods of a one-dimensional Floquet circuit whose period has a constant number of nearest-neighbor gate layers.
Residual repair
Throughout this section, circuits use one- and two-qubit gates, fanout, and generalized Toffoli gates. For a circuit on data qubits and work registers initialized in , its block is
a matrix, not necessarily unitary. The circuit is a block encoding of : measuring its work qubits and obtaining all zeros would apply to the data before normalization. The repair keeps this component coherent. Circuits are padded to common work registers, and denotes the projector onto initialized work qubits. If an approximation is specified up to global phase, we choose the representative of closest to . A known one-qubit phase restores any prescribed matrix representative before a controlled version is used.
A circuit of depth and width in this gate set can be inverted, or controlled by one qubit, in depth and width with clean additional work qubits. One fans the control out to a separate copy for each gate of a layer; a controlled generalized Toffoli gate gains one control, and a controlled fanout computes, fans out, and uncomputes the conjunction of its source and the control [18, 22]. The reflection is a generalized Toffoli gate conjugated by single-qubit gates, so it too has constant depth.
Theorem 2 (Residual repair). Let , and let be a coherent circuit of one- and two-qubit gates, fanout, and generalized Toffoli gates, of depth and width , whose block satisfies
which holds in particular when . When , suppose the -qubit state proportional to has an exact clean preparation in the same gate set of depth and width . Then has an exact clean circuit of depth and width in the same gate set.
Proof. Put . If , the projected output already has norm , so itself is exact and clean. Assume .
Teleporting the residual. On two -qubit registers A and B, prepare
Apply to the data and B the inverse Bell transform, a layer of CNOTs followed by Hadamards that maps to , and swap the data with A. Call the whole circuit, including the state preparation, . Its block acts as
Adding the residual. Prepare a selector qubit in , apply if it is and if it is , and unprepare it. With the selector counted as a work qubit, the block becomes
Unpreparing the selector makes the two contributions interfere in the component with all work qubits zero. Apply to a flag initialized in , with , to rescale the block to . Count the flag as a work qubit and call the resulting circuit .
One exact amplification step. The block has success amplitude for every input. One amplification step triples this angle to , making success certain. Define
Expanding the reflections and using and , we obtain
Thus the circuit implements and returns every work qubit to . Two controlled calls to and one to , and likewise for , account for the stated resources.
Linear combinations of unitaries [29] and oblivious amplitude amplification [25, 30] are standard tools. The latter includes the one-step exact case, also used in Refs. [20 Lemma 6.11] and [31 Proposition 2]. Novo and Berry improved a constant-accuracy Hamiltonian simulation with a truncated correction followed by amplitude amplification [32]. Here the entire residual is encoded exactly as a state, and makes one amplification step sufficient.
Constant-depth ingredients
Approximation and state preparation
To apply Theorem 2, we use the approximation of Ref. [21] at accuracy . The implementation below gives the stated width. The input is encoded as a single excitation shared among auxiliary oscillator modes. Quadratic phase gates shear their phase space, while Fourier transforms exchange position and momentum. Three phase layers and two Fourier layers transform the single-excitation amplitudes before decoding [21, 33]. Representing each mode on a finite grid gives an approximate qubit circuit with the following resource bound.
Lemma 3 (Approximate synthesis). For every and , there is a constant-depth fanout circuit whose block satisfies . It uses qubits.
Writing the quadratic phases in register bits produces commuting one- and two-qubit phase gates that fanout allows to run in parallel [28 Theorem 3.2]. This reduces the phase-layer width of Ref. [21 Algorithm 4]; Fourier transforms and encoding contribute the second term. Supplementary Material A proves the finite-grid error bound.
Lemma 4 (Exact state preparation). Every -qubit pure state has an exact clean preparation of constant depth with one- and two-qubit gates, fanout, and generalized Toffoli gates on qubits, and with a fanout circuit on qubits.
Rosenthal established exact clean constant-depth state preparation with qubits [18 Theorem 4.1]. Sharing prefix computations reduces the workspace of Ref. [20 Theorem 4.2] to with generalized Toffoli gates. Supplementary Material B gives the construction and compilation.
Coherent part of Theorem 1. Take the approximate circuit of Lemma 3 with ; its width is . The residual state of Theorem 2 has qubits, so Lemma 4 prepares it exactly in constant depth on qubits with generalized Toffoli gates, and Theorem 2 yields an exact clean constant-depth circuit of width . The Toffoli compilation of Lemma S4 expands each width- layer to qubits, since gates within a layer have disjoint supports. □
From coherent synthesis to dynamic circuits
Constant-depth fanout with parity feedforward is standard [15, 16, 17, 34, 35]. Related measurement-based fanout protocols have been demonstrated on quantum hardware [36]. Each target couples to its own ancilla in parallel, and the measurement outcomes determine the final local Pauli corrections. The seven-layer construction in Supplementary Material D uses ancillas for targets, including preparation and reset. Since fanouts in a layer have disjoint supports, replacing them in a coherent circuit of depth and width gives
with at most feedforward rounds, proving the adaptive part of Theorem 1. Controls, adjoints, and amplification are completed before substitution, so each gadget replaces an uncontrolled fanout and its outcome-dependent phase remains global.
Depth–width trade-offs
Parameter counting
For adaptive unitary synthesis, parameter counting [11, 12, 14] can be applied to a single nonzero measurement branch.
Proposition 5 (Generic depth–width lower bound). For Haar-almost every -qubit unitary, every exact implementation of depth , coherent with fanout and generalized Toffoli gates or adaptive with single-qubit measurements and arbitrary classical feedforward, uses qubits.
Proof. Refine every measurement and reset into individual Kraus outcomes, and contract the final ancillary outputs with computational-basis bras. This gives Kraus operators of the implemented channel. A unitary channel has Choi rank one [37], so each nonzero equals for a scalar . Fix such a branch. Its gates, measurement bases, and wiring, including adaptively chosen parameters, are fixed, and at width and depth they contain real parameters: each local operation contributes , while fanout and generalized Toffoli gates contribute none.
For each wiring, is a smooth function of these parameters. On the open set , the map to its projective class is smooth and locally Lipschitz, hence its image has Hausdorff dimension . The exactly realizable unitary classes lie in this image. There are finitely many wirings at fixed . Haar measure on the projective unitary group is its smooth -dimensional volume, so their union is Haar-null unless . A countable union over preserves this conclusion and proves the converse in Theorem 1. Applying the same argument to a nonzero successful branch also covers heralded exact implementations.
In an exact deterministic implementation of a unitary, the branch probability is independent of the input. The measurement record therefore carries no information about the unknown state.
Trading width for depth
A multiplexer applies a unitary selected by the computational-basis value of a control register. A cosine–sine decomposition through qubits expresses as multiplexers whose component unitaries act on at most qubits [11, 38, 39]. For each multiplexer, a one-hot control routes the input to the selected component. The controlled component circuits run in parallel; reversing the routing returns the work qubits to for reuse by the next factor. The resulting bound is proved in Supplementary Material C.
Theorem 6 (Depth–width trade-off). For every , every -qubit unitary has an exact clean fanout circuit of depth and width . The same bounds hold for exact deterministic adaptive circuits with parity feedforward. The width is within a factor of Proposition 5.
Depth without feedforward
Replacing fanout in Theorem 1 by CNOT trees gives ordinary depth . The direct construction in Supplementary Material E reaches the same depth with fewer qubits and gates.
Theorem 7 (Optimal depth without feedforward). Every -qubit unitary has an exact clean circuit of one- and two-qubit gates with depth , width , and gates. For Haar-almost every unitary, every such circuit with any number of ancillas initialized in a product state has depth
This lower bound also holds with single-qubit measurements and unconditional resets, provided no measurement outcome controls subsequent operations or the choice of output qubits.
Proof. Take in the direct construction of Supplementary Material E; this lies in its range for sufficiently large , and the finitely many remaining cases are absorbed into the constants. Substitution gives depth , and the gate count is at most depth times width.
The causal-cone argument of Refs. [12, 14] also applies to measurements and resets without feedforward. Averaging over outcomes turns these operations into single-qubit trace-preserving channels. Their adjoints preserve the identity, so operations outside the backward causal cones of the fixed output qubits cannot affect the output channel. The cones contain only local operations and product-state parameters. Up to relabeling ancillas there are finitely many cone topologies. Each describes a channel family of dimension , whereas unitary channels have dimension . Thus a generic target requires , giving Eq. (11).
This exponentially improves the previous exact depth of Refs. [18 Corollary 4.6] and [14 Theorem 3]. Rosenthal’s accompanying optimality result concerns queries to oracles that prepare the columns of [18 Theorem 2.3]. Nehoran and Yuen achieve approximate ordinary depth [21 Theorem 5.1(1)]; Theorem 7 removes the approximation error at depth . More generally, at width for , the depth is , within a factor of the generic lower bound (Supplementary Material E and Figure 2).
Figure 2. Schematic depth–width landscape for generic unitaries, with constants and logarithmic factors suppressed. Shading marks the parameter-counting bound on circuit spacetime volume. The linear-depth floor without feedforward follows from backward circuit causal cones. Solid and dashed blue curves show Theorems 6 and S8; dark and light stars mark the constant-depth and -depth constructions. Gray curves and the diamond are earlier exact constructions [12, 14, 18]. Open circles show Ref. [21] at , offset to the right for visibility; the arrow shows increasing accuracy at constant fanout depth. For smaller widths, Sun et al.’s bound [12] completes the frontier up to factors polynomial in .
Discussion
The construction interleaves a constant number of quantum stages with classical parity computations. Using two-input XOR gates, each feedforward round can be evaluated in depth . Whether a single feedforward round can achieve width at constant quantum depth remains open.
Coherent error-1/3 approximations suffice if available for every unitary: Supplementary Material F combines such circuits in parallel and corrects the final residual exactly. Supplementary Material G constructs the block from convex combinations of permutations, giving a proof independent of Nehoran–Yuen at width .
Decomposing the two-qubit gates of Theorem 1 into single-qubit gates and CNOTs [22], and replacing fanout by the clean construction of Ref. [20 Lemma 6.12], leaves only single-qubit and generalized Toffoli gates, at a possibly doubly exponential width. That lemma uses Rosenthal’s approximate construction [40] and one exact amplification step; Section 4 of Ref. [20] gives another route using Grier, Morris, and Wu [41] together with Rosenthal. Polynomial-size fanout elimination remains open [42, 43, 44].
Our constructions use continuous gate parameters. With Clifford+ gates and computational-basis measurements, generic exact synthesis is impossible [45, 46].
With fanout or parity feedforward, can the width be reduced to at constant depth? Our construction has overheads from residual-state preparation, Toffoli compilation, and the quadratic phase layers. It also remains open whether an approximation-free construction can reach width .
AI disclosure
The author posed the problem and proposed the residual-repair strategy. The results and derivations were developed through iterative exchanges with GPT-6 Astra, which contributed substantially to the constructions and proofs and drafted much of the manuscript. The author selected the directions pursued and independently verified every proof. Numerical checks on small systems covered Eqs. (6), (7), (9), and (46). The author takes full responsibility for the article.
Gaussian approximate synthesis
We use Nehoran and Yuen’s continuous identity [21 Theorem 3.1], which they relate to Fiurášek’s continuous-variable gate synthesis [33]. Following the wrapped-sampling approach discussed in Ref. [21, Remark 4.4], we make the Fourier steps exact and bound the errors in the three phase steps. A bitwise expansion of the phases then gives the width in Lemma 3.
Continuous identity
For , let for real symmetric , and let be the unitary Fourier transform with kernel . The map
is an isometry from to the single-excitation subspace.
Lemma S1 (Gaussian identity). If is real symmetric, , and , then
Proof. On functions with , a Gaussian integral sends under to ; the square root is continued from . The five operations therefore give
For eigenvalues of , the determinant factors multiply to .
We use the realification and involution reductions of Ref. [21, Lemma 2.1]. For , put , also used in Ref. [20, following Proposition 5.12], and
This is a real symmetric traceless involution on coordinates. For ,
Thus two label qubits and fixed input and output rotations reduce synthesis of to Eq. (13).
Periodization and a uniform error bound
Set , , and . For Schwartz functions define
Let in one dimension, where and . The two vectors have opposite parity under , so they are orthogonal. Define as the product of normalized in mode and normalized in the other modes. Factorization gives
Writing and , Poisson summation gives
Consequently the prefactor in Eq. (18) is at least once exceeds an absolute constant, independently of .
Let have entries , and let multiply by .
Lemma S2 (Discretized identity). Under the hypotheses of Lemma S1, there are absolute constants such that, whenever ,
Proof. Poisson summation and give the exact relation
Thus only the phase multiplications contribute to the error. The terms with agree and all other terms differ by phases, so
Let be the successive continuous states in Eq. (13), starting at with . Telescoping through the unitary discrete gates bounds the error on by .
These three functions have unit norm and the form , with for . Their normalization and Cauchy–Schwarz imply
uniformly in . For , set with , and , . Writing and applying gives
Poisson summation of the full one-dimensional grid bounds and . For a noncentral cell, all are at least . The integral estimates
and bounding each decreasing grid sum by its first term plus the corresponding integral give
Taking square roots and summing over gives and for . Constants are uniform for . If with sufficiently large , then
Apply this to the three continuous states and divide by the common prefactor in Eq. (18). The estimate holds for every unit vector , proving the operator-norm bound. □
Circuit implementation and width
Lemma S3 (Small Fourier transforms). For , has an exact clean constant-depth implementation with one- and two-qubit gates and fanout on qubits.
This is Nehoran–Yuen’s exact Fourier circuit [21 Sec. 5.3.1, Algorithm 6], based on Fourier-state preparation [28 Lemma 4.13] and exact phase decoding [47 Sec. 4.1], and including the final modular sum and ancillary cleanup. Their Fourier convention has the opposite sign; reversing the circuit gives with the same resources.
Proof of Lemma 3. Choose the smallest power of two satisfying the hypothesis of Lemma S2 and making its bound at most . Then for . The input rotations prepare on the label qubits. An encoder maps to as follows. Convert the label to one-hot form by Eq. (29), using qubits.
In each mode prepare and, controlled on its indicator, exchange it with by the Householder reflection with vector . If , apply first, reflect about the zero state of the mode and all its preparation work, and then apply . The resulting operator is
Thus the reflection preserves the zero-work subspace. The preparation uses qubits by Lemma 4. Compiling the reflection on these qubits costs by Lemma S4; controlling the other gates adds only work. This is within the bound. The states have opposite eigenvalues under modular negation. We erase the indicator by adapting the phase-kickback construction of Ref. [21 Algorithm 3]: apply a Hadamard to the indicator , controlled modular negation on the mode, and another Hadamard to . For each initial indicator value , the mode has negation eigenvalue , so this maps to . Controlled modular negation is a classical permutation on bits. Parallel truth-table tests, compiled using Lemma S4, implement it exactly in constant depth with clean work and qubits.
Apply the five discrete layers, reverse the encoder, and use the fixed output rotations and phase specified by Eq. (16). In two’s complement, with except , so
After collecting terms this is a product of single-qubit and controlled-phase gates on bits. Fanout provides a separate pair of copies for each interaction. Apply all phases in parallel and reverse the fanouts, at constant depth and width . This replaces the product computation in Ref. [21], Algorithm 4, whose phase-layer width is . The Fourier layers and encoder require qubits. Combining the two bounds gives
width. Write . Since , the decoded block satisfies
The fixed label preparations and output rotations do not increase this error.
Exact state preparation
Lemma S4 (Generalized Toffoli gates). A generalized Toffoli with controls has an exact clean constant-depth circuit of one- and two-qubit gates and fanout on qubits.
Takahashi and Tani’s refinement of their exact OR construction has constant depth and size [47 Sec. 3.2]. Their size convention sums all gate arities and hence bounds the workspace. Negating controls and output gives AND; compute–copy–uncompute gives the clean XOR into an arbitrary target with the same resource orders.
Proof of Lemma 4. Put and write the target as , with . The first-one construction of Ref. [20, Theorem 4.2] uses the predicates for . They can all be computed cleanly in constant depth on qubits with generalized Toffoli gates. Write . For and , the dyadic blocks satisfy
Each position belongs to at most blocks, and is used by prefixes. Copy the input bits, compute all block-zero indicators, copy those indicators to their prefixes, and compute each as a conjunction of at most indicators. Reversing the intermediate computations leaves only the input and flags. Both copying stages use qubits.
Let be the last index with , , and choose for , with and otherwise. Since , the all-zero branch vanishes. The product rotations give
Compute the prefix flags. On the summand with first one at , exactly when , so controlled inverse rotations return all later qubits to zero. Changing bits after the first one leaves every prefix predicate unchanged, so the same prefix circuit clears the flags. Applying phase to qubit gives the desired one-hot state. Parities write its binary label into a fresh -qubit output, and equality tests on copies of that label clear the one-hot register. All temporary copies are uncomputed before their source registers change.
The depth is constant and the width is . A layer whose generalized Toffolis have controls in total expands, by Lemma S4, to qubits. The added compilation work is clean and reusable, proving both bounds.
Coherent selection and the depth–width trade-off
We use binary-to-one-hot conversion as in Refs. [20 Lemma 2.16] and [21 Algorithm 2], splitting the label to reduce the workspace. An -bit label has a clean encoding
by a constant-depth fanout circuit of width . Here is the bit string with a single 1 at position . Split into two halves, compute all equality indicators for each half, and erase the original bits by parities of those indicators. Products of the half indicators give every . The half indicators are then erased by summing the appropriate full indicators. Temporary copies are uncomputed before their sources change. The generalized-Toffoli compilation for the half tests costs qubits, and combining and clearing the indicators costs . The case is immediate.
Lemma S5 (Parallel coherent selection). Let be specified coherent circuits, each on data qubits with its own work register, with depths , widths , and blocks . With one- and two-qubit gates, fanout, and generalized Toffoli, there is a circuit of depth and width such that
Here appends zero-initialized work qubits to the selector and data registers. The circuits may leave nonzero work.
Proof. Compute while retaining the binary selector, using Eq. (29) on a computational-basis copy of it. For each data bit , parallel Toffoli gates write into bit of a separate data register . Uncompute the temporary copies, then erase by the parity of bit across these registers. This routes the data into the selected register and leaves the original data register zero. Run each controlled by its own indicator, in parallel, then reverse the routing and indicator computation. All unselected circuits act as identity. The inverse routing only requires the other data registers to be zero; the selected register can be entangled with its work and an arbitrary reference. Projecting all circuit work onto zero therefore gives Eq. (30) by linearity. The controlled-circuit construction of Sec. § 3 costs depth and width, and routing costs qubits at constant depth.
Lemma S6 (Exact multiplexers). For , the multiplexer
has an exact clean constant-depth fanout circuit on qubits.
Proof. Use the routing above and implement each -qubit controlled by Theorem 1, each with its own clean work register. These circuits act on disjoint registers, so their depth is constant and their total width is . Reversing the routing completes the multiplexer. Any global phases of these complete circuits multiply to a single phase independent of the selector.
Proof of Theorem 6. Apply the cosine–sine decomposition recursively through the first qubits [11, 38, 39]. With , it gives
where each is an -controlled multiplexer on qubits. Each rotates one of the first qubits, conditioned on the others, and can be viewed as an -controlled multiplexer on qubits. Lemma S6 implements every factor at constant depth with width . Reuse the work between the factors and take . Replacing fanout after completing the coherent circuit gives the adaptive bound.
At smaller widths, the ordinary-circuit bound of Sun et al. [12] fills the remaining range: it is optimal for and within a factor of the counting bound for . Thus the adaptive depth–width frontier is determined up to factors polynomial in , including this transition interval.
Corollary S7 (Logarithmic blocks). A constant number of layers of disjoint -qubit unitaries on qubits has an exact clean constant-depth fanout circuit on qubits, and an adaptive implementation with the same resource order. This includes depth- nearest-neighbor circuits on a line of qubits.
Proof. Apply Theorem 1 to each block. For a line circuit of depth , number the layers . The case is already a single block. Otherwise mark every th site as a cut. Gates whose time is at most the distance of both sites from the nearest cut form a set closed under predecessors, so they can be applied first. They act within disjoint intervals between cuts. The remaining gates lie within distance of a cut and form another layer of disjoint -site blocks. Apply the first assertion to these two layers.
Fanout by measurement and parity feedforward
We give the seven-layer construction used in § 4.2, including its action on each measurement branch.
Let be the control, the targets, and a reference. An arbitrary input has the form , where the states of targets and reference may be unnormalized and nonorthogonal. The gadget uses cat qubits and probes , all starting in . The first three layers of Figure S1 apply Hadamards to all cat qubits, followed by the CNOT layers and for all . The fourth applies the CNOTs and in parallel. We then apply Hadamards to , measure all cat qubits and probes, and apply the corrections below. Write for the probe outcomes, for the outcome on , for the outcome on , and . The last layer applies
Figure S1. Seven-layer implementation of by measurement and parity feedforward, with all ancillas initialized and reset to . All measurements occur in layer 6; the corrections of Eq. (33) and resets occur in layer 7. For targets, the construction uses ancillas.
and resets each measured qubit by raised to its recorded bit.
For a fixed probe record, the unnormalized cat state is . The outcome forces , and the final Hadamards contribute . After Eq. (33), the branch operator is therefore
Every record has probability , independent of the input, and implements even with an entangled reference.
In a layer of width , the fanout gates have disjoint supports and use at most extra qubits. These are reused after reset, giving Eq. (10).
An ordinary depth–width trade-off
The Gaussian approximate circuit can also be compiled directly for limited workspace. This improves on replacing every fanout in the constant-depth circuit by a tree. Throughout this section only one- and two-qubit gates are allowed, and width includes all data and work registers.
Theorem S8 (Ordinary depth–width trade-off). For an absolute constant , every , , and every admit an exact clean circuit of width and depth
For generic targets the lower bound is , so the upper bound is within a factor in this width range.
Larger widths use the construction at the upper endpoint, with the additional qubits idle.
Lemma S9 (Controlling an ordinary circuit). *A depth-, width- ordinary circuit can be controlled by one qubit in depth and width , with clean additional
work. A reflection about the zero state of any specified set of its wires has depth and width .
Proof. A balanced CNOT tree distributes the external control to one separate copy per physical wire. Each gate uses a designated copy from its support, so disjoint gates use distinct controls. Controlled local gates have constant-size exact decompositions [22]. The copies remain controls throughout all layers and are cleared by one inverse tree at the end. For a reflection, a balanced Toffoli tree computes the conjunction of the negated tested bits, a changes its sign, and the inverse tree clears the added work. This works on arbitrary states of the tested wires.
Lemma S10 (Quadratic phases with limited workspace). A diagonal phase that is a quadratic function of bits has an exact clean implementation of width and depth
Proof. After collecting terms, the two-bit phases are edges of a simple graph on vertices. Give each bit representatives, including the original, using parallel balanced CNOT trees. At each vertex, distribute its incident edges among its representatives, each receiving at most edges. An original edge now joins its assigned representative at each endpoint. The resulting graph has maximum degree , so greedy edge coloring gives matchings. Apply these layers and the single-bit phases, then reverse the copy trees. The phases preserve computational-basis values, so all copies are erased exactly. The width is and the depth , as claimed.
Proof of Theorem S8. At approximation error , the discretization of Supplementary Material A permits
with an absolute, target-independent constant in . Use the same encoder as there, with ordinary implementations of its components. Their costs, with all modes processed in parallel, are
| Operation | Width | Depth |
| Binary/one-hot conversion | ||
| Mode preparation and controlled exchange | ||
| Parity readout by modular negation | ||
| Ordinary Fourier transforms |
Table 1.
For the conversion in Eq. (29), separate copies and balanced AND/parity trees give the first row. For the second, Yuan–Zhang state preparation on logical qubits with ancillas has depth and clean work [14 Theorem 2]. Lemma S9 implements the controlled Householder reflection in Eq. (26) with the same resource orders. Modular negation uses two’s complement and a ripple-carry increment. For the last row, use the standard exact -qubit Fourier circuit; the much wider constant-depth Fourier circuit is unnecessary. Thus the encoder and its inverse have
Each quadratic phase acts on bits. Allocate a constant fraction of the workspace to its copies and apply Lemma S10. The remaining live registers fit because . Combining the three phases with the table gives a width- approximate circuit of depth
Only the scheduling has changed, so its block-error guarantee is unchanged.
The residual has logical qubits. The same Yuan–Zhang theorem, now with ancillas, prepares it exactly and cleanly in width and depth
Apply the residual-repair circuit using Lemma S9 for its constant number of controls and reflections. Their total additional depth is and their clean additional workspace is . This proves the upper bound, with the same exact block identity and cleanup as in Theorem 2. The lower bound follows by combining parameter counting with the ordinary causal-cone bound.
Exact synthesis from constant-accuracy approximations
Suppose every , , has a specified coherent circuit of depth and width whose block satisfies . We use one- and two-qubit gates, fanout, and generalized Toffoli.
Every square matrix with is the average of two unitaries. For a full SVD , , set
Fix , let , and start with , . At round , the matrix has operator norm at most one. Decompose it as above and approximate its two unitaries by :
The resulting approximate circuits are specified classically.
For , suppose the residual state in Eq. (5), with , has an exact clean preparation of depth and width . Equation (6) gives the block , and
When , omit the residual branch and set . Prepare the selector with probabilities , for each sign at round , and for the residual branch. Pad to a power of two with zero-amplitude branches and identity circuits. Lemma S5 implements the selection in parallel. After unpreparing the selector, the block is . Rotating a zero-initialized flag by with gives , to which the exact identity in (9) applies.
The selector state has nonzero amplitudes and needs constant depth and qubits by Lemma 4. The selection lemma, , and therefore give
Amplification uses each specified approximate circuit twice forward and once backward. Compiling generalized Toffoli gates, including the all-work reflections, gives a fanout circuit of width , and the fanout gadget gives the adaptive circuit. If both the approximate circuits and the residual preparation use ordinary one- and two-qubit gates, Lemma S9 and tree implementations of routing and selector preparation instead give depth and width .
An independent proof of exact constant-depth universality
The following finite-dimensional construction gives exact universality with width . Its synthesis ingredients are the elementary binary-to-one-hot conversion ((S18)), the standalone state-preparation Lemma 4, and classical reversible lookup. It does not invoke the approximate synthesis theorem or the exact multiplexer lemma.
Let and index its basis by . Define the fixed real isometry , with . For every real matrix with , we will show that
where the are permutations of the basis states. Let denote the entrywise th power of , for . For , the identity gives . Following the sine transformation in Krivine’s argument [48], define
Take centered jointly Gaussian with covariance
Their sign vectors and each have the uniform distribution on the entire sign cube because the coordinates within each marginal are independent. The Gaussian sign identity [49 Lemma 2.1] gives
The arcsine takes its principal value since . The doubly stochastic matrix is a convex combination of permutations by the Birkhoff–von Neumann theorem. Apply Carathéodory’s theorem after compression: the matrices lie in a real space of dimension , so at most are required. This proves Eq. (46). The Gaussian distribution enters only this existence argument.
For a power-of-two , encode as using Eq. (29), then apply . The amplitude at a bit string is , which implements cleanly. Pad the coefficients to a power-of-two number and prepare by Lemma 4, using qubits.
The required selection is the classical bijection on bits, with identity permutations on padded labels. With fanout and generalized Toffoli gates, any -bit Boolean map has a clean constant-depth reversible oracle on qubits: compute all tests on fanout copies, form the output bits by parities, and uncompute. For a bijection , the oracles for and give ; a swap restores the data location [18 footnote 3]. Thus the selection operation is implemented at width in the generalized-Toffoli model.
Prepare , apply the selected permutation, undo the state preparation, and conjugate this circuit by the encoder for . With every work qubit included in the projection, the resulting unitary has block
The permutations need not preserve the encoded subspace. For , use and
Apply the construction to the real orthogonal and prepare and unprepare . The block becomes . The algebraic amplification identity (9) therefore gives an exact clean implementation on every input and reference.
There are a constant number of stages. Permutation selection dominates the width, and compiling generalized Toffoli gates, including all-work reflections, only multiplies it by . Hence both the fanout and adaptive implementations have constant depth and
References
- [1]Charles H. Bennett, Gilles Brassard, Claude Crépeau, Richard Jozsa, Asher Peres, and William K. Wootters. “Teleporting an unknown quantum state via dual classical and Einstein–Podolsky–Rosen channels”. Phys. Rev. Lett. 70, 1895–1899 (1993).pubmed.ncbi.nlm.nih.gov/10053414
- [2]Daniel Gottesman and Isaac L. Chuang. “Demonstrating the viability of universal quantum computation using teleportation and single-qubit operations”. Nature 402, 390–393 (1999). arXiv:quant-ph/9908010.
- [3]Robert Raussendorf and Hans J. Briegel. “A one-way quantum computer”. Phys. Rev. Lett. 86, 5188–5191 (2001). arXiv:quant-ph/0010033.
- [4]Robert Raussendorf, Daniel E. Browne, and Hans J. Briegel. “Measurement-based quantum computation on cluster states”. Phys. Rev. A 68, 022312 (2003). arXiv:quant-ph/0301052.DOI
- [5]Lorenzo Piroli, Georgios Styliaris, and J. Ignacio Cirac. “Quantum circuits assisted by local operations and classical communication: Transformations and phases of matter”. Phys. Rev. Lett. 127, 220503 (2021). arXiv:2103.13367.DOI
- [6]Tsung-Cheng Lu, Leonardo A. Lessa, Isaac H. Kim, and Timothy H. Hsieh. “Measurement as a shortcut to long-range entangled quantum matter”. PRX Quantum 3, 040337 (2022). arXiv:2206.13527.DOI
- [7]Nathanan Tantivasadakarn, Ashvin Vishwanath, and Ruben Verresen. “Hierarchy of topological order from finite-depth unitaries, measurement, and feedforward”. PRX Quantum 4, 020339 (2023). arXiv:2209.06202.DOI
- [8]Elisa Bäumer, Vinay Tripathi, Derek S. Wang, Patrick Rall, Edward H. Chen, Swarnadeep Majumder, Alireza Seif, and Zlatko K. Minev. “Efficient long-range entanglement using dynamic circuits”. PRX Quantum 5, 030339 (2024). arXiv:2308.13065.DOI
- [9]Chenfeng Cao and Jens Eisert. “Measurement-driven quantum advantages in shallow circuits”. Phys. Rev. Lett. 136, 080601 (2026). arXiv:2505.04705.DOI
- [10]Chenfeng Cao, Yifan Tang, and Jens Eisert. “Measurement-induced non-commutativity in adaptive fermionic linear optics” (2026). arXiv:2603.24950.DOI
- [11]Vivek V. Shende, Stephen S. Bullock, and Igor L. Markov. “Synthesis of quantum-logic circuits”. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst. 25, 1000–1010 (2006). arXiv:quant-ph/0406176.
- [12]Xiaoming Sun, Guojing Tian, Shuai Yang, Pei Yuan, and Shengyu Zhang. “Asymptotically optimal circuit depth for quantum state preparation and general unitary synthesis”. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst. 42, 3301–3314 (2023). arXiv:2108.06150.arxiv.org/abs/2108.06150
- [13]Xiao-Ming Zhang, Tongyang Li, and Xiao Yuan. “Quantum state preparation with optimal circuit depth: Implementations and applications”. Phys. Rev. Lett. 129, 230504 (2022). arXiv:2201.11495.DOI
- [14]Pei Yuan and Shengyu Zhang. “Optimal (controlled) quantum state preparation and improved unitary synthesis by quantum circuits with any number of ancillary qubits”. Quantum 7, 956 (2023). arXiv:2202.11302.DOI
- [15]Dan Browne, Elham Kashefi, and Simon Perdrix. “Computational depth complexity of measurement-based quantum computation”. In Theory of Quantum Computation, Communication, and Cryptography (TQC 2010). Volume 6519 of Lecture Notes in Computer Science, pages 35–46. Springer (2011). arXiv:0909.4673.arxiv.org/abs/0909.4673
- [16]Harry Buhrman, Marten Folkertsma, Bruno Loff, and Niels M. P. Neumann. “State preparation by shallow circuits using feed forward”. Quantum 8, 1552 (2024). arXiv:2307.14840.DOI
- [17]Wei Zi, Junhong Nie, and Xiaoming Sun. “Constant-depth quantum circuits for arbitrary quantum state preparation via measurement and feedback” (2025). arXiv:2503.16208.arxiv.org/abs/2503.16208
- [18]Gregory Rosenthal. “Query and depth upper bounds for quantum unitaries via Grover search”. Quantum 10, 2144 (2026). arXiv:2111.07992v5.
- [19]Lucas Gretta, Meghal Gupta, and Malvika Raj Joshi. “QAC0 can prepare every logarithmic-qubit state” (2026). arXiv:2609.17408v1.arxiv.org/abs/2609.17408
- [20]Sergii Strelchuk, Sathyawageeswar Subramanian, and Máté Weisz. “The power of constant-depth quantum circuits of unbounded size” (2026). arXiv:2609.40294v1.arxiv.org/abs/2609.40294
- [21]Barak Nehoran and Henry Yuen. “All unitaries have constant depth quantum circuits” (2026). arXiv:2609.40351v1.
- [22]Adriano Barenco, Charles H. Bennett, Richard Cleve, David P. DiVincenzo, Norman Margolus, Peter Shor, Tycho Sleator, John A. Smolin, and Harald Weinfurter. “Elementary gates for quantum computation”. Phys. Rev. A 52, 3457–3467 (1995). arXiv:quant-ph/9503016.DOI
- [23]Sandy Irani, Anand Natarajan, Chinmay Nirkhe, Sujit Rao, and Henry Yuen. “Quantum search-to-decision reductions and the state synthesis problem”. In 37th Computational Complexity Conference (CCC 2022). Volume 234 of Leibniz International Proceedings in Informatics (LIPIcs), pages 5:1–5:19. (2022). arXiv:2111.02999.DOI
- [24]Gilles Brassard, Peter Høyer, Michele Mosca, and Alain Tapp. “Quantum amplitude amplification and estimation”. In Quantum Computation and Information. Volume 305 of Contemporary Mathematics, pages 53–74. American Mathematical Society (2002). arXiv:quant-ph/0005055.DOI
- [25]Dominic W. Berry, Andrew M. Childs, Richard Cleve, Robin Kothari, and Rolando D. Somma. “Exponential improvement in precision for simulating sparse Hamiltonians”. In Proceedings of the 46th Annual ACM Symposium on Theory of Computing (STOC). Pages 283–292. (2014). arXiv:1312.1414.DOI
- [26]Gregory Rosenthal. “Quantum state and unitary complexity”. PhD thesis. University of Toronto. (2023). url: https://www.cs.toronto.edu/~rosenthal/thesis.pdf.
- [27]Frederic Green, Steven Homer, Cristhopher Moore, and Christopher Pollett. “Counting, fanout and the complexity of quantum ACC”. Quantum Inf. Comput. 2, 35–65 (2002). arXiv:quant-ph/0106017.arxiv.org/abs/quant-ph/0106017
- [28]Peter Høyer and Robert Špalek. “Quantum fan-out is powerful”. Theory Comput. 1, 81–103 (2005). arXiv:quant-ph/0208043.
- [29]Andrew M. Childs and Nathan Wiebe. “Hamiltonian simulation using linear combinations of unitary operations”. Quantum Inf. Comput. 12, 901–924 (2012). arXiv:1202.5822.DOI
- [30]Dominic W. Berry, Andrew M. Childs, Richard Cleve, Robin Kothari, and Rolando D. Somma. “Simulating Hamiltonian dynamics with truncated Taylor series”. Phys. Rev. Lett. 114, 090502 (2015). arXiv:1412.4687.DOI
- [31]Francisca Vasconcelos. “Depth-optimal quantum compilation” (2026). arXiv:2609.34659v1.arxiv.org/abs/2609.34659
- [32]Leonardo Novo and Dominic W. Berry. “Improved Hamiltonian simulation via a truncated Taylor series and corrections”. Quantum Inf. Comput. 17, 623–635 (2017). arXiv:1611.10033v1.arxiv.org/abs/1611.10033
- [33]Jaromír Furašek. “Unitary-gate synthesis for continuous-variable systems”. Phys. Rev. A 68, 022304 (2003). arXiv:quant-ph/0303035.
- [34]Anne Broadbent and Elham Kashefi. “Parallelizing quantum circuits”. Theor. Comput. Sci. 410, 2489–2510 (2009). arXiv:0704.1736.DOI
- [35]Ben Foxman, Natalie Parham, Francisca Vasconcelos, and Henry Yuen. “Random unitaries in constant (quantum) time”. In Shubhangi Saraf, editor, 17th Innovations in Theoretical Computer Science Conference (ITCS 2026). Volume 362 of Leibniz International Proceedings in Informatics (LIPIcs), pages 61:1–61:25. Dagstuhl, Germany (2026). Schloss Dagstuhl – Leibniz-Zentrum für Informatik. arXiv:2508.11487v3.arxiv.org/abs/2508.11487
- [36]Elisa Bäumer and Stefan Woerner. “Measurement-based long-range entangling gates in constant depth”. Phys. Rev. Research 7, 023120 (2025). arXiv:2408.03064.DOI
- [37]Man-Duen Choi. “Completely positive linear maps on complex matrices”. Linear Algebra Appl. 10, 285–290 (1975).DOI
- [38]Christopher C. Paige and Musheng Wei. “History and generality of the CS decomposition”. Linear Algebra Appl. 208–209, 303–326 (1994).DOI
- [39]Mikko Möttönen, Juha J. Vartiainen, Ville Bergholm, and Martti M. Salomaa. “Quantum circuits for general multiqubit gates”. Phys. Rev. Lett. 93, 130502 (2004). arXiv:quant-ph/0404089.DOI
- [40]Gregory Rosenthal. “Bounds on the QAC⁰ complexity of approximating parity”. In 12th Innovations in Theoretical Computer Science Conference (ITCS 2021). Volume 185 of LIPIcs, pages 32:1–32:20. (2021). arXiv:2008.07470.arxiv.org/abs/2008.07470
- [41]Daniel Grier, Jackson Morris, and Kewen Wu. “QAC⁰ contains TC⁰ (with many copies of the input)” (2026). arXiv:2601.03243v1.
- [42]Maosen Fang, Stephen Fenner, Frederic Green, Steven Homer, and Yong Zhang. “Quantum lower bounds for fanout”. Quantum Inf. Comput. 6, 46–57 (2006). arXiv:quant-ph/0312208.DOI
- [43]Shivam Nadimpalli, Natalie Parham, Francisca Vasconcelos, and Henry Yuen. “On the Pauli spectrum of QAC⁰”. In Proceedings of the 56th Annual ACM Symposium on Theory of Computing (STOC). Pages 1498–1506. (2024). arXiv:2311.09631.DOI
- [44]Anurag Anshu, Yangjing Dong, Fengning Ou, and Penghui Yao. “On the computational power of QAC⁰ with barely superlinear ancillae”. In Proceedings of the 57th Annual ACM Symposium on Theory of Computing (STOC). Pages 1476–1487. (2025). arXiv:2410.06499.arxiv.org/abs/2410.06499
- [45]Vadym Kliuchnikov, Dmitri Maslov, and Michele Mosca. “Fast and efficient exact synthesis of single-qubit unitaries generated by Clifford and T gates”. Quantum Inf. Comput. 13, 607–630 (2013). arXiv:1206.5236.arxiv.org/abs/1206.5236
- [46]Brett Giles and Peter Selinger. “Exact synthesis of multiqubit Clifford+T circuits”. Phys. Rev. A 87, 032332 (2013). arXiv:1212.0506.DOI
- [47]Yasuhiro Takahashi and Seiichiro Tani. “Collapse of the hierarchy of constant-depth exact quantum circuits”. Comput. Complexity 25, 849–881 (2016). arXiv:1112.6063v2.
- [48]Jean-Louis Krivine. “Constantes de Grothendieck et fonctions de type positif sur les sphères”. Adv. Math. 31, 16–30 (1979).
- [49]Shmuel Friedland, Lek-Heng Lim, and Jinjie Zhang. “An elementary and unified proof of Grothendieck’s inequality”. Enseign. Math. 64, 327–351 (2018). arXiv:1711.10595.


