Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:2610.38189

Ancilla-free randomized Toffoli gates and the T-count of Boolean oracles

Arul Rhik Mazumder

quant-phcs.CCSubmitted Oct 28, 2026• Announced Oct 29, 2026• 0 citations
arXivHTMLPDF

Abstract

In fault-tolerant Clifford+T circuits, a Boolean oracle costs T gates and extra qubits, and on four or more qubits every exact Toffoli gate needs an extra qubit. Gosset, Kothari and Zhang showed that sampling a fresh random circuit for each call makes the T-count of the Toffoli gate independent of its size, but a direct implementation of their sampler uses about one extra qubit per bit of precision. We show that computing the sampled parities in place, on the gate's own controls, removes every extra qubit once the gate is large enough: each random circuit then uses about 8 T gates per bit of precision and borrows only the gate's own idle inputs. This is one T gate more per circuit than the best measurement-free variant that keeps one clean ancilla. The same holds for exclusive-ors of indicators of affine subspaces, such as equality tests and checks of linear equations. For randomized circuits that do not measure, this is within a factor of eight of optimal up to an additive constant, even with extra qubits, and when each random circuit computes a Boolean function exactly, closing the factor asymptotically is equivalent to determining the leading constant in the T-count of exact multi-controlled Toffoli gates. Finally, the oracle of the indicator of a random set of fixed density needs exponentially many T gates at constant error, while that of an affine subspace of the same density needs a constant number, and extra qubits reduce the exponential cost only quadratically.

Comments
27 pages, 4 figures, 1 table. Verification scripts: https://github.com/arulrhikm/randomized-oracle-checks

Related papers

Adaptive Clifford+T Decomposition of Large Toffoli Gates with One Clean Ancilla

Abhoy Kole, Majd Assaad, Till Schnittka +1 more

Multi-controlled Toffoli gates are fundamental building blocks in quantum computation, with applications in quantum arithmetic, simulation, and search algorithms. In fault-tolerant architectures, their realization is constrained by the high cost of non-Clifford resources, particularly in terms of T-count and T-depth. Recent advances have demonstrated that the use of ancillary qubits, relative-phase Toffoli gates, and dynamic circuit techniques can substantially reduce this overhead. In this work, we investigate the decomposition of large Toffoli gates using 3- and 4-input relative-phase Toffoli gates in the presence of a single clean ancilla and conditionally clean ancillas. We derive explicit resource bounds for Clifford+T implementations incorporating dynamic-circuit-based uncomputation and measurement-conditioned corrections. Our analysis emphasizes T-depth reduction under fixed CX and T-count overhead, ensuring relevance for near-term devices. We show that introducing 4-input relative-phase Toffoli gates enables significant T-depth reductions through enhanced parallelism while maintaining favorable ancilla requirements. We further validate our theoretical results through experimental evaluation and comparative analysis with existing approaches.

quant-pharXiv:2605.18169•May 19, 2026•0 citations

Multi-qubit Toffoli with exponentially fewer T gates

David Gosset, Robin Kothari, Chenyi Zhang

Prior work of Beverland et al. has shown that any exact Clifford+$T$ implementation of the $n$-qubit Toffoli gate must use at least $n$ $T$ gates. Here we show how to get away with exponentially fewer $T$ gates, at the cost of incurring a tiny $1/\mathrm{poly}(n)$ error that can be neglected in most practical situations. More precisely, the $n$-qubit Toffoli gate can be implemented to within error $ε$ in the diamond distance by a randomly chosen Clifford+$T$ circuit with at most $O(\log(1/ε))$ $T$ gates. We also give a matching $Ω(\log(1/ε))$ lower bound that establishes optimality, and we show that any purely unitary implementation achieving even constant error must use $Ω(n)$ $T$ gates. We also extend our sampling technique to implement other Boolean functions. Finally, we describe upper and lower bounds on the $T$-count of Boolean functions in terms of non-adaptive parity decision tree complexity and its randomized analogue.

arXiv:2510.07223•Oct 8, 2025•1 citation

Exact TTT-counts of CCZ layers from an isotropy bound

Arul Rhik Mazumder

