- [Elisa Baumer] Let's
continue with Quantum circuits.
So what do we use to
describe quantum circuits
is what we call a circuit model.
Which is a sequence of
some building blocks,
which carry out our computations.
And those we call gates.
So the way it looks like
is we have some wire
coming in from the left.
So we always go from
the left to the right.
From the left, we have some wire coming in
that's the input.
Then we have our algorithm or our gate.
I mean algorithm can
consist of logical gates.
And then we have some output wire
or multiple output wires.
So let us start with considering
seeing a single qubit gates.
So as the name suggests,
that means that we look at gates
that act on a single qubit.
So before looking at
actual single cubit gates,
let us look at how a
gate on a classical bit
would look like.
So classical example of a gate on one bit
would be the NOT gate.
So have, as input state
either zero or one.
Then I have my wire,
I have a symbol which
reflects the NOT gate.
And then the output is one or zero.
So then NOT Gate just flips a bit.
So the input zero, I would get one,
if I input one, I would get zero.
Now for an quantum example,
we will look at actually a lot
of different quantum examples.
We will look at different gates,
different standard gates.
So, but first of all,
we know that quantum theory
was one of the passivate
of quantum theory is that it is unitary.
Which means that quantum gates
always represented
by unitary matrices.
And unitary matrices for those of you,
maybe not too familiar with linear algebra
the matrix is unitary if
you degA and now Degas
is T again,
which refers again to the transposed
and complex conjugated,
where's an offered, the matrix.
If you degA at times you
equals the identity matrix,
whichever right with this is this one.
Identity matrix is the matrix
where we have just ones
on the diagonals and
zeros every where else.
If this holds for matrix,
then we call this matrix Unitary.
So we will not go into that too much
because all the matrices
that I will show you now,
all gates that are all unitary.
Of course we will not prove that,
but just, know, what the definition is.
And maybe let's quickly recall
from our direct notation.
The direct notation cause I
think it will help you know,
if we write because you
want to write the gates
in direct notation as well.
If I have a unitary that I can
write as zero zero zero one
U10 U11 unitary,
then the way I would write
this indirect notation,
remember with the bras and with the chats
would be the first element I can write it
as zero times zero.
You use your attempts zero zero,
which gives us this element,
because if I have this
zero pitch zero bra,
that would give us a matrix
that looks like this.
Then I have, plus
U zero one times zero one,
because this would give us a matrix.
Give us this matrix.
Okay.
Plus you want zero times one
zero, plus u11 times one, one.
So this is it if write now,
this looks maybe complicated,
but you will see for the
other gates and simplified
sometimes to use the direct rotation
instead of the matrix
way to write it down.
So this is a general way
of writing down a matrix
and let's consider some
gates as a foot first gate.
We will look at what we've seen before
that Sigma X gate, the poly X gate,
the poly X gate is given
by zero one, one zero.
And now writing this into direct notation,
we can write it like this,
because the prefect is that just one,
the other elements are zero.
So this would be a direct
way of writing this poly gate
now to see what FX this gate has.
We can, we will apply to the state zero,
Questions what happens if we
apply the X gauge Sigma X gauge
to a state zero, and we can determine
this by just either we can
shoot some matrix multiplication
or we can choose the direct notation.
I will show you both so if we
use the matrix multiplication,
we just take the matrix and multiply it
with our vector.
Importantly, we always take
the matrix from the left.
So if we have multiple elements,
the first matrix is the
one on the very right.
And then the more you go to the left,
this all happens later.
So now if we do like my
matrix multiplication,
I hope you're familiar with that
to take the first element
here from the matrix,
this zero and a multiplied with one.
And I take it, which gives
zero, zero times one.
So I'm taking this one,
then I'm taking plus one
times the zero.
So I'm getting just zero.
And then for the second row,
I wanna do this slow every time.
But just for people that
aren't familiar, maybe
I'm taking one times one, oops, sorry.
I'm sorry.
I'm taking one times
one plus then this zero,
times this zero.
So I'm getting zero one, okay.
So I will get the vector zero one,
which is our stayed one.
Now let's check what happens
if we apply the sigma X gauge
to our stage one.
And now this time lets do
it with the direct notation.
So we have our matrix,
which we know write with cuts
and bras times the state one.
Now we can just write it
as two different terms.
It's linear, so we just write zero one.
I multiply the one in both
terms plus one zero one.
And now we can notice
is here we have the inner
product of one and one,
which is one.
Here, we have the end product
of zero and one which is one.
So this, the second part is zero and we're
only half state zero left.
So, what this gate then
corresponds to is two, a bit flip.
So it is just like in
classical computation.
I just told you before the NOT gate,
and this is the quantum
equivalent of the Not gate,
because what it does is it flips the gate.
If we input zero, it gives us back one,
if we input one, it gives us zero.
So for example,
if I have zero as my
state here on the left
and I have the wire,
I have my matrix Sigma X,
and then the final state will be one.
What the state in general,
I could also not only input.
So this is the quantum
equivalent, which means,
first of all, it can
act up quantum states.
That's what that implies
that it cannot only,
echon zero in one, but it can
also act on superpositions.
And so what it does in general,
is it a rotation around
the X axis by pie.
So if we go back to the plot
blogosphere that we had here
and so if we'd go from,
we have the X axis and
you can now think of it
as a rotation of the set by pie.
So just half way by 180 degrees.
So if we around the X axis,
the axis that looks towards us.
So if we are in zero,
we'd go down this way to one.
If we are, for example, in,
plus I, one could also just buy
this geometrical description
is graphic description.
If we now rotate around the X axis,
we would go halfway around and we would go
from plus i to minus I
and from minus I plus I.
If however we start with
the plus state, for example,
since it is on the x axis of your rotator
on the X axis is what stay there.
So on the X axis is on the X
on the plus state.
This gate would not have any effect.
If I apply Sigma X to the plus state,
I would get the plus state back
and same for the minus state.
So those states lie on the axis,
But okay, let's continue
with the next gate.
The next gate is the
Zima Z gauge the policy.
We have seen that one before as well.
And in general it's so the description is
once you are zero minus one,
and if we want you to write
it in direct notation,
we can write it as your
zero zero minus one one.
I can tell you now, already this,
if I go not have any
effect on zero in one state
and the states are in one,
so we will not consider that now,
but let's instead look at what happens
when we apply it to the plus state.
If we applied to the plus state,
we let's do it again.
And matrix notation with
our matrix we multiply it
with the plus state,
the plus state is one of us
screwed up two times one one,
and so we can get this
prefect to the front.
And then we have,
if we do much matrix multiplication,
we get one minus one,
and this is exactly the minus state.
And in a very similar way,
if we apply zigma Z to the minus state,
let's do it again one more
time in direct notation.
If we do this and we multiple with
the state is zero minus one.
Then we can see all, most of the,
two of the factors actually
canceled because if we have,
if we multiply this, if
we have the bracket of,
zero and one it always zero.
So the only terms that we keep
when we have zero and zero,
let me get this.
You were left.
And when we have one one one,
so we have what would have
been it minus times minus.
So we get the plus.
So we get zero plus one,
which is the plus state
since we go from now in this
case from plus to minus.
So from zero plus one,
we go to zero minus one,
we call it this time, not the bit flip,
but the phase flip, because
it flips in this case,
the phase of our of the phase
to face between zero and one
for the states plus, and minus.
In general,
what did corresponds to is a
rotation around the Z axis.
And again, but 180 degrees.
That's also, by the way, why
it does not have any effect
on the state zero under state one,
if we act on that,
because of you,
since we rotate around the C axis,
as if we're already on the
C axis is just as, before,
it would not have an effect
on that on those states.
Okay and now I guess you can already guess
what the next gate is?
The next gate is the Zigma Y gate Poly Y
and it is given by this form.
And now one thing that,
that one can note is that
this actually also corresponds
to I times Sigma, X, times Zigma Z.
Which means that we're not
gonna do any calculations now,
but I would just tell you,
because you can read
it as a product product
of zigma X and Z.
It's the same as if we apply
a bit and to phase flip.
And of course in general,
it's a rotation around why.
So, because of, well, on
the blogosphere actually,
if we do first rotation around X
and then a rotation around Z, both by pie,
then in the end,
that would be a rotation around
Y also by pie 180 degrees.
Now these matrix matrices are
quite important in an algebra
because they have a lot of nice features
and we call them,
as I know that several
times already, we are,
we call them the poly matrices.
And for each of them,
if we take,
if we square them, we get identity.
We can calculate that by
just multiplying two times
the same matrix,
we will see.
We will always get this identity matrix.
Identity matrix means basically
that we're doing anything at all.
If we apply the identity
matrix to any state,
we would get the same state back.
So that also tells us
that if we applied twice the same gauge,
we will basically do nothing.
So they play it two times the Sigma X gate
I'll have two bit flips.
And then I will be back at the flip
at the state ahead before.
Which you can also see on the blogosphere,
because I told you it's a
rotation by 180 degrees.
If I now apply twice,
I have a rotation by 360 degrees.
So I can just,
it has no effect.
So we have the poly
matrices and the identity
and the together.
So the poly matrices
together with identity.
Together, they form a basis
of two times two matrices.
Which means that any one
qubit rotation can be written
as a linear combination of these gates,
which is something that is
for example, very important.
Once we look at error correction,
which you will learn about on Friday,
so these three or of
them form gates together
form a basis and have
therefore some nice features.
Now there's one last gate,
or maybe two more gates that
I really wanna tell you about.
So the, in my opinion,
the most important gate
that you will learn today,
the most important thing the qubit gate
is it's called the hadamard gate
And you will find it
in any quantum circuit.
That we gonna, then
you've got to learn about,
you will find this gate.
You will see in a minute, why,
so the description of the
mathematical description
of the hadamard gate,
you write it as a matrix.
You write it this way,
again by the way, you see
the prefect of one of two.
We need that prefect there to make sure
that we have a unit to
have a unitary matrix.
If we want to write it in direct rotation,
it would be this.
Now, if we apply the hadamard gauge
to state zero
and what we will get,
we have this perfect,
I, one of squared two,
and here we get one and one,
which is the plus state.
And if we apply the
hadamard gauge to state one,
I will not do the calculation.
Now can believe me or do it yourself.
We will get the minus state,
which means that in
general, this hadamard gate
what it's used for is
to create superposition.
Because if we usually,
if we have quantum circuit,
if we run a quantum circuit
in the beginning,
if we initialize our qubits,
we usually initialize
it in the zero state.
So the quantum circuit
usually starts with all qubits
and record them.
Circuit starts with all the
cubits in this zero state.
If we then apply a hadamard
gate to each of these cubits,
they will all be in a superposition.
So we will immediately get this well.
Superposition of all possible states
and then calculate and do our quatan stuff
on all those qubit at the same time.
So this is the reason
why basically any circuit
you're gonna learn about
what in the beginning,
start with hadamard gauge.
I see what see something
else that holds is
that if we apply the
hadamard gauge to the plus,
we'll get the zero state.
And if we apply to the state
minus, we would get one.
So actually going back and forth,
we can from, if we apply
to state zero, we get, plus
if we apply to say, plus we
go back to zero and the same
with the one state and the minus state.
So we can use this to change
between the different basis.
So experimentally, for example,
we usually can not do an X measurement.
We could buy what you do is
we measure in the set basis.
We measure whether it's zero
one, the other one state.
And if I give you the qubit,
if you would like to
do at an X measurement,
what we do is we first
apply a hadamard gate
and then do, as the
measurement applying first,
hadamard gate and then
doing the C measurement
is the same as doing an X measurement,
at least mathematically, of course,
it can always have some
noise and some errors,
but for now,
we're gonna talk about the
method matrix behind it.
And then so applying hadamard gates
and Z measurement is equals
applying an X measurement
and the say in a similar way.
We have the gate S so this
is not the last thing a
qubit gate I will show you.
So it's similar to the Z gate,
but instead of a minus one,
we have the I here.
So it's basically, if we apply S twice,
we will get the Z gate
or set gate,
maybe to have less confusion.
And so what this scape
does instead of they've,
this Polly Z gauge
rotates us around the ZX
is by 92, by 180 degrees.
And this is basically half of it.
So what the SK does is it adds 90 degrees
for the phase of five phase five.
So if we apply S to the state, plus
we will get the state
plus I, if we apply as
to the state minus, we'll
get the state minus. I.
So if I show you again
on the blogosphere,
You see the blogosphere.
So on the blogosphere sphere,
if I start in the, in the blue state,
the plus state blue plus
state, and I do this escalate,
I would go to from the
X axis to the Y axis.
If I applied again I would
go to the minus stage.
And I would go to the minus I and so on,
so I could turn around.
And so what it's used for
then as if I apply S times H
hadamard gate that instead of changing
between the state zero, that
between the X and Z basis,
we change between the Z and the Y basis.
So if I wanna do a Y
measurement, I would do the same.
I would apply S and H and
then do my Z measurement.
Cause that's the physical one.
Okay.
So now there's some time for questions.
Brian, do you wanna read
for the read first question?
- [Brian] I would love to.
So we have a good amount
of questions on here,
and just a reminder to
everyone in the chat.
Please upload questions
when you have one in here.
I see a lot of people still
typing them in the chat,
but we're using the upload questions
and answers lists for to find the top one.
So please make sure
you're uploading those.
right now, our most uploaded question,
that doesn't have a full answer here is,
a bra, describes a quantum state
super position of zero one,
how do I imagine a kat?
- [Elisa Baumer] Oh first
of all, the quantum states,
usually if I act actually the way
I'm writing quantum states
now is I'm just writing
the catch not the bra.
So I'm writing this kind of thing,
which is a catch, not a bra.
So also if I'm writing a superposition,
I would write at this zero plus one.
For example, so that
would be, I'm using kat,
to describe quantum states.
The reason it's a bit hard to explain,
because we do not talk
about mixed states now,
but only about pure states for
pure states, quantum state.
If I want to look at a density matrix,
which is the actual way
to describe any kind
of quantum state both pure and mixed.
I would always look at
a state if it's pure,
it would always have this form.
So both the bra and the kat
would always be the same,
for pure states.
So the actual quantum state
would be the bra times the chats
and production would be
described by a matrix.
But since we just look at pure states
and it's easier to,
it's easier then to describe
it by just using the kat.
But in theory, you can
think of both of it.
It's both vectors that both help
to describe the quantum
states, given the pure states,
you can either of them
will just be or describe
our quantum state.
- [Brian] Okay, thank you.
Next one.
Looks like a question
about Poly's matrices
has been sufficiently answered,
so we're going to move that one out.
Again, if people have
answered these questions
in the comments already,
we're gonna consider that answered.
Next question.
That's highest is what
is exactly Eigen state
or what exactly is Eigen state.
- [Elisa Baumer] I
actually see that someone
answered it already,
but okay.
So the Eigen state of a matrix
is a vector for which holds,
let's say I'm giving a matrix a
and then the ideal state of a vector of
this matrix is any vector
for which holds that.
So this is a matrix
and for the Eigen states,
how is that?
Eight times X equals,
let's say alumna times X,
where here we have again,
the same Eigen state, and we're
alumnus is just some number.
This is a, well,
I will not go into too much detail now.
So that's a mathematical
thing that you learn
about algebra and these Eigen states
have a lot of important features,
but this is the mathematical
definition of an Eigen state.
- [Brian] Great, and then
last question for now
user said, "I'm curious
about the kids kit logo.
It is a block steer, but
there's a specific state
or phase on it.
Is that, is there one
that's being displayed?"
- [Elisa Baumer] That's
a very good question.
I'm actually gonna answer that in an hour
when we will look at the quosphere
because it is not a blogosphere.
On the blogosphere we, that
I will yeah, you will see,
you will get the answer in an hour
when we introduced the quosphere,
which is like the blogosphere,
but on multiple qubits.
So the kids get a logo is actually a state
that describes the state
on multiple qubits,
not just on one single qubit.
- [Brian] Perfect, thank you very much.
- [Elisa Baumer] Okay then, let's continue
with multi patent quantum states.
So by the way,
I just noticed that I can not
see that on the screen now.
Can you see any texts on the screen?
Oh, okay.
Here we go.
Okay.
(indistinct)
Good.
So, but I guess then
now I should not right
on the very bottom, right of here.
Can you see that?
What I'm writing right now?
Nope.
Okay.
Good to know,
- [Brian] So I think zooming
in and out and trying to scroll
as needed at a larger size,
but that just means zooming
in and out at different ways.
- [Elisa Baumer] Okay.
I mean, I can also,
I can also write larger
if that helps or...
- [Brian] Probably both, lets
do both and start from there
- [Elisa Baumer] okay.
I've tried to write a bit lecture then.
So we use multiple quantum
states as the name suggests
to describe multiple
quantum states or sorry
to describe quantum
states on multiple cubits.
So what we use to this to do that
is tens of products,
which is another thing that
some of you might've heard
from in linear algebra.
So the way it works is I have two states.
I have state eight on
one cubit and state B
on the other so just to
Henze B one B two.
And now if I take the
tens of product of two,
two dimensional vectors,
I will get one,
four dimensional vector.
What I'm doing is I'm
taking the first element off
the first vector multiplied
with the first element
of the second vector.
Then the first, so of the
first vector attempts,
the second element of the
second vector and the same
with the other two elements.
So I'm getting it four dimensional vector.
Give you an example.
Let's say system a is in state one.
I know I put this small A here
to determine which, which,
who that space of which
particular I'm talking about it,
which qubit I'm talking about.
So if I'm big, this,
now I'm talking about
qubit A is in state one,
and then I have the system B
or cubit B,
which is in state zero.
And I have a small B here.
So which one I'm referring to.
Now, the total states
and I call this bipartite state
because it's too few qubits
It's given by,
so a short way to write it as
this one, zero people just,
it's not 10.
It's just that people write
it this way when they,
what they actually mean is I will also
use that way by the way.
So it's yeah, just shorter.
It means I'm in state one
one of A tens or zero one B,
and then I can write the
vectors for the both of them.
And if I do the multiplication
that I just described,
the pincer multiplication,
I get zero zero one zero.
So this is how
I would describe that state on two qubits.
If I have even more qubits
than I can do that again.
And for example, on three cubits,
I will get two to the power three.
So I would get an eight
dimensional vector.
And then it skates pretty fast.
This is by the way, then
what we call the state vector
and the state directors.
If I have a state vector, for example,
on 10 cubits,
it would be two to the power 10,
which is 1024.
So I would have in the vector
with 1024 elements,
which is the reason why
simulating quantum computing
is sometimes where the
few qubits you will get.
At some point you get
you to the limits, right?
It can not do it easily
for a hundred qubits.
So yeah, because it's scared so fast.
So this is the state vector
of the state one zero
and two qubits.
And I'll remark for the states
is if a state is of this form.
And with this form,
I mean, something like
some state on a tens
for some state of B
Then it's called uncorrelated.
But so there are also
other bipartite states
that cannot be written in this form.
So they cannot be written as some states,
sign on a tensor,
some state five on B.
If it, if they cannot
be written like this,
then we call these states correlated.
And sometimes they're not only correlated,
but even what we call entangled.
So all the states that are
entangled also correlated,
but not every state that
is correlated as entangled.
So you can think of it as like,
like very strong correlation
that only happens
in quantum mechanics
that we can not have classically
and mean will talk about that
actually in the third hour
or at the end of this hour.
So one example is the
size of a zero state,
which we'll also look into later just
to write it down already analysis.
See what I mean?
I could have a state that
is in a superposition
of zero, zero, and one one,
which is something I can not read it
as zero plus one times he replies one,
because then I would get
four terms in total, right.
If I would write down state
a as zero plus one state,
B a surplus one,
I would get zero, zero plus
one plus one zero plus on one,
I would get four terms.
The only of these two terms,
I cannot write it as a
product of just two states.
And if I give you this can give you
the state vector of this.
It's actually escorted
up to the pre factor.
And then we have one zero, zero one,
because so the first one corresponds
to the state zero, zero,
and the last one corresponds
to the state of one one.
If you look at the bipartite description,
the state that I just wrote down
is by the way,
so-called bell state,
which I will talk about later.
And it is used, for
example, for teleportation,
the protocol that we're
gonna look at next hour,
but also for cryptography and both us
and has a lot of applications.
But yet you learn about that.
For now maybe right now,
is there already maybe one question
on Monte pothead, quantum states or,
Oh, actually Brian,
I see there's a question
that is not on the topic,
but that you might wanna answer
- [Brian] I saw that question
about the increased playback speed
when you play it back.
I believe there's an option
I'm struggling to remember.
So I will research that for you.
- [Elisa Baumer] And then someone, okay.
So there seems to be
not a question you get
on multi-part touch states,
but maybe I'm just
answering this one question
that is most voted now.
- [Brian] Yeah.
And I'm sorry,
I was scrolling through
looking for the same thing,
but I do see there is a
question on the chat but...
- [Elisa Baumer] I just broke down.
- [Brian] I saw two questions
with either one of these
are aiming at what you were saying,
but one is why can bipartite states
not be written like that?
And then another is
can you give an example
of a correlated state
that isn't untangled?
- [Elisa Baumer] The correlated
state that is not entangled?
That is a very good question.
However, so currently the
states that are not entangled
are only mixed states.
So actually if we have pure states,
I was about to tell you that
when I introduced entanglement,
if we have a pure state
that is correlated,
it is also entangled.
So for classical states,
if they are correlated,
that means they're always mixed states.
I will give you an example for that later.
But yes, I will not write
down the description all
because then we need
to change the formalism
from not writing chats,
but writing density, matrices,
which is going too deep
into the topic now.
And sorry, did you say there
was another question?
- [Brian] Yeah.
I'm sorry, I'm pulling it back up.
No, apparently I just lost it.
So why don't we move on and then I'll try
to find it for you.
- [Elisa Baumer] Yeah, good.
So now that we know how to describe states
on multiple qubits,
we can continue with two qubit gates.
And as before we will start
with a classical example.
So classical example, obligate
that x then on two bits
is the XR gate.
So for the XR gate,
I take two inputs,
all of them, X and Y.
And then I have my X or gauge.
And what it outputs
is X plus Y where this plus means
that I'm taking the two bits
and I add them in, I take them Model too.
So if I input one and one,
I would get two, but modular
two, I'm getting zero.
So,
if I input zero, if,
if what it basically does
is if I have two bits that are the same,
it will output zero.
If my two input bits are different
than I would output one.
However, now a problem with
this gate is that this gate
is irreversible because
if I give you the output
and I tell you the output is one,
then what is that either X or zero one,
but you don't know which one of them.
So you can not construct the input
from the output,
which means that it's irreversible.
But what we just learned
before is that quantum theory
is unitary,
which means that we only
consider unitary gates
unitary gates always reversible
because I told you before
the condition for unitarity
is U degA U
you equals identity.
This is actually also because
we have a Lynch to Lisa.
If we look at square matrices,
which we do that you to
the minus one equals U degA
And so the inverse of a matrix,
so that pushes you to
the minus polo minus one.
So we do not mean one over you,
but we mean the inverse with that
inwards always exists, for unitary gates.
So we, what this tells us is
that we cannot just rate the XR gate
with quantum computers,
which sounds like a big disadvantage.
However, that's look at quantum gates.
I will give you an example
of a quantum two qubit gate.
We look at what we call the CNOT gate,
the matrix for this CNOT gate,
just given by this.
And then if I want to write
it into your reputation,
just so you get more familiar with,
so this is If you think of the Iraq
of the basic states.
So the first one corresponds
to zero zero, zero, zero.
And we have zero one zero one
one zero one one, and one, one, one zero,
which are the two ones at the bottom.
So if we apply that CNOT
gate two of the state, zero,
zero on X and Y
We have omitted our CNOT
matrix times the state, vector,
if you get for the states, you are zero,
which is just one zero, zero,
zero yesterday before.
And now if we apply this matrix,
I can easily see
that we actually get the same state back.
So we just get again,
state we're zero.
If ever we apply the CNOT gate
to the stage one zero.
What we will get back is the state one one
on X and Y.
So let's make an input and
output table if we have.
If we have four possible basis states
as input zero zero zero
one one zero one one is X.
This is why,
now the output four
zero, zero as we just saw
is zero zero,
the upper four zero one.
I can tell you it's zero one.
It doesn't change for one zero.
However, we just will get one, one.
So I just wrote down and four, one, one,
we will get one zero.
So if we look at the output,
what we notice is that this first,
the first output but then we get back,
always equals X,
Y the second puppet that we get.
For zero zero we get zero
four, one, one, we get zero.
In the other two cases,
we get one.
So that's exactly the XR of X and Y.
It's X plus Y.
So if we write it as a circuit,
we can write out a state
X and the state of Y.
And then the way someone writes it,
we usually write it this way.
And the output will be X and X plus Y.
So what it does is it
computes the X or gauge,
but it is also reversible
because we also get the expect.
If I give you the X and the X plus Y,
then you can always create, you can always
you can always recover what the input
was given the output state.
So this is basically the
CNOT gate is basically
or reversible version of an X or gate.
So we can just calculate XR
and get X back.
Now, the reason maybe just
to mention why we write it
this way also,
why it's called CNOT it's called CNOT
is a short form for
controlled, NOT controlled,
not it's quite controlled,
not because controlled on the state X
and controlled as
this.here that I'm doing.
This thing is what we mean.
Whenever we have controlled gates,
we make this kind of thing there.
So we control an X
and then controlling means if
I'm in the state, zero on X,
I will not do anything.
Nothing happens.
And you see, our output,
it's just the same as before
we can tell for those two cases here,
input and output are the same.
If however, X axis and one as this one,
we're controlling on X,
then I'm flipping the state on Y
It's more beautiful.
So how it's supposed to look,
then I'm adding bit to
Y to editing on which,
but then what are the two,
that's why I'm getting the extra output.
And that's why it like
a small plus the effect
on why it looks like a
plus controlling on X.
I'm doing an addition on Y.
This is what the control.
Not, not because we call it our well,
the NOT gate is the one that flips a bit.
So then it flips a bit.
If we're, if X is in zero and one
is X, it does nothing.
But yes, we,
so what one can show is
that every function F
Can be described by a reversible circuit.
So whenever I ask you
to compute something,
I can, if it's a classical
computation that is irreversible,
I can always compute the same thing and
somehow make it such that
it's a reversible circuit
and you get additional outputs
so that we can in the end,
recover the input,
which means that quantum circuits,
Can perform all qubit, all functions,
That we can possibly calculate classically
So there's no disadvantage,
even though it has to be a reversible
it's actually even better than,
and we can always create gates in a way
that they are reversible,
but still perform any computation.
And then also of course,
the CNOT gates now in the
input output table,
I only looked at the base of states,
but since everything is
the now we can also just,
but it works the same way
with the superpositions
and I can input any superposition state
or any entangled state,
and just apply the matrix as it is there.
The CNOT gate just applied
by multiplying that matrix
with whatever state vector has.
