Skip to main content

Table 1 The steps from \((x_1,y_1)\) to \((x_3,y_3)\) by point addition. Symbols \(|\cdot \rangle _1\) and \(|\cdot \rangle _0\) respectively represent the state when the control bit is 1 and 0. The states in the table represent the change of the quantum registers corresponding to each step and the unwritten states are the same as the states in the previous step

From: Minimizing CNOT-count in quantum circuit of the extended Shor’s algorithm for ECDLP

 

Process

The change in value

1.1

CNOT\(\quad c_1,c_2,x_1,y_1\)

\(c_1\leftarrow x_1;c_2\leftarrow y_1\)

2.1

\({\texttt{ctrl}}\)-CNOT\(\quad c_3,c_4,x_1,y_1,{\texttt{ctrl}}\)

\(c_3\leftarrow [x_1]_1,[0]_0;c_4\leftarrow [y_1]_1,[0]_0\)

3.1

\({\texttt {ModAdd}}^{-1}(\cdot )\quad x_1,y_1,x_2,y_2\)

\(x_1\leftarrow x_1-x_2;y_1\leftarrow y_1-y_2\)

4.1

\({\texttt {Inv}} \quad c_5,x_1\)

\(c_5\leftarrow \frac{1}{x_1-x_2}\)

5.1

\({\texttt {M-Mul}} \quad c_6,y_1,c_5\)

\(c_6\leftarrow \lambda\)

6.1

\({\texttt {D-Mul}} \quad c_8,c_6,c_7\)

\(c_7\leftarrow \lambda ;c_8\leftarrow \lambda ^2\)

7.1

\({\texttt{ctrl}}\)-CNOT\(\quad c_9,c_8,{\texttt{ctrl}}\)

\(c_9\leftarrow [\lambda ^2]_1,[0]_0\)

8.1

\({\texttt {ModAdd}}^{-1}\quad c_9,c_3\)

\(c_9\leftarrow [\lambda ^2-x_1]_1,[0]_0\)

9.1

\({\texttt{ctrl}}-{\texttt {ModAdd}}^{-1}(\cdot )\quad c_9,x_2,{\texttt{ctrl}}\)

\(c_9\leftarrow [\lambda ^2-x_1-x_2=x_3]_1,[0]_0\)

10.1

\({\texttt {ModAdd}}^{-1}\quad c_3,c_4\)

\(c_3\leftarrow [x_1-x_3]_1,[0]_0\)

11.1

\({\texttt {D-Mul}} \quad c_{10},c_3,c_7\)

\(c_{10}\leftarrow [\lambda (x_1-x_3)]_1,[0]_0\)

12.1

\({\texttt {ModAdd}}^{-1}\quad c_{10},c_4\)

\(c_{10}\leftarrow [\lambda (x_1-x_3)-y_1=y_3]_1,[0]_0\)

13.1

\({\texttt{ctrl}}\)-CNOT\(\quad c_9,c_{10},c_1,c_2,{\texttt{ctrl}}\)

\(c_9\leftarrow [x_3]_1,[x_1]_0;c_{10}\leftarrow [y_3]_1,[y_1]_0\)