Quantum arithmetic operations based on quantum Fourier transform on signed integers

05/01/2020 ∙ by Engin Şahin, et al. ∙ COMU 0

The quantum Fourier transform brings efficiency in many respects, especially usage of resource, for most operations on quantum computers. In this study, the existing QFT-based and non-QFT-based quantum arithmetic operations are examined. The capabilities of QFT-based addition and multiplication are improved with some modifications. The proposed operations are compared with the nearest quantum arithmetic operations. Furthermore, novel QFT-based subtraction and division operations are presented. The proposed arithmetic operations can perform non-modular operations on all signed numbers without any limitation by using less resources. In addition, novel quantum circuits of two's complement, absolute value and comparison operations are also presented by using the proposed QFT based addition and subtraction operations.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

In recent years, quantum computation have started to attract attention with the ease of solving difficult problems in classical computation. After Shor proposed the quantum factoring algorithm Shor1994

, researchers’ interest in quantum arithmetic operations increased. Quantum arithmetic operations are required in many studies such as quantum signal processing, quantum machine learning. Especially in quantum image processing, arithmetic operations are used in many processes such as steganography, edge detection and pattern recognition.

The modular adder, the modular multiplier and the modular exponentiation operations proposed by Vedral et al. Vedral1996 are the first elementary quantum arithmetic operations to improve the time and the memory complexity of Shor’s quantum factoring algorithm Shor1994 . Gossett Gossett1998 showed how to design modular arithmetic elements from quantum gates using the carry-save method on a classic computer. Draper Draper2000

proposed a new method for computing sums on a quantum computer. This technique uses the quantum Fourier transform (QFT) and reduces the number of carry qubits. Cuccaro et al.

Cuccaro2004 presented a new linear-depth ripple-carry quantum addition circuit. This new adder circuit uses only a single ancillary qubit instead of the many ancillary qubits used by the previous adder circuits. Takahashi and Kunihiro Takahashi2005 proposed a quantum circuit based on the ripple-carry approach for addition of two -bit binary numbers that uses no ancillary qubits. Draper et al. Draper2006 focused on decreasing the depth and constructed a fast quantum circuit for addition using the classical carry-lookahead technique. Takahashi and Kunihiro Takahashi2008 combined a modified version of Draper et al.’s quantum carry-lookahead adder Draper2006 with parallel applications of Takahashi et al.’s quantum ripple-carry adder Takahashi2005 . This modified adder used a few qubits and saved ancillary qubits. Alvarez-Sanchez et al. Sanchez2008 proposed a quantum multiplication architecture based on the Booth algorithm on classical computers, which used signed integers. Markov and Saeedi Markov2012 proposed constant-optimized quantum circuits for modular multiplication and exponentiation. Wang et al. Wang2016 presented an improved linear-depth ripple-carry quantum addition circuit, which is an elementary circuit used for quantum computation. Compared with previous adder circuits costing at least two Toffoli gates for each bit of output, the proposed adder used only a single Toffoli gate. Babu Babu2017 proposed a cost-efficient quantum multiplier–accumulator unit. Babu presented a fast multiplication algorithm with the optimum time complexity and designed a novel quantum multiplier based on the proposed algorithm. Ruiz-Perez and Garcia-Escartin Perez2017 made some simple variations to the existing QFT adders and multipliers, proposed a novel adder and a novel multiplier based on QFT with improved capabilities. The modified circuits could perform non-modular addition and modular multiplication operations. These circuits could also perform modular signed addition for numbers up to ( is the number of modulo).

All the arithmetic operations in the literature are on integers with same numbers of qubit . All the studies except the adder of Ruiz-Perez and Garcia-Escartin Perez2017 are modular arithmetic operations. In addition, only Ruiz-Perez and Garcia-Escartin’s QFT adder Perez2017 and Alvarez-Sanchez et al.’s multiplier Sanchez2008 can operate with signed integers. Furthermore, too many CNOT gates are used in non-QFT based arithmetic operations. CNOT gate consists of Toffoli gates (each Toffoli gate consists six CNOT gate) and one CNOT gate. This is also leading to increase in time complexity. Most of the studies in the literature have focused on addition, multiplication and exponentiation to make Shor’s quantum factoring algorithm Shor1994 more efficiently.

