Documente Academic
Documente Profesional
Documente Cultură
Seminar Report
presented by :
Indranil Nandy
MTech(CS),2007
Roll : 06CS6010
e-mail : hi_i_am_indranil@yahoo.com
Introduction……………………………………..3
How all it came…………………………………4
Background……………………………………..6
Definitions……………………………………....6
How to represent a reversible circuit truth table?
How to encode a reversible circuit?
Temporary Storage
Representing Circuits by graphs
Discussion……………………………………..11
Some special types of reversible gates………...12
Introduction……………………….…………...14
Trapped-Ion Technology.....……....…………..15
Fault Models……………………….…………..16
Single Missing-Gate Fault Model
Repeated-Gate Fault Model
Multiple Missing-Gate Fault Model
Partial Missing-Gate Fault Model
2
Conclusion……………………………………...31
Introduction…………………………………….32
Addressing the problem of fan-out……………..33
Constructing a new reversible RS-latch………...34
Reversible clocked flip-flops…………………...35
Master-Slave flip-flop
D flip-flop
JK flip-flop
T flip-flop
Discussion…………………………..,..………..37
Appendix A
Irreversibility and Heat Generation…………….43
References…………………………………………..44
3
Chapter 1
Introductory Chapter
Introduction:
In most computing tasks, the number of output bits is relatively small compared to the
number of input bits. For example, in a decision problem, the output is only one bit (yes or
no) and the input can be as large as desired. However, computational tasks in digital signal
processing, communication, computer graphics, and cryptography require that all of the
information encoded in the input be preserved in the output. Some of those tasks are
important enough to justify adding new microprocessor instructions to the HP PA-RISC
(MAX and MAX-2), Sun SPARC (VIS), PowerPC (AltiVec), IA-32 and IA-64 (MMX)
instruction sets In particular, new bit-permutation instructions were shown to vastly improve
performance of several standard algorithms, including matrix transposition and DES, as well
as two recent cryptographic algorithms Twofish and Serpent. Bit permutations are a special
case of reversible functions, that is, functions that permute the set of possible input values.
For example, the butterfly operation (x,y) → (x+y,x−y) is reversible but is not a bit
permutation. It is a key element of Fast Fourier Transform algorithms and has been used in
application-specific Xtensa processors from Tensilica. One might expect to get further speed-
ups by adding instructions to allow computation of an arbitrary reversible function. The
problem of chaining such instructions together provides one motivation for studying
reversible computation and reversible logic circuits, that is, logic circuits composed of gates
computing reversible functions.
Reversible circuits are also interesting because the loss of information associated with
irreversibility implies energy loss. Younis and Knight showed that some reversible circuits
can be made asymptotically energy-lossless as their delay is allowed to grow arbitrarily large.
[Excerpt from "Asymptoticay Zero Energy Split-Level Charge Recovery Logic" :
Younis & Knight :
Power dissipation in conventional CMOS primarily occurs during device
switching. One component of this dissipation is due to charging and discharging the gate
capacitances through conducting, but slightly resistive, devices. We note here that it is
not the charging or the discharging of the gate that is necessarily dissipative, but rather
that a small time is allocated to perform these operations. In conventional CMOS, the
time constant associated with charging the gate through a similar transistor is RC,
where R is the ON resistance of the device and C its capacitance. However, the cycle
time can be, and usually is, much longer than RC. An obvious conclusion is that energy
consumption can be reduced by spreading the transitions over the whole cycle rather
than "squeezing" it all inside one RC.
To successfully spread the transition over periods longer than RC, we insist that
two conditions apply throughout the operation of our circuit. Firstly, we forbid any
device in our circuit from turning ON while a potential difference exists across it.
Secondly, once the device is switched ON, the energy transfer through the device occurs
in a controlled and gradual manner to prevent a potential from developing across it.
These conditions place some interesting restrictions on the way we usually perform
computations. To perform a non-dissipative transition of the output, we must know the
state of the output prior to and during this output transition. Stated more clearly, to
non-dissipatively reset the state of the output we must at all times have a copy of it. The
only way out of this circle is to use reversible logic. It is this observation that is the core
of our low energy charge recovery logic.]
4
Currently, energy losses due to irreversibility are dwarfed by the overall power
dissipation, but this may change if power dissipation improves. In particular, reversibility is
important for nanotechnologies where switching devices with gain are difficult to build.
5
In his classic 1961 paper [3, Appendix A], Rolf Landauer attempted
to apply thermodynamic reasoning to digital computers. Paralleling the
fruitful distinction in statistical physics between macroscopic and
microscopic degrees of freedom, he noted that some of a computer’s
degrees of freedom are used to encode the logical state of the
computation, and these ”information bearing” degrees of freedom (IBDF)
are by design sufficiently robust that, within limits, the computer’s logical
(i.e. digital) state evolves deterministically as a function of its initial value,
regardless of small fluctuations or variations in the environment or in the
computer’s other non-information-bearing degrees of freedom (NIBDF).
While a computer as a whole (including its power supply and other parts of
its environment), may be viewed as a closed system obeying reversible
laws of motion (Hamiltonian or, more properly for a quantum system,
unitary dynamics), Landauer noted that the logical state often evolves
irreversibly, with two or more distinct logical states having a single logical
successor.
Therefore, because Hamiltonian/unitary dynamics conserves (fine-
grained) entropy, the entropy decrease of the IBDF during a logically
irreversible operation must be compensated by an equal or greater
entropy increase in the NIBDF and environment.
This is Landauer’s principle. Typically the entropy increase takes the
form of energy imported into the computer, converted to heat, and
dissipated into the environment. So, what is the solution?
At this juncture Bennett[4] showed : An irreversible computer can always be made
reversible by having it save all the information it would otherwise throw away. For example,
the machine might be given an extra tape (initially blank) on which it could record each
operation as it was being performed, in sufficient detail that the preceding state would be
uniquely determined by the present state and the last record on the tape. However, as
Landauer pointed out, this would merely postpone the problem of throwing away unwanted
information, since the tape would have to be erased before it could be reused. It is therefore
reasonable to demand of a useful reversible computer that, if it halts, it should have erased all
its intermediate results, leaving behind only the desired output and the originally furnished
input. (The machine must be allowed to save its input-otherwise it could not be reversible and
still carry out computations in which the input was not uniquely determined by the output.)
General-purpose reversible computers (Turing machines) satisfying these requirements indeed
exist, and they need not be much more complicated than the irreversible computers on which
they are patterned. Computations on a reversible computer take about twice as many steps as
on an ordinary one and may require a large amount of temporary storage.
At this time Tomasso Toffoli (1980) showed that there exists a
reversible gate which could play a role of a universal gate for reversible
circuits. These two simultaneously have lead to the exploration in the field
of Reversible Logic Gates and Circuits.
In recent years, reversible computing system design is attracting a
lot of attention.
Reversible computing is based on two concepts: logic reversibility and
physical reversibility. A computational operation is said to be logically
reversible if the logical state of the computational device before the
operation of the device can be determined by its state after the operation
i.e., the input of the system can be retrieved from the output obtained
from it. Irreversible erasure of a bit in a system leads to generation of
energy in the form of heat. An operation is said to be physically reversible
if it converts no energy to heat and produces no entropy. Landauer has
shown that for every bit of information lost in logic computations that are
not reversible, kTlog2 joules of heat energy is generated, where k is
6
Boltzmann’s constant and T the absolute temperature at which
computation is performed. The amount of energy dissipation in a system
increases in direct proportion to the number of bits that are erased during
computation. Bennett showed that kTln2 energy dissipation would not
occur, if a computation were carried out in a reversible way. Reversible
computation in a system can be performed if the system is composed of
reversible gates.
Two conditions must be satisfied for reversible computation
7
Chapter 2
Reversible Gates and Circuits: Details
Analysis
Background :
In conventional (irreversible) circuit synthesis, one typically starts with a universal
gate library and some specification of a Boolean function. The goal is to find a logic circuit
that implements the Boolean function and minimizes a given cost metric, e.g., the number of
gates or the circuit depth. At a high level, reversible circuit synthesis is just a special case in
which no fanout is allowed and all gates must be reversible.
Definitions:
Definition 1: A gate is reversible if the (Boolean) function it computes is bijective.
If arbitrary signals are allowed on the inputs, a necessary condition for reversibility is
that the gate have the same number of input and output wires. If it has k input and output
wires, it is called a k×k gate, or a gate on k wires. We will think of the mth input wire and the
mth output wire as really being the same wire. Many gates satisfying these conditions have
been examined in the literature. We will consider a specific set defined by Toffoli.
Clearly the k-CNOT gates are all reversible. The first three of these have special
names. The 0- CNOT is just an inverter or NOT gate, and is denoted by N. It performs the
operation (x)→(x XOR 1). The 1-CNOT, which performs the operation (y,x)→(y,x XOR y)
is referred to as a Controlled-NOT, or CNOT (C). The 2-CNOT is normally called a
TOFFOLI (T) gate, and performs the operation (z,y,x)→(z,y,x XOR yz). We will also be
using another reversible gate, called the SWAP (S) gate. It is a 2×2 gate which exchanges the
inputs; that is, (x,y)→(y,x). One reason for choosing these particular gates is that they appear
often in the quantum computing context, where no physical “wires” exist, and swapping two
values requires non-trivial effort. We will be working with circuits from a given, limited-gate
library. Usually, this will be the CNTS gate library, consisting of the CNOT, NOT, and
TOFFOLI, and SWAP gates.
As with reversible gates, a reversible circuit has the same number of input and output
wires; again we will call a reversible circuit with n inputs an n × n circuit or a circuit on n
wires. We draw reversible circuits as arrays of horizontal lines representing wires. Gates are
represented by vertically-oriented symbols. For example, in the following Figure, we see a
reversible circuit drawn in the notation introduced by Feynman. The symbols inverters
and the • symbols represent controls. A vertical line connecting a control to an inverter means
8
that the inverter is only applied if the wire on which the control is set carries a 1 signal. Thus,
the gates used are, from left to right, TOFFOLI, NOT, TOFFOLI, and NOT.
Figure 1
a, b and c are the three inputs to the gate and the corresponding
output lines are X, Y and Z respectively. The corresponding functions
computed are as following :
9
X=a
Y=b
Z = c XOR ab
a b c x y z
0 0 0 0 0 0
0 0 1 0 0 1
0 1 0 0 1 0
0 1 1 0 1 1
1 0 0 1 0 0
1 0 1 1 0 1
1 1 0 1 1 1
1 1 1 1 1 0
10
How to encode a reversible circuit?
In electronic design automation, it is common to represent logic
circuits as graphs or hypergraphs. However, the regularity and ordering
intrinsic to reversible circuits facilitate a more compact array-based
representation (encoding) that is also more convenient. In conventional
circuit representations, all connections between individual gates are
enumerated, and each gate stores indices of its incident connections.
However, in a reversible circuit, one can distinguish a small number of
wires going all the way through the circuit. In our encoding of a reversible
circuit, those indices are maintained at individual gates, and the gates are
stored in an array in an arbitrarily chosen topological order. Overlaid on
this array is a redundant adjacency data structure (a graph) that allows
one to look up the neighbors of a given gate. This representation is
faithful; it is also convenient because each range in the array represents a
valid sub-circuit. However, not every valid sub-circuit is represented by a
range. In particular, any set of gates in a circuit that form an anti-chain
(with respect to the partial ordering) will be ordered, obscuring the fact
that any subset is a valid subcircuit.
Figure 3
To encode the circuit in the above figure, we number wires top-down from 0 to 3.
Then the gates can be written as following : T(2,3;1)T(0,1;3)C(3;2)C(1;2)C(3;0)T(0,2;1)N(2)
11
Figure 4
On the right, we see similarly that three C gates can be used to replace the S gate
appearing in the middle circuit of Figure 4b. If allowed by the physical implementation, the S
gate may itself be replaced with a wire swap. This, however, is not possible in some forms of
quantum computation. Figure 4 therefore shows us that the C and S gates in the CNTS gate
library can be removed without losing computational power. We will still use the CNTS gate
library in synthesis to reduce gate counts and potentially speed up synthesis. This is motivated
by Figure 4, which shows how to replace four gates with one C gate, and thus up to 12 gates
with one S gate.
Temporary Storage:
Figure 5
Figure 5 illustrates the meaning of “temporary storage”. The top n−k lines transfer
n−k signals, collectively designated Y, to the corresponding wires on the other side of the
circuit. The signals Y are arbitrary, in the sense that the circuit K must assume nothing about
them to make its computation. Therefore, the output on the bottom k wires must be only a
function of their input values X and not of the “ancilla” bits Y, hence the bottom output is
denoted f (X). While the signals Y must leave the circuit holding the same values they entered
it with, their values may be changed during the computation as long as they are restored by
the end. These wires usually serve as an essential workspace for computing f (X). An example
of this can be found in Figure 4a: the C gate on the right needs two wires, but if we simulate it
with two N gates and two T gates, we need a third wire. The signal applied to the top wire
emerges unaltered.
12
Definition 5. Let L be a reversible gate library. Then L is universal if for all k and
all permutations π Є S2K , there exists some l such that some L-constructible
circuit computes π using l wires of temporary storage.
The concept of universality differs in the reversible and irreversible cases in two
important ways. First, we do not allow ourselves access to constant signals during the
computation, and second, we synthesize whole permutations rather than just functions with
one output bit.
Discussion:
13
Some special types of Reversible Gates:
K-CNOT Gate:
K=0:
The 0-CNOT is just an inverter or NOT gate, and is denoted by N.
It performs the operation (x) → (x XOR 1).
K=1:
The 1-CNOT, performs the operation (y,x) →(y,x XOR y).
It is referred as a controlled-NOT or CNOT or C.
K=2:
The 2-CNOT is normally called a TOFFOLI (T) gate.
It performs the operation (z,y,x) → (z,y,x XOR yz).
SWAP Gate :
We will also be using another reversible gate, called the SWAP (S) gate.
It is a 2×2 gate which exchanges the inputs; that is, (x,y) → (y,x).
Toffoli's Gate:
In Toffoli Gate, all the inputs from 1 to (n-1) are passed as outputs.
The nth output is controlled by 1 to (n-1) inputs. When all the inputs from
1 to (n-1) are 1s, the nth input is inverted and passed as output else
original signal is passed. A 3-input, 3-output Toffoli gate is shown in Fig 6.
The inputs ‘a’ and ‘b’ are passed as first and second output respectively.
The third output is controlled by ‘a’ and ‘b’ to invert ‘c’. The truth table has
been shown before.
Fredkin's Gate:
The Fredkin gate is shown in the Fig 7. Here the input ‘a’ is passed
as first output. Inputs b and c are swapped to get the second and third
output which is controlled by ‘a’. Thus two inputs can be swapped by
controlling the swap using another input in Fredkin Gate.
14
Figure 7: 3x3 Fredkin's Gate
a b c x y z
0 0 0 0 0 0
0 0 1 0 1 0
0 1 0 0 0 1
0 1 1 0 1 1
1 0 0 1 0 0
1 0 1 1 0 1
1 1 0 1 1 0
1 1 1 1 1 1
15
Figure 8
Chapter 3
A Family of Logical Fault Models for
Reversible Circuits
Introduction:
The reversibility of computation has long been studied as a means to reduce or even
eliminate the power consumed by computation. Of particular interest is a type of reversible
computing known as quantum computing, which fundamentally changes the nature of
computation by basing it on quantum mechanics rather than classical physics.
Since all its gates are reversible, each group of gates in a reversible circuit is also
reversible. Hence, any arbitrary state can be justified on each gate. For example, if the values
(1111) must be applied to the rightmost 3-CNOT gate of Figure 9 for test purposes, there is a
unique input vector that is easily obtained by backward simulation (1101 in this case).
Furthermore, propagation of a fault effect is trivial: if a logic 1 value is replaced by a logic 0
(or vice versa) due to a fault, this will result in a different value at the output of the circuit.
16
Figure 9
Trapped-Ion Technology:
Nielsen and Chuang cite four abilities of a technology as necessary for quantum
computation. The technology must:
(1) robustly represent quantum information;
(2) perform a universal set of unitary transformations;
(3) prepare accurate initial states; and
(4) measure the output results.
In the following, we will briefly review how these four issues are addressed in the trapped-ion
technology.
Qubit representation: The internal state of an ion serves as the qubit representation; the
ground state (|g>) represents |0>, while the excited state (|e0>) represents |1>. In trapped-ion
technology, ions are confined in an ion trap, i.e. between electrodes, some of which are
grounded (have a static potential) while others are driven by a fast oscillating voltage. The
Los Alamos group used the Ca+ ions with 42S1/2 as the ground state and 32D5/2 as the excited
state.
.
Unitary transformations: These operations rotate state vectors without changing their
length, which implies reversibility. In the trapped-ion technology, ions interact with laser
pulses of certain duration and frequency. Qubits interact via a shared phonon (quantum of
vibrational energy) state. CNOT functionality has been experimentally demonstrated for the
trapped-ion technology (as well as for NMR technology).
17
Initialization: Trapped ions are brought into their motional ground state |00 . . . 0> using
Doppler and sideband cooling.
Measurement: The state of a single ion is determined by exciting an ion via a laser pulse and
measuring the resulting fluorescence.
Figure 10 illustrates the gate implementation in trapped-ion technology required for the
circuit in Figure 9. The circuit has four wires a, b, c and d, so four ions (qubits) are used.
Since the input vector is (1010), the qubits a and c are set to the state |1_ and the qubits b and
d are set to |0> in the beginning.
The leftmost (2-CNOT) gate is implemented by a laser pulse (or a sequence thereof)
applied to qubits a, b and c. Their interaction results in the state of qubit b being changed
from |0> to |1>. This is shown in the upper right of Figure 10. Similarly, the second (1-
CNOT) gate corresponds to a pulse that changes the state of qubit c from |1> to |0>. The third
gate does not result in a state change on the target qubit d due to a logic-0 value at one of its
control inputs (c); consequently, the third pulse does not change the state of qubit d.
Figure 10
Fault Models
Next we introduce several fault models that are mainly motivated by the ion-trap
quantum computing technologies discussed in the preceding section. The basic assumptions
are that qubits are represented by the ion state, gates correspond to external pulses which
18
control the interactions of the qubits, and the gate operations are error prone. The fault models
proposed are the single missing gate fault (SMGF), the repeated-gate fault (RGF), the
multiple missing gate fault (MMGF) and the partial missing-gate fault (PMGF) models.
Figure 11
19
Figure 12
Theorem 2 (Properties of RGFs) Consider an RGF that replaces a gate by k instances of the
same gate.
1. If k is even, the effect of the RGF is identical to the effect of the SMGF with respect
to the same gate.
2. If k is odd, the fault is redundant, i.e., it does not change the function of the circuit.
Figure 13
It has been proven for stuck-at faults in reversible circuits that a complete single fault
test set covers all multiple faults. This is not true for SMGFs and MMGFs, however, despite
the restriction that the missing gates must be consecutive. This is demonstrated by the two-
gate circuit fragment shown in Figure 13 (right). The SMGF corresponding to the left (3-
CNOT) gate requires the test vector (111X) for detection, where X stands for “don’t care”.
The SMGF for the second (2-CNOT) gate requires (X11X), so the optimal SMGF test set
consists of one test vector, e.g., (1110). However, this vector does not detect the MMGF
defined by removal of both gates, although it is a complete SMGF test set. The MMGF is not
20
redundant, as vector (011X) detects it. Furthermore, as every SMGF is also an MMGF, the
vector (111X) also must be included in any complete MMGF test set. Hence, the optimal size
of a complete MMGF test set is two. We have seen above that the size of the optimal test set
for SMGFs is one. Hence, a complete SMGF test set does not cover all MMGFs.
Figure 14
21
Chapter 4
Testable Reversible Gates.
Introduction:
The currently available reversible gates can be used to implement arbitrary logic
functions; however, the testing of such circuits has not been addressed in literature. The
testing of reversible logic gates can be a problem because the levels of logic can be
significantly higher than in standard logic circuits.
Here two reversible logic gates, R1 and R2 that can be used in pairs to design testable
reversible logic circuits, are introduced. The first gate R1 is used for implementing arbitrary
functions while the second gate R2 is employed to incorporate online testability features into
the circuit. Gates R1 and R2 are shown in Figures and the corresponding truth tables of the
gates are shown. A third gate R is also introduced R3 that is used to construct two pair two
rail checker. In the next two sections we will discuss these three gates.
Gate R:
The reversible gate R is shown in Fig 15 and its truth table is shown.
Gate R differs from gates R1 and R2 in gate width. Gate width of R1 and
R2 is 4, while that of R is 3. In other words, R is 3 input-3output reversible
gate, while R1 and R2 are 4 input-4 output reversible gates. The testability
feature is not incorporated in gate R, as it will be used as the basic block
for implementing the two pair two-rail checker.
.
Gate R
22
From the truth table, it can be verified that the input pattern corresponding to a
particular output pattern can be uniquely determined. The new gate can be used both to invert
and duplicate a signal.
Gate R is a universal gate and its universality is shown in Fig. 16. The signal
duplication function can be obtained by setting the input b to 0, as shown in Fig. 16(b). The
EXOR function is available at the output “l” of the new gate. The AND function is obtained
by connecting the input c to 0, the output is obtained at the terminal n, as shown in Fig. 16(c).
The implementation of a NAND gate is shown in Fig. 16(d). An OR gate is realized by
connecting two new reversible gates, as shown in the Fig. 16(e).
Figure 16. (a) New reversible-logic gate R. (b) Signal duplication. (c) AND gate. (d) NAND gate. (e) OR
gate.
Here, we are introducing R1 and R2 that can be used in pairs to design testable
reversible logic circuits. The first gate R1 is used for implementing arbitrary functions while
the second gate R2 is employed to incorporate online testability features into the circuit. Gates
R1 and R2 are shown in Fig. 17(a); and the corresponding truth tables of the gates are shown
in the preceeding tables. From the truth tables, it can be verified that the input pattern
corresponding to a particular output pattern can be uniquely determined.
23
Truth Tables for Gates R1 and R2
24
Figure 17
25
Gate R1 can implement all Boolean functions and during a normal operation, the
input p is set to 0. The OR and the EXOR functions can be simultaneously implemented on
R1 [Fig. 17(b)]. The EXNOR function and the NAND function are obtained by setting input c
to 1 [Fig. 17(c)]. The NOR function can be obtained by cascading two R1 gates [Fig. 17(d)].
An AND gate also requires the cascading of two gates [Fig. 17(e)]. R1 can transfer a signal at
input a to output u by setting the input c to 0.
Gate R2 is used to transfer the input values at d, e, and f to outputs x, y, and z; it also
generates the parity of the input pattern at output s. The output s of the gate is the complement
of the input r if all other inputs of the gate remain unchanged. For example, if input defr =
1000 is changed to 1001, the output of the gate will change from 1000 to 1001. During a
normal operation, the input r is set to 1.
e1 =x0y1 + y0x1
e2 =x0x1 + y0y1
The fault-free checker will produce the complementary output at e1 and e2 if the
inputs are complementary; otherwise, they will be identical. The block diagram of the testable
block along with the two-pair rail checker is shown in Fig. 20. The outputs q and s of one
testable block forms the input x0 and y0 for the two-pair rail checker, and the outputs of
another testable block forms the input x1 and y1. Thus, the testable blocks constructed using
gates R1 and R2 are tested using the two-pair rail checker. .
26
Figure 19: Two-pair two rail checker
The next figure [Fig. 20] shows the block diagram of the testable block along with the
two-pair rail checker shown in Fig. 19.
27
Figure 20: Testable block embedded with the two-pair two-rail checker
The implementation of the function is shown in Fig 22. The number of signal
duplication blocks used instead of fan-outs, depends on the number of times the variable
appears in the function. For example, the number of blocks required to implement fan out of
variable that appears 6 times as “a”, and 3 times as its complement “ a’ ” is shown in Fig 23.
Several MCNC Benchmark functions were implemented using the above approach. The
testable gate count, garbage outputs and number of checkers are shown in the following
Table.
28
Figure 22: Reversible NAND block implementation for the function ab+cd
29
CMOS realization of the proposed reversible logic gates:
The transistor level design of the three reversible logic gates are realized in CMOS.
Fig. 24 shows the transistor level design of the gate R. Since an EXOR functionality is needed
for implementing the output functions of the reversible gates, an efficient four-transistor
EXOR function design has been chosen to implement the transistor level design.
30
Figure 25: CMOS implementation of gate R1
All the gates (R, ,R1, and R2) can be combined to form a reversible cell, which minimizes the
number transistors by a count of four as a function a XOR c needed by gate R and gate R1 are
shared. Thus, the cell can be implemented with a total of 46 transistors (Fig. 27).
31
Figure 27: Reversible Cell
32
Estimation of Power:
The implementation of the full adder using the reversible gate R has been compared
with that implemented using the Fredkin Gate. The design implemented using the proposed
gate is found to be more efficient; it requires fewer gates, fewer garbage outputs, and
consumes less power. The power analysis has been made using Xilinx ISE version 6.1. The
full adder with propagate was implemented at the behavioral level [VHSIC (very high speed
integrated circuit) hardware description language (VHDL)] using the Fredkin gate, the
proposed gates, and the Toffoli gate. The following Table shows the comparison of the
designs using these gates.
.
The following Table (in the next page) shows the number of gates, garbage outputs,
and the power estimation of several benchmark circuits implemented in VHDL using
reversible gate R, testable gate R1/R2, and the Fredkin and Toffoli gates.
33
Conclusion:
Three new reversible logic gates have been shown. Two of these gates can be paired
such that any function implemented using the gate pair will be online testable. A fault in any
of these gates will produce a single bit output error. In order to ensure that errors can be
detected online, two rail checkers are incorporated in the design. Such checkers are also
constructed from the proposed reversible logic gates.
A CMOS implementation of reversible gates are also shown. The most important
requirement of the reversible gate-based design is the reduction of garbage outputs rather than
the actual number of gates.
34
Chpater 5
Reversible Memory Elements
Introduction:
Despite the great potential of reversible logic and these
endorsements from the leaders in the field, little to no work has been done
in this area of sequential reversible logic. Many researchers are
investigating combinational logic synthesis techniques but have seemed
to overlook the necessity of memory elements if one is planning to
implement many of our day to day circuits in reversible technologies.
Here, we have shown the small amount of existing work in the area, and
the reversible implementation of the RS-latch. Then we will present flip-
flop implementations based on this latch.
The following Table lists the behavior of each of the most commonly
used reversible gates. The behavior describes how each input becomes
transformed to produce the outputs when the gate is applied. For instance,
if the input values for x, y and z are 110 then the output values will be x,
y, xyXOR z or 111 after the Toffoli gate is applied.
The symbols used here for the gates are shown in the figure below:
35
Figure 28
Figure 29
Figure 30
36
State tables for the two reversible latches latches illustrate that the
behaviours are the same, as shown in the following Table (in the next
page)
37
Figure 31
After creating the state table the next stage is to create a cascade of
reversible gates that effects the required transitions. However, in the case
above the cascade quickly becomes quite involved, and so the designs
from Figures 30 and 31 are a more efficient choice.
According to Sasao there are four standard flip-flop designs. Although one can
construct more complex latches with characteristics similar to those of the flip-flops, we
argue that the usefulness of a non-clocked memory element is limited. Additionally, we
investigate only edge-triggered flipflops, since clocked latches may be difficult to use due to
the restrictions inherent in the period and and width of the clock pulse.
38
identical outputs and one output that is the negation of the other two. This is useful since we
also need a negated clock output, which is then fanned-out to the two inputs to the second RS-
latch. Another issue lies in the question of how to generate the clock signal for a reversible
circuit.
2) D flip-flop: An extension of the Master-slave flip-flop is to disallow S = R. One way
to do this is to use a single input D which is connected directly to the S input, and
then D is connected to the R input. The behaviour is then as shown in Figure 33 (A).
Figure 33 also shows both the traditional logic implementation of the D flip-flop and
an equivalent reversible.
Figure 32
39
Figure 33
40
Figure 34
4) T flip-flop: Again, a modification to the inputs of the JK flip-flop is
possible in order to build a slightly different flip-flop. If we let T = J =
K then the flip-flop behaviour becomes as given in Figure 35 (A).
Figure 8 also shows a traditional implementation of this flip-flop and
an equivalent reversible implementation.
Figure 35
Discussion:
There is some argument as to whether a flip-flop such as the JK flip-
flop shown in Figure 34 (C) can be considered reversible. Certainly it is
constructed entirely of reversible elements; however, by introducing not
one but two stages of feedback is the final structure truly reversible?
41
Further examination is required here in order to satisfy the doubts raised
by some researchers.
42
Chapter 6
Quantum Search Applications
What is Quantum Computing?
In quantum computers we exploit quantum effects to compute in
ways that are faster or more efficient than, or even impossible, on
conventional computers. Quantum computers use a specific physical
implementation to gain a computational advantage over conventional
computers. Properties called superposition and entanglement may, in
some cases, allow an exponential amount of parallelism. Also, special
purpose machines like quantum cryptographic devices use entanglement
and other peculiarities like quantum uncertainty.
Quantum computing combines quantum mechanics, information
theory, and aspects of computer science [Nielsen, M. A. & Chuang, I. L.
2000]. The field is a relatively new one that promises secure data transfer,
dramatic computing speed increases, and may take component
miniaturization to its fundamental limit.
43
values the state collapses and we get only one value (the rest get lost). This is tantalizing but,
in some cases, can be made to work to our computational advantage.
Single Qubits:
Classical computers use two discrete states (e.g. states of charging of a capacitor) to
represent a unit of information, this state is called a binary digit (or bit for short). A bit has the
following two values: 0 and 1.
There is no intermediate state between them, i.e. the value of the bit cannot be in a
superposition.
Quantum bits, or qubits, can on the other hand be in a state ”between” 0 and 1, but
only during the computational phase of a quantum operation. When measured, a qubit can
become either: |0> or |1> i.e. we readout 0 or 1. This is the same as saying a spin particle can
be in a superposition state but, when measured, it shows only one value.
The |> symbolic notation is part of the Dirac notation. In terms of the above it
essentially means the same thing as 0 and 1 (this is explained a little further on), just like a
classical bit. Generally, a qubit’s state during the computational phase is represented by a
linear combination of states otherwise called a superposition state.
α|0> + β|1>
Here α and β are the probability amplitudes. They can be used to calculate the
probabilities of the system jumping into |0> or |1> following a measurement or readout
operation. There may be, say a 25% chance a 0 is measured and a 75% chance a 1 is
measured. The percentages must add to 100%. In terms of their representation qubits must
satisfy:
|α|2+|β|2 = 1
This the same thing as saying the probabilities add to 100%. Once the qubit is
measured it will remain in that state if the same measurement is repeated provided the system
remains closed between measurements.
Quantum Search:
Quantum computation is necessarily reversible, and quantum circuits generalize their
reversible counterparts in the classical domain. Instead of wires, information is stored on
qubits, whose states we write as |0> and |1> instead of 0 and 1. There is an added
complexity—a qubit can be in a superposition state that combines |0> and |1>. Specifically,
|0> and |1> are thought of as vectors of the computational basis, and the value of a qubit can
be any unit vector in the space they span. The scenario is similar when considering many
qubits at once: the possible configurations of the corresponding classical system (bit-strings)
are now the computational basis, and any unit vector in the linear space they span is a valid
configuration of the quantum system. Just as the classical configurations of the circuit persist
as basis vectors of the space of quantum configurations, so too classical reversible gates
persist in the quantum context. Non-classical gates are allowed, in fact, any (invertible) norm-
preserving linear operator is allowed as a quantum gate. However, quantum gate libraries
often have very few non-classical gates . An important example of a non-classical gate (and
the only one used in this paper) is the Hadamard gate H. It operates on one qubit, and is
defined as follows: H|0> = (1/√2)(|0>+|1>), and H|1> = (1/√2) (|0>−|1>). Note that
because H is linear, giving the images of the computational basis elements defines it
completely.
44
During the course of a computation, the quantum state can be any unit vector in the linear
space spanned by the computational basis. However, a serious limitation is imposed by
quantum measurement, performed after a quantum circuit is executed. A measurement non-
deterministically collapses the state onto some vector in a basis corresponding to the
measurement being performed. The probabilities of outcomes depend on the measured state
— basis vectors [nearly] orthogonal to the measured state are least likely to appear as
outcomes of measurement. If H|0> were measured in the computational basis, it would be
seen as |0> half the time, and |1> the other half.
Despite this limitation, quantum circuits have significantly more computational
power than classical circuits. In this work, we consider Grover’s search algorithm, which is
faster than any known non-quantum algorithm for the same problem. Figure 28 outlines a
possible implementation of Grover’s algorithm. It begins by creating a balanced superposition
of 2n n-qubit states which correspond to the indexes of the items being searched. These index
states are then repeatedly transformed using a Grover operator circuit, which incorporates the
search criteria in the form of a search-specific predicate f (x). This circuit systematically
amplifies the search indexes that satisfy f (x) = 1 until a final measurement identifies them
with high probability.
.
Figure 28
45
Figure 29
Lemma With one temporary storage qubit, the problem of synthesizing a quantum circuit
that transforms computational basis states |x> to (−1) f (x)|x> can be reduced to a problem
in the synthesis of classical reversible circuits.
Proof: Define the permutation πf by πf (x,y) = (x,y XOR f (x)), and define a unitary
operator
Uf by letting it permute the states of the computational basis according to πf . The additional
qubit is initialized to |−> = H|1> so that Uf |x,−> = (−1) f (x)|x,−>. If we now ignore
the value
of the last qubit, the system is in the state (−1) f (x)|x>, which is exactly the state needed for
Grover’s algorithm. Since a quantum operator is completely determined by its behavior on a
given computational basis, any circuit implementing πf implements Uf . As reversible gates
may be implemented with quantum technology, we can synthesize Uf as a reversible logic
circuit.
Corollary 37 For permutations πf (x,y) = (x,y XOR f (x)), such that {x : f (x) = 1} has
even cardinality no more temporary storage is necessary. For the remaining πf , we need an
additional qubit of temporary storage.
The following Table gives the optimal circuit sizes of functions πf corresponding to
3-input 1-output functions f (“3+1 oracles”) which can be synthesized on four wires. These
circuits are significantly smaller than many optimal circuits on four wires. This is not
surprising, as they perform less computation.
In Grover oracle circuits, the main input lines preserve their input values and only the
temporary storage lines can change their values. Therefore, Travaglione et al. studied circuits
where some lines cannot be changed even at intermediate stages of computation. In their
46
terminology, a circuit with k lines that we are allowed to modify and an arbitrary number of
read-only lines is called a k-bit ROM-based circuit. They show how to compute permutation π
f arising from a Boolean function f using a 1-bit quantum ROM-based circuit, and prove that if
only classical gates are allowed, two writable bits are necessary. Two bits are sufficient if the
CNT gate library is used. The synthesis algorithms of Travaglione et al. rely on XOR sum-of-
products decompositions of f .
We outline their method in a proof of the following result.
47
(Appendix A)
Irreversibility and Heat Generation
The search for faster and more compact computing circuits leads directly to the
question: What are the ultimate physical limitations on the progress in this direction? In
practice the limitations are likely to be set by the need for access to each logical element. At
this time, however, it is still hard to understand what physical requirements this puts on the
degrees of freedom which bear information. The existence of a storage medium as compact as
the genetic one indicates that one can go very far in the direction of compactness, at least if
we are prepared to make sacrifices in the way of speed and random access.
Without considering the question of access, however, we can show, or at least very
strongly suggest, that information processing is inevitably accompanied by a certain
minimum amount of heat generation. In a general way this is not surprising. Computing, like
all processes proceeding at a finite rate, must involve some dissipation. Our arguments,
however, are more basic than this, and show that there is a minimum heat generation,
independent of the rate of the process. Naturally the amount of heat generation involved is
many orders of magnitude smaller than the heat dissipation in any practically conceivable
device. The relevant point, however, is that the dissipation has a real function and is not just
an unnecessary nuisance. The much larger amounts of dissipation in practical devices may be
serving the same function.
The conclusion about dissipation can be anticipated in several ways, and our major
contribution will be a tightening of the concepts involved, in a fashion which will give some
insight into the physical requirements for logical devices. The simplest way of anticipating
our conclusion is to note that a binary device must have at least one degree of freedom
associated with the information. Classically a degree of freedom is associated with kT of
thermal energy. Any switching signals passing between devices must therefore have this much
energy to override the noise. This argument does not make it clear that the signal energy must
actually be dissipated.
An alternative way of anticipating the conclusions is to refer to the arguments by
Brillouin and earlier authors, as summarized by Brillouin in his book, Science and
Information Theory, to the effect that the measurement process requires a dissipation of the
order of kT. The computing process, where the setting of various elements depends upon the
setting of other elements at previous times, is closely akin to a measurement. It is difficult,
however, to argue out this connection in a more exact fashion. Furthermore, the arguments
concerning the measurement process are based on the analysis of specific and the specific
models involved in the measurement analysis are rather far from the kind of mechanisms
involved in data processing.
In short, it can be said : The information-bearing degrees of freedom of a computer
interact with the thermal reservoir represented by the remaining degrees of freedom. This
interaction plays two roles. First of all, it acts as a sink for the energy dissipation involved in
the computation. This energy dissipation has an unavoidable minimum arising from the fact
that the computer performs irreversible operations. Secondly, the interaction acts as a source
of noise causing errors. In particular thermal fluctuations give a supposedly switched element
a small probability of remaining in its initial state, even after the switching force has been
applied for a long time. It is shown, in terms of two simple models, that this source of error is
dominated by one of two other error sources:
1) Incomplete switching due to inadequate time allowed for switching.
2 ) Decay of stored information due to thermal fluctuations.
It is, of course, apparent that both the thermal noise and the
requirements for energy dissipation are on a scale which is entirely
negligible in present-day computer components. Actual devices which are
far from minimal in size and operate at high speeds will be likely to require
48
a much larger energy dissipation to serve the purpose of erasing the
unnecessary details of the computer's past history.
49
REFERENCES
50