so first we have all ready looked at this the idea of computing and in that we are used
to these kinds of computers where the basic idea remains the same which was concede way
back in nineteen thirty six before the computers actually existed showing that a computer essentially
is a device which uses limitless memory and a scanner to scan the memory backward and
forward and read it by symbol to symbol and write additional symbols to execute any computation
thats the turing machine ok the whole idea of this principle still works and its the
same one which is given for this computer so that is the basic idea behind the concept
of any classical computer ok so the classical computer has some limitations
even the fact you can have limitless parallel computers they which can do really complex
work but they are basically complex turing engines which employ multiple computing
modules dealing with pieces of incoming data which are chunks of bytes instru[ctions] instructions
etcetera but there are problems which are beyond the competence of a universal turing
machine for example we cannot predict whether a program will terminate and this is the halting
problem so famous one and then there is this classes of problems which have been delineated
and are solvable for example in polynomial or exponential time and those whose answers
are checkable in polynomial time so these are the classes which will be looking
at so these are n so if anything can be solved in n polynomials then its a problem
which is to be looked at in this fashion but as these so this is an n p problem but as
these become larger and larger it becomes more difficult so will be looking into these
things more and more and we have also discussed about moores law before which was given by
gordon moore who is a founder of intel cofounder of intel who who made an implicit statement
based on the fact that he saw that the number of transits for chips essentially doubled
every eighteen months and this tendency of the computer world has kept on going since
the beginning of the computers for a very long time and thats kind of very interesting
because now we are talking about switching which are at very smalt scales and the current
v l s i the very small very large scale integrated circuits thats v l s i can be a
small as a few tends of a micron and even smaller actually they have reached nanometer
scales so the principles of quantum mechanics are
going to come and in the spirit of feynman the mystery associated with quantum mechanics
is something which you perhaps cannot really explain but what you can do is you can just
look at it how it works because you cannot really in his words we cannot make the mystery
go away by explaining it so thats how you look at it and this was done this is this
is famous statement with respect to the double slit experiment where interference fringe
sent things were found for the first time so in terms of quantum mechanics the beginning
or basically the use of quantum mechanics in computers started in nineteen eighty
one where this statement was made that the classical turing machine would probably experience
an exponential slowdown because of the probability issues as you become smaller and the immediate
other side of the story was there the quantum system with many particles is described by
hilbert space whose dimensions are exponentially large in the number of particles which means
that it can utilized for its advantages and this statement that this has its benefits
ops you know what happened sorry this as its benefits where described in a conference
called cleo in this nineteen eighty one so its in nineteen eighty one cleo conference
feynman first coined the term which is quantum computer
then david deutsch in nineteen eighty four proposed the idea of universal quantum
computer took a it was quite soon that this idea was brought out and the qubits required
were the number of particles in the system thats how it was defined and in then it when
through a lot of developments and about a decade later satellite talked about a
standard quantum computer which can be programmed to stimulate local quantum systems efficiently
so this was one of the important statements that he was able to make and he was able to
show he was a able to take a stock of all the developments over the more than a decade
by the time and showed that it quantum computers has been extend extended to larger classes
of quantum systems so well quantum mechanics essentially are
systems which involve electrons protons neutrons photon quarks neutrinos any of them can be
our potential qubit in some sense and its a system of laws that describes the behavior
of such objects so this was predicted way back then that by twenty twenty we will store
one bit of data on objects of that size not sure we are there yet but well not too
far from twenty twenty either so let see what happens
so the one of the interesting concepts of quantum mechanics is that the atoms size objects
behave in unusual ways because their state is generally unknown at any given point of
time and changes if you try to observe it now this is a very important aspect of quantum
mechanics which is different from classical works in a classical object whatever you have
the solution is there in a quantum object unless you measure it you dont know what it
is and secondly if you measure it you cannot be sure that its the same thing that you measure
because the act of measurement changes it so there is also this principle of standardization
which exists in this quantum world and simultaneously several properties of the
systems of such systems can be manipulated and measured simultaneously thats one of the
other advantages of this so anyway these are the motivations as to how you would be going
and why you would be going quantum and we have done this in class i am just going to
re iterate here a it to bring you up to speed one is that as we go smaller to avoid waste
wastage in time energy etcetera because as we go smaller the time taken to travel goes
lesser so wastage of time is lesser energy required in dissipation goes down and so eventually
go to quantum so thats the thats the way of looking at it the other option is that in
order to be energetically most favorable you want to act reversibly that comes from thermodynamic
principles that gives minimum energy loss and the biggest important point is turing
machine is not reversible but the quantum evolution is reversible ok
so a classical bit again the other important thing which is different is a classical bit
an either be one or zero however a two state quantum system can be in an arbitrary number
of superpositions a all such states can be processed at once in quantum operations right
so for example this continuously the system getting tipped is an example of a superposition
principle so while classical essentially means either one or the other in a spin system in
quantum systems it is a continuous tipping kind of a situation where in the middle wherever
whatever you are you can see them so those are our superposition states and we can used
them so there is this concept of hidden variables
in physics which have been used quite often to even talk about these a superposition and
in between conditions but we not need not worry about this right now it was assumed
that quantum systems essentially meant that they were lots of variables which you cannot
see and they were called hidden variables is one of the concepts of quantum physics
or foundations of quantum mechanics but it was found that just by thinking that there
are hidden variables you can explain quantum mechanics that didn't work similarly a quantum
process also therefore will not perhaps be reduced to a turing machine
but on the other hand we will be discussing something called a quantum turing machine
which will be an analog to the world of computers that we know it ok so the definition of quantum
computing which will use is manipulation of quantum mechanical systems for information
processing and so there are two terms here so let us be clear one is quantum computing
and the other one is quantum computer please remember they are not the same thing its like
noun and adjective you dont want to use a noun implies noun objective and vice versa
a quantum computer is the noun and the computing is actually the adjective so the act of manipulation
where do have actually act of manipulation is the quantum mechanical system for information
processing that is quantum computing whereas computer quantum computer is a device that
processes information in a quantum mechanically coherent fashion and so it could do it could
performs certain types of calculations now its important to mention this certain types
of calculations not that we have going to at least at this point of time say that for
every class of calculation it will be better but for certain parts it can be far more efficient
and this is again the example of how they look different in bits you can either be here
or there whereas in quantum bit or qubit you could be anywhere in between and all possibilities
of these betweens exist which is sought of not an issue for the bit case
so interestingly way back in nineteen eight two feynman essentially looked at quantum
computing from a different perspective he was not thinking in terms of a computer that
can be faster or something he basically looked at it saying that since all natural processer
processes are at the base or at the fundamental level quantum mechanical you can by using
quantum computing realistically stimulate quantum systems that was his basic principle
and his basic interest being a physicist of his kind so that was his main idea that you
could stimulate quantum systems in the most appropriate fashion once a quantum computer
is here that's his way of looking at it the first realistic application game as late as
nineteen nineteen four by shor peter shor showed that it is possible to actually
find the primes or basically factorize integers into their primes in a much faster
way then it is possible by any foreseeable classical computer because there is the place
where you can see an exponential speedup by using a quantum computers
so who will do this particular problem and the other important place right after this
which became very popular is the grovers algorithm which basically searches database
now you might thing that you know this speedup of this is not as much as a shors algorithm
but it is usually popular because most of the problems that you have in a quantum computer
finally boils down to a such problem because in most cases what happens is you come down
to a point when you would say the answer exists once you say an answer exists its essentially
a search problem of finding the answer ok and the best part is when you can say that
there is only a single answer and if you say that then this is perhaps the most important
problems the most important algorithm that you need need to use and therefore grovers
algorithm although maybe not the most effective way of quantum computing but its also one
of the most popular approaches of quantum computing
however the i should mention that these nineteen nineteen four work of shor is a by far the
most complete application of quantum computing and also is one of the most important basis
of cryptography some of the applications today that is being already done in the defense
labs is some of the countries around the world is due to the fact that this factorization
to give raise to this extreme security is possible because of this particular principle
of shors algorithm which gives raise to exponential speedup
ok now the basic idea of qubit is that the case where the quantum system with exactly
two degrees of freedom ok now let me also point out that i am giving you the picture
which is an evolved picture in the nineteen eighties people were not really concerned
about just the two degrees of freedom when the first idea came and the ideas of superposition
and entanglement came became clear people wanted to use many degrees of freedom but
soon it turned out that in order to maintain the language which can be continuous between
the computer scientist as well as the rest of the community developing this so this has
a lot of people in this area your q c essentially is represented in one side by computer scientist
mathematicians and on the other side by mostly physicist
and some very odd people who are interested in physics for example setloit he is a mechanical
engineer so all of these different people who had an inclination of physics understanding
or interest in physics have also contributed hugely in this but in order to make sure that
the community understands each other quite well more to say that the computer scientist
are able to finally able to use and make it or compare it with the classical computing
it was decided that the two degrees of freedom should be the benchmark because classical
computers essentially still realize this based on that binary principle so we will be using
the same principle to go between zero and one i mention this right away here because
that is a large and we will perhaps look at it in some point of the other is a large number
of work body of work which is also parallely developed into having multiple states or
multiple degrees utilized for quantum computing very often those are known as qudits
ok anything more than two one when it goes is called qudit that's a typical area of
development which is also happened and people have shown that you could use qudits to do
computing without any problem its like saying if you have is like having a decimal
system verses a binary system and so on and so forth you can have more than just two so
just to clarify now once you say two degrees of freedom then there are some very common
ones to look at one is say for example the hydrogen atom ground in the excised state
these are the quantum states spin half system and that can be in electron positron a nuclei
any of these would work right so thats the situations the state of the qubit is generally
as we mentioned superposition of two basis states
so here the starting point is our basis states so thats coming from quantum mechanics
we have been looking at the basics of quantum mechanics before so we have all ready know
that the everything starts off with basis states and here we are basically confining
ourselves to the two basis states that we start of with the rest state and the excited
state are the basis states of hydrogen atom for example the rest or initially ground it
can be anything for example again in the spin case the spin up and spin down are the states
that a basis states of the spin half electron now based on these you can have the vector
picture which we discussed which is essentially the idea of dirac and he used this bracket
notation a essentially representing the arrow going one way verses the other and very effectively
using this pictorial principles to develop the entire shorthand math associated with
this entire process a the reason for the rap to develop this was he was the first want
to do the entire relativistic quantum mechanics and with the help of using relativistic quantum
mechanics he was able to for the first time show the spin quantum number to appear
and not adhoc put in as was done in the non relativistic scheme scheme
so those of you who have done relativistic quantum mechanics you all ready know what
i am talking about so for relativistic quantum mechanics this was critical to be able to
develop the ideas of shorthand notation so it was important to develop the shorthand
notations to take care of the entire math that was going to go ahead with it simply
put its a much easier way of looking at the entire problem there are certain notions
that you go by doing this one is to say that the basis states for each qubit can be written
as zero and one for instance and then each of them is associated with some probability
or some amplitude factor and they can be all complex so for example alpha and beta as long
as they the square of them add up to one you are allowed to take any complex number for
them so thats how you bring in quantum mechanics
so at the very beginning whoever is entering this field for them its important to notice
the main difference between the classical system verses a quantum system even here in
terms of writing out the linear way of writing everything out is the fact that we invoke
complex numbers for the amplitudes ok and so these numbers by themselves really have
no physical understanding no physical meaning only when you square them then they start
having some meaning ok so you get the feeling as to how probability
is associated with the square and not just the amplitudes so we can use any kind of a
basis sets instead of zero and one we can use any other one as long as we can distinguish
them the basis states are typically are chosen in terms of orthogonal vectors the reason
being the inner product of the two vectors then are determined or are confirmed to be
always zero when you take orthogonal right this is always going to work
so you setup the problem this way so you could also use a plus minus notations for this and
you can go from one basis set to the other this is basis set transforms again something
each you have done quantum mechanically many times for simple simple cases its just
a rotation for instance here we are showing an example of a forty five degree rotation
from the original orthogonal states of one and zero to plus and minus which are off
by forty five degrees and you can just easily rotate one to get to the other ok so this
is the qubit rotation in some sense so this in a itself whenever you look at in a answer
or situation like this you are going to visualize what it means so here is our first example
of an operation why is it important because these are the operations that form the basis
of how you are going to develop your computer so just this very simple idea that you can
actually rotate a basis set gives you the first principle idea of an operation in a
quantum sense now when you have more then one qubit then
their internally arrangement gives raise to many more conditions so for instance if we
know the individuals states of electrons of a system given below so these are three electrons
let say they are individual representation on the basis of how they are would give raise
to the three different possibilities of representing them right so i could always write my different
way functions psi one psi two psi three with amplitude factors in such a way that will
give me raise to three different way function they can be as simple as zero and one amplitudes
which give raise to either one of the other state as it is being represented here or it
could be much more complex so if we write it like this very simply and we ask the question
what is the overall state of the three particle system then will be able to look at their
composite products as their solution ok and these composite products are tensor
products they are not anything else but tensor products so this is again a definition here
so the inner product was the term where we used the basis states to tell that they were
orthogonal right so zero and one when they formed orthogonal set their inner product
was zero but when i actually taken outer product which is representing the final state of all
these different qubits that i have taken that is my outer product and so this is so my final
state psi is essentially an outer product of all these three different states that
i have which is a tensor product and that gives raise to the state and so this is very
different from the inner product for any two states if i take an inner product
that is not going to be the same as the outer product so if i want to write if i take the
phi and psi for instance if i want to write this is my inner product as i have mentioned
here then the outer product will essentially be phi and psi this is my representation which
corresponds to right thats what it means so the tensor products are written in this way
i could also as well represent this psi one psi two psi three this is the shorthand notation
which goes outer product inner product and this is how they go ok
now in this particular case where this was just set it up like this we will finally
find that my state psi is going to be just represented by a state which is one zero one
which is a tensor product of the states corresponding to each of them ok
now thats how you represent states next important thing which we would like to understand
is the concept of gates so the first thing we discussed was qubits first thing is quantum
mechanics and classical mechanics concept to computer the very basics of it these are
how we built then we looked at what is the qubit we defined qubits and we specifically
mentioned the way we are going then we came to a point where we looked at the way the
qubits are defined in terms of when you have multiple of them and then its also looked
at to say whether we are going to take in a products on outer products what does them
what do they mean inner products typically are projections outer products are basically
the final state ok when you have multiple of them and thats what we looked at
now when we are going to see what can you do with them thats when we are going to do
the quantum gates now it can be parallel to the idea of a classical gate in terms of the
classical computing a gate is an operation on a unit of data where in our particular
case it is a qubit in this particular case right a quantum gate is represented by a matrix
that may be applied to a state vector now you can already see why it is a matrix because
you are now looking at states which were being represented as vectors which are also essentially
single order matrices so if you want to operate on them and change to another one
you need a matrix most of in this square matrices so quantum gates are essentially often square
matrices which can give raise to the vectors changing into the states that you would like
now we will talk about this is more detail later but for now lets look at some of the
examples of commonly used gates now this is important case so let us start with some
of the gates here one of them is called the hadamard gate and they are represented by
different notations unfortunately the hadamard gate representation is h which is
very close to an hamiltonian therefore please note for this class we will be using
the hamiltonian in the cursory manner ok so this will represent hamiltonian because
we are used to using hamiltonian for generating energy whereas for the hadamard gate will
be using the h regular h capital h then there are these very important pauli gates so what
are these pauli gates ok so i will come to them the next one is the pauli gate which
is also very important and the first gate which is of consequence to an actual computing
is the controlled not gate ok so we will go by them quickly to understand how these goes
so as an example for the classical case so this is a parallel that you are building the
simplest boolean gate is not so for the simplest case of a single qubit what is it we put in
one case and we get out the opposite of them as a not gate whatever you put in the opposite
comes out so if you go up it will come out as down and so on and so forth so zero one
goes in and you get one zero now one of the very important things to remember is that
in quantum gates however you have define it only not only on the basis of the equivalents
of zero and one but also on the basis of their superposition
now this is one very important point that you have to remember just by looking at the
final outcome which is the classical case you could have done or made your gates but
in quantum mechanics thats not just the case every other possible superposition also coming
from the same condition should also be following this rule so thats the idea so here is an
example you have a state zero and you have state one so if you want to define a not gate
what you want to do is you want to have say not operating on zero it should give one and
not operating on one should give zero ok thats what you expect
so the action of quantum not gate on a superposition must then also have a situation where if i
if i do this then it should work which means that this very important point is going to
be always maintained incase of quantum mechanics there all the quantum operations are going
to be linear ok so this linearity now it should not come to you as a surprise because you
know that when we did quantum mechanics or when we have been learning quantum mechanics
we have always mentioned the quantum mechanics is always going to work in a linear way all
the operations in quantum mechanics are linear the allowed operations or the ones which you
actually call are measurable operations always linear so whenever you use a hamiltonian the
hamiltonian is linear whenever you use a momentum operator the momentum operator is linear the
position operator is a linear ok so thats the point that if it works for any particular
set then all the superposition states also should be following that which means that
a requirement of quantum operations are that they are going to be linear
now how do you get that so this is the logic behind why do you have a matrix for a quantum
gate the logic being that the quantum operations have to be linear right so we can represent
the action of a quantum gate by a matrix so the quantum not gate or or its also known
as the pauli x gate is written by this form the x is equal to a matrix is zero one zero
one zero this one whenever you operates so here is a way how it works the quantum state
is represented by a vector so zero is one zero whereas one is zero one and the any psi
which is a linear combination of this two can be written in this form
so you can now express you can now express the not operation as a on a generalized qubit
by using a matrix manipulation method and you will find that this always works so thats
why your not operator x is working properly as a quantum gate ok and you can immediately
see that not was a good one to take because not is one of the classical gates which is
reversible so i specifically choose the one to start with which is the reversible one
its make sense everything goes well so us let us look at another important single
qubit gates so this was a single qubit gate we will just use one qubit the other single
qubit gates which are important the that was the pauli x gate and this works on one qubit
the other common single qubit gates are the pauli z gate so the representation therefore
would then be in terms like similar to the way that you write the classical ones you
will be writing out how they are pauli z gate is zero one zero zero minus one then pauli
y gate is a multiplication of the z and the x and the hadamard gate is a essentially a
square root of the not gate ok so you can for your own you can do these molecule
excises to prove it to you that this is how they work so if you just apply y what does
the y look like you should write it out similarly the z is anyway given but the fact that
the hadamard gate can be actually written in this form by taking a square root of not
just simple exercise you should just refresh your matrix manipulation by doing this
x ok now the summary of the simple gates therefore are these x gates basically the not gate alpha
one zero converts to one beta one converts to zero then the y gate which basically is
a complex conversion let as a part which takes you like this and then the z gate gives you
that finally the hadamard gate now this hadamard gate is actually very important important
as will find out later because what it is producing is a superposition of the two
states that are involved with the individual amplitudes
right so basically your sort of equalizing the two states right i mean if i take a
if i take my basis now to be zero and one superposition of zero and one any one of them
then i will get a fifty fifty combination of them so thats the reason why it becomes
useful now the reversibility requirement is we have being doing that but now this is the
point where we should look at it since all the quantum operations have to be reversible
we have this principle that our gates have to be designed in a particular way so that
they are always reversible this is not true for the classical case and that is what is
written in next line which is that boolean operations are not necessary reversible
a reversible operation is always given by a unitary matrix for which so all our quantum
gates will be written will be possible to be written in terms of this kind of a unitary
transforms so that is one other point which we have any
gate that we device will have a unitary transform so it will be possible to get this inversion
very easily ok so any operation that you have you have its inverse available right
so thats the advantage of it so now let us look at the hadamard gate because its an important
gate and as i said it places it in a superposition of one and zero so this is the gate which
takes one qubit and puts it in the superposition state of its own two states
so this is important because you will find many practical uses of this hadamard gate
later on and this is the representation that you will so in in shorthand notation when
you write circuits which is analogues to computer circuits you will be having this
kind of scenario where we feeding in the states and you will be having an output state like
this with just the circuit diagram given like that so you should be able to interpret these
kinds of simple circuit diagrams to you thats one of the learning that we do in this because
we will be soon going to cases where i will be simply showing you pictures like this and
will not be writing down these other states if i give you this then you should be immediately
able to recognize the that this is how it is or if i just give you this there should
be able to understand how this is happening this is important because these the language
that will be following for building up quantum circuits
so the hadamard gate for instance can give you very interesting results so with zero
as an input you will be getting a superposition of the sum with one you will get the superposition
of the difference when you put in the superposition state in there your actually get a superposition
of the individual components with equal probabilities of theirs ok or another way of writing
is this one where we are actually taking in some sense this is the very important gate
for basis transform this is very important because in quantum
mechanics is all about taking the problem to a basis where it is easy thats the reason
why quantum mechanics is quantum computing is also going to take advantage of that and
the design of a quantum algorithm or anything else that you can think of is ninety percent
relying on this idea so how smoothly can you come up with ideas
with which you can do your basis transform to a condition where it is the easiest to
solve the problem and then you come back to the state or the transform back to the case
where you wear so that you can get your result ok thats the point of this entire place so
hadamard is almost nineteen nine point nine percent you will always find a hadamard gate
existing in any computing you cannot avoid it because you always need to do basis transforms
that's one thing similarly if you input this superposition
you will get back one so this is basically complement so you its shows that its a
completely reversible condition so if you if you believe in this than you can immediately
get the other and so on so forth the other important gate is the pauli gate once again
its important because the pauli gate is in important for phase shift which means that
the phase of the two states can be reversed for example this is their zero and one
are in the same direction sum but the reversal will make one is plus and one is minus so
this is the phase shift whereas the sigma x is a bit flip so we started of by saying
these were the z x and y gates more formally in terms of the pauli gates they are more
known as the sigma z sigma x and sigma y and to complete the identity goes along with it
so these are our final set of four sigma four pauli gates and these are all very important
in terms of anything to do with spin ok so thats the part which is very important
about these pauli gates so one of them so you can see there is an understand the
z is only one dimension zee sigma zee thats only phase shift if you do a bit flip thats
along the x axis if you do both phase shift and bit flip which means that you are doing
y which is a composite of zee and x will find this and identity doesnt do anything
but this is necessary to complete the gate z thats what the pauli gates are
now these are the corresponding pauli matrices they are also often written as zero one two
and three zero is nothing but the identity sigma zero then sigma one is the x sigma
two is the y and sigma three is the z zee i have given you all the different notations
which are used in different books ok each books uses different notation and to be clear
i have put them all in this particular slides so that there is no confusion wherever you
see these you know these are the most popular single qubit gates right ok
now the final the first gate which we will do which is more than the single qubit gate
is the control not gate this is a two qubit gate ok so why you need more than one in
this case is because you need a bit for the control ok so its more often known as the
so this this is our other bit requirements so the control not gate or the c not gate
as is popularly known is the standard two qubit quantum gate and its defined in this
fashion when you are only operating on zero zero then its just going to give back
the same one because your control parameter essentially the zero so whenever you have
zeros then its leaving it so your operation and the control essentially gives raise to
what is going to happen so the one flips the bit and the zero is no
change so thats your control the first bit is your control that is working on the other
one to do the not right so thats why its a control not so the state of the first if it
is going to be one will let will give rise to a flip if it is going to be zero it will
not let it will not make any changes right so thats why its a control the first bit decides
as to whether it will act like a not gate or not so thats why its a control not
so it has a notation this is its notation a plus with zero inside inside the zero
there is a plus so its a generalization of the xor classical xor ok if you they call
it x or xor whatever way you want to call it so the classical x or is essentially these
where you have this principle and here you are using this two qubit case where the second
one is second bit is going to behave based on what the first bit is going to be its drawn
in this fashion this is also important to know because you would like to see so basically
the first bit remains as it is so whether it is zero or one remains as it is the second
one is going to change and depending on whether the control is going to do something or not
its going to show off as a result thats how it is
so the first so obviously if it's a two qubit gate then it has to be a four by four matrix
because for the one qubit gates we were using two by two matrices so this is a two qubit
gate this will be a four by four matrix so the simplest matrix corresponding to the c
not will therefore be this so here here you can see that this is my c not gate and and
here is an example of applying the c not gate for a for a matrix which is y for a for
a state which is y and you get the solution now this c not gate along with the single
qubit gates are universal for quantum computer ok irrespective of how you formulate your
problem these will be always a complete closed set ok as you go and make an bigger gates
they can often be broken down into these basic gates but these gates cannot be broken down
further so thats what is known that you know if you can go to the very basic states thats
how they are ok so how how can you actually use them so the
first important thing about the quantum computing is that once you have learnt your qubits and
you have learnt some operations which are you gates then you can actually write out
your circuits so we have been doing that but here is a here is a basic principle of
how to go about doing something which is combination of more than one applied gates
to get to where you want to so for example we would like to just show a quantum swap
circuit so i would like to go from a to be and b to a ok so the point is when you if
you if you apply only one gate it will be not possible to swap both is a c not will
only swap one of them and the other one remains constant but if you apply it twice then you
end a producing a swap gate a quantum swap circuit
so this is exactly an example of that so by using just control nots in series you will
be able to get this happen right so you can actually start building your interesting circuits
right from this very basics that we have just learnt ok so this is a circuit let see
so here is the point that is being shown step by step so the what does the first one do
first one generates a c not so you get this next one you have not applied anything on
this part so its only going to be the next and then the second one is going to be this
which is going to go to become b and then that one again remain same whereas the other
one finally goes and applies this one to get back there so how many c nots did i use one
two and then the third one now if you tell somebody who does classical computing will
just look at and you say come on you know is a swap qubits they equal swap qubits for
that you have gone through three not givens three controls and three gates to do this
but one very important thing to note here however is that this is reversible i can as
well come from this side and i will have the same result thats not true when you do a classical
computing in classical computing yes you can actually
swap them just like that but you are r a you are expending energy you want to go the other
way round is expending energy because it is not reversible its not the same way how it
works ok so thats the idea so that brings it to a very important point what are the
basic features that we are now looking for in a quantum circuit we cannot do a few things
that we have just now realized no loops are allowed ok quantum circuits are acyclic you
know why ok so there are no loops which are allowed quantum circuits are cyclic acyclic
because you cannot paralyze loop circuits even we when you do parallel prosing in
a classical computer the most difficult part is the nested loops so generally speaking
you are not really supposed to have nested loops if you have trying to do parallel prosing
so for example fan in you can understand that
why fan in is not allowed you are going to loose qubits you cant have that and similarly
you cannot gain qubits so you cannot have fan out what we have going to do is that we
have going to take on more from this point on into for the lectures for today let us
stop here and we will continue on with this in the next lecture
thank you