In this paper, both modular and non-modular QFT based addition, subtraction, multiplication and division arithmetic operations are presented. In addition to these arithmetic operations, two’s complement, absolute value calculation and comparison operations are presented. All the arithmetic operations are performed on two signed integers with the different number of qubits (). The comparison operation also compares signed integers. The results of multiplication and division operations are calculated on a separate qubit sequence, not on input qubits. Thus, the required resource and the time complexity in operations are reduced by reusing the input qubits.

This paper is organized as follows. Section 2 briefly introduces the two’s complement of signed binary integers and the quantum Fourier transform. Section 3 presents the quantum circuits for addition, subtraction, multiplication, division, two’s complement, absolute value and comparison operations and briefly explanations of the related operations. Section 4 makes comparisons between the proposed operations and the relevant operations with respect to the usage of ancillary qubits and time complexity. A conclusion remarks are given in Sect. 5.

2 Preliminaries

2.1 Two’s complement of signed binary integers

Two’s complement is the most common method of representing signed integers on computers. The two’s complement is calculated by inverting the bits and adding one. In this scheme, if the binary number encodes the signed integer , then its two’s complement, , encodes the inverse . The leading bit is the sign bit and is called the most significant bit (MSB). If the MSB of a number is 0, the number is positive, and if the MSB of a number is 1, the number is negative. Any -bit integer can be represented as a quantum state as follows:

(1)

where , and

is a tensor product. If

is positive, then and is simply represented as a binary sequence. In the other case, if is negative, then and is represented by the two’s complement of signed integer as follows.

(2)
(3)

Where is a Pauli X gate. The quantum circuit of the two’s complement method using by the proposed QFT addition is given in Sect. 3.3.

2.2 The quantum Fourier transform

Quantum Fourier transform (QFT) is a application of classical discrete Fourier transform to the quantum states Nielsen2010 ; Sahin2018a . The quantum Fourier transform of state from the computational basis can be defined as follows:

(4)

The QFT encodes a number into the phases of all states of equal amplitude in superposition. The state is usually shown as . The inverse QFT () can be defined as follows.

(5)

In this study, an overflow qubit is used in addition to -qubit state for non-modular arithmetic operations. This overflow qubit is actually the MSB of the result, ie the sign qubit. The circuits of the QFT and the inverse QFT are given to use for operations in the following sections. Thus, the quantum circuit of the application to the -qubit state with an additional overflow qubit (-qubit in total) is given in Fig. 1. The quantum circuit of applying to state is given in Fig. 2.

(a)
(b)
Figure 1: The quantum Fourier transform (a) the quantum circuit of QFT, (b) the simplified graph of QFT
(a)
(b)
Figure 2: The inverse quantum Fourier transform (a) the quantum circuit of , (b) the simplified graph of

The number of operations required for the QFT of any -qubit input is and the time complexity is . Barenco et al. Barenco1996 proposed approximate quantum Fourier transform (AQFT) in the presence of decoherence to reduce the number of operations required for QFT from to

. However, the AQFT is used in algorithms that include periodicity estimates. Therefore, the QFT is used instead of the AQFT in this study.

3 Quantum circuits for arithmetic operations

In this section, both modular and non-modular addition, subtraction, multiplication and division arithmetic operations based on QFT are presented. In addition, two’s complement, absolute value calculation and comparison operations are presented. All the arithmetic operations are performed on two signed integers with the different number of qubits ().

Let’s consider the quantum states and of the signed integers -bit and -bit to be used in the arithmetic operations presented in this section as follows.

(6)
(7)

where , , and is a tensor product. and are sign qubits of the signed integers.

3.1 QFT based addition operation

Ruiz-Perez and Garcia-Escartin Perez2017 proposed modular and non-modular QFT based adder by adding an additional qubit to the Draper’s modular QFT adder Draper2000 . The modified circuit could perform non-modular and modular addition operations on integers (). These circuits could also perform modular addition for signed integers up to ( is the number of modulo). In this section, the improved version of Ruiz-Perez and Garcia-Escartin’s QFT adder Perez2017 is presented for both modular and non-modular adder on all signed integers () without a limit such as . All the proposed circuits in this study are shown for . To accomplish this, an additional qubit which will be the sign qubit of the result, is first added to the state like in Ruiz-Perez and Garcia-Escartin’s design. For the modular addition, no additional qubit is required for the proposed method in this study.

