SlideShare uma empresa Scribd logo
1 de 27
Baixar para ler offline
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 1 | 27
Quantum computing
Wave function in Ket notation
A wave function in quantum physics is a mathematical description of the quantum state of an
isolated quantum system. Denoted as  .
The wave function is a complex-valued probability amplitude, and the probabilities for the
possible results of measurements made on the system can be derived from it.
Probability =
2
*

  is a positive deterministic value
where  is complex and *
 is conjugate.
Mathematically, we describe every quantum state with a vector.
j
i
i ˆ
ˆ 

 


Its conjugate is j
i
i ˆ
ˆ
*


 


Then, 2
2
2
*
)
ˆ
ˆ
).(
ˆ
ˆ
( 







 




 j
i
i
j
i
i


is the probability
Matrix form of Wave function
The physical state of a system is represented in quantum mechanics by elements of a Hilbert
space; these elements are called state vectors. The state vectors in different bases by means of
function expansions. This is analogous to specifying an ordinary (Euclidean) vector by its
components in various coordinate systems. The meaning of a vector is, of course, independent
of the coordinate system chosen to represent its components. Similarly, the state of a
microscopic system has a meaning independent of the basis in which it is expanded.
In quantum mechanics, bra–ket notation, or Dirac notation, is used to denote quantum states.
Bra–ket notation was effectively established in 1939 by Paul Dirac.
A ket is of the form  Mathematically it denotes a vector, in an abstract (complex) vector
space and physically it represents a state of some quantum system.
The basis vector j
and
i ˆ
ˆ can be written in matrix form as 















1
0
1
ˆ
0
1
0
ˆ j
and
i
Then j
i
i ˆ
ˆ 

 
 becomes 1
0 

 i


Then, 

























i
i
1
0
0
1
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 2 | 27



























i
i
1
0
0
1
*
)
1
2
(
)
1
2
(
*
.
x
x
i
i 


















 matrix multiplication is not possible.
Orthonormal (orthogonal) matrices are matrices in which the columns vectors form an
orthonormal set (each column vector has length one and is orthogonal to all the other colum
vectors).
Hence A matrix
†
 is multiplied to  gives probability. Where,
T
*
†

 
i.e.,   2
2
†







 









i
i
But 
 
†
is a bra
Hence
2
2



 
 is the probability
Then according to normalization rule 1



Identity operators
Identity matrix In is an n x n matrix with all diagonal entries equal to 1 and all others zero.
)
2
2
(
1
0
0
1
x
I 






Determination of 0
I and 1
I
Matrix representation of 






0
1
0 and 






1
0
1 States,
0
0
1
0
0
0
1
0
1
1
0
0
1
0 





























I
1
1
0
1
0
0
0
1
0
1
0
0
1
1 





























I
Applying I to |0> and |1> states to show there is no change.
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 3 | 27
Truth table for Identity matrix.
Input Out put
0 0
1 1
1
0 
  1
0 
 
Pauli matrices and its operation on 0 and 1
There are three extremely useful matrices called Pauli matrices that are often used in quantum
computing.








0
1
1
0
X
x






 


0
0
i
i
Y
y










1
0
0
1
Z
Z

Note: Pauli matrices satisffy the unitary condition.
I
Z
Y
X 


2
2
2











0
1
1
0
X
x

X 0 = 











0
1
0
1
1
0
= 







0
1
0
0
= 





1
0
= 1
X 1 = 











1
0
0
1
1
0
= 







0
0
1
0
= 





0
1
= 0
Y 0 = 










 
0
1
0
0
i
i
= 







0
0
0
i
= 





i
0
= 1
i
Y 1 = 










 
1
0
0
0
i
i
= 







0
0
0 i
= 






0
1
i = 0
i

Z 0 = 











 0
1
1
0
0
1
= 







0
0
0
1
= 





0
1
= 0
Z 1 = 











 1
0
1
0
0
1
= 







1
0
0
0
= 





1
0
= 1

BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 4 | 27
Hermitian matrix
A hermitian matrix is a square matrix, which is equal to its conjugate transpose matrix. The
non-diagonal elements of a hermitian matrix are all complex numbers. The complex numbers
in a hermitian matrix are such that the element of the ith
row and jth
column is the complex
conjugate of the element of the jth
row and ith
column.
Mathematically, a Hermitian matrix is defined as A square matrix, A = [aij]n × n such that
(A*)T
= A,
where (A*)T
= A†
is the conjugate transpose of A.
Since A is Hermitian,
†
†
AA
A
A 
Hermitian Matrix of Order 2 x 2
If 








2
2
3
2
3
1
i
i
A is a complex matrix, 








2
2
3
2
3
1
*
i
i
A is the complex conjugate of
A.
  A
i
i
A
T










2
2
3
2
3
1
*
Here the non-diagonal are complex numbers. Only the first element of the first row and the
second element of the second row are real numbers. Also, the complex number of the first-row
second element is a conjugate complex number of the second-row first element.
Unitary Matrix
A matrix U of order n is said to be unitary if
n
I
U
U
U
U 
 †
†
.
.
In quantum mechanics, the conjugate transpose is referred to as the Hermitian adjoint of a
matrix and is denoted by a dagger (†).
The real analogue of a unitary matrix is an orthogonal matrix. Unitary matrices have significant
importance in quantum mechanics because they preserve norms, and thus, probability
amplitudes.
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 5 | 27
Principles of quantum information and quantum computing.
Introduction to Quantum Computing
Quantum computing is a rapidly-emerging technology that harnesses the laws of quantum
mechanics to solve problems too complex for classical computers. Quantum theory explains
the behavior of energy and material on the atomic and subatomic levels. Quantum computing
uses subatomic particles, such as electrons or photons.
Quantum bits, or qubits, allow subatomic particles to exist in more than one state (i.e., 1 and
0) at the same time. Unlike a normal computer bit, which can be either 0 or 1, a qubit can exist
in a multidimensional state. Theoretically, linked qubits can "exploit the interference between
their wave-like quantum states to perform calculations that might otherwise take millions of
years.
Classical computers today employ a stream of electrical impulses (1 and 0) in a binary manner
to encode information in bits. This restricts their processing ability, compared to quantum
computing. The power of quantum computers grows exponentially with more qubits. Classical
computers that add more bits can increase power only linearly.
Moore’s law& its end
Gordon Moore, the co-founder of Intel, indicated that - due to the shrinking size of transistors
to the nanoscale (allowing integrated circuits to be composed of more transistors, resulting in
more powerful computer systems) - every year, twice as many transistors would be able to fit
onto computer chips. Hence, Moore’s Law was born. After 1975, the estimate changed to a
doubling of transistors every two years.
Moore's law is the observation that the number of transistors in a dense integrated circuit (IC)
doubles about every two years. Moore's law is an observation and projection of a historical
trend rather than a law of physics.
Engineers were able to consistently create computer systems/chips with double the number of
transistors, resulting in a number of more advanced technologies being developed, from smart
technology, to mobile technology, to wearable technology, to faster processors, to more robust
computers, to faster/more efficient data centers like cloud computing. Engineers were able to
dedicate time to develop more efficient nanotechnology systems whereby transistors went from
being millimeters to nanometers. However, feats in engineering and physics have been pushed
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 6 | 27
to their limit, and while more power results in more resources and more abilities to carry out
advanced tasks via computers, engineers are unable to keep pushing the limit on smaller
transistors, and thus, computer systems may have reached their limit in transistor capacity and
power. Hence, industry leaders are asserting that Moore’s Law has come to an end, and
computers will no longer have many more transistors every year.
Single particle quantum interference
Quantum computing involves the concept of superposition. To understand the idea of
superposition it is appropriate to know about an experiment which is concerned with a
phenomenon know as single-particle quantum interference.
In this experiment light from a source S falls upon an half-silvered mirror i.e., a mirror which
reflects 50% of the incident light and transmits the rest 50% as shown in figure 1. The reflected
light is detected by the detector D1, and the transmitted part is detected by D2. If we consider
the light to be a stream of photons, then 50% of them will reach D1 and the rest 50% reach D2.
If the source were to emit one photon at a slow rate, then as per probabilistic prediction, we
may say that over a period of time after a number of photons were emitted, D1 would have
received 50% of them and D2 the rest 50%.
It means, each time a photon is emitted we assume that it is either reflected and travels along
OY, or transmitted and travels along OX. Since a photon is quantised, we don’t consider it to
split into two with one-half going along OY and other travelling along OX (i.e., at one time,
the photon is detected by either D1 or D2, but never together). But because of the wave nature
associated with the photon, the photon must a measurement is carried out it is said to collapse
to cpllapse to only that path concerned to the measurement. There is a method to demonstrate
this by extending the above experiment as follows.
Let there be two fully silvered mirrors at two points A and B, and half silvered mirror at C such
that the mirror A and B reflect the light (photons) exactly to the point C where another half
silvered mirror lies. All the mirrors lie with their planes inclined at 45 to the incident light.
The path length OACOCB.
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 7 | 27
With this arrangement, after a photon leaves the source and travels-up its path here also one
expects that it will be detected by either D1 or D2. However, as per quantum mechanical
considerations, it is always only the detector D1 which the photon reaches and never the
detector D2. This effect is explained as follows.
Everytime a photon leaves the source, the two sets of waves that represent the photon existing
simultaneously along the two paths, would always cancel each other before reaching D2. But
those which proceed to reach D1 will reinforce and thus will be detected there. This means that
the photon has in reality travelled not one but both the paths simultaneously and underwent self
interference to be detected only at D1.
This experiment is known as single-particle quantum interference and the fact that it exists in
both the paths (states) is considered superposition.
Quantum superposition and concept of qubit
In a classical computer, a bit is represented by a physical quantity with two states to represent
0 and 1. It can be the voltage in a circuit (e.g. 5 V for 1 and 0 V for 0). It can be the
magnetization direction in a magnetic drive (e.g. up for 1 and down for 0). It can be the charge
density in the charge storage layer in the flash memory (e.g. low for 1 and high for 0). In a
quantum computer, the information is represented by qubits. Like the classical bit, each qubit
still has two distinct states and we say that they are orthogonal to each other because they
cannot exist with 100% certainty at the same time. We also call them the basis vectors or basis
states most of the time. We can still label them as “0” and “1.” In addition to the two distinct
states, a qubit may also have many other states which are the superposition of the two distinct
states (or the basis states). This is what is fundamentally different from the classical bit. In
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 8 | 27
these states, the two distinct (orthogonal) basis states are allowed to exist at the same time with
<100% certainty. Superposition is one of the fundamental operation principles in quantum
computing. Superposition allows us to perform a calculation on multiple basis states at the
same time, which is not possible in classical computing.
We learned superposition in wave theory in which two wavelets can superimpose on each other.
In electromagnetism, light can be polarized in any direction. Any linear polarization is just a
linear combination of horizontal and vertical polarization. If we represent the horizontal
polarization as a horizontal vector (Vx) and the vertical polarization as a vertical vector (Vy)
any linear polarization, V, is just a linear combination of the two vectors.
We can write
y
x V
V
V 
 

where α and β are just some numbers (coefficients) and Vx and Vy are the horizontal and vertical
polarization unit vectors (which are basis vectors in this case), respectively. Vx and Vy are the
orthogonal states in the system.
There is a genius called Dirac and he decided to write in this way
y
x V
V
V 
 

This is called the Dirac ket notation.
A qubit can be in a linear combination or superposition of the two states 0 and 1 as:
1
0 

 

The number α and β are complex, but generally taken as real without any loss. In other words,
a qubit is a vector in a two dimentional complex vector space.
An example of a qubit state could be:
1
2
1
0
2
1



So a qubit can exist in a continuum states between 0 and 1 .
The sum of probabilities of 0 and 1 adds to 1.
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 9 | 27
We can examine 1
0 

 
 to find out whether it is in the state 0 or 1 . When we
measure a qubit, we get either the result 0 with probability
2
 or 1 with probability
2
 .
Naturally, the sum
1
2
2

 

Since the probabilities must add up to one. So we can interpret this as the condition that the
qubit’s state can be normalised to length 1. A qubit’s state is therefore, a unit vector in a two-
dimentional complex vector space.
1
2
1
0
2
1



When measured gives the result of 0 for 5
.
0
2
1
2
1
2

 or 50% of the time and a result of 1
for 5
.
0
2
1
2
1
2

 or 50% of the time.
We come to the important conclusion that a qubit can exist in a coherent superposition of states
0 and 1 only till it measured upon measurement, it gives only one of the states 0 or 1 .
Single and two qubits. Extension to N qubit
The quantum mechanical notation of Dirac (known as Ket notation), the states of a qubit are
represented as 0 and 1 as a classical bit can be in the state of 0 and 1.
Any quantum data processing can be done by one and two qubit gates acting on qubits.
For example, if we consider the case of two-qubit XRO (also called controlled –NOT) gate, it
flips the second input provided the first input is 1 . Otherwise stays unchanged. A
superposition at the stage of input gives a superposition of outputs. This is recognised as
entangled state.
With two such qubits, the four states of two ordinary bits can be taken at once and represented
as one state.
i.e., 00, 01, 10, 11
Going further, if we consider a register composed of three classical bits, then the register can
store only one out of eight possible configurations given by,
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 10 | 27
000, 001, 010, 011, 100, 101, 110, 111
One can show that, three qubits can store all eight numbers in a quantum superposition.
If we keep adding qubits to the register we increase its capacity exponentially i.e., three qubit
can store 8 different numbers. Four qubit can store 16 different numbers, and so on.
This means, by using N qubits, any of N
2 states can be formed with just one state. Therefore,
it becomes possible to perform super-parallel processing of problems which need to have N
2
inputs. This is the origin of its mega-calculating capacity. With the increase in the number of
qubits, the effect grown exponentially. Ultimately for getting the answer, some kind of
observation needs to be made on the quantum system serving as qubits. For the reson that the
qubits are quantum mechanical nature, the answer comes out in probabilistic form. But when
answer is probabilistic, it may come with different values at the end of different observations.
To overcome this kind of uncertainty, a method called quantum interference will be made use
of. In this method, operations are carried out such that we get answers with probabilities very
near 1 (ie., it is almost certain).
Classical and quantum information comparison
Technically any information could be reliazed in terms of various distinctive steps that follows
certain logic. For instance, in computer applications, information could be reduced in terms of
bits (0 and 1). Further it could be processed in terms of logic gates (NOT, AND). But both bits
and logic gates are not materials but electrical effects. However the effects manifest following
certain physical laws which are classical in nature. This is classical information.
Information could also be obtained through entities such as photons or nuclear spins which
obey quantum information. But unlike classical information, quantum information cannot be
read or copied without disturbing the system which bear them.
The quantum information is realized through different possible states of a quantum system
called qubits. Further processing is achieved through one-and two-qubit gate operation. It is
called quantum computing.
Differences between classical & quantum computing
In classical computers, a bit is a fundamental unit of information, classically represented as 0
or 1 in the digital computer such as the magnetization on a hard disc or the charge on a
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 11 | 27
capacitor. A document, for example, comprises of n-characters stored in the hard drive of a
typical computer which is accordingly described by a string of 8n 0’s and 1’s.
In quantum computing the concept is fundamentally different. It is neigther a capacitor nor
magnetization on the disc, but a quantum system such as an atom or a photon is used to encode
the information. We can choose two electronic states of an atom or two different polarization
orientations of light for the two states. But as per quantum mechanics, the atom, apart from the
two distinct electroic states, can be also prepared in a state which is said to be a coherent
superposition of both the states. i.e., the atom can exist in state as a 0, a 1, or simultaneously
both as 0 and 1. It will not be known definitely, in which of these states the atom would be. But
a number called probability factor associated with the corresponding states provides the
probability of the atoms existence in each of these states. Since it follows quantum principles,
it becomes a quantum system and is called a quantum bit or a qubit. Thus one qubit can
encode at a time both 0 and 1. If we refer to the case of light, a qubit may correspond to the
superposed state of horizontal and verticle polarization of photons apart from the two individual
states of polarization.
Hence qubit can be defined as follows. “A qubit is a quantum bit the counterpart in quantum
computing to the binary digit or bit of classical computing. Just as bit is the basic unit of
information in a classical computer, a qubit is the basic unit of information in a quantum
computers”.
Properties of a qubit
 A qubit can be in a superposed state of two states 0 and 1 .
 If measurements are carried out with a qubit in superposed state then the results that we
get will be probabilistic. (not deterministic as we get in bits in classical computer).
 Qwing to the quantum nature, the qubit changes its state at once when subjected to
measurement. This means, one canot copy information from qubits the way we do in
the present computers, as there will be no similarity between the copy and the original.
This is known as ‘no cloning principle’.
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 12 | 27
Representation of qubit by Bloch sphere
The Bloch sphere is a geometrical representation of pure single-qubit states as a point on the
unit sphere. Operations on single qubits commonly used in quantum information processing
can be represented on the Bloch sphere.
The geometric representation of a qubit is done with a Bloch sphere as follows;
Given an orthonormal basis, any pure state  of a two level quantum states can be written as
a superposition of the basis vectors 0 and 1 .
i.e., 1
0 

 

where the coefficient of (or contribution from) each of the two basis vectors is a complex
number. This means that the state is described by four real numbers.
We also know from quantum mechanics that the total probability of the system has to be one:
1



or equivalently 1
2


We can write  using the following representation:
1
2
sin
0
2
cos 















 
i
e
  1
2
sin
sin
cos
0
2
cos 


















 i
i.e., 






2
cos

 and   







2
sin
sin
cos



 i
Where 
 

0 and 
 2
0 

BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 13 | 27
For 0

 and 0


0

 and is along +Z axis.
For 
  and 0


1

 and is along - Z axis.
For
2

  and
2

 
2
1
0 i


 and is a superposition state along +Y axis.
For
2

  and
2
3
 
2
1
0 i


 and is a superposition state along - Y axis.
2
1
0 

 and is a superposition state along +X axis.
For
2

  and 
 
2
1
0 

 and is a superposition state along - X axis.
The sphere provides a useful means of visualizing the state of a single qubit and serves as an
excellent testbed for ideas about quantum computing.
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 14 | 27
Quantum Gate
A classical computer is build using an electrical circuit having wires and logic gates. Similarly,
a quantum computer is built from a quantum circuit containing wires and elementary quantum
gates to transmit and manipulate quantum information.
Single Qubit Gates
There are single bit gates in classical computing like NOT gate, which work on only a single
bit. Similarly, single qubit gates are those that act on only single quantum bit.
Quantum NOT Gate
An analogous quantum NOT gate for qubits can be defined as a process that takes the same
state 0 to the state 1 and vice versa and is the quantum analogues for the NOT gate. However
in case of superposition, the quantum NOT gate acts linearly in that the sate
1
0 
  is taken to the state 0
1 
  so that the roles of 0 and 1 states have been
interchanged.
Pauli – X, Y and Z matrices
There are three extremely useful matrices called Pauli matrices that are often used in quantum
computing.








0
1
1
0
X
x






 


0
0
i
i
Y
y










1
0
0
1
Z
Z

Note: Pauli matrices satisffy the unitary condition.
I
Z
Y
X 


2
2
2



X Gate
There is an easy way of representing the X gate or quantum NOT gate in matrix form, which
follows the linearity of quantum gates. It is represented by the matric X as;
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 15 | 27
Note: Matrix representation of 






0
1
0 and 






1
0
1








0
1
1
0
X
x

X 0 = 











0
1
0
1
1
0
= 







0
1
0
0
= 





1
0
= 1
X 1 = 











1
0
0
1
1
0
= 







0
0
1
0
= 





0
1
= 0
If the quantum state 1
0 
  is written in vector notation as 







then
X ( 1
0 
  )= 













0
1
1
0
= 







0
0


= 







= 0
1 
 
Truth table for Pauli X gate or quantum NOT gate
Input Out put
0 1
1 0
1
0 
  0
1 
 
Input 1
0 
  otuput 0
1 
 
X gate or Quantum NOT gate
It can be verified that the X gate satisfies the unitary condition that
I
X
X 
.
†






























1
0
0
1
0
1
0
0
0
0
1
0
0
1
1
0
0
1
1
0
Y gate
There is an easy way of representing the Y gate in matrix form, which follows the linearity of
quantum gates. It is represented by the matric Y as;





 


0
0
i
i
Y
y

Y 0 = 










 
0
1
0
0
i
i
= 







0
0
0
i
= 





i
0
= 1
i
X
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 16 | 27
Y 1 = 










 
1
0
0
0
i
i
= 







0
0
0 i
= 






0
1
i = 0
i

Y ( 1
0 
  )= 










 


0
0
i
i
= 







0
0


i
i
= 







i
i
= 0
1 
 i
i 
Truth table for Y gate
Input Out put
0 1
i
1 0
i

1
0 
  0
1 
 i
i 
Input 1
0 
  out put 0
1 
 i
i 
Pauli Y gate
It can be verified that the Y gate satisfies the unitary condition that
I
Y
Y 
.
†























 





 
1
0
0
1
0
1
0
0
0
0
1
0
0
0
0
0
i
i
i
i
Z gate
The Z gate is defined as









1
0
0
1
Z
Z

Z 0 = 











 0
1
1
0
0
1
= 







0
0
0
1
= 





0
1
= 0
Z 1 = 











 1
0
1
0
0
1
= 







1
0
0
0
= 





1
0
= 1

Z ( 1
0 
  )= 











 

1
0
0
1
= 









0
0
= 





 

= 1
0 
 
Truth table for Y gate
Input Out put
0 0
1 1

1
0 
  1
0 
 
Y
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 17 | 27
Input 1
0 
  output 1
0 
 
Quantum Z gate
It can be verified that the Z gate satisfies the unitary condition that
I
Z
Z 
.
†































 1
0
0
1
1
0
0
0
0
0
0
1
1
0
0
1
1
0
0
1
Hadamard Gate
Hadamard gate is defined as








1
1
1
1
2
1
H
The Hadamard gate is at times considered the “square-root” of a NOT gate as it transform 0
into
2
1
0 
, which may be considered mid-way between 0 and 1 . Similarly, it transform a
1 into
2
1
0 
, which can also be described as mid-way between 0 and 1 .
Thus the state 1
0 
  is transformed as





















 





2
1
1
1
1
1
2
1
Hadamard gate
Relationship between Hadamard and Pauli gates
There is an algebraic relation between the Hadamard and Pauli matrices,
2
Z
X
H























 1
0
0
1
2
1
0
1
1
0
2
1
1
1
1
1
2
1
Phase Gate (or S Gate)
The Phase gate or S gate can be defined as
Z
H
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 18 | 27







i
S
0
0
1
It effect on 0 is
S 0 = 




























0
1
0
0
0
1
0
1
0
0
1
i
0
i.e output is 0
It effect on 1 is
S 1 = 1
1
0
0
0
0
0
1
0
0
0
1
i
i
i
i
i




































i.e output is 1
i
S( 1
0 
  )= 













i
0
0
1
= 









i
0
0
= 







i
= 1
0 
 i

i.e out put is 1
0 
 i

Truth table of S gate
Input Out put
0 0
1 1
i
1
0 
  1
0 
 i

Input 1
0 
  Output 1
0 
 i

S gate
S gate satisfies the unitary condition that
I
S
S 
.
†






























 1
0
0
1
1
0
0
0
0
0
0
1
0
0
1
0
0
1
i
i
T Gate
T gate is defined as follows








 





4
0
0
1

i
e
T
It is also referred as the /8 gate since it can also be expressed as
S
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 19 | 27






























8
8
8
0
0



i
i
i
e
e
e
T
If input is 0 , then the output is
T 0 = 0
0
1
0
1
0
0
1
4





















 
i
e
i.e. the state 0 , means same state.
If input is 1 , then output is
T 1 = 1
0
1
0
0
0
1
4
4
4

















 
















 


i
i
i e
e
e
i.e. the state 1
4





 
i
e .
It transforms the state 1
0 
  as
T( 1
0 
  )= 1
0
0
0
1
4
4
4

















 

















 

 




 i
i
i e
e
e
To 1
0 4










i
e .
Truth table of T gate
Input Out put
0 0
1
1
4





 
i
e
1
0 
 
1
0 4










i
e
Relation between S and T gates
There is an algebraic relation between T and S gates
S=T2






i
0
0
1
= 


































i
e
e
i
i
0
0
1
0
0
1
0
0
1
4
4


Multiple Qubit Gates
We can generalize from single qubit to multiple qubit gates. Examples of classical multiple
input gates include AND, OR, XRO, NAND, NOR etc. Similarly we have multiple qubit gates.
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 20 | 27
A controlled gate is one in which the operation is of the kind “If A is true, then do B”. A is
usually refered to as the control qubit and B as the target qubit. If the control qubit is 0,then the
target qubit is not altered. If the control qubit is 1, then the target qubit is transformed. Hoever,
the control qubit remains unaltered in both the cases.
Controlled gate, CNOT Gate, (Discussion for 4 different input states).
The multi-qubit quantum logic gate is the controlled NOT or CNOT gate. The circuit of the
CNOT gate is shown in figure. The gate has two input qubits. (1) Control qubit and (2) Target
qubit.
Control qubit
Target qubit
Figure. CNOT gate
If the control qubit of the gte is set to 0, then the target qubit is not altered. If the control qubit
is set to 1, then the target qubit is inverted. Figure shows a control gate with the control qubit
a and target qubit b .
(1) Input state 0
0 (Control qubit = 0, Target qubit = 0)
Both the bits remain unaltered. Hence, the output state is the same as the input state or
0
0
0
0 
(2) Input state 1
0 (Control qubit = 0, Target qubit = 1)
Both the bits remain unaltered. Again, the output state is the same as the input state or
1
0
1
0 
(3) Input state 0
1 (Control qubit = 1, Target qubit = 0)
The target qubit is flipped to 1. Therefore, the output state has both qubits 1, or
1
1
0
1 
(4) Input state 1
1 (Control qubit = 1, Target qubit = 1)
a
b
a
a
b 
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 21 | 27
The target qubit is flipped to 0. Therefore, the output state becomes 0
1 , or
0
1
1
1 
CNOT can be represented in the matrix form as













0
1
0
0
1
0
0
0
0
0
1
0
0
0
0
1
CN
U
The matrix representation is written with respect to the amplitude for 0
0 , 1
0 , 0
1 and 1
1
in that order. Thus the first column describes the transformation that occurs to 0
0 and so on.
The output state Y can also be understood as









































1
1
0
1
1
0
0
0
0
1
0
0
1
0
0
0
0
0
1
0
0
0
0
1
1
1
0
1
1
0
0
0
Y
The CNOT gate can be regarded as a type of generalized XOR gate since the action of the gate
can be considered as
a
b
a
b
a 
 ,
,
Where  stands for module-2 addition, which is the same as that achived by a XRO gate. In
other words, the control qubit and the target qubit are XROed and stored in the target qubit.
00
0
0
0
1
0
0
0
1
0
1
0
0
1
0
0
0
0
0
1
0
0
0
0
1
00 






































CN
U
01
0
0
1
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
1
0
0
0
0
1
01 






































CN
U
11
1
0
0
0
0
1
0
0
0
1
0
0
1
0
0
0
0
0
1
0
0
0
0
1
10 






































CN
U
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 22 | 27
10
0
1
0
0
1
0
0
0
0
1
0
0
1
0
0
0
0
0
1
0
0
0
0
1
11 






































CN
U
Truth table of a CNOT gate
Input Out put
0
0 0
0
1
0 1
0
0
1 1
1
1
1 0
1
UCN gate satisfies the unitary condition that
I
U
U CN
CN 
.
†





































1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
1
0
0
1
0
0
0
0
0
1
0
0
0
0
1
0
1
0
0
1
0
0
0
0
0
1
0
0
0
0
1
Swap gate,
The swap gate is a simple quantum circuit containing three quantum gates. 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 particle of light to move from one location to another space.













1
0
0
0
0
0
1
0
0
1
0
0
0
0
0
1
SWAP
U
Swap gate equivalent schematic symbol notation
The output of the first CNOT gate is b
a
a
b
a 
 ,
, .
This is fed as input to the second gate which also does modulo 2 addition but the result is placed
in the first qubit now.
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 23 | 27
Its output becomes   b
a
b
b
a
b
a
a 



 ,
,
),
This is now fed to the third gate which performs modulo 2 addition and places the result in the
second qubit.
The output finally becomes   a
b
b
b
a
b ,
,
)
, 

 .
