Fig. 4: Number of Toffoli gates of the optimized circuits found by AlphaTensor-Quantum.

a, For multiplication in finite fields of order 2m, AlphaTensor-Quantum finds efficient circuits that substantially outperform the original construction, which scales like \({\mathcal{O}}({m}^{2})\). The number of Toffoli gates matches the best-known lower bound of the classical circuits50 for some values of m, and scales as \(\sim {m}^{{\log }_{2}(3)}\), showing that AlphaTensor-Quantum found an algorithm with the same complexity as Karatsuba’s method35, a classical algorithm for multiplication on finite fields for which a quantum version has not been reported in the literature. (The baselines are classical circuits, and hence not directly comparable, as naive translations of classical to quantum circuits commonly introduce overheads. To compare, we assume the number of effective Toffoli gates is the number of 1-bit AND gates in the classical circuit.) b, For binary addition, AlphaTensor-Quantum halves the cost of the circuits from Cuccaro et al. (2004)51 matching the state-of-the-art circuits from Gidney (2018)38. Remarkably, it does so automatically without any prior knowledge of the measurement-based uncomputation technique, which was crucial to their results.