(8)

In non-modular addition, when both numbers are positive or negative, the sign qubits and affect the smoothly at the end of process. However, if one of the numbers is negative and one is positive, the overflow qubit also affects the . The sign qubit is incorrect at the end of the operation. Therefore, Ruiz-Perez and Garcia-Escartin limits the addition to with signed integers. To correct this and to make the addition without any limit, two Toffoli gates with control qubits of and of (one of the gates is -controlled on , the other is -controlled on ) are applied to the qubit . Then the QFT circuit shown in Fig. 1 is applied to the state . The states represent the th qubit of the phase state .

In the Ruiz-Perez and Garcia-Escartin’s QFT adder, the application of controlled rotation phase gates leads to error as a result of the adder process. The corrected circuit of adding state to state with controlled rotation phase gates for non-modular addition (NMAdd) is shown in Fig. 3. Furthermore, the quantum circuit for modular addition (MAdd) is shown in Fig. 4. The rotation phase gate is follows.

(9)
(a)
(b)
Figure 3: The non-modular addition with controlled rotation phase gates (NMAdd) (a) the quantum circuit of NMAdd, (b) the simplified graph of NMAdd
(a)
(b)
Figure 4: The modular addition with controlled rotation phase gates (MAdd) (a) the quantum circuit of MAdd, (b) the simplified graph of MAdd

Finally, the state is obtained by applying inverse QFT circuit shown in Fig. 2. The full quantum circuits of QFT addition operation on the signed integers are shown in Fig. 5 for non-modular addition (QNMAdd) and Fig. 6 for modular addition (QMAdd).

(a)
(b)
Figure 5: The non-modular QFT addition (QNMAdd) (a) the quantum circuit of QNMAdd, (b) the simplified graph of QNMAdd
(a)
(b)
Figure 6: The modular QFT addition (QMAdd) (a) the quantum circuit of QMAdd, (b) the simplified graph of QMAdd

To add -qubits signed integer to -qubits signed integer , -qubits are used for modular addition, -qubits are used for non-modular addition with only one additional qubit in this study. The proposed QFT adder requires no additional ancillary qubits compared to the other classic computation-based quantum adders and uses a minimum size of qubits for non-modular addition with signed integers (). A total of 16 basic gate operations, 4 NOT and 2 Toffoli gates, are needed to correct the sign qubit before the QFT circuit. The time complexity of the QFT circuit for -qubit input is . The time complexity of the NMAdd circuit for the inputs -qubits and -qubits is (for ) . The time complexity of the MAdd circuit for the inputs -qubits and -qubits is (for ) . The time complexity of the inverse QFT circuit for -qubit input is . The time complexity of the non-modular QFT addition (QNMAdd) circuit for the inputs -qubits and -qubits is (for ) . The time complexity of the modular QFT addition (QMAdd) circuit for the inputs -qubits and -qubits is (for ) .

3.2 QFT subtraction operation

The QFT based subtraction operation is very similar to the QFT based addition operation. As with the QFT based addition operation, two NOT gates with zero and one controlled are initially applied for sign qubit correction, then the QFT is applied to the state . In the QFT subtraction operation, the inverse rotation phase gates are used instead of the rotation phase gates used in the QFT addition operation. The inverse rotation phase gate is follows.

(10)

The circuit of subtracting state from state with controlled inverse rotation phase gates for non-modular subtraction (NMSub) is shown in Fig. 7. The quantum circuit for modular subtraction (MSub) is shown in Fig. 8.

(a)
(b)
Figure 7: The non-modular subtraction with controlled rotation phase gates (NMSub) (a) the quantum circuit of NMSub, (b) the simplified graph of NMSub
(a)
(b)
Figure 8: The modular subtraction with controlled rotation phase gates (MSub) (a) the quantum circuit of MSub, (b) the simplified graph of MSub

Finally, the state is obtained by applying inverse QFT circuit shown in Fig. 2. The full quantum circuits of QFT subtraction operation on the signed integers are shown in Fig. 9 for non-modular subtraction (QNMSub) and in Fig. 10 for modular addition (QMSub).

