Skip to content

A linear-size, logarithmic-depth quantum constant adder with one dirty ancilla

Jingquan Luo, Lvzhou Li

quant-ph

Abstract

Quantum arithmetic circuits often add known classical constants, for instance when implementing modular arithmetic for Shor's factoring algorithm. We give an exact circuit that performs this addition modulo 2n2^n on an nn-qubit register. It uses one dirty ancilla and O(n)O(n) NOT, CNOT, and Toffoli gates. With all-to-all connectivity, its depth is O(log⁡(n+1))O(\log(n+1)). The gate count, depth, and number of ancillas are optimal in the worst case over constants.

Create a lesson