The $T$-count is a dominant cost of fault-tolerant Clifford$+T$ computation. We prove that every Hadamard-free Clifford$+T$ circuit with clean ancillas for a layer of $m$ disjoint CCZ gates, the diagonal core of a parallel Toffoli layer, uses at least $6m+1$ $T$ gates. Campbell and Howard gave a circuit with $6m+1$, and to our knowledge this is the first proof that it is optimal for general $m$. The proof combines Campbell and Howard's self-orthogonality of the columns of the parity matrix with a rank (flattening) bound, sharpened by one. More generally, the argument gives a lower bound on the $T$-count of every diagonal gate in the third level of the Clifford hierarchy, the isotropy floor, computable by Gaussian elimination. It is never below the stabilizer nullity $ν$ and reaches $2ν+1$ on non-Clifford gates whose phase is purely cubic. No bound that also holds for circuits with measurement and feedforward can do this, since such circuits implement CCZ ($ν=3$) with four $T$ gates and the layer with $4m$, where the floor gives seven and $6m+1$. The floor also recovers Campbell and Howard's count $4m+3$ for a fan-out of Toffolis. On the output of PyZX's TODD-based optimizer, relative to its Hadamard placement, it certifies $193$ of $311$ phase-polynomial blocks $T$-optimal once repeated parities are merged (at the best of five optimizer seeds), against $113$ for nullity, including $37$ of the $72$ blocks too large for exhaustive search.

quant-pharXiv:2610.01024•Oct 2, 2026•0 citations

Multi-qubit controlled gate synthesis without T-count overhead in the small-error limit

Soichiro Yamazaki, Seiseki Akibue, Kaoru Sano

We study the Clifford+T synthesis of quantum multiplexers $U=\bigoplus_{i=1}^{2^n}U_i$: an $n$-qubit control register selects which single-qubit gate $U_i\in\mathrm{SU}(2)$ acts on the target qubit. For each block $U_i$, consider the minimum even T-count needed to approximate it within diamond distance $\varepsilon$ without ancillae, and let $m$ be the largest of these costs. For an arbitrary multiplexer $U$, we construct an approximation of $U$ within the same distance using at most $m+O(\sqrt{2^n(m+1)})$ $T$ gates. With one control qubit, the cost is $m+O(1)$ and no ancillae are required. We also prove a lower bound that allows the Clifford+T circuit to use any number of clean ancillae initialized to zero and returned exactly to zero. For fixed $n$ and independent Haar-random blocks, the minimum T-count among these circuits lies between $(3-δ)\log_2(1/\varepsilon)$ and $(3+δ)\log_2(1/\varepsilon)$ for every fixed $δ>0$, except with probability $O(\varepsilon^{c_{n,δ}})$ as $\varepsilon\rightarrow0$. The optimal leading coefficient is therefore the same as for a single Haar-random $\mathrm{SU}(2)$ gate. In the lower-bound proof, unitarity forces pairs of off-diagonal blocks describing transitions in opposite directions to satisfy cancellation relations with residuals of order $\varepsilon^2$. We combine these relations with the arithmetic of Clifford+T circuits to bound the Haar measure of targets compatible with each pair of off-diagonal blocks. As an application, we obtain ancilla-free approximations of Haar-random $\mathrm{SU}(4)$ gates within diamond distance $\varepsilon$, using at most $(9+δ)\log_2(1/\varepsilon)$ $T$ gates for every fixed $δ>0$, except with probability $O(\varepsilon^{c_δ})$ with $c_δ>0$.

quant-pharXiv:2603.14202•Mar 17, 2026•0 citations

Any Clifford+T circuit can be controlled with constant T-depth overhead

Isaac H. Kim, Tuomas Laakkonen

Since an n-qubit circuit consisting of CNOT gates can have up to $Ω(n^2/\log{n})$ CNOT gates, it is natural to expect that $Ω(n^2/\log{n})$ Toffoli gates are needed to apply a controlled version of such a circuit. We show that the Toffoli count can be reduced to at most n. The Toffoli depth can also be reduced to O(1), at the cost of 2n Toffoli gates, even without using any ancilla or measurement. In fact, using a measurement-based uncomputation, the Toffoli depth can be further reduced to 1. From this, we give two corollaries: any controlled Clifford circuit can be implemented with O(1) T-depth, and any Clifford+T circuit with T-depth D can be controlled with T-depth O(D), even without ancillas. As an application, we show how to catalyze a rotation by any angle up to precision $ε$ in T-depth exactly 1 using a universal $\lceil\log_2(8/ε)\rceil$-qubit catalyst state.

quant-pharXiv:2512.24982•Jan 1, 2026•0 citations

Reducing T-Count in Quantum Circuits Using Alternate Forms of the Relative Phase Toffoli Gate

David Clarino, Shohei KURODA, Shigeru Yamashita

Toffoli gates are an important primitive in reversible Boolean logic. In quantum computation, these Toffoli gates are composed using other elementary gates, most notably the Clifford+T basis. However, in fault-tolerant implementations of quantum circuits, the T-gate incurs extra cost relative to Clifford gates like the S-gate and CNOT gate. Relative-phase Toffoli Gates (RTOFs) have been proposed as a way to reduce this T-count at the cost of incurring a relative phase that could skew the final quantum states. In this paper, we utilize an observation that the relative phase which RTOFs introduce can be canceled by the appropriate application of less expensive S-gates instead of T-gates. It leverages alternate forms of the RTOF including incorporating S-gates into it or moving around its input bits in order to simplify the logic to erase the relative phase. We find experimentally that our method has a clear advantage in most cases, and identify several types of circuits that it could be synergistic with.