(a)
(b)
Figure 9: The non-modular QFT subtraction (QNMSub) (a) the quantum circuit of QNMSub, (b) the simplified graph of QNMSub
(a)
(b)
Figure 10: The modular QFT subtraction (QMSub) (a) the quantum circuit of QMSub, (b) the simplified graph of QMSub

To subtract -qubits signed integer from -qubits signed integer , -qubits are used for modular addition, -qubits are used with only one additional qubit for non-modular addition in this study. This QFT subtraction operation uses a minimum size of qubits for non-modular subtraction with signed integers (). The time complexity of the NMSub circuit for the inputs -qubits and -qubits is (for ) . The time complexity of the MSub circuit for the inputs -qubits and -qubits is (for ) . The time complexity of the non-modular QFT subtraction (QNMSub) circuit for the inputs -qubits and -qubits is (for ) . The time complexity of the modular QFT subtraction (QMSub) circuit for the inputs -qubits and -qubits is (for ).

3.3 QFT based absolute value operation

Absolute value is a positive expression of a number. In other words, the negative number is multiplied by -1. The two’s complement method is used to change the sign by multiplying a number with -1 in the binary number system. If the number is negative, the number is converted to positive by the two’s complement method and thus its absolute value is found. The quantum circuit of the two’s complement method (QTC) for -qubits ( is a sign qubit) is shown in Fig. 11.

(a)
(b)
Figure 11: The two’s complement of signed binary integer (QTC) (a) the quantum circuit of QTC, (b) the simplified graph of QTC

Where is for adding 1 in the two’s complement method. If the sign qubit , is a positive number and no action is required for the absolute value. If the sign qubit , is negative and the two’s complement must be applied to . First, an additional ancillary qubit is required to store the sign qubit of the state . Then by applying CNOT(,) gate, the state is transferred to the state as . The controlled () QTC circuit is applied to other qubits of the state () and state . Finally, by applying CNOT(,) gate, if the number is negative, the sign qubit changes from to , so the number will be positive. The quantum circuit of the absolute value operation is shown in Fig. 12.

(a)
(b)
Figure 12: The QFT based absolute value (QABS) (a) the quantum circuit of QABS, (b) the simplified graph of QABS

The QTC operation requires a total of -qubits with an ancillary qubit for an input -qubits. The QABS operation requires a total of -qubits with two ancillary qubits for an input -qubits. The time complexity of the QTC circuit for the input -qubits is . The time complexity of the QABS circuit for the input -qubits is .

3.4 QFT based comparison operation

The quantum comparator (QC) module proposed by Wang et al. Wang2012 is used for comparison of quantum states in most of the studies. The QC module Wang2012 compares two -qubits unsigned integers (positive) with the same number of qubits. In this study, the proposed QFT based quantum comparison (QComp) scheme can be used to compare all signed integers with different numbers of qubits (). The QC module Wang2012 uses a lot of qubits and has a lot of time complexity.

The proposed QComp scheme can be compare all signed integers using the QFT-based QNMSub operation and 3 ancillary qubits . The proposed method is quite simple and based on the subtraction of the signed integer state from the signed integer state . The quantum circuit of QComp is shown in Fig 13. After subtraction from to , one of the three ancillary quits changes to by controlled NOT gates. According to the measurement results of qubits ; if then , if then , if then .

(a)
(b)
Figure 13: The QFT based comparison operation (QComp) (a) the quantum circuit of QComp, (b) the simplified graph of QComp

The QC module Wang2012 needs additional ancillary qubits to compare -qubits state with -qubits state . The proposed QComp module only needs 3 additional ancillary qubits for the result. The QC module uses two times (01)-controlled NOT and (10)-controlled NOT gates, times (0010)-controlled NOT and (0001)-controlled NOT gates for comparison. Since the n-CNOT gate consists of Toffoli gates and 1 CNOT gate, Wang et al’s scheme uses a lot of basic gates. The time complexity of the QC Wang2012 is for inputs. The time complexity of the proposed QComp is for inputs .

3.5 QFT based multiplication operation

