From: Minimizing CNOT-count in quantum circuit of the extended Shor’s algorithm for ECDLP
The basic arithmetic operations | #Toffoli | #CNOTs for Clifford+Toffoli |
---|---|---|
\({\texttt {1-Add}} _y\) (unknown state y) | 2n | \(4n+1\) |
\({\texttt{ctrl}}\)-\({\texttt {1-Add}} _y\) (unknown state y) | \(4n+1\) | 2n |
\({\texttt{2-Add}}_y\) (known constant y) | \(2n-1\) | \(2n+0.5\) |
\({\texttt{ctrl}}\)-\({\texttt{2-Add}}_y\) | 2n | \(5n+1\) |
\({\texttt{1-Comp}}\) | 2n | 1 |
\({\texttt{2-Comp}}_y\) (known constant y) | 2n | 1 |
\({\texttt{ctrl}}\)-\({\texttt{2-Comp}}_y\) (known constant y) | \(2n+1\) | 1 |
\({\texttt{2-Comp}}_y\) (unknown state y) | 2n | \(4n+1\) |
\({\texttt{ctrl}}\)-\({\texttt{2-Comp}}_y\) (unknown state y) | \(2n+1\) | \(4n+1\) |
\({\texttt {ModSub}} _y\) or \({\texttt {ModAdd}}_y\) (known constant y) | \(6n-1\) | \(7n+3.5\) |
\({\texttt{ctrl}}\)-\({\texttt {ModSub}} _y\) (known constant y) | \(6n+1\) | \(10n+5\) |
\({\texttt {ModAdd}}_y\) (unknown state y) | 8n | \(13n+6\) |
\({\texttt{ctrl}}\)-\({\texttt {ModAdd}}_y\) (unknown state y) | \(10n+2\) | \(11n+5\) |
\({\texttt {Neg}}\) | \(2n-1\) | \(2n-0.5\) |
\({\texttt{ctrl}}\)-\({\texttt {Neg}}\) | 2n | \(6n+1\) |
\({\texttt {1-Shift}}\) | - | 2n |
\({\texttt{ctrl}}\)-\({\texttt {1-Shift}}\) | 2n | - |
\({\texttt{2-Shift}}\) | - | 3n |
\({\texttt{ctrl}}\)-\({\texttt{2-Shift}}\) | n | 2n |
\({\texttt {ShiftMod}}\) | 4n | \(7n+3\) |
\({\texttt {M-Mul}}\) (half) | \(6n^2+5n-1\) | \(9n^2+9n+0.5\) |
\({\texttt {D-Mul}}\) (half) | \(8n^2\) | \(9n^2+1.5\) |