IEICE Transactions on Fundamentals of Electronics Communications and Computer Sciences•Jul 15, 2024•1 citation
In fault-tolerant Clifford+T circuits, a Boolean oracle costs T gates and extra qubits, and on four or more qubits every exact Toffoli gate needs an extra qubit. Gosset, Kothari and Zhang showed that sampling a fresh random circuit for each call makes the T-count of the Toffoli gate independent of its size, but a direct implementation of their sampler uses about one extra qubit per bit of precision. We show that computing the sampled parities in place, on the gate's own controls, removes every extra qubit once the gate is large enough: each random circuit then uses about 8 T gates per bit of precision and borrows only the gate's own idle inputs. This is one T gate more per circuit than the best measurement-free variant that keeps one clean ancilla. The same holds for exclusive-ors of indicators of affine subspaces, such as equality tests and checks of linear equations. For randomized circuits that do not measure, this is within a factor of eight of optimal up to an additive constant, even with extra qubits, and when each random circuit computes a Boolean function exactly, closing the factor asymptotically is equivalent to determining the leading constant in the T-count of exact multi-controlled Toffoli gates. Finally, the oracle of the indicator of a random set of fixed density needs exponentially many T gates at constant error, while that of an affine subspace of the same density needs a constant number, and extra qubits reduce the exponential cost only quadratically.
Multi-controlled Toffoli gates are fundamental building blocks in quantum computation, with applications in quantum arithmetic, simulation, and search algorithms. In fault-tolerant architectures, their realization is constrained by the high cost of non-Clifford resources, particularly in terms of T-count and T-depth. Recent advances have demonstrated that the use of ancillary qubits, relative-phase Toffoli gates, and dynamic circuit techniques can substantially reduce this overhead. In this work, we investigate the decomposition of large Toffoli gates using 3- and 4-input relative-phase Toffoli gates in the presence of a single clean ancilla and conditionally clean ancillas. We derive explicit resource bounds for Clifford+T implementations incorporating dynamic-circuit-based uncomputation and measurement-conditioned corrections. Our analysis emphasizes T-depth reduction under fixed CX and T-count overhead, ensuring relevance for near-term devices. We show that introducing 4-input relative-phase Toffoli gates enables significant T-depth reductions through enhanced parallelism while maintaining favorable ancilla requirements. We further validate our theoretical results through experimental evaluation and comparative analysis with existing approaches.
Prior work of Beverland et al. has shown that any exact Clifford+TTT implementation of the nnn-qubit Toffoli gate must use at least nnn TTT gates. Here we show how to get away with exponentially fewer TTT gates, at the cost of incurring a tiny 1/poly(n)1/\mathrm{poly}(n)1/poly(n) error that can be neglected in most practical situations. More precisely, the nnn-qubit Toffoli gate can be implemented to within error εεε in the diamond distance by a randomly chosen Clifford+TTT circuit with at most O(log⁡(1/ε))O(\log(1/ε))O(log(1/ε)) TTT gates. We also give a matching Ω(log⁡(1/ε))Ω(\log(1/ε))Ω(log(1/ε)) lower bound that establishes optimality, and we show that any purely unitary implementation achieving even constant error must use Ω(n)Ω(n)Ω(n) TTT gates. We also extend our sampling technique to implement other Boolean functions. Finally, we describe upper and lower bounds on the TTT-count of Boolean functions in terms of non-adaptive parity decision tree complexity and its randomized analogue.
The TTT-count is a dominant cost of fault-tolerant Clifford+T+T+T computation. We prove that every Hadamard-free Clifford+T+T+T circuit with clean ancillas for a layer of mmm disjoint CCZ gates, the diagonal core of a parallel Toffoli layer, uses at least 6m+16m+16m+1 TTT gates. Campbell and Howard gave a circuit with 6m+16m+16m+1, and to our knowledge this is the first proof that it is optimal for general mmm. The proof combines Campbell and Howard's self-orthogonality of the columns of the parity matrix with a rank (flattening) bound, sharpened by one. More generally, the argument gives a lower bound on the TTT-count of every diagonal gate in the third level of the Clifford hierarchy, the isotropy floor, computable by Gaussian elimination. It is never below the stabilizer nullity ννν and reaches 2ν+12ν+12ν+1 on non-Clifford gates whose phase is purely cubic. No bound that also holds for circuits with measurement and feedforward can do this, since such circuits implement CCZ (ν=3ν=3ν=3) with four TTT gates and the layer with 4m4m4m, where the floor gives seven and 6m+16m+16m+1. The floor also recovers Campbell and Howard's count 4m+34m+34m+3 for a fan-out of Toffolis. On the output of PyZX's TODD-based optimizer, relative to its Hadamard placement, it certifies 193193193 of 311311311 phase-polynomial blocks TTT-optimal once repeated parities are merged (at the best of five optimizer seeds), against 113113113 for nullity, including 373737 of the 727272 blocks too large for exhaustive search.
We study the Clifford+T synthesis of quantum multiplexers U=⨁i=12nUiU=\bigoplus_{i=1}^{2^n}U_iU=⨁i=12n​Ui​: an nnn-qubit control register selects which single-qubit gate Ui∈SU(2)U_i\in\mathrm{SU}(2)Ui​∈SU(2) acts on the target qubit. For each block UiU_iUi​, consider the minimum even T-count needed to approximate it within diamond distance ε\varepsilonε without ancillae, and let mmm be the largest of these costs. For an arbitrary multiplexer UUU, we construct an approximation of UUU within the same distance using at most m+O(2n(m+1))m+O(\sqrt{2^n(m+1)})m+O(2n(m+1)​) TTT gates. With one control qubit, the cost is m+O(1)m+O(1)m+O(1) and no ancillae are required. We also prove a lower bound that allows the Clifford+T circuit to use any number of clean ancillae initialized to zero and returned exactly to zero. For fixed nnn and independent Haar-random blocks, the minimum T-count among these circuits lies between (3−δ)log⁡2(1/ε)(3-δ)\log_2(1/\varepsilon)(3−δ)log2​(1/ε) and (3+δ)log⁡2(1/ε)(3+δ)\log_2(1/\varepsilon)(3+δ)log2​(1/ε) for every fixed δ>0δ>0δ>0, except with probability O(εcn,δ)O(\varepsilon^{c_{n,δ}})O(εcn,δ​) as ε→0\varepsilon\rightarrow0ε→0. The optimal leading coefficient is therefore the same as for a single Haar-random SU(2)\mathrm{SU}(2)SU(2) gate. In the lower-bound proof, unitarity forces pairs of off-diagonal blocks describing transitions in opposite directions to satisfy cancellation relations with residuals of order ε2\varepsilon^2ε2. We combine these relations with the arithmetic of Clifford+T circuits to bound the Haar measure of targets compatible with each pair of off-diagonal blocks. As an application, we obtain ancilla-free approximations of Haar-random SU(4)\mathrm{SU}(4)SU(4) gates within diamond distance ε\varepsilonε, using at most (9+δ)log⁡2(1/ε)(9+δ)\log_2(1/\varepsilon)(9+δ)log2​(1/ε) TTT gates for every fixed δ>0δ>0δ>0, except with probability O(εcδ)O(\varepsilon^{c_δ})O(εcδ​) with cδ>0c_δ>0cδ​>0.
Since an n-qubit circuit consisting of CNOT gates can have up to Ω(n2/log⁡n)Ω(n^2/\log{n})Ω(n2/logn) CNOT gates, it is natural to expect that Ω(n2/log⁡n)Ω(n^2/\log{n})Ω(n2/logn) Toffoli gates are needed to apply a controlled version of such a circuit. We show that the Toffoli count can be reduced to at most n. The Toffoli depth can also be reduced to O(1), at the cost of 2n Toffoli gates, even without using any ancilla or measurement. In fact, using a measurement-based uncomputation, the Toffoli depth can be further reduced to 1. From this, we give two corollaries: any controlled Clifford circuit can be implemented with O(1) T-depth, and any Clifford+T circuit with T-depth D can be controlled with T-depth O(D), even without ancillas. As an application, we show how to catalyze a rotation by any angle up to precision εεε in T-depth exactly 1 using a universal ⌈log⁡2(8/ε)⌉\lceil\log_2(8/ε)\rceil⌈log2​(8/ε)⌉-qubit catalyst state.
Toffoli gates are an important primitive in reversible Boolean logic. In quantum computation, these Toffoli gates are composed using other elementary gates, most notably the Clifford+T basis. However, in fault-tolerant implementations of quantum circuits, the T-gate incurs extra cost relative to Clifford gates like the S-gate and CNOT gate. Relative-phase Toffoli Gates (RTOFs) have been proposed as a way to reduce this T-count at the cost of incurring a relative phase that could skew the final quantum states. In this paper, we utilize an observation that the relative phase which RTOFs introduce can be canceled by the appropriate application of less expensive S-gates instead of T-gates. It leverages alternate forms of the RTOF including incorporating S-gates into it or moving around its input bits in order to simplify the logic to erase the relative phase. We find experimentally that our method has a clear advantage in most cases, and identify several types of circuits that it could be synergistic with.