The QFT multiplier proposed by Ruiz-Perez and Garcia-Escartin Perez2017 performs non-modular multiplication of unsigned integers (). Alvarez-Sanchez et al. Sanchez2008 proposed quantum multiplication on signed integers () based on the Booth algorithm, which is widely used in classical computer. The result is stored in -qubits separately from the input qubits in Alvarez-Sanchez et al.’s circuit. In this section, the quantum circuit of a novel non-modular QFT-based multiplication is proposed which multiplies the signed integers of all different qubit numbers (). The proposed circuit also needs -qubits (for , -qubits) for the multiplication result of -qubits and -qubits .

In order not to change the values of inputs and in the process, copies of the inputs are made in the proposed circuit and operations are performed on them. This is done by taking into consideration the studies that need to reuse the input states. The copy states are treated as inputs and multiplication occurs in these copy states. If it is not important to change the values of inputs, the operations in the circuit can be directly processed on states and . In this case, no extra ancillary qubits will be required. The unitary UC operation for copying an -qubits state to another -qubits state is shown in Fig. 14.

(11)
(a)
(b)
Figure 14: The Unitary Copy (UC) (a) the quantum circuit of UC, (b) the simplified graph of UC

The result of the operation is found by (absolute value of ) times adding value to in this study. If is a negative integer, its absolute value will be positive. Therefore, the signal qubit of the result will be incorrect. Since the operation is performed with the absolute value of , the qubit called is defined to correct the sign of the result . The sign qubit of state is transferred to the state with CNOT gate. If is a negative integer, is and will be . Hence, at the end of the procedure, the result is corrected by applying -controlled the two’s complement (QTC) circuit. After the signal information is transferred to the qubit, the state is backed up to the ancillary qubits as with the operation UC. The absolute value of is calculated on the ancillary qubits . The QFT is applied to the allocated -qubits for the result. Then is added to this result qubits by NMAdd, is subtracted from by QMSub and a zero-controlled NOT gate is applied to the ancillary qubit as to check if state . If the state , the process is terminated by applying the inverse QFT and the controlled QTC. The quantum circuit of QFT-based multiplication (QNMMul) on two signed integers () is shown in Fig. 15.

(a)
(b)
Figure 15: The QFT based multiplication operation (QNMMul) (a) the quantum circuit of QNMMul, (b) the simplified graph of QNMMul

The proposed QFT-based multiplication operation requires -qubits for the result , -qubits for the copy of the state (If the change of is not important, these qubits are not needed) and 3 ancillary qubits ( as strl, , as ctrl). The time complexity of the UC circuit for -qubits input is . The time complexity of the QNMMul circuit for the inputs -qubits and -qubits is (for ) .

3.6 QFT based division operation

In this section, the quantum circuit of a new non-modular QFT-based division is proposed which divides the signed integers of all different qubit numbers (). The proposed circuit also needs -qubits for the division result of -qubits and -qubits .

In the division operation, as in the multiplication operation, the copies of the inputs , are made in order not to change the inputs. The copy states are treated as inputs and division occurs in these copy states. If it is not important to change the values of inputs, the operations in the circuit can be directly processed on states and . In this case, no extra ancillary qubits will be required.

The result of the operation is obtained by taking the absolute values of and first, and the number of steps of subtraction of from until the value of is negative. If only one of the and the is negative, its absolute values will be positive. Therefore, the signal qubit of the result will be incorrect. Since the operation is performed with the absolute value of or , the qubit called is defined to correct the sign of the result . If the signs of the input states and are different, NOT gates are applied to the qubit with 01-controlled and 10-controlled at the inputs and the sign information stored in the qubit for the correction of the result’s sign at the end of the operations. If only one of the and the is a negative integer, or is and will be . Hence, at the end of the procedure, the result is corrected by applying -controlled the two’s complement (QTC) circuit. After the signal information is transferred to the qubit, the states and are backed up to the ancillary qubits and as and with the operation UC. The absolute values of and are calculated on the ancillary qubits and . The QFT is applied to the allocated -qubits for the result. Then is subtracted from the by QMSub, CNOT gate (controlled qubit:) is applied to the qubit to check if state and is added to by MAdd. If the state , the process is terminated by applying the inverse QFT and the controlled QTC. The quantum circuit of QFT-based division (QNMDiv) on two signed integers () is shown in Fig. 16.

(a)
(b)
Figure 16: The QFT based division operation (QNMDiv) (a) the quantum circuit of QNMDiv, (b) the simplified graph of QNMDiv