Thus, the overall effect is that the two qubits have been swapped.
Note: Matrix representation of













0
0
0
1
00 ,













0
0
1
0
01 ,













0
1
0
0
10 and













1
0
0
0
11
00
0
0
0
1
0
0
0
1
1
0
0
0
0
0
1
0
0
1
0
0
0
0
0
1
00 






































SWAP
U
10
0
1
0
0
0
0
1
0
1
0
0
0
0
0
1
0
0
1
0
0
0
0
0
1
1
0 






































SWAP
U
01
0
0
1
0
0
1
0
0
1
0
0
0
0
0
1
0
0
1
0
0
0
0
0
1
10 






































SWAP
U
11
1
0
0
0
1
0
0
0
1
0
0
0
0
0
1
0
0
1
0
0
0
0
0
1
11 






































SWAP
U
Truth table of a swap gate
Input Out put
0
0 0
0
1
0 0
1
0
1 1
0
1
1 1
1
Controlled -Z gate
The controlled-Z gate is another example of a controlled gate, i.e. gates in which the operation
is of the kind “If A is true, then do B”.
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 24 | 27
Fig. Contolled Z-Gate
The action of a controlled Z-gate is specified as follows.














1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
Z
U
Truth table of a controlled Z-gate
Input Out put
0
0 0
0
1
0 1
0
0
1 0
1
1
1 1
1

