V3i9 0363 PDF
V3i9 0363 PDF
V3i9 0363 PDF
Page | 163
Nayak et al., International Journal of Advanced Research in Computer Science and Software Engineering 3(10),
October - 2013, pp. 163-171
XOR (Exclusive-OR) is a variant of OR function.
It is defined as a Boolean Function
The result can be written as
B. UNIVERSAL IRREVERSIBLE LOGIC GATES
NAND-GATE
NAND (NOT-AND) is a universal gate from which any Boolean function can be derived. Let
be a NOT function
and
be a AND function. The NAND function can be defined as
.
NOR-GATE
Similarly NOR gate is another universal gate from which any Boolean function can be derived. It can be defined as a
function
.
C. LIMITATION OF IRREVERSIBLE LOGIC GATES
The AND and OR gates are example of irreversible logical gates. The physical meaning of logical irreversibility can be
interpreted as the erase of bits during information processing. The work done to erase a bit can be represented as the heat
dissipation. According to conservation of energy this loss of energy can be interpreted as physical irreversibility which
leads to logical irreversibility in case of irreversible logic gates. This amount of energy loss can be expressed in terms of
per bit (Where K
Boltzmans constant and T
Absolute temperature) [9]. One way to overcome this
problem is to modify chip design and use only reversible logic gates. In case of reversible gates there will be no erase of
information and hence no loss of energy. NOT gate is an example of reversible logic gate. From the output of a NOT gate
we can find the input just inverting the output bit value. Classically we can design reversible logic gates [10,11] but in
the next section we will see quantum gates are reversible by nature.
III. LOGIC GATES IN QUANTUM COMPUTER
In quantum mechanics the state of a physical system is represented by its wave function which contains all information to
describe the system completely. A quantum bit or qubit is the smallest unit of information used for quantum information
processing. Just as classical bit has two possible states 0 and 1, the qubit has two possible states ket
and ket
.These two states are also known as computational basis states. In general a qubit is a vector in the two dimensional
complex vector space. The main difference between a classical bit and quantum bit is that, a qubit can stay in the
superposition of basis states. The superposition is the linear combination of the two basis states
and
to form the
state
, where and are two complex scalar numbers called amplitudes. The amplitudes can be
thought of as the quantum probabilities. The classical probability amplitudes are represented by real numbers, where as
the quantum probability amplitudes are represented by complex numbers. The probabilities of a classical system must
sum to 1 to form a complete probability distribution. Similarly the squares of the absolute values of the amplitudes of
states in a quantum system must add up to 1.The logic that can be implemented with qubits is quite distinct from Boolean
logic, and that is why quantum computing is exciting by opening new possibilities.
Mathematically quantum logic gates are represented by transformation matrices or linear operators. The quantum logic
gate in the form of transformation matrix interacts with the quantum register through tensor operations. All linear
operators that correspond to the quantum logic gates must be unitary i.e. the inverse of that matrix must be equal to its
complex conjugate transpose. Unitary operators preserve the inner product of the two vectors. Geometrically the lengths
of vectors and the angle between them are preserved i.e.
. The unitary
transformation on single qubit may be visualized as rotation and reflection about the
If
are two unitary operators then the composition is also unitary:
Classical gates like NAND and XOR are irreversible but the quantum gates, represented in the form of unitary matrices,
are always reversible. The matrix representation of single as well as multiple qubit gates is a convenient mathematical
way of expressing their input output relationship. If the
truth-table combinations of a gate are denoted as
and
, then the matrix representation of the gate can be computed as
A. SINGLE QUBIT GATES
As NOT gate is a single bit gate in classical computer, in the similar way there exists single qubit quantum gate in
quantum computer. Hence single qubit gates are those that act on only a single quantum bit.
QUANTUM NOT-GATE
The quantum NOT gate for qubits can be defined as a process that takes
in case of superposition, the NOT gate acts linearly in the state
and produces
to
Page | 164
Nayak et al., International Journal of Advanced Research in Computer Science and Software Engineering 3(10),
October - 2013, pp. 163-171
The matrix representation of quantum NOT gat is
The matrix representation of
is
then
and
and
Hence we can conclude from above discussion that there exists a single non-trivial single qubit bit gate i.e. NOT gate.
But in case of single qubit NOT gates, several possible cases are possible as long as the unitary constraint is satisfied.
Some of these are Hadamard gates and Z gates.
Z-Gate
The Matrix Representation of Z-Gate is defined as:
It inverts sign of
For
the output is
For
the output is
to give
and leaves
unaltered.
:
:
:
Page | 165
Nayak et al., International Journal of Advanced Research in Computer Science and Software Engineering 3(10),
October - 2013, pp. 163-171
Derivation of Matrix Representation of Quantum Z- Gate:
The matrix representation of
and
HADAMARD GATE
The Matrix Representation of Hadamard gate is defined as:
For
the output is
Similarly, for
the output is
Hence, the Hadamard gate is also known as square- root of a NOT gate as it transforms
in to
and
into
and
Or
If we apply
to H:
Similarly, if we apply
to H: we will get
and
Page | 166
Nayak et al., International Journal of Advanced Research in Computer Science and Software Engineering 3(10),
October - 2013, pp. 163-171
the output is
For
the output is
For
the output is
Graphical representation:
For
the output is
For
the output is
For
the output is
Page | 167
Nayak et al., International Journal of Advanced Research in Computer Science and Software Engineering 3(10),
October - 2013, pp. 163-171
Classical multiple input gates are AND, OR, XOR, NAND, NOR etc. Similarly we can have multiple qubit gates in case
of quantum computation.
The operation of controlled gate is described as If A is true, then do B .Where A is the control qubit and B is the target
qubit. If control qubit is set to 0 then target qubit is not altered. If control qubit is set to 1 then target qubit is inverted.
CONTROLLED NOT-GATE (CNOT-GATE)
The CNOT gate is the prototype of multi qubit quantum gate. The circuit of CNOT is given below:
Input state
: Control qubit = 0 and Target qubit = 1
As control qubit is 0 the target qubit remains unaltered. Hence the output state is the same as the input state.
Input state
: Control qubit = 1 and Target qubit = 0
As control qubit is 1, the target qubit is inverted to 1. Hence the output state has both the qubits 1.
Input state
: Control qubit = 1 and Target qubit = 1
As control qubit is 1, the target qubit is inverted to 0. Hence the output state becomes
Page | 168
Nayak et al., International Journal of Advanced Research in Computer Science and Software Engineering 3(10),
October - 2013, pp. 163-171
CNOT gate can be considered as a generalized XOR gate since the action of the gate can be considered
as:
where
stands for modulo-2 addition.
Verification of Unitary Constraint for CNOT-Gate:
CNOT-Gate is Reversible:
Unitary quantum gates are always invertible since inverse of unitary matrix is also a unitary matrix.
Universality of CNOT Gate:
Any multiple qubit logic gates may be composed from CNOT and single qubit gates. This is the quantum parallel of the
universality of the NAND gate.
SWAP-GATE
Swap gate is defined as:
Graphical Representation of Swap Gate:
The swap gate is prepared using three CNOT gets. The circuit is read from left to right and each line represents a
quantum passage, maybe of time, perhaps a physical particle such as a photon or a light to move from one location to
another space.
The inputs are
.The output of first CNOT gate is
.This is fed to the second CNOT gate, the output is
.This is now fed to the third CNOT gate, the final output becomes
. Hence the overall effect is that the two qubits have been swapped.
Truth Table of Swap gate:
Page | 169
Nayak et al., International Journal of Advanced Research in Computer Science and Software Engineering 3(10),
October - 2013, pp. 163-171
CONTROLLED Z-GATE
The controlled-Z gate is defined as:
The action of Controlled Z- Gate: If A is true, then do B
Truth table:
V. CONCLUSION
In this paper the quantum gates have been discussed with graphical and mathematical representation. The reversible
nature of quantum gates have been proved mathematically. Hence using quantum computer we can overcome the
irreversibility nature of classical computation and avoid information loss. Finally a comparison is made between the
classical and quantum logic gates.
REFERENCE
[1] M.Morris Mano, Digital Design Prentice Hall, Third Edition, (2002)
[2] Mikio Nakahara and Tetsuo Ohmi, Quantum computing, CRC press, (2008)
[3] Nielsen, M.A. and Chuang, I.L., Quantum computation and quantum information. UK: Cambridge University
Press,(2000)
[4] Sahni, V., Quantum computing. New Delhi: Tata McGraw Hill, (2007)
2013, IJARCSSE All Rights Reserved
Page | 170
Nayak et al., International Journal of Advanced Research in Computer Science and Software Engineering 3(10),
October - 2013, pp. 163-171
[5] Sitakanta Nayak, Shaktikanta Nayak, J.P Singh, Quantum Concepts in Neural Computation, Proceedings of the
International Conference on Soft Computing for problem Solving, 2011, Advances in Intelligent and Soft
Computing ,Vol. 130, pp. 395400 , Springer India
[6] Sitakanta Nayak, Shaktikanta Nayak A Study on Quantum inspired Hybrid Neural Networks Model, International
Journal of Advanced Research in Computer science and Software Engineering.Vol-3, No-06, June-2013
[7] A. Turing, On computable numbers with an application to the Entscheidungs-problem, Proc. Lond. Math. Soc.
Ser. 2, 42 (1936), 230-65. Also see A. Church, An unsolvable problem of elementary number theory, American J.
of Math., 58 (1936), 345-63.
[8] F. E. Hohn, Applied Boolean Algebra An Elementary Introduction, The Macmillan Company, New York, 1966.
[9] R. P. Feynman, Quantum mechanical computers, Found. Phys., 16 (1986), 507.
[10] C. H. Bennett, Logical Reversibility of Computation, IBM Journal of Research and Development, 17 (1973),
525-32.
[11] T. Toffoli, Reversible Computing, Tech. Memo MIT/LCS/TM-151, MIT Lab. for Com. Sci. (1980).
[12] D. P. DiVincenzo, Two-bit gates are universal for quantum computation, Phys. Rev. A, 51 (1995), 1015-18.
[13] T. Sleator, H. Weinfurter, Realizable Universal Quantum Logic Gates, Phys. Rev. Lett., 74 (1995), 4087-90.
[14] A. Barenco, A universal two-bit gate for quantum computation, Proc. R. Soc. Lond. A, 449 (1995), 679-83.
Page | 171