Читать книгу Quantum Computing - Hafiz Md. Hasan Babu - Страница 28

Оглавление

IOP Publishing

Quantum Computing

A pathway to quantum logic design

Hafiz Md Hasan Babu

Chapter 4

The quantum adder and subtractor

In circuit design the adder and subtractor are the circuits that are capable of adding or subtracting numbers. In this chapter quantum adder, namely half-adder and full-adder, circuits and subtractor, namely half-subtractor and full-subtractor, circuits are presented with their quantum representations.

4.1 The quantum adder

An adder is a circuit in electronics that implements the addition of numbers. In many computers and other types of processors, adders are used to calculate addition and similar operations in the arithmetic logic unit (ALU) and also in other parts of processors. These can be constructed for many numerical representations such as excess-3 or binary coded decimal. Adders are classified into two types: half-adder and full-adder. The half-adder circuit has two inputs, A and B, which add two input digits and generate a carry and a sum. The full-adder circuit has three inputs, A, B, and C, which add the three input numbers and generate a carry and a sum.

Table 4.1 is the truth table of a half-adder. From this table, we can obtain the half-adder circuit’s outputs which are

Sum=A⊕BCarry=AB.

Table 4.1. The truth table of the half-adder.

A B Carry Sum
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0

The output equations of the half-adder can be mapped with a quantum Peres gate, as shown in figure 4.1, and the quantum half-adder can be obtained by putting C = 0, which is illustrated in figure 4.2. The quantum cost of the quantum half-adder is 4 and the delay is 4Δ.


Figure 4.1. The quantum Peres gate.


Figure 4.2. The quantum Peres gate as a quantum half-adder.

4.1.1 The quantum full-adder

Table 4.2 is the truth table of a full-adder. From this table we can obtain the output of the full-adder circuit:

Sum=A⊕B⊕CinCarry=(A⊕B)Cin⊕AB.

Table 4.2. The truth table of the full-adder.

A B C in Carry Sum
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1

The output equations of the full-adder can be mapped with the quantum modified Thapliyal Srinivas gate (MTSG), as shown in figure 4.3, and the quantum full-adder can be obtained by putting D = 0, which is shown in figure 4.4. The quantum cost of the quantum full-adder is 6 and the delay is 5Δ.


Figure 4.3. The quantum MTSG gate.


Figure 4.4. The quantum MTSG gate as a quantum full-adder.

4.2 The quantum subtractor

A subtractor is also an important logic component in circuit design. Subtractors are classified into two types: half-subtractors and full-subtractors. The half-subtractor circuit has two inputs A and B where the half-subtractor performs the AB operation.

4.2.1 The quantum half-subtractor

Table 4.3 is the truth table of a half-subtractor. From this table we can obtain the half-subtractor circuit:

Difference=A⊕BBorrow=A¯B.

Table 4.3. The truth table of the half-subtractor.

A B Borrow Difference
0 0 0 0
0 1 1 1
1 0 0 1
1 1 0 0

The output equations of the half-subtractor can be mapped with a quantum Thapliyal Ranganathan (TR) gate, as shown in figure 4.5, and the quantum half-subtractor can be obtained by putting C = 0, which is shown in figure 4.6. The quantum cost of the quantum half-subtractor is 4 and the delay is 4Δ.


Figure 4.5. The quantum TR gate.


Figure 4.6. The quantum half-subtractor.

4.2.2 The quantum full-subtractor

The full-subtractor circuit has three inputs A, B, and Cin, which realize the operation Y = ABC. Table 4.4 is the truth table of a full-subtractor. From this table we can obtain the output of the full-subtractor circuit:

Difference=A⊕B⊕CinBorrow=(A⊕B¯)Cin⊕AB.

Table 4.4. The truth table of full-subtractor.

A B C in Borrow Difference
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 1 0
1 0 0 0 1
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1

A quantum full-subtractor can be designed using two quantum TR gates, shown in figure 4.7. Figure 4.8 is the optimized version of the full-subtractor. The quantum cost of a quantum full-subtractor is 6 and the delay is 4Δ.


Figure 4.7. The quantum full-subtractor by cascading two quantum TR gates.


Figure 4.8. The optimized quantum full-subtractor.

4.3 Summary

This chapter presents the quantum full-adder and full-subtractor from the half-adder and half-subtractor circuits. The quantum costs of the adder and subtractor circuits are discussed for better understanding of the circuits.

Further reading

[1] Babu H M H, Islam M R, Chowdhury S M A and Chowdhury A R 2004 Synthesis of a full-adder circuit using reversible logic Proc. 17th Int. Conf. on VLSI Design (Mumbai) 2004 pp 757–60

[2] Babu H M H, Islam R, Chowdhury A R and Chowdhury S M A 2003 On the realization of reversible full-adder circuit Int. Conf. on Computer and Information Technology pp 880–3

[3] Babu H M H, Islam R, Chowdhury A R and Chowdhury S M A 2003 Reversible logic synthesis for minimization of full-adder circuit Proc. Euromicro Symp. on Digital System Design pp 50–4

[4] Babu H M H, Jamal L and Saleheen N 2013 An efficient approach for designing a reversible fault tolerant n-bit carry look-ahead adder IEEE Int. SOC Conf. pp 98–103

[5] Cheng K-W and Tseng C-C 2002 Quantum full adder and subtractor Electron. Lett. 38 1343–4

[6] Cuccaro S A, Draper T G, Kutin S A and Moulton D P 2004 A new quantum ripple-carry addition circuit (arXiv: quant-ph/0410184)

[7] Khan M H A and Perkowski M A 2007 Quantum ternary parallel adder/subtractor with partially-look-ahead carry J. Syst. Archit. 53 453–64

[8] Monfared A T and Haghparast M 2016 Design of new quantum/reversible ternary subtractor circuits J. Circuit. Syst. Comp. 25 1650014

[9] Murali K V R M, Sinha N, Mahesh T S, Levitt M H, Ramanathan K V and Kumar A 2002 Quantum-information processing by nuclear magnetic resonance: experimental implementation of half-adder and subtractor operations using an oriented spin-7/2 system Phys. Rev. A 66 22313

[10] Takahashi Y 2009 Quantum arithmetic circuits: a survey IEICE Trans. Fundam. Electron. Commun. Comput. Sci. 92 1276–83

[11] Takahashi Y, Tani S and Kunihiro N 2010 Quantum addition circuits and unbounded fan-out Quantum Inf. Comput. 10 872–90

Quantum Computing

Подняться наверх