00
0
0
0
1
0
0
0
1
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
00 







































Z
U
01
0
0
1
0
0
0
1
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
01 







































Z
U
10
0
1
0
0
0
1
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
10 







































Z
U
Z
Control qubit
Target qubit
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 25 | 27
11
1
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
11 









































Z
U
Toffoli gate (CCNOT, CCX, TOFF)
Any classical logic cicuit can be build using a quantum circuit. Any classical circuit can be
replaced by an equivalent circuit containing only reversible element, by using a reversible gate
called Toffoli Gate.
Fig. Toffoli gate
The Toffoli gate has three input bits ( a , b and c ) and three output bits ( a , b and c ).
The first two bits are control bits which remain unaffected by the action of the Toffoli gate.
The third is the target bit which is inverted if both the control bits are 1; else it is left unchanged.
Input Output
a b c a b c
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
The Toffoli gate can be expressed as an 8 by 8 matrix as follows
a
b
Control qubit
Target qubit
Control qubit
c
a
b
ab
c 
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 26 | 27



























0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
T
U
It can be verified that this matrix is unitary and thus the Toffoli gate is a legitimate quantum
gate. The quantum Toffoli gate can be used to simulate irreversible classical logic gates and
ensures that quantum gates are capable of performining any computation that a classical
computer can do.
I
U
U T
T 
.
†















































































