arXiv:2610.38189quant-phOct 2026

Manuscript Offprint

arXiv:2610.38189

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

Arul Rhik Mazumder

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

In fault-tolerant Clifford+TT circuits, a Boolean oracle costs TT 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 TT-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 TT gates per bit of precision and borrows only the gate's own idle inputs. This is one TT 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 TT-count of exact multi-controlled Toffoli gates. Finally, the oracle of the indicator of a random set of fixed density needs exponentially many TT 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.

Contents

1 Introduction 2
1.1 Structured oracles 3
1.2 Lower bounds and exact gates 4
1.3 Distance from affine and random sets 4
2 Technical overview 5
2.1 Warm-up: one branch 5
2.2 Structured oracles 6
2.3 Lower bounds for the Toffoli gate 7
2.4 Distance from affine and random sets 7
3 Related work 8
4 Discussion and open problems 9
A Preliminaries 10
A.1 Distances and synthesis models 10
A.2 Multi-controlled NOTs with borrowed qubits 11

*Imperial College London. rhik.mazumder26@imperial.ac.uk

B Constructions without an ancilla 11 B.1 The randomized Toffoli gate ..... 12 B.2 Affine decompositions ..... 14 B.2.1 Every Boolean function has such a decomposition ..... 15

C Lower bounds 15 C.1 The Toffoli gate ..... 15 C.2 Oracle branches and exact multi-controlled NOTs ..... 17 C.3 The distance from affine ..... 19 C.4 Random exceptional sets ..... 20

References (34)