The proposed QFT-based division operation requires -qubits for the result , -qubits for the copy of the state and -qubits for the copy of the state (If the changes of and are not important, these qubits are not needed) and 3 ancillary qubits ( as strl, , as ctrl). The time complexity of the QNMDiv circuit for the inputs -qubits and -qubits is (for ) .

4 Discussion

There are no non-modular operations on the signed integers () without any limitation in the literature. In the all studies in the literature, addition, multiplication and exponential operations are performed on integers having the same number of qubits (). There is no study on quantum subtraction, quantum division and quantum two’s complement methods. Only the Ruiz-Perez and Garcia-Escartin’s addition operation Perez2017 (limited for negative integers) and the Alvarez-Sanchez et al.’s multiplication operation Sanchez2008 work with signed integers. All the studies in the literature are modular, except for the Ruiz-Perez and Garcia-Escartin’s addition operation. Too many -CNOT gates are used in non-QFT based quantum arithmetic operations. Therefore, the number of basic gates to be used increases too much. Since there are no studies that do exactly the same procedures as the methods proposed in this study, some comparisons with the Ruiz-Perez and Garcia-Escartin’s and Alvarez-Sanchez et al.’s studies, two nearest studies, will be shown in the tables.

The required number of ancillary qubits (on the states and the copied states ) and the time complexities of the proposed arithmetic operations are shown in Table 1 (the states and are -qubits, the states and are -qubits) and Table 2, the required number of ancillary qubits and the time complexities of the other proposed operations are shown in Table 3.

Operation On and On and
ancillary ancillary
QNMAdd
QMAdd
QNMSub
QMSub
QNMMul
QNMDiv
Table 1: The required number of ancillary qubits of the proposed modular and non-modular arithmetic operations and the time complexity
Operation time complexity
QNMAdd
QMAdd
QNMSub
QMSub
QNMMul
QNMDiv
Table 2: The time complexities of the proposed modular and non-modular arithmetic operations
Operation ancillary time complexity
QTC
QABS
QComp
Table 3: The other proposed operations, the required number of ancillary qubits and the time complexity

All of the available studies do arithmetic operations with integers having the same qubit number (). Therefore, the situations of the proposed circuits on integers of the same qubit numbers were considered for a more efficient comparison. The comparison of the QFT-based proposed addition and the existing QFT-based addition Perez2017 operation in terms of the required number of ancillary qubits and the time complexity for signed integers () is shown in Table 4.

Operation ancillary time complexity
Proposed
Existing Perez2017
Table 4: The required number of qubits and the time complexity for addition operation with signed integers ()

The proposed and the existing Perez2017 QFT-based addition operations require the same number of ancillary qubits. The existing Perez2017 addition operation uses only 15 gates less than the proposed used. However, this is for the maximum number of qubits of integer . As the number of qubits of integer decreases, the proposed addition operation uses fewer resources than Perez2017 . Furthermore, the proposed addition operation can operate without any limitation on negative integers.

The comparison of the proposed multiplication and the existing multiplication operation Sanchez2008 in terms of the required number of ancillary qubits and the time complexity for signed integers () is shown in Table 5.

Operation ancillary time complexity
Proposed
Existing Sanchez2008
Table 5: The required number of ancillary qubits and the time complexity for multiplication operation with signed integers ()

The proposed QFT-based multiplication operation requires far less ancillary qubits than the existing multiplication based on the classic Booth algorithm Sanchez2008 for the result. In study Sanchez2008 , as the number of qubits of the inputs increases, the number of required ancillary qubits will be increase exponentially. In terms of time complexity, multiplication operations are almost identical. Considering the non-modular multiplication of the signed numbers and the number of required ancillary qubits, it is seen that the proposed study is more efficient than the existing Sanchez2008 .

The comparison of the proposed comparison and the existing comparison operation Wang2012 in terms of the required number of ancillary qubits and the time complexity for integers () is shown in Table 6.

Operation ancillary time complexity
Proposed
Existing Wang2012
Table 6: The required number of ancillary qubits and the time complexity for comparison operation with integers ()

The Wang et al.’s Wang2012 circuit is designed to make comparisons only with unsigned integers. The proposed circuit is designed to compare all signed integers. While the proposed circuit requires only 3 ancillary qubits for the result, the Wang et al.’s Wang2012 circuit requires ancillary qubits. The proposed circuit is also better than the existing Wang2012 in terms of time complexity.

The most important difference of the proposed circuits from the other circuits is that they perform non-modular operations on all signed integers by using less ancillary qubits and lower time complexity.

5 Conclusion

Arithmetic operations are required for most methods using quantum computation, especially quantum image and audio processing. This paper presents quantum circuits of QFT-based non-modular addition, subtraction, multiplication and division operations for signed integers with different qubit numbers. In addition, quantum circuits of two’s complement, absolute value and comparison operations are also presented. The proposed procedures in this paper will reduce the resource usage of most quantum studies in the literature. It is also considered that the inputs do not change in order to be useful in many quantum methods to be developed. After this paper, it is aimed to develop quantum edge detection, steganography and pattern recognition algorithms in quantum images by using these quantum arithmetic operations.

Acknowledgements

This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.

References

  • (1) P. W. Shor, Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer, SIAM J.Sci.Statist.Comput. 26 (5) (1997) 1484–1509. doi:10.1137/S0097539795293172.
  • (2) V. Vedral, A. Barenco, A. Ekert, Quantum networks for elementary arithmetic operations, Phys. Rev. A 54 (1) (1996) 147–153. doi:10.1103/PhysRevA.54.147.
  • (3) P. Gossett, Quantum carry-save arithmetic, arXiv:quant-ph/9808061v2 (1998) 1–12.
  • (4) T. G. Draper, Addition on a quantum computer, arXiv:quant-ph/0008033v1 (2000) 1–8.
  • (5) S. A. Cuccaro, T. G. Draper, S. A. Kutin, D. P. Moulton, A new quantum ripple-carry addition circuit, arXiv:quant-ph/0410184v1 (2004) 1–9.
  • (6) Y. Takahashi, N. Kunihiro, A linear-size quantum circuit for addition with no ancillary qubits, Quantum Info. Comput. 5 (6) (2005) 440–448.
  • (7) T. G. Draper, S. A. Kutin, E. M. Rains, S. K. M., A logarithmic-depth quantum carry-lookahead adder, Quantum Info. Comput. 6 (4) (2006) 351–369.
  • (8) Y. Takahashi, N. Kunihiro, A fast quantum circuit for addition with few qubits, Quantum Info. Comput. 8 (6) (2008) 636–649.
  • (9) J. J. Alvarez-Sanchez, J. V. Alvarez-Bravo, L. M. Nieto, A quantum architecture for multiplying signed integers, J. Phys.: Conf. Ser. 128 (1) (2008) 012013. doi:10.1088/1742-6596/128/1/012013.
  • (10) I. L. Markov, M. Saeedi, Constant-optimized quantum circuits for modular multiplication and exponentiation, Quantum Info. Comput. 12 (5) (2012) 361–394.
  • (11) F. Wang, M. Luo, H. Li, Z. Qu, X. Wang, Improved quantum ripple-carry addition circuit, Science China Inf. Sci. 59 (4) (2016) 042406. doi:10.1007/s11432-015-5411-x.
  • (12) H. M. H. Babu, Cost-efficient design of a quantum multiplier–accumulator unit, Quantum Inf. Process. 16 (1) (2017) 30. doi:10.1007/s11128-016-1455-0.
  • (13) L. Ruiz-Perez, G.-E. J. C., Quantum arithmetic with the quantum fourier transform, Quantum Inf. Process. 16 (6) (2017) 152. doi:10.1007/s11128-017-1603-1.
  • (14) M. A. Nielsen, I. L. Chuang, Quantum computation and quantum information, 10th Edition, Cambridge University Press, Cambridge, 2010.
  • (15) E. Şahin, I. Yılmaz, Security of neqr quantum image by using quantum fourier transform with blind trent, International Journal of Information Security Science 7 (1) (2018) 20–25.
  • (16) A. Barenco, A. Ekert, K. Suominen, P. Torma, Approximate quantum fourier transform and decoherence, Phys. Rev. A 54 (1) (1996) 139–146. doi:10.1103/PhysRevA.54.139.
  • (17) D. Wang, Z. H. Liu, W. N. Zhu, S. Z. Li, Design of quantum comparator based on extended general toffoli gates with multiple targets, Comput. Sci. 39 (9) (2012) 302–306.