1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
Toffoli gate is its Own Inverse.
The Toffoli gate is its own inverse since applying it once to the input, c
b
a ,
, gives the output,
ab
c
b
a 
,
, .
Applying it to another Toffoli gate gives the output
c
b
a
ab
ab
c
b
a ,
,
)
(
,
, 


As the modulo-2 sum of a number with itself gives 0. Hence, the Toffoli gate is a reversible
gate and is its own inverse.
BMS Institute of Technology and Management 22PHYS12
Department of Physics P a g e 27 | 27

Mais conteúdo relacionado

Semelhante a Quantum computing notes_DN_30 1 2023.pdf

Introduction to Quantum Computing
Introduction to Quantum ComputingIntroduction to Quantum Computing
Introduction to Quantum ComputingGDSC PJATK
 
Electromagnetic Field Theory Lecture Notes
Electromagnetic Field Theory Lecture NotesElectromagnetic Field Theory Lecture Notes
Electromagnetic Field Theory Lecture NotesFellowBuddy.com
 
Fundamentals of quantum computing part i rev
Fundamentals of quantum computing   part i revFundamentals of quantum computing   part i rev
Fundamentals of quantum computing part i revPRADOSH K. ROY
 
Modelos de Redes Neuronales
Modelos de Redes NeuronalesModelos de Redes Neuronales
Modelos de Redes NeuronalesCarlosNigerDiaz
 
Study on Transmission Probabilities for Some Rectangular Potential Barriers
Study on Transmission Probabilities for Some Rectangular Potential BarriersStudy on Transmission Probabilities for Some Rectangular Potential Barriers
Study on Transmission Probabilities for Some Rectangular Potential Barriersijtsrd
 
International Refereed Journal of Engineering and Science (IRJES)
International Refereed Journal of Engineering and Science (IRJES)International Refereed Journal of Engineering and Science (IRJES)
International Refereed Journal of Engineering and Science (IRJES)irjes
 
23125135 the-basics-of-nmr
23125135 the-basics-of-nmr23125135 the-basics-of-nmr
23125135 the-basics-of-nmrdharma281276
 
Characterization Of Switchable And Multilayered FSS Circuits Using The WCIP M...
Characterization Of Switchable And Multilayered FSS Circuits Using The WCIP M...Characterization Of Switchable And Multilayered FSS Circuits Using The WCIP M...
Characterization Of Switchable And Multilayered FSS Circuits Using The WCIP M...IJERA Editor
 
Quantum Computing
Quantum ComputingQuantum Computing
Quantum ComputingAmr Mohamed
 
Bp219 2011
Bp219 2011Bp219 2011
Bp219 2011waddling
 
1 Aminullah Assagaf_Estimation-of-domain-of-attraction-for-the-fract_2021_Non...
1 Aminullah Assagaf_Estimation-of-domain-of-attraction-for-the-fract_2021_Non...1 Aminullah Assagaf_Estimation-of-domain-of-attraction-for-the-fract_2021_Non...
1 Aminullah Assagaf_Estimation-of-domain-of-attraction-for-the-fract_2021_Non...Aminullah Assagaf
 
Chemical dynamics and rare events in soft matter physics
Chemical dynamics and rare events in soft matter physicsChemical dynamics and rare events in soft matter physics
Chemical dynamics and rare events in soft matter physicsBoris Fackovec
 
Problems and solutions statistical physics 1
Problems and solutions   statistical physics 1Problems and solutions   statistical physics 1
Problems and solutions statistical physics 1Alberto de Mesquita
 

Semelhante a Quantum computing notes_DN_30 1 2023.pdf (20)

Introduction to Quantum Computing
Introduction to Quantum ComputingIntroduction to Quantum Computing
Introduction to Quantum Computing
 
Electromagnetic Field Theory Lecture Notes
Electromagnetic Field Theory Lecture NotesElectromagnetic Field Theory Lecture Notes
Electromagnetic Field Theory Lecture Notes
 
8_06_Paper
8_06_Paper8_06_Paper
8_06_Paper
 
Dynamics
DynamicsDynamics
Dynamics
 
Fundamentals of quantum computing part i rev
Fundamentals of quantum computing   part i revFundamentals of quantum computing   part i rev
Fundamentals of quantum computing part i rev
 
Ab initio md
Ab initio mdAb initio md
Ab initio md
 
Modelos de Redes Neuronales
Modelos de Redes NeuronalesModelos de Redes Neuronales
Modelos de Redes Neuronales
 
Study on Transmission Probabilities for Some Rectangular Potential Barriers
Study on Transmission Probabilities for Some Rectangular Potential BarriersStudy on Transmission Probabilities for Some Rectangular Potential Barriers
Study on Transmission Probabilities for Some Rectangular Potential Barriers
 
International Refereed Journal of Engineering and Science (IRJES)
International Refereed Journal of Engineering and Science (IRJES)International Refereed Journal of Engineering and Science (IRJES)
International Refereed Journal of Engineering and Science (IRJES)
 
23125135 the-basics-of-nmr
23125135 the-basics-of-nmr23125135 the-basics-of-nmr
23125135 the-basics-of-nmr
 
Characterization Of Switchable And Multilayered FSS Circuits Using The WCIP M...
Characterization Of Switchable And Multilayered FSS Circuits Using The WCIP M...Characterization Of Switchable And Multilayered FSS Circuits Using The WCIP M...
Characterization Of Switchable And Multilayered FSS Circuits Using The WCIP M...
 
Quantum Computing
Quantum ComputingQuantum Computing
Quantum Computing
 
Bp219 2011
Bp219 2011Bp219 2011
Bp219 2011
 
Bp219 2011-4.13
Bp219 2011-4.13Bp219 2011-4.13
Bp219 2011-4.13
 
1 Aminullah Assagaf_Estimation-of-domain-of-attraction-for-the-fract_2021_Non...
1 Aminullah Assagaf_Estimation-of-domain-of-attraction-for-the-fract_2021_Non...1 Aminullah Assagaf_Estimation-of-domain-of-attraction-for-the-fract_2021_Non...
1 Aminullah Assagaf_Estimation-of-domain-of-attraction-for-the-fract_2021_Non...
 
Chemical dynamics and rare events in soft matter physics
Chemical dynamics and rare events in soft matter physicsChemical dynamics and rare events in soft matter physics
Chemical dynamics and rare events in soft matter physics
 
Andreev levels
Andreev levelsAndreev levels
Andreev levels
 
Quantum Noise and Error Correction
Quantum Noise and Error CorrectionQuantum Noise and Error Correction
Quantum Noise and Error Correction
 
Problems and solutions statistical physics 1
Problems and solutions   statistical physics 1Problems and solutions   statistical physics 1
Problems and solutions statistical physics 1
 
MD_course.ppt
MD_course.pptMD_course.ppt
MD_course.ppt
 

Último

Machine Learning 5G Federated Learning.pdf
Machine Learning 5G Federated Learning.pdfMachine Learning 5G Federated Learning.pdf
Machine Learning 5G Federated Learning.pdfadeyimikaipaye
 
priority interrupt computer organization
priority interrupt computer organizationpriority interrupt computer organization
priority interrupt computer organizationchnrketan
 
Novel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsNovel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsResearcher Researcher
 
10 AsymmetricKey Cryptography students.pptx
10 AsymmetricKey Cryptography students.pptx10 AsymmetricKey Cryptography students.pptx
10 AsymmetricKey Cryptography students.pptxAdityaGoogle
 
The Satellite applications in telecommunication
The Satellite applications in telecommunicationThe Satellite applications in telecommunication
The Satellite applications in telecommunicationnovrain7111
 
Detection&Tracking - Thermal imaging object detection and tracking
Detection&Tracking - Thermal imaging object detection and trackingDetection&Tracking - Thermal imaging object detection and tracking
Detection&Tracking - Thermal imaging object detection and trackinghadarpinhas1
 
Substation Automation SCADA and Gateway Solutions by BRH
Substation Automation SCADA and Gateway Solutions by BRHSubstation Automation SCADA and Gateway Solutions by BRH
Substation Automation SCADA and Gateway Solutions by BRHbirinder2
 
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHTEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHSneha Padhiar
 
input buffering in lexical analysis in CD
input buffering in lexical analysis in CDinput buffering in lexical analysis in CD
input buffering in lexical analysis in CDHeadOfDepartmentComp1
 
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptx
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptxTriangulation survey (Basic Mine Surveying)_MI10412MI.pptx
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptxRomil Mishra
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionSneha Padhiar
 
Analysis and Evaluation of Dal Lake Biomass for Conversion to Fuel/Green fert...
Analysis and Evaluation of Dal Lake Biomass for Conversion to Fuel/Green fert...Analysis and Evaluation of Dal Lake Biomass for Conversion to Fuel/Green fert...
Analysis and Evaluation of Dal Lake Biomass for Conversion to Fuel/Green fert...arifengg7
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosVictor Morales
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxStephen Sitton
 
Livre Implementing_Six_Sigma_and_Lean_A_prac([Ron_Basu]_).pdf
Livre Implementing_Six_Sigma_and_Lean_A_prac([Ron_Basu]_).pdfLivre Implementing_Six_Sigma_and_Lean_A_prac([Ron_Basu]_).pdf
Livre Implementing_Six_Sigma_and_Lean_A_prac([Ron_Basu]_).pdfsaad175691
 
Uk-NO1 kala jadu karne wale ka contact number kala jadu karne wale baba kala ...
Uk-NO1 kala jadu karne wale ka contact number kala jadu karne wale baba kala ...Uk-NO1 kala jadu karne wale ka contact number kala jadu karne wale baba kala ...
Uk-NO1 kala jadu karne wale ka contact number kala jadu karne wale baba kala ...Amil baba
 
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewsandhya757531
 
Javier_Fernandez_CARS_workshop_presentation.pptx
Javier_Fernandez_CARS_workshop_presentation.pptxJavier_Fernandez_CARS_workshop_presentation.pptx
Javier_Fernandez_CARS_workshop_presentation.pptxJavier Fernández Muñoz
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Romil Mishra
 
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSneha Padhiar
 

Último (20)

Machine Learning 5G Federated Learning.pdf
Machine Learning 5G Federated Learning.pdfMachine Learning 5G Federated Learning.pdf
Machine Learning 5G Federated Learning.pdf
 
priority interrupt computer organization
priority interrupt computer organizationpriority interrupt computer organization
priority interrupt computer organization
 
Novel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsNovel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending Actuators
 
10 AsymmetricKey Cryptography students.pptx
10 AsymmetricKey Cryptography students.pptx10 AsymmetricKey Cryptography students.pptx
10 AsymmetricKey Cryptography students.pptx
 
The Satellite applications in telecommunication
The Satellite applications in telecommunicationThe Satellite applications in telecommunication
The Satellite applications in telecommunication
 
Detection&Tracking - Thermal imaging object detection and tracking
Detection&Tracking - Thermal imaging object detection and trackingDetection&Tracking - Thermal imaging object detection and tracking
Detection&Tracking - Thermal imaging object detection and tracking
 
Substation Automation SCADA and Gateway Solutions by BRH
Substation Automation SCADA and Gateway Solutions by BRHSubstation Automation SCADA and Gateway Solutions by BRH
Substation Automation SCADA and Gateway Solutions by BRH
 
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHTEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
 
input buffering in lexical analysis in CD
input buffering in lexical analysis in CDinput buffering in lexical analysis in CD
input buffering in lexical analysis in CD
 
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptx
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptxTriangulation survey (Basic Mine Surveying)_MI10412MI.pptx
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptx
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based question
 
Analysis and Evaluation of Dal Lake Biomass for Conversion to Fuel/Green fert...
Analysis and Evaluation of Dal Lake Biomass for Conversion to Fuel/Green fert...Analysis and Evaluation of Dal Lake Biomass for Conversion to Fuel/Green fert...
Analysis and Evaluation of Dal Lake Biomass for Conversion to Fuel/Green fert...
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitos
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptx
 
Livre Implementing_Six_Sigma_and_Lean_A_prac([Ron_Basu]_).pdf
Livre Implementing_Six_Sigma_and_Lean_A_prac([Ron_Basu]_).pdfLivre Implementing_Six_Sigma_and_Lean_A_prac([Ron_Basu]_).pdf
Livre Implementing_Six_Sigma_and_Lean_A_prac([Ron_Basu]_).pdf
 
Uk-NO1 kala jadu karne wale ka contact number kala jadu karne wale baba kala ...
Uk-NO1 kala jadu karne wale ka contact number kala jadu karne wale baba kala ...Uk-NO1 kala jadu karne wale ka contact number kala jadu karne wale baba kala ...
Uk-NO1 kala jadu karne wale ka contact number kala jadu karne wale baba kala ...
 
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overview
 
Javier_Fernandez_CARS_workshop_presentation.pptx
Javier_Fernandez_CARS_workshop_presentation.pptxJavier_Fernandez_CARS_workshop_presentation.pptx
Javier_Fernandez_CARS_workshop_presentation.pptx
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________
 
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
 

Quantum computing notes_DN_30 1 2023.pdf

  • 1. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 1 | 27 Quantum computing Wave function in Ket notation A wave function in quantum physics is a mathematical description of the quantum state of an isolated quantum system. Denoted as  . The wave function is a complex-valued probability amplitude, and the probabilities for the possible results of measurements made on the system can be derived from it. Probability = 2 *    is a positive deterministic value where  is complex and *  is conjugate. Mathematically, we describe every quantum state with a vector. j i i ˆ ˆ       Its conjugate is j i i ˆ ˆ *       Then, 2 2 2 * ) ˆ ˆ ).( ˆ ˆ (                j i i j i i   is the probability Matrix form of Wave function The physical state of a system is represented in quantum mechanics by elements of a Hilbert space; these elements are called state vectors. The state vectors in different bases by means of function expansions. This is analogous to specifying an ordinary (Euclidean) vector by its components in various coordinate systems. The meaning of a vector is, of course, independent of the coordinate system chosen to represent its components. Similarly, the state of a microscopic system has a meaning independent of the basis in which it is expanded. In quantum mechanics, bra–ket notation, or Dirac notation, is used to denote quantum states. Bra–ket notation was effectively established in 1939 by Paul Dirac. A ket is of the form  Mathematically it denotes a vector, in an abstract (complex) vector space and physically it represents a state of some quantum system. The basis vector j and i ˆ ˆ can be written in matrix form as                 1 0 1 ˆ 0 1 0 ˆ j and i Then j i i ˆ ˆ      becomes 1 0    i   Then,                           i i 1 0 0 1
  • 2. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 2 | 27                            i i 1 0 0 1 * ) 1 2 ( ) 1 2 ( * . x x i i                     matrix multiplication is not possible. Orthonormal (orthogonal) matrices are matrices in which the columns vectors form an orthonormal set (each column vector has length one and is orthogonal to all the other colum vectors). Hence A matrix †  is multiplied to  gives probability. Where, T * †    i.e.,   2 2 †                   i i But    † is a bra Hence 2 2       is the probability Then according to normalization rule 1    Identity operators Identity matrix In is an n x n matrix with all diagonal entries equal to 1 and all others zero. ) 2 2 ( 1 0 0 1 x I        Determination of 0 I and 1 I Matrix representation of        0 1 0 and        1 0 1 States, 0 0 1 0 0 0 1 0 1 1 0 0 1 0                               I 1 1 0 1 0 0 0 1 0 1 0 0 1 1                               I Applying I to |0> and |1> states to show there is no change.
  • 3. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 3 | 27 Truth table for Identity matrix. Input Out put 0 0 1 1 1 0    1 0    Pauli matrices and its operation on 0 and 1 There are three extremely useful matrices called Pauli matrices that are often used in quantum computing.         0 1 1 0 X x           0 0 i i Y y           1 0 0 1 Z Z  Note: Pauli matrices satisffy the unitary condition. I Z Y X    2 2 2            0 1 1 0 X x  X 0 =             0 1 0 1 1 0 =         0 1 0 0 =       1 0 = 1 X 1 =             1 0 0 1 1 0 =         0 0 1 0 =       0 1 = 0 Y 0 =              0 1 0 0 i i =         0 0 0 i =       i 0 = 1 i Y 1 =              1 0 0 0 i i =         0 0 0 i =        0 1 i = 0 i  Z 0 =              0 1 1 0 0 1 =         0 0 0 1 =       0 1 = 0 Z 1 =              1 0 1 0 0 1 =         1 0 0 0 =       1 0 = 1 
  • 4. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 4 | 27 Hermitian matrix A hermitian matrix is a square matrix, which is equal to its conjugate transpose matrix. The non-diagonal elements of a hermitian matrix are all complex numbers. The complex numbers in a hermitian matrix are such that the element of the ith row and jth column is the complex conjugate of the element of the jth row and ith column. Mathematically, a Hermitian matrix is defined as A square matrix, A = [aij]n × n such that (A*)T = A, where (A*)T = A† is the conjugate transpose of A. Since A is Hermitian, † † AA A A  Hermitian Matrix of Order 2 x 2 If          2 2 3 2 3 1 i i A is a complex matrix,          2 2 3 2 3 1 * i i A is the complex conjugate of A.   A i i A T           2 2 3 2 3 1 * Here the non-diagonal are complex numbers. Only the first element of the first row and the second element of the second row are real numbers. Also, the complex number of the first-row second element is a conjugate complex number of the second-row first element. Unitary Matrix A matrix U of order n is said to be unitary if n I U U U U   † † . . In quantum mechanics, the conjugate transpose is referred to as the Hermitian adjoint of a matrix and is denoted by a dagger (†). The real analogue of a unitary matrix is an orthogonal matrix. Unitary matrices have significant importance in quantum mechanics because they preserve norms, and thus, probability amplitudes.
  • 5. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 5 | 27 Principles of quantum information and quantum computing. Introduction to Quantum Computing Quantum computing is a rapidly-emerging technology that harnesses the laws of quantum mechanics to solve problems too complex for classical computers. Quantum theory explains the behavior of energy and material on the atomic and subatomic levels. Quantum computing uses subatomic particles, such as electrons or photons. Quantum bits, or qubits, allow subatomic particles to exist in more than one state (i.e., 1 and 0) at the same time. Unlike a normal computer bit, which can be either 0 or 1, a qubit can exist in a multidimensional state. Theoretically, linked qubits can "exploit the interference between their wave-like quantum states to perform calculations that might otherwise take millions of years. Classical computers today employ a stream of electrical impulses (1 and 0) in a binary manner to encode information in bits. This restricts their processing ability, compared to quantum computing. The power of quantum computers grows exponentially with more qubits. Classical computers that add more bits can increase power only linearly. Moore’s law& its end Gordon Moore, the co-founder of Intel, indicated that - due to the shrinking size of transistors to the nanoscale (allowing integrated circuits to be composed of more transistors, resulting in more powerful computer systems) - every year, twice as many transistors would be able to fit onto computer chips. Hence, Moore’s Law was born. After 1975, the estimate changed to a doubling of transistors every two years. Moore's law is the observation that the number of transistors in a dense integrated circuit (IC) doubles about every two years. Moore's law is an observation and projection of a historical trend rather than a law of physics. Engineers were able to consistently create computer systems/chips with double the number of transistors, resulting in a number of more advanced technologies being developed, from smart technology, to mobile technology, to wearable technology, to faster processors, to more robust computers, to faster/more efficient data centers like cloud computing. Engineers were able to dedicate time to develop more efficient nanotechnology systems whereby transistors went from being millimeters to nanometers. However, feats in engineering and physics have been pushed
  • 6. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 6 | 27 to their limit, and while more power results in more resources and more abilities to carry out advanced tasks via computers, engineers are unable to keep pushing the limit on smaller transistors, and thus, computer systems may have reached their limit in transistor capacity and power. Hence, industry leaders are asserting that Moore’s Law has come to an end, and computers will no longer have many more transistors every year. Single particle quantum interference Quantum computing involves the concept of superposition. To understand the idea of superposition it is appropriate to know about an experiment which is concerned with a phenomenon know as single-particle quantum interference. In this experiment light from a source S falls upon an half-silvered mirror i.e., a mirror which reflects 50% of the incident light and transmits the rest 50% as shown in figure 1. The reflected light is detected by the detector D1, and the transmitted part is detected by D2. If we consider the light to be a stream of photons, then 50% of them will reach D1 and the rest 50% reach D2. If the source were to emit one photon at a slow rate, then as per probabilistic prediction, we may say that over a period of time after a number of photons were emitted, D1 would have received 50% of them and D2 the rest 50%. It means, each time a photon is emitted we assume that it is either reflected and travels along OY, or transmitted and travels along OX. Since a photon is quantised, we don’t consider it to split into two with one-half going along OY and other travelling along OX (i.e., at one time, the photon is detected by either D1 or D2, but never together). But because of the wave nature associated with the photon, the photon must a measurement is carried out it is said to collapse to cpllapse to only that path concerned to the measurement. There is a method to demonstrate this by extending the above experiment as follows. Let there be two fully silvered mirrors at two points A and B, and half silvered mirror at C such that the mirror A and B reflect the light (photons) exactly to the point C where another half silvered mirror lies. All the mirrors lie with their planes inclined at 45 to the incident light. The path length OACOCB.
  • 7. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 7 | 27 With this arrangement, after a photon leaves the source and travels-up its path here also one expects that it will be detected by either D1 or D2. However, as per quantum mechanical considerations, it is always only the detector D1 which the photon reaches and never the detector D2. This effect is explained as follows. Everytime a photon leaves the source, the two sets of waves that represent the photon existing simultaneously along the two paths, would always cancel each other before reaching D2. But those which proceed to reach D1 will reinforce and thus will be detected there. This means that the photon has in reality travelled not one but both the paths simultaneously and underwent self interference to be detected only at D1. This experiment is known as single-particle quantum interference and the fact that it exists in both the paths (states) is considered superposition. Quantum superposition and concept of qubit In a classical computer, a bit is represented by a physical quantity with two states to represent 0 and 1. It can be the voltage in a circuit (e.g. 5 V for 1 and 0 V for 0). It can be the magnetization direction in a magnetic drive (e.g. up for 1 and down for 0). It can be the charge density in the charge storage layer in the flash memory (e.g. low for 1 and high for 0). In a quantum computer, the information is represented by qubits. Like the classical bit, each qubit still has two distinct states and we say that they are orthogonal to each other because they cannot exist with 100% certainty at the same time. We also call them the basis vectors or basis states most of the time. We can still label them as “0” and “1.” In addition to the two distinct states, a qubit may also have many other states which are the superposition of the two distinct states (or the basis states). This is what is fundamentally different from the classical bit. In
  • 8. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 8 | 27 these states, the two distinct (orthogonal) basis states are allowed to exist at the same time with <100% certainty. Superposition is one of the fundamental operation principles in quantum computing. Superposition allows us to perform a calculation on multiple basis states at the same time, which is not possible in classical computing. We learned superposition in wave theory in which two wavelets can superimpose on each other. In electromagnetism, light can be polarized in any direction. Any linear polarization is just a linear combination of horizontal and vertical polarization. If we represent the horizontal polarization as a horizontal vector (Vx) and the vertical polarization as a vertical vector (Vy) any linear polarization, V, is just a linear combination of the two vectors. We can write y x V V V     where α and β are just some numbers (coefficients) and Vx and Vy are the horizontal and vertical polarization unit vectors (which are basis vectors in this case), respectively. Vx and Vy are the orthogonal states in the system. There is a genius called Dirac and he decided to write in this way y x V V V     This is called the Dirac ket notation. A qubit can be in a linear combination or superposition of the two states 0 and 1 as: 1 0      The number α and β are complex, but generally taken as real without any loss. In other words, a qubit is a vector in a two dimentional complex vector space. An example of a qubit state could be: 1 2 1 0 2 1    So a qubit can exist in a continuum states between 0 and 1 . The sum of probabilities of 0 and 1 adds to 1.
  • 9. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 9 | 27 We can examine 1 0      to find out whether it is in the state 0 or 1 . When we measure a qubit, we get either the result 0 with probability 2  or 1 with probability 2  . Naturally, the sum 1 2 2     Since the probabilities must add up to one. So we can interpret this as the condition that the qubit’s state can be normalised to length 1. A qubit’s state is therefore, a unit vector in a two- dimentional complex vector space. 1 2 1 0 2 1    When measured gives the result of 0 for 5 . 0 2 1 2 1 2   or 50% of the time and a result of 1 for 5 . 0 2 1 2 1 2   or 50% of the time. We come to the important conclusion that a qubit can exist in a coherent superposition of states 0 and 1 only till it measured upon measurement, it gives only one of the states 0 or 1 . Single and two qubits. Extension to N qubit The quantum mechanical notation of Dirac (known as Ket notation), the states of a qubit are represented as 0 and 1 as a classical bit can be in the state of 0 and 1. Any quantum data processing can be done by one and two qubit gates acting on qubits. For example, if we consider the case of two-qubit XRO (also called controlled –NOT) gate, it flips the second input provided the first input is 1 . Otherwise stays unchanged. A superposition at the stage of input gives a superposition of outputs. This is recognised as entangled state. With two such qubits, the four states of two ordinary bits can be taken at once and represented as one state. i.e., 00, 01, 10, 11 Going further, if we consider a register composed of three classical bits, then the register can store only one out of eight possible configurations given by,
  • 10. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 10 | 27 000, 001, 010, 011, 100, 101, 110, 111 One can show that, three qubits can store all eight numbers in a quantum superposition. If we keep adding qubits to the register we increase its capacity exponentially i.e., three qubit can store 8 different numbers. Four qubit can store 16 different numbers, and so on. This means, by using N qubits, any of N 2 states can be formed with just one state. Therefore, it becomes possible to perform super-parallel processing of problems which need to have N 2 inputs. This is the origin of its mega-calculating capacity. With the increase in the number of qubits, the effect grown exponentially. Ultimately for getting the answer, some kind of observation needs to be made on the quantum system serving as qubits. For the reson that the qubits are quantum mechanical nature, the answer comes out in probabilistic form. But when answer is probabilistic, it may come with different values at the end of different observations. To overcome this kind of uncertainty, a method called quantum interference will be made use of. In this method, operations are carried out such that we get answers with probabilities very near 1 (ie., it is almost certain). Classical and quantum information comparison Technically any information could be reliazed in terms of various distinctive steps that follows certain logic. For instance, in computer applications, information could be reduced in terms of bits (0 and 1). Further it could be processed in terms of logic gates (NOT, AND). But both bits and logic gates are not materials but electrical effects. However the effects manifest following certain physical laws which are classical in nature. This is classical information. Information could also be obtained through entities such as photons or nuclear spins which obey quantum information. But unlike classical information, quantum information cannot be read or copied without disturbing the system which bear them. The quantum information is realized through different possible states of a quantum system called qubits. Further processing is achieved through one-and two-qubit gate operation. It is called quantum computing. Differences between classical & quantum computing In classical computers, a bit is a fundamental unit of information, classically represented as 0 or 1 in the digital computer such as the magnetization on a hard disc or the charge on a
  • 11. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 11 | 27 capacitor. A document, for example, comprises of n-characters stored in the hard drive of a typical computer which is accordingly described by a string of 8n 0’s and 1’s. In quantum computing the concept is fundamentally different. It is neigther a capacitor nor magnetization on the disc, but a quantum system such as an atom or a photon is used to encode the information. We can choose two electronic states of an atom or two different polarization orientations of light for the two states. But as per quantum mechanics, the atom, apart from the two distinct electroic states, can be also prepared in a state which is said to be a coherent superposition of both the states. i.e., the atom can exist in state as a 0, a 1, or simultaneously both as 0 and 1. It will not be known definitely, in which of these states the atom would be. But a number called probability factor associated with the corresponding states provides the probability of the atoms existence in each of these states. Since it follows quantum principles, it becomes a quantum system and is called a quantum bit or a qubit. Thus one qubit can encode at a time both 0 and 1. If we refer to the case of light, a qubit may correspond to the superposed state of horizontal and verticle polarization of photons apart from the two individual states of polarization. Hence qubit can be defined as follows. “A qubit is a quantum bit the counterpart in quantum computing to the binary digit or bit of classical computing. Just as bit is the basic unit of information in a classical computer, a qubit is the basic unit of information in a quantum computers”. Properties of a qubit  A qubit can be in a superposed state of two states 0 and 1 .  If measurements are carried out with a qubit in superposed state then the results that we get will be probabilistic. (not deterministic as we get in bits in classical computer).  Qwing to the quantum nature, the qubit changes its state at once when subjected to measurement. This means, one canot copy information from qubits the way we do in the present computers, as there will be no similarity between the copy and the original. This is known as ‘no cloning principle’.
  • 12. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 12 | 27 Representation of qubit by Bloch sphere The Bloch sphere is a geometrical representation of pure single-qubit states as a point on the unit sphere. Operations on single qubits commonly used in quantum information processing can be represented on the Bloch sphere. The geometric representation of a qubit is done with a Bloch sphere as follows; Given an orthonormal basis, any pure state  of a two level quantum states can be written as a superposition of the basis vectors 0 and 1 . i.e., 1 0      where the coefficient of (or contribution from) each of the two basis vectors is a complex number. This means that the state is described by four real numbers. We also know from quantum mechanics that the total probability of the system has to be one: 1    or equivalently 1 2   We can write  using the following representation: 1 2 sin 0 2 cos                   i e   1 2 sin sin cos 0 2 cos                     i i.e.,        2 cos   and           2 sin sin cos     i Where     0 and   2 0  
  • 13. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 13 | 27 For 0   and 0   0   and is along +Z axis. For    and 0   1   and is along - Z axis. For 2    and 2    2 1 0 i    and is a superposition state along +Y axis. For 2    and 2 3   2 1 0 i    and is a superposition state along - Y axis. 2 1 0    and is a superposition state along +X axis. For 2    and    2 1 0    and is a superposition state along - X axis. The sphere provides a useful means of visualizing the state of a single qubit and serves as an excellent testbed for ideas about quantum computing.
  • 14. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 14 | 27 Quantum Gate A classical computer is build using an electrical circuit having wires and logic gates. Similarly, a quantum computer is built from a quantum circuit containing wires and elementary quantum gates to transmit and manipulate quantum information. Single Qubit Gates There are single bit gates in classical computing like NOT gate, which work on only a single bit. Similarly, single qubit gates are those that act on only single quantum bit. Quantum NOT Gate An analogous quantum NOT gate for qubits can be defined as a process that takes the same state 0 to the state 1 and vice versa and is the quantum analogues for the NOT gate. However in case of superposition, the quantum NOT gate acts linearly in that the sate 1 0    is taken to the state 0 1    so that the roles of 0 and 1 states have been interchanged. Pauli – X, Y and Z matrices There are three extremely useful matrices called Pauli matrices that are often used in quantum computing.         0 1 1 0 X x           0 0 i i Y y           1 0 0 1 Z Z  Note: Pauli matrices satisffy the unitary condition. I Z Y X    2 2 2    X Gate There is an easy way of representing the X gate or quantum NOT gate in matrix form, which follows the linearity of quantum gates. It is represented by the matric X as;
  • 15. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 15 | 27 Note: Matrix representation of        0 1 0 and        1 0 1         0 1 1 0 X x  X 0 =             0 1 0 1 1 0 =         0 1 0 0 =       1 0 = 1 X 1 =             1 0 0 1 1 0 =         0 0 1 0 =       0 1 = 0 If the quantum state 1 0    is written in vector notation as         then X ( 1 0    )=               0 1 1 0 =         0 0   =         = 0 1    Truth table for Pauli X gate or quantum NOT gate Input Out put 0 1 1 0 1 0    0 1    Input 1 0    otuput 0 1    X gate or Quantum NOT gate It can be verified that the X gate satisfies the unitary condition that I X X  . †                               1 0 0 1 0 1 0 0 0 0 1 0 0 1 1 0 0 1 1 0 Y gate There is an easy way of representing the Y gate in matrix form, which follows the linearity of quantum gates. It is represented by the matric Y as;          0 0 i i Y y  Y 0 =              0 1 0 0 i i =         0 0 0 i =       i 0 = 1 i X
  • 16. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 16 | 27 Y 1 =              1 0 0 0 i i =         0 0 0 i =        0 1 i = 0 i  Y ( 1 0    )=                0 0 i i =         0 0   i i =         i i = 0 1   i i  Truth table for Y gate Input Out put 0 1 i 1 0 i  1 0    0 1   i i  Input 1 0    out put 0 1   i i  Pauli Y gate It can be verified that the Y gate satisfies the unitary condition that I Y Y  . †                                 1 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 i i i i Z gate The Z gate is defined as          1 0 0 1 Z Z  Z 0 =              0 1 1 0 0 1 =         0 0 0 1 =       0 1 = 0 Z 1 =              1 0 1 0 0 1 =         1 0 0 0 =       1 0 = 1  Z ( 1 0    )=                1 0 0 1 =           0 0 =          = 1 0    Truth table for Y gate Input Out put 0 0 1 1  1 0    1 0    Y
  • 17. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 17 | 27 Input 1 0    output 1 0    Quantum Z gate It can be verified that the Z gate satisfies the unitary condition that I Z Z  . †                                 1 0 0 1 1 0 0 0 0 0 0 1 1 0 0 1 1 0 0 1 Hadamard Gate Hadamard gate is defined as         1 1 1 1 2 1 H The Hadamard gate is at times considered the “square-root” of a NOT gate as it transform 0 into 2 1 0  , which may be considered mid-way between 0 and 1 . Similarly, it transform a 1 into 2 1 0  , which can also be described as mid-way between 0 and 1 . Thus the state 1 0    is transformed as                             2 1 1 1 1 1 2 1 Hadamard gate Relationship between Hadamard and Pauli gates There is an algebraic relation between the Hadamard and Pauli matrices, 2 Z X H                         1 0 0 1 2 1 0 1 1 0 2 1 1 1 1 1 2 1 Phase Gate (or S Gate) The Phase gate or S gate can be defined as Z H
  • 18. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 18 | 27        i S 0 0 1 It effect on 0 is S 0 =                              0 1 0 0 0 1 0 1 0 0 1 i 0 i.e output is 0 It effect on 1 is S 1 = 1 1 0 0 0 0 0 1 0 0 0 1 i i i i i                                     i.e output is 1 i S( 1 0    )=               i 0 0 1 =           i 0 0 =         i = 1 0   i  i.e out put is 1 0   i  Truth table of S gate Input Out put 0 0 1 1 i 1 0    1 0   i  Input 1 0    Output 1 0   i  S gate S gate satisfies the unitary condition that I S S  . †                                1 0 0 1 1 0 0 0 0 0 0 1 0 0 1 0 0 1 i i T Gate T gate is defined as follows                4 0 0 1  i e T It is also referred as the /8 gate since it can also be expressed as S
  • 19. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 19 | 27                               8 8 8 0 0    i i i e e e T If input is 0 , then the output is T 0 = 0 0 1 0 1 0 0 1 4                        i e i.e. the state 0 , means same state. If input is 1 , then output is T 1 = 1 0 1 0 0 0 1 4 4 4                                        i i i e e e i.e. the state 1 4        i e . It transforms the state 1 0    as T( 1 0    )= 1 0 0 0 1 4 4 4                                               i i i e e e To 1 0 4           i e . Truth table of T gate Input Out put 0 0 1 1 4        i e 1 0    1 0 4           i e Relation between S and T gates There is an algebraic relation between T and S gates S=T2       i 0 0 1 =                                    i e e i i 0 0 1 0 0 1 0 0 1 4 4   Multiple Qubit Gates We can generalize from single qubit to multiple qubit gates. Examples of classical multiple input gates include AND, OR, XRO, NAND, NOR etc. Similarly we have multiple qubit gates.
  • 20. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 20 | 27 A controlled gate is one in which the operation is of the kind “If A is true, then do B”. A is usually refered to as the control qubit and B as the target qubit. If the control qubit is 0,then the target qubit is not altered. If the control qubit is 1, then the target qubit is transformed. Hoever, the control qubit remains unaltered in both the cases. Controlled gate, CNOT Gate, (Discussion for 4 different input states). The multi-qubit quantum logic gate is the controlled NOT or CNOT gate. The circuit of the CNOT gate is shown in figure. The gate has two input qubits. (1) Control qubit and (2) Target qubit. Control qubit Target qubit Figure. CNOT gate If the control qubit of the gte is set to 0, then the target qubit is not altered. If the control qubit is set to 1, then the target qubit is inverted. Figure shows a control gate with the control qubit a and target qubit b . (1) Input state 0 0 (Control qubit = 0, Target qubit = 0) Both the bits remain unaltered. Hence, the output state is the same as the input state or 0 0 0 0  (2) Input state 1 0 (Control qubit = 0, Target qubit = 1) Both the bits remain unaltered. Again, the output state is the same as the input state or 1 0 1 0  (3) Input state 0 1 (Control qubit = 1, Target qubit = 0) The target qubit is flipped to 1. Therefore, the output state has both qubits 1, or 1 1 0 1  (4) Input state 1 1 (Control qubit = 1, Target qubit = 1) a b a a b 
  • 21. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 21 | 27 The target qubit is flipped to 0. Therefore, the output state becomes 0 1 , or 0 1 1 1  CNOT can be represented in the matrix form as              0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 CN U The matrix representation is written with respect to the amplitude for 0 0 , 1 0 , 0 1 and 1 1 in that order. Thus the first column describes the transformation that occurs to 0 0 and so on. The output state Y can also be understood as                                          1 1 0 1 1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 1 0 1 1 0 0 0 Y The CNOT gate can be regarded as a type of generalized XOR gate since the action of the gate can be considered as a b a b a   , , Where  stands for module-2 addition, which is the same as that achived by a XRO gate. In other words, the control qubit and the target qubit are XROed and stored in the target qubit. 00 0 0 0 1 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 00                                        CN U 01 0 0 1 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 01                                        CN U 11 1 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 10                                        CN U
  • 22. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 22 | 27 10 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 11                                        CN U Truth table of a CNOT gate Input Out put 0 0 0 0 1 0 1 0 0 1 1 1 1 1 0 1 UCN gate satisfies the unitary condition that I U U CN CN  . †                                      1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 Swap gate, The swap gate is a simple quantum circuit containing three quantum gates. 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 particle of light to move from one location to another space.              1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 SWAP U Swap gate equivalent schematic symbol notation The output of the first CNOT gate is b a a b a   , , . This is fed as input to the second gate which also does modulo 2 addition but the result is placed in the first qubit now.
  • 23. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 23 | 27 Its output becomes   b a b b a b a a      , , ), This is now fed to the third gate which performs modulo 2 addition and places the result in the second qubit. The output finally becomes   a b b b a b , , ) ,    . Thus, the overall effect is that the two qubits have been swapped. Note: Matrix representation of              0 0 0 1 00 ,              0 0 1 0 01 ,              0 1 0 0 10 and              1 0 0 0 11 00 0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 00                                        SWAP U 10 0 1 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 1 0                                        SWAP U 01 0 0 1 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 10                                        SWAP U 11 1 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 11                                        SWAP U Truth table of a swap gate Input Out put 0 0 0 0 1 0 0 1 0 1 1 0 1 1 1 1 Controlled -Z gate The controlled-Z gate is another example of a controlled gate, i.e. gates in which the operation is of the kind “If A is true, then do B”.
  • 24. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 24 | 27 Fig. Contolled Z-Gate The action of a controlled Z-gate is specified as follows.               1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 Z U Truth table of a controlled Z-gate Input Out put 0 0 0 0 1 0 1 0 0 1 0 1 1 1 1 1  00 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 00                                         Z U 01 0 0 1 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 01                                         Z U 10 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 10                                         Z U Z Control qubit Target qubit
  • 25. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 25 | 27 11 1 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 11                                           Z U Toffoli gate (CCNOT, CCX, TOFF) Any classical logic cicuit can be build using a quantum circuit. Any classical circuit can be replaced by an equivalent circuit containing only reversible element, by using a reversible gate called Toffoli Gate. Fig. Toffoli gate The Toffoli gate has three input bits ( a , b and c ) and three output bits ( a , b and c ). The first two bits are control bits which remain unaffected by the action of the Toffoli gate. The third is the target bit which is inverted if both the control bits are 1; else it is left unchanged. Input Output a b c a b c 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 The Toffoli gate can be expressed as an 8 by 8 matrix as follows a b Control qubit Target qubit Control qubit c a b ab c 
  • 26. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 26 | 27                            0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 T U It can be verified that this matrix is unitary and thus the Toffoli gate is a legitimate quantum gate. The quantum Toffoli gate can be used to simulate irreversible classical logic gates and ensures that quantum gates are capable of performining any computation that a classical computer can do. I U U T T  . †                                                                                1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 Toffoli gate is its Own Inverse. The Toffoli gate is its own inverse since applying it once to the input, c b a , , gives the output, ab c b a  , , . Applying it to another Toffoli gate gives the output c b a ab ab c b a , , ) ( , ,    As the modulo-2 sum of a number with itself gives 0. Hence, the Toffoli gate is a reversible gate and is its own inverse.
  • 27. BMS Institute of Technology and Management 22PHYS12 Department of Physics P a g e 27 | 27