Quantum Cost Optimization For Reversible Sequential Circuit
Quantum Cost Optimization For Reversible Sequential Circuit
Quantum Cost Optimization For Reversible Sequential Circuit
B. Garbage Output
Every gate output that is not used as input to other gates or
as a primary output is garbage. Unwanted or unused outputs
which are needed to maintain reversibility of a reversible gate
(or circuit) are known as Garbage Outputs. The garbage output
of Feynman gate [7] is shown in Fig. 1 with *.
I. INTRODUCTION
In recent years, reversible computing has emerged as a
promising technology. The primary reason for this is the
increasing demands for lower power devices. In the early
1960s R. Landauer [1] demonstrated that losing bits of
information causes loss of energy. Information is lost when an
input cannot be recovered from its output. In 1973 C. H.
Bennett [2] showed that energy dissipation problem can be
avoided if the circuits are built using reversible logic gates.
Reversible logic has the feature to generate one to one
correspondence between its input and output. As a result no
information is lost and there is no loss of energy [3]. Although
many researchers are working in this field, little work has been
done in the area of sequential reversible logic. In the current
literature on the design of reversible sequential circuits, the
number of reversible gates is used as a major metric of
optimization [4]. The number of reversible gates is not a good
metric of optimization as reversible gates are of different type
and have different quantum costs [5]. In this paper, we
presented new designs of reversible sequential circuits that are
efficient in terms of quantum cost, delay and the number of
garbage outputs.
This paper is organized as follows: Section 2 presents some
basic definitions related to reversible logic. Section 3 describes
some basic reversible logic gates and their quantum
implementation. Section 4 introduces our proposed gate Selim
Al Mamun (SAM) gate. Section 5 describes the logic
synthesis of sequential circuits and comparisons with other
researchers. Finally this paper is concluded with the Section 6.
II.
A. Reversible Gate
A Reversible Gate is a k-input, k-output (denoted by k*k)
circuit that produces a unique output pattern for each possible
input pattern [6]. If the input vector is Iv where Iv = (I1,j , I2,j ,
I3,j , . , Ik-1,j , Ik,j) and the output vector is Ov where Ov =
(O1,j , O2,j , O3,j , , Ok-1,j , Ok,j), then according to the
definition, for each particular vector j, Iv Ov.
C. Delay
The delay of a logic circuit is the maximum number of
gates in a path from any input line to any output line. The
definition is based on two assumptions: (i) Each gate performs
computation in one unit time and (ii) all inputs to the circuit are
available before the computation begins.
In this paper, we used the logical depth as measure of the
delay proposed by Mohammadi and Eshghi [8]. The delay of
each 1x1 gate and 2x2 reversible gate is taken as unit delay 1.
Any 3x3 reversible gate can be designed from 1x1 reversible
gates and 2x2 reversible gates, such as CNOT gate, ControlledV and Controlled-V+ gates (V is a square-root-of NOT gate and
V+ is its hermitian). Thus, the delay of a 3x3 reversible gate can
be computed by calculating its logical depth when it is
designed from smaller 1x1 and 2x2 reversible gates.
D. Quantum Cost
The quantum cost of a reversible gate is the number of 1x1
and 2x2 reversible gates or quantum gates required in its
design. The quantum costs of all reversible 1x1 and 2x2 gates
are taken as unity [9]. Since every reversible gate is a
combination of 1 x 1 or 2 x 2 quantum gate, therefore the
quantum cost of a reversible gate can be calculated by counting
the numbers of NOT, Controlled-V, Controlled-V+ and CNOT
gates used.
III.
BASIC DEFINITIONS
15 | P a g e
www.ijacsa.thesai.org
P=A
A
Toffoli
Gate
Q=B
R AB C
C
(a)
P=A
Q=B
R AB C
V+
V
(b)
Feynman
Gate
P=A*
Fig. 3. (a) Block diagram of 3*3 Toffoli gate and (b) Equivalent quantum
representation.
Q A B
D. Frekdin Gate
The input vector, Iv and output vector, Ov for 3*3 Fredkin
gate (FRG) [12] can be defined as follows: Iv = (A, B, C) and
(a)
P=A*
Q A B
Ov = (P = A, Q AB AC , R AC AB ). The quantum
cost of Frekdin gate is 5. The block diagram and equivalent
quantum representation for 3*3 Fredkin gate are shown in Fig.
4.
(b)
Fig. 1. (a) Block diagram of 2x2 Feynman gate and (b) Equivalent quantum
representation
B
B. Double Feynman Gate
Let Iv and Ov are input and output vector of a 3*3 Double
Feynman gate (DFG) where Iv and Ov are defined as follows: Iv
= (A, B, C) and Ov = (P = A, Q = A B, R = A C). The
quantum cost of Double Feynman gate is 2 [10]. The block
diagram and equivalent quantum representation for 3*3 Double
Feynman gate are shown in Fig. 2.
P=A
A
Frekdin
Gate
Q AB AC
R AC AB
C
(a)
P=A
Q AB AC
R AC AB
V+
V
(b)
A
B
P=A
DFG
Fig. 4. (a) Block diagram of 3*3 Frekdin gate and (b) Equivalent quantum
representation
Q A B
R AC
C
(a)
P=A
Q A B
R AC
(b)
Fig. 2. (a) Block diagram of 3x3 Double Feynman gate and (b) Equivalent
quantum representation.
C. Toffoli Gate
The input vector, Iv and output vector, Ov for 3*3 Toffoli
gate (TG) [11] can be defined as follows: Iv = (A, B, C) and Ov
= (P = A, Q = B, R = AB C). The quantum cost of Toffoli
gate is 5.
The block diagram and equivalent quantum representation
for 3*3 Toffoli gate are shown in Fig. 3.
E. Peres Gate
The input vector, Iv and output vector, Ov for 3*3 Peres gate
(PG)[13] can be defined as follows: Iv = (A, B, C) and Ov = (P
= A, Q = A B, R = AB C). The quantum cost of Peres
gate is 4. The block diagram and equivalent quantum
representation for 3*3 Peres gate are shown in Fig. 5.
P=A
A
Peres
Q A B
B
Gate
R AB C
C
(a)
P=A
Q A B
V+
R AB C
(b)
Fig. 5. Block diagram of 3*3 Peres and (b) Equivalent quantum
representation
16 | P a g e
www.ijacsa.thesai.org
(c)
PA
Q AB AC
B
C
R AC AB
V+
(d)
Fig. 7. Quantum cost of proposed SAM gate.
SAM
Fig. 6.
SAM
V.
P=A
Q A B
Q AB AC`
R AC AB
Q AB AC
A
PA
PA
V+
R AB C
(a)
Q A B
MPG
(a)
P=A
V+
V+
R AB C
(b)
Fig. 9. (a) Block diagram of 3*3 MPG and (b) Equivalent quantum
represenation
R AC AB
(b)
PA
Q AB AC
B
C
R AC AB
17 | P a g e
www.ijacsa.thesai.org
MPG
R
S
FG
TABLE III.
g1
Q OUTPUTS
Cost Comparison
and Q outputs
Quantum Cost
Delay
Garbage
Outputs
Proposed
Existing[15]
Improvement in (%) w.r.t. [15]
11
17
41
11
17
41
2
3
33
R
S
MPG
g1
g2
SAM
FG
Q
SAM
g3
g4
Cost Comparison
SR flip-flop design
Quantum
Cost
Delay
Garbage
Outputs
Proposed
Existing [14]
Existing [15]
Improvement(%) w.r.t. [14]
Improvement(%) w.r.t. [15]
5
10
8
50
37
5
10
8
50
37
1
2
2
50
50
CLK
R
S
MPG
SAM
Q
Q
DFG
1
0
and Q outputs
Q output
CLK
FG
Cost Comparison
Quantum
Cost
Delay
Garbage
Outputs
15
22
36
15
22
36
4
4
0
B. The JK Flip-Flop
Proposed gated SR flip-flop with Q and Q outputs has
quantum cost 10, delay 10 and has 2 garbage bits. The
18 | P a g e
www.ijacsa.thesai.org
mapped with the SAM gate by giving Q, J and K to 1st, 2nd and
3rd inputs to the SAM gate. The proposed JK flip-flop with Q
and Q outputs is shown in Fig.13.
SAM
FG
Cost Comparisons
and Q outputs
Quantum Cost
Delay
Garbage
Outputs
Proposed
Existing[17]
Existing[15]
Improvement in (%) w.r.t. [17]
Improvement in (%) w.r.t. [15]
10
16
13
37
23
10
16
13
37
23
2
3
3
33
33
SAM
SAM
DFG
0
1
JK flip-flop design
Proposed
Existing[15]
Existing[16]
Improvement in (%) w.r.t. [15]
Improvement in (%) w.r.t. [16]
Quantum
Cost
Delay
Garbage
Outputs
5
13
12
62
58
5
13
12
62
58
1
3
3
67
67
SAM
SAM
DFG
and Q outputs.
SAM
FG
Fig. 15. Proposed Master Slave JK flip-flop with
and Q outputs
Cost Comparisons
Quantum
Cost
Delay
Garbage
Outputs
Proposed
15
15
Existing[17]
Existing[15]
Improvement in (%) w.r.t. [17]
Improvement in (%) w.r.t. [15]
24
19
37
21
23
19
37
21
5
4
20
0
19 | P a g e
www.ijacsa.thesai.org
C. The D Flip-Flop
The characteristic equation of gated D flip-flop is
Q CLK .Q CLK .D . The D flip-flop can be realized by one
SAM gate and one DFG. It can be mapped with SAM gate by
giving CLK, D and Q respectively in 1st, 2nd and 3rd inputs of
SAM gate. The Fig. 16 shows our proposed gated D flip-flop
with with Q and Q outputs.
SAM
TABLE IX.
DFG
1
0
and Q outputs.
Proposed
Existing[18]
Existing[15]
Improvement in (%) w.r.t. [17]
Improvement in (%) w.r.t. [15]
Cost Comparisons
Quantum Cost
Delay
Garbage
Outputs
Proposed
Existing[15]
Existing[16]
Improvement in (%) w.r.t. [15]
Improvement in (%) w.r.t. [16]
6
7
7
14
14
6
7
7
14
14
1
2
2
50
50
[1]
CLK
[2]
SAM
g1
0
[3]
FG
[4]
g2
g3
SAM
[5]
Q
[6]
1
0
Fig. 17. Proposed design Master Slave D flip-flop with
DFG
[7]
and Q outputs.
Delay
Garbage
Outputs
11
14
13
21
15
11
14
13
21
15
3
3
3
0
0
ACKNOWLEDGMENT
The authors would like to thank the anonymous referees for
their supports and constructive feedback, which helped
significantly to improve technical quality of this paper.
Cost Comparisons
Quantum
Cost
VI. CONCLUSION
Reversible latches are going to be the main memory block
for the forthcoming quantum devices. In this paper we
proposed optimized reversible D latch and JK latches with the
help of proposed SAM gates. Appropriate algorithms and
theorems are presented to clarify the proposed design and to
establish its efficiency. We compared our design with existing
ones in literature which claims our success in terms of number
of gates, number of garbage outputs and delay. This
optimization can contribute significantly in reversible logic
community.
D flip-flop design
[8]
REFERENCES
Rolf Landauer, "Irreversibility and Heat Generation in the Computing
Process", IBM Journal of Research and Development, vol. 5, pp. 183191, 1961.
Charles H.Bennett, "Logical Reversibility of computation", IBM Journal
of Research and Development, vol. 17, no. 6, pp. 525-532, 1973.
Perkowski, M., A.Al-Rabadi, P. Kerntopf, A. Buller, M. ChrzanowskaJeske, A. Mishchenko, M. Azad Khan, A. Coppola, S. Yanushkevich,
V. Shmerko and L. Jozwiak, A general decomposition for reversible
logic, Proc. RM2001, Starkville, pp: 119-138, 2001
J.E Rice, "A New Look at Reversible Memory Elements", Proceedings
International Symposium on Circuits and Systems(ISCAS) 2006, Kos,
Greece, May 21-24 ,2006, pp. 243-246.
Dmitri Maslov and D. Michael Miller, Comparison of the cost metrics
for reversible and quantum logic synthesis, http://arxiv.org/abs/quantph/0511008, 2006
Md. Selim Al Mamun and Syed Monowar Hossain. "Design of
Reversible Random Access Memory." International Journal of Computer
Applications 56.15 (2012): 18-23.
Richard P.Feynman, "Quantum mechanical computers," Foundations of
Physics, vol. 16, no. 6, pp. 507-531, 1986.
Mohammadi,M. and Mshghi,M, On gures ofmerit in reversible and
quantumlogic designs, Quantum Inform. Process. 8, 4, 297318, 2009.
20 | P a g e
www.ijacsa.thesai.org
[10]
[11]
[12]
[13]
[14]
21 | P a g e
www.ijacsa.thesai.org