 who was an associate professor in Colorado University and is also part of a researcher in Continium. So please go ahead. Thank you. Thank you. Hello. Okay. So I'm making sure that this works here. Okay. So thank you very much. So at Continium, I'm pretty much responsible with some Mark Jackson and Thomas Cervoni. We are like academic outreach, travel universities and talk about Continium, but also about quantum computing and so on. So today I want to now give the second lecture on Introduction to Quantum Computing. So it's going to be a little bit different flavor now. So you have been now told how you went from the Turing machine to kind of P and MP hard problems and how you would like to have your computer to be able to do statistical computations. And then you have been shown where classical probability theory kind of breaks down because you have to think about quantum mechanical concepts. So what we're going to do now in this lecture is I'm going to make these slides available to you. And my notes after my lecture today. I will use the board in conjunction with the slides. So I'm going to work between the board and the slides. If you do not have a notebook, here's a stack of notebooks. Okay. I'm going to give you now five seconds to pick up your notebook if you haven't done so. Go get your notebook. Active writing. And there are pens, I think, right next to it. Because we all tend sometimes to fall asleep, which is okay. Well, I didn't know that notebooks can do no pads to write on can be that popular. That's amazing. Okay. Great. If you still have a notebook, just go around on the side and get one, so that's good. Okay, great. So let's quickly go over the topics. I want to cover now the next hour. So it's quite a lot of material I want to cover. But first, I want to kind of tie on to what you have heard right now and talk about logical bits in the classical sense. And then I want to introduce the idea of classical bits versus qubits and how they are the unique properties of quantum computing coming to play there. We'll talk about the postulates of quantum mechanics. I'm going to give you an overview. Each of them are probably a lecture by themselves. But you should get an overview, just in case you've forgotten. Then we'll discuss the block sphere, which is a way of visually representing the qubit. And then we'll do a little bit of complex numbers and linear algebra that we use for quantum computing and then we'll talk about the quantum circuit model. So I will not do any programming yet. When we get to the quantum circuit model, at the end, you pretty much then in the afternoon, you will be exposed to ticket, quantum SDK, which is state of the art, and you will learn then how to implement quantum circuits using ticket. That's in the afternoon today. So let's get going. So first of all, I want you to do a little bit of an exercise here if I can connect with you. But first of all, let's go back to kind of like logical circuits. So all of us are used to logical circuits. We have our cell phones that work with logical circuits. So even simpler than our cell phone, what is another example of everyday's life where you have a logical circuit? I can imagine a little chip in a device at home, maybe? Anyone? Switches. Yes, switches, on-off switches. Yes, so switches, any kind of remote control you have. These are all based on logical circuits. So pretty much logical circuits, as you know, you have your logic gates, right? And pretty much for logical circuits, you have either a zero or a one, right? So this is a logical bit. So you start there, and then when you are developing kind of like a circuit, your fundamental building block of logical computing, what you do is you kind of have gates that help you go through your computation, what you like to do. So first of all, in logical circuits, what you have is you have some kind of like input, right? Then you do something, do something, right? And then you have an output. So we have learned today that obviously in order to do that you must have some kind of like function. You work on or a computation you work on. And in a logical circuit, what you have, you have these gates. And there are many of these gates. For example, the AND gate, the OR gate, the NOT gate, right? And each of what these do is you take an input, you have this gate, that does your computation, and then you get this output. So what you see up here is a lot of different tables, right? I do want to write this down. So here you have the AND gate, right? Which looks like this. And then you have your table, right? So the idea is you have an A going in, you have a B going in, and you have an A and B coming out. So this is kind of like what logical circuits do. So if you have an A and a B, you go in with a zero, zero. You add them together, A and B gives you zero. So both of the input and output have to be one in order to get that one for output. Let's go back to how does it work on a level of computation or in a device? So how does it work? So you have typically a transistor, right? So you have a voltage going in, right? And then you have some kind of chip, some material, right? That's very smartly sandwiched together in order to do the computation for you. So for example, you have this chip. When you have voltage going in, just say for being easy. So one would be one volts and zero would be zero volts, right? You go into that chip, the chip has a smart setup, and then it gives you the output exactly how you would like to put the gate together. So in any case, so you have all these gates, and then what you do when you have a logical circuit, like I talked to you about, this is for example the NOT gate, if you have a logical circuit, you have some computation in mind, what you do is you add these different gates together, okay? So I want you to think about it, and I'm going to write it down too. You also have a cell phone, right? But for example, now if you just want to think about something very simple, your garage door opener, right? So you want to design a circuit using basic logic control to have your garage door open, right? So first of all, you're going to have to have a remote control, right? That either is active or inactive, for example, and then you have maybe you want to detect an obstacle, right? So for example, you don't want your garage door to close, for example, when there is an obstacle, right? So I don't know how many of you have played with the sensors in a garage door opener. I've spent a lot of time on that in my house. In any case, you can think about how could you put the logical circuit together in order to have a garage door opener. So maybe I give you five minutes to, no, five minutes is a little bit too long, but I give you a little bit of time to think about that. So what you want is you want the door to open only no obstacle, extra opener. So the way you can think about it, so A, let's say this is your opener, and B, let's say that's your obstacle, detector. What you typically do is you look at the sentence and says like and, right? It's active. There's a couple of words you can see there. But in any case, what you could do, for example, you can say, well, at the end of the day, I want to have kind of like an and gate, right? Where I say that both of them have to be one in order to get a one output to open or close, right? So in this way, you can see, well, just maybe this is an input here, I have into my and gate, but then B, that's your obstacle detector, right? So typically, your obstacle detector is zero when there's nothing in the way and it becomes one when there is something in the way, right? So what you want, you only want to open it or close it when there's no obstacle, right? When I close it when there's no obstacle. You want here and not skate and you want that to go in here, so this is a not. So only when B is not, there's no obstacle, you want after A being active, you want it to open, right? So you can try and tell this call a truth table so you can think about what's A, what's B, what's your output and you can go through all of these possibilities. So when A is active and when B, when I don't have an obstacle, right? What happens here now in this intermediate step because B is not active, it becomes a one. So now, maybe we should do here, sorry, a B. So now it becomes a one and my output is one and my garage opens, right? So we can go through this truth table to figure out what you're doing. So this is a classical circuit and it turns out that quantum computing is very similarly like set up where you have gates that do operations on an input in order to get your output, okay? The difference here is this is a truth table, this is deterministic, right? You know your outcome. We just heard about there's ways of doing it probabilistic. So the output for quantum computers will be non-deterministic, right? So there's going to be a probability you have to work with. But we'll build up to this. So you've probably heard about, you know, bits as we talked about already and there's a calculation, right? Typically you have zero in once and if you want to, for example, take a bit string and you want to turn it into bit string and you want to turn it into your decimal number, right? We can do some math. So for example, if you want to build an adder, right? You want to add two numbers together. You would represent five in terms of bits and six in terms of bits. Then you have an adder gauge to add them together. You build an adder circuit, for example. And then you get, again, a string of output bits and then you convert them into your decimals, right? Which you use in a computer. So you know how this goes. So typically you have some numbers, right? You have a bit string and what you can do with this bit string is you can pretty much say, well, the decimal number is you take the entries of your bit string and you multiply that number times two to the i, right? So where i is your exponent. So how do you do this? And i depends on the position, right? So for example, as an example right now, let's look at a value. So example, which I have up next. What is the binary number of 1, 0, 1, 1 in, yeah, what's the binary number? 1, 0, 1, 1 in a decimal number. So we have here a suggestion 11. So let's do this. So 1, 0, 1, 1. Oh, yes, 1, 0, 1, 1. So this is your first one, right? So this would be now, if you relate it, it would be 1 times 2 to the 0 plus 1 times 2 to the 1 plus 0 times 2 to the 2 plus 1 times 2 to the 3, right? So you have 1 plus 2 plus, what's this? 8, which gives you 11, right? So this was a crash course in kind of like how you do a logic circuit. What do you do with bits, right? You get the deterministic output value. This is 11. Okay, any questions? So now let's talk about quantum bits a little bit. And while I do the active exercise of raising. So I talked about bits, now let's talk about quantum bits. So we call these quantum bits qubits, as it says up there. And you can also quantum bits qubits. You can sometimes see them written differently. But the unique thing about qubits is that they are, you know, not deterministic. And they are kind of used as a tool to explain to you how quantum computing works and what's the uniqueness thing about it. And then we have come up with a very nice and smart mathematical ways in order to do computation on these qubits, right? And describe what they mean in a function. Because mathematically we like to work with functions. So the first thing I want to point out is that you have a qubit. You have seen this notation already in the previous lecture. So it can be in state zero. That's a state zero. Then you also have your state one, right? So if you've seen this notation before. This is written in terms of direct notation, okay? So zero, as you've seen already, this is in direct notation. So this is a column vector. So this is also called a cat. So cat zero and cat one. So the thing about qubits now, which is interesting, is that a qubit is a two-state system. So it can be in state zero and state one simultaneously at the same time, okay? So compared to a classical bit, you are either zero or you're one. That's it, you have to make up your mind, right? You flip a coin, it's zero, one in essence, right? So you have to make up your mind. A qubit in the other hand is both states at the same time. It doesn't make up its mind until we measure it, okay? So this is very, very much different to the classical bit. So if you think about it, if you think about, you could have the state zero to be, you spin to the left and the state one, you spin to the right, but if you're a real qubit, you spin to the left and right at the same time. You don't know what you're doing. You can't make up your mind, right? So that's the difference between a classical bit and a qubit, and it kind of goes deeper than that, but that's the main thing right now you have to understand, is that it has the simultaneous properties of both states, and we call this a superposition, okay? So that is the important thing right now, and we'll go through the math in just a bit. Mm-hmm. Oh, yeah, sorry. Good. Round your points. Yes. Thank you. So when you are going through computation, quantum computing, there's a lot of different ways of you are developing a quantum computer. So you can have photonics qubits, you can have trapped ions, superconducting qubits, and they all have a different ways of computation. So a qubit for photons could be a different polarization, right? It could be horizontal polarized and vertically polarized, and you manipulate the qubits in terms of using kind of like photonics devices, filters, for example, right? Rotations and such. If you have trapped ion qubits, then you have some kind of ion, and you think about the different energy levels. So a zero qubit would be a lower energy level than one qubit of the energy level of the ion. Superconducting, again, has different ways. Trapped ion quantum computers are used typically lasers to manipulate the state of your qubit. Then superconducting qubits like IBMs. So we have trapped ion quatinium, and superconducting qubits. Then you have, again, a superconducting circuit, and you use kind of pulses, microwave pulses in order to manipulate between these two states. So again, these are just a few of them. There are more out there, and you can look up details. So now let's go into the postulates of quantum mechanics because they're very important for quantum computing. So sometimes you hear about a postulate, you hear about principles. They're different ideas of, you know, scientists have come up with during history. Some of these postulates, you know, were kind of like given, and then sometimes we have done experiments to show that they're true. Some of these postulates are still not well understood in quantum mechanics, and we need to understand them better. But in any case, quantum computing is pretty much a consequence of all of these postulates and principles in quantum mechanics that kind of like made it possible for us to actually have actual hardware to run a quantum computer on. So some of these postulates in quantum mechanics, how many of you have not taken quantum mechanics? So all of you have. So this is the review. So you know that there's the state postulate. So a vector describes a quantum system. You have the measurement postulate, right, until you measure something. I don't really know which state your system is in. It has to collapse. There's a superposition postulate. I just talked about you have the quantum system exist in a superposition state of zero and one. And then you have this evolution postulate that you have your state, which you have your quantum state evolves over time, right? We took the usage of Schrodinger equation to describe that. Then there's different principles. Kind of experiments have shown that quantum mechanics follows these principles. You've heard about the wave-particle duality. For example, particles exist both wave-like and particle-like features depending on what you do. Uncertainty principle, right? You know that if you know momentum very well, you don't know the position well, right, and vice versa. That's one of the limiting factors of quantum mechanics. And then you also have the entanglement principle, right? So you can entangle states. So when they are far, far apart, you can still kind of communicate with that state. So there's some intrinsic correlation between the two states, and that's also very unique for quantum computing. Then obviously, the consequences of these postulates and principles, for example, is that you have quantization. So certain physical properties, you have discrete energy levels, right? That is not very obvious from classical mechanics. Where you have rather continuous values, right? Your function is continuous in classical mechanics, for example. Then you have interference, which we already talked about today a little bit, that you have the quantum particles that can interfere with each other constructively and destructively. And that's an important tool for quantum computing. And yes, quantum computing is a consequence of these principles. So in any case, you know you studied quantum mechanics fairly deeply, and then all of these things you learn in quantum mechanics fit into quantum computing, which is just very nice. So pretty much now what I want to do is I want to kind of talk a little bit about superposition principle, right? So when we talked about that your qubit has two states, it can be zero and one. But in principle, you could have K states, right? So classically, think about energy levels. You could populate the zero state, the first state, the second state, the third state, and so on, right? So you have many states. So classically, you have all these states you could populate with, and each of these states could be assigned to something, and you could use that for computation. So in principle, you could have K of these states. We typically work with two, a qubit of two, right? So with two states, the zero state and the ground state, but you can have many of these. In principle, you could have K states if you wanted to, and people are looking into ways of having more states in their bits for quantum computing. So this is something we talked about already. So you have your quantum state, and you want to write your wave function. So this is something very important now that when you write your wave function, your Schrodinger's equation, the way your qubit state evolves, so you have a wave function. We typically call it capital Psi, again in the ket notation. And then what you have, you have a probability amplitude in front of it. So you may have the zero state, plus you could call this actually alpha sub zero, I believe, yes. And then you have alpha sub one for one to alpha sub K minus one. So in the case, this is your wave function, this is what you evolve over time with your Schrodinger's equation. You can also write in terms of a vector, which has data there, and then you have to have them to be normalized. So in any sense, your state, your quantum state is a unit vector in the K space. It's a complex space, and it has to normalize to one. And we also know this as Hilbert space. And then also in order to operate on this wave function, so typically when we do operations, we apply a unitary operator to that wave function. Okay, so now we are going to, this is your input, right? Go back to your classical idea of gates. This is your input, right? Now you're applying some gates, so you have to have input to get a new output. So you're doing an operation on your state function, a state vector, and that's how you do it. So these operators for quantum computing are matrices. And these are Hermitian matrices, and they have a very specific property that if you take the complex conjugate or transpose u dagger, you do u u dagger or u u to the inverse, right? The inverse matrix, and then you get the identity matrix back. And that's a very important feature of quantum computing. It's a very important feature. We talk about circuit optimization to run it on a quantum computer. They even make it possible to run on a quantum computer. Unitary matrices are very important because we've all learned about gates, basic gates of a quantum computer, and they all connect to this unitary matrix. So that's a very important concept. Okay, so now, just as an exercise again, again, imagine you have these baoli matrices. These are very common in quantum computing. These are Hermitian matrices. These are 2 by 2 matrices. And for example, you want to show that they are indeed unitary operators. How would you do that? So you have sigma sec x, which is 0, 1, 1, 0. So how do you show that this is a unitary operator? You sigma x, sigma x conjugate, right? So you have this, right, times the same, right? And if you do this, because you have to do the dot product between it, right? If you do the math, you should get your identity matrix, right? So that's how you show it. If you wonder how to do this, so you do this times this, plus this times this, right? You have to do this entry, this times this, this times... Oh, yeah, so this times this, this times this, and so on, right? So you go through your entries in that way. Okay, so now let's talk about different qubits. So if you have one qubit, right, and you only have two states, you write this down in the superposition, where alpha sub 0 and alpha sub 1 are your probability amplitudes we talked about before. You square these, these give you the probability of being in a 0 and a 1 state. You can write the wave function's term of column vector instead of the bracket notation, and then you have a unitary matrix that operates on your one qubit, right? So now what happens if you have two qubits? Well, if you have two qubits, it's getting a little bit more complex, right? So now each of these qubits can be simultaneously in the 0 and a 1 state, right? So now you have four different states. You can put your single qubit in, up, down, down, up, or like 0, 1, right? So you have four different states, and each of them is going to have a probability amplitude assigned to them. Again, this is your wave function. If you square your probability amplitudes, you get the probability out. Again, you have your bracket notation here, right? This is your column vector, and your unitary operator is now a 4 by 4 matrix. Okay? Also, I want to say here, we talk about Hilbert space sometimes. So your two qubit system, once qubit system lives in C squared, Hilbert space, your two qubit system lives in the C to the fourth Hilbert space. If you now have multi qubits, right? Now, again, what you have, you have to think about each of these qubits can be in two states simultaneously, right? So now you have two to the n possible states. So you see how this is blowing up quickly. And that's where quantum computing is making big leaps, right? Because if you have 50 qubits, you're already talking about terabytes of information, right? So it's blowing up quickly. So quantum computing is going to be very, it's impossible to do, like, model classically if you have 50 qubits. It's just you're going to need too much computational power from a classical computer. So in any case, you can see how it flows up, and you can also see, like, computationally how it gets, that's why it's so difficult, right? Imagine you have a two to the n times two to the n matrix. You have to all write it all out, right? And you have to go along. Maybe you've heard about sparse matrices that's so much easier in quantum computing to work with because you have lots of series you can throw out, right? So it makes it a little bit easier for your computer. But in any case, you can now appreciate why it blows up. It just gets bigger and bigger and bigger and eventually classical computing can't, you know, simulate this. So that should get you an idea of what a single qubit is, what two qubits are in multi qubits. Obviously, we can work with more states and then it actually gets more complicated. But typically our qubits now in our actual hardware has two states, right? A zero and a one. Okay, we really did this a bit twice. Okay, so now a lot of you have heard about a block sphere. So who has not heard about a block sphere? Okay, so most of you did, right? So a block sphere, this is your physical representation of your qubit, right? So in essence, what you can think of is that your qubit can be either you can think about the qubit being on this block sphere, it's a vector on this block sphere with lengths of one and you use spherical polar coordinates to describe the position of that vector. And pretty much what you do is you do a computational process, you can think about this that you have your block sphere, you initialize your state function, right? In a position, maybe in a zero state. And then what you do is you apply these unitary operators and what you do is you rotate your vector on that block sphere. Okay? So in essence, that's what you do. So each qubit is in essence a vector on this block sphere so if you have multiple qubits you have multiple of these block spheres and then if you entangle the qubits the spheres in essence talk to each other but it's a little bit difficult to to draw this picture. By any case, this is what we use typically in order to describe qubits. So it's a very nice visual representation of what a qubit does during a computation. So what you add these matrices. And that's another thing about these Hermitian matrices. They are rotation matrices. So maybe you remember in classical mechanics, right? When you talk when you go between different you go between different representation, you want to rotate it, right? On somehow for application or you want to go to a different space, you have to rotate it. And that's what all unitary matrices are. They have pretty much rotations on this block sphere. So yes. So pretty much then if you have your block sphere, right? And I'm not really good at drawing. That's why I have a picture up there. Right? But if you think about this you're looking at the block sphere this way. So see this is the y-axis and that's the c-axis. Here we have state zero. And here in the bottom we have state one. And you have a vector there. You are thinking about the probability amplitudes, right? So in essence you can think about the projections. But these probability amplitudes are the projections on the c-axis. But then when you actually measure when you measure a qubit what it does is it jumps either to this state or it jumps to this state, right? So it becomes then that value on the block sphere and it sticks there. It stays there. So it becomes then once you measure it this qubit on this state vector jumps to this state or this state. So it collapses onto the zero and one. When you do a quantum computation. This is the time. So this is what I said here in the words. So typically what you do if you have one qubit we already talked about this. You have it in a bracket notation you have your zero state and your one state. If you want to calculate your alpha what you do is you take the inner product so you may have seen and remember that from quantum mechanics you multiply the bra to your wave function right? So what is the bra? That's now a row vector right? So that would be then one zero. So now this is your row vector. So it's a bra and the other thing was the cat. That would be this way. So in the case in a product then you have to multiply a row vector times a column vector and then you get out a number. If it's imaginary you're going to take the complex conjugate and you get alpha squared which gives you the amplitude. You do the same thing for beta and so on. So you can do also now you can map your qubit onto the block sphere. So you can take this equation here okay here this equation and you want to map it onto the block sphere. Here what you do in this case is you are told you that you know from the postulates of quantum mechanics that alpha and beta must be complex numbers. So you can rewrite them in Euler's notation and then pretty much what you can do is you can go through the algebra and you can go back right this was your alpha this was your beta you put in your Euler's notation which are angles right so for your Euler's notation or science and coscience if you wish. You can factor out the E to the i theta 1 this is a common phase and this phase remember what the phase was on the block sphere the phase of the block sphere took you around right like this this has no effect like an overall phase does not have an effect on your amplitude or probability amplitudes so you can take that overall phase out and now what you do is rewrite this fashion so now you have alpha upset value of alpha and then here you have a phase a complex possibly complex number right here in front of your one state and then you can even go further in polar coordinates that's a little bit more messy have to go for a lot of algebra but at the end of the day what you end up with is this representation of your psi function where you have your theta right your theta takes you from up to down on your block sphere and then you have your phi E to the i phi that's your phase angle takes you around the block sphere so your qubit now can be represented on this block sphere very nicely so either you can use your bracket notation which is very nicely a way of representing in a very compacted nicely or you can go onto a block sphere where you can think about rotations on a block sphere so these are different ways so when you do a computation you can think about it in these different ways so now the last thing I want to do now are quantum circuits okay so quantum circuits is a way of doing your computation and in essence what you have here is a quantum circuit I got to redraw this a little bit because late check doesn't doesn't necessarily like show you the circuit you will see when you start computation today so you have is a quantum circuit so typically start state right that's your input then we call this a wire right so this is a wire so now we're going to do computation for this qubit on this wire so this is the qubit one typically actually we call this qubit zero so in ticket what you're going to see here is q sub zero that is going to be your first one so now we're going to do a computation on this wire so we call this a wire time is going this way and then what we do is we're going to do a unitary operator we can apply that to the wire and then we keep going and then what we could have because we have two qubits so maybe your qubit one is maybe initialize to random input right it could be a random state function doesn't have to be clearly in the up or in the zero position or down position it could be any again you have a wire you maybe apply another unitary matrix you shouldn't do your prime maybe call this u1 u2 and then you could have some unitary matrix u that maybe is in this case 4 by 4 matrix and you can now for example entangle it and you keep going and then eventually what you do is you measure out you measure your qubit why do we need to measure your qubit so we measure our qubit and then what we do typically what you have and it's kind of like drawn differently up there but here you have your classical registers so maybe here you have your first one so you have a classical register one and classical register two so what you can do is you can measure them out right during the school for next four days you will see algorithms that actually can measure things out and depending on what you measured out and what result you got you can feed that back into your algorithm right so this is pretty cool we'll do that quite a lot for example for quantum error correction and the other like algorithms that have it but this is your input this is your algorithm that's your measurement function right and obviously what you can have you can have it even more complex you could have this classical your classical computer right have doing some classical computation and then part of the computation is fed into a quantum computer that information comes out from the quantum computer and then you do a classical computation so there's also something called hybrid computing so in essence your quantum computer will never be by itself it always going to have a classical component to it that you need for computation so that's kind of like the very beginnings of a quantum circuit now let's talk a little bit about some of the gates you may experience this week one of them is the Hadamagate so Hadamagate is an H gate right we call it H you see up there it's a 2x2 matrix it's a 1 over square root of 2 it looks like this and what you do in this case is here you can now imagine if you have a quantum circuit so here you have your initial state now you apply a Hadamagate what is the output right output wave function so what you do this is kind of like intuitively but what you do is you apply the gate here so what we're looking for the output wave function is the Hadamagate applied to the zero state so now you have a 2x2 matrix so we're going to do this 1 over square root of 2 you have your 1 1 1 minus 1 you apply that to your zero state right you go through the matrix multiplication and what you get is 1 over sorry 1 over square root of 2 and you get 1 1 ok again remember this is your direct notation right so this is your direct notation so remember that your 0 was your 1 0 and your 1 was your 0 1 so now you can rewrite this as 1 over square root of 2 of 0 plus 1 so what this is Hadamagate do it took a qubit that was initialized up on a block sphere rotated it in a super position between your 0 and your 1 state right so the Hadamagate is the gate that puts your qubit into super position so you will see a Hadamagate like every in every circuit in quantum computing because it puts the qubit in super position and that's how you do it you can think about a rotation on the block sphere or you can think about it a bracket location matrix multiplication so there are many many many two qubit gates you will experience or see or work with when you do quantum computing I obviously don't have time to go through all of them but you know there are resources out there you can Google them you can see them we have an explanation in our ticket documentation too but pretty much these are your different rotations baoli x baoli y baoli c gates right rotation about the x axis y axis c axis s gates t gates there are different rotations you can also have gates that don't rotate at any given angle right so for example your quantum computer quantum devices can have unitary operators that rotate just a little bit or a lot so you can rotate any angle on your block sphere so you can think about your matrix rotation you can think about rotation or block sphere whatever works best for you to understand how algorithm works you develop then during the hackathon for example very important is the tensor product that you will see and you have to work with it's used to combine qubits into a joint state okay so first you have two qubits right you have two qubits here on each of the wire the wires don't talk now you have to somehow join them right so when you do that you are applying in essence a tensor product but it's more than that because when you entangle things it's getting more complicated but if you want to join the two qubits typically you use a tensor product that is up there which is very important in order to make a joint state so then you get for two qubits you get a two hold on so it's like a column vector of four entries right when you have three qubits how many entries does your column vector have eight good if you have n qubits two to the n right so again very long column vector okay then you would what you're going to also introduce in your computation is something called the c-naught gate so now the c-naught gate that is your unitary operator that for example IE c-naught gate right so this unitary operator here for a two qubit system could be a c-naught gate and again there are different types of gates there in this case if your qubit one which is your kind of like your initial qubit is in state zero then a c-naught gate acts as the identity gate on qubit two if qubit one is in state one the c-naught gate applies a not gate to qubit two so it flips it so again sometimes you can actually see controlled not that's what that means right so you have now the logical not gate we talked about right the flipping gate so this just means controlled so you have a qubit that controls the flipping or not flipping that's another qubit right so that's your not gate so again you can have many many of these gates you can have a swap gate where you swap your qubits the position of them you can have you control y applies a y gate to a second qubit if the first qubit is in the one state and such so there are many many many of these of these processes you can think of you will experience many of these gates there are also three qubit gates they're entangled three qubits with different control sequence and such so it goes on and on we have developed many of these things and the important thing I want to say here is that control not that's a typical gate operation you can do in your quantum computer that's how you entangle typically two qubits can you represent the C not gate on a block sphere no right so two qubit gates you can represent on a block sphere cannot represent on a block sphere the single qubit gates you can these are rotations but the two qubit gates you cannot so that's why the block sphere has a limited representation here regarding how algorithms work that's one thing I want to say and then I guess just as an exercise you know this is a very very common exercise you have seen but just to get us all to the start what you need to do now for example if you think about the bell state the bell state is a state there are four bell states and it's kind of like the most basic quantum state that entangles two qubits and in this case what I want to do so what I haven't told you now maybe I should go back so 0 so now you have the tensor product of 0 right that gives you now a 1 0 0 0 right or you can write this as 0 0 right so this is your tensor product so you have two qubits you put them in a combined state with a tensor product so now the question is how can you design this circuit which is the bell state using the gates we discussed you want to use a lot many gates you want to have a two qubit gate you want to use the least number of gates because in quantum computing we'll talk about it the more gates you have each of them are operations with lasers or they're operations with a filter or they are operations with a microwave and each of these operations will add noise right because your quantum computer is not perfect it's going to have tumult errors so for example one thing you want to do when you do algorithm development is you want to apply the least number of gates because each of them is going to add error so in any case if you want to think about this what you want to do here is do that's your amplitude you squared it so one half of the time you want to have both qubits in the up position one half of the time you want to have both qubits in the down position so that's what you're looking for and typically your quantum computer starts with some initial states for each of your qubits and in this case both of them are up so let's assume that you start with this you have qubit 1 qubit 0 sorry this is a little bit confusing but this is what your quantum ticket is going to do you're going to have a 0 and 1 qubit so it's going to be initialized in an up position and now we have to do a computation right so now we have to put it first into superposition so which gate do we use to put something in superposition Hadamard gate so you apply the Hadamard gate so and then what you want to do actually you want to apply the C0 gate and I think you see it differently so C0 or X0 it's a controlled expectation given your target qubit so once you see this here you can also see in terms of this the X ticket will give you an X here if you work with Qiskit it has this symbol and then in any case you are measuring out so this is then your final state so if you want to write this down you can show mathematically that I also have to make sure that I get that right because I always mess up where the I is so if you want to do it mathematically what you do is you have your zero zero state you start with then you have to do a Hadamard gate you have to bring these two qubits right into superposition and then you are applying the C0 gate in your circuit so what it does here this right so Hadamard with the identity matrix this gives you a 4x4 matrix so if you want to write this all out it looks like this so let's do it step by step for those who have seen this so zero zero is your one zero zero zero column vector then what you do is Hadamard tensor product into the identity matrix you have one over square root of two of one one one minus one you do your tensor product into the identity matrix this gives you then what should you get here because again what does a tensor product do it puts us into a combined state right so you should get a 4x4 matrix out so if you do that you get one over square root of two a one zero one zero zero one zero one zero minus one zero zero one zero minus one and then what you do is you apply your control not gate things here but now if you do your and then oh sorry this is your matrix running out of space here and then you still have to apply it to oh sorry that's right so now what you do is you apply this right to your zero zero column vector and then you apply the C not gate if you do this then you should get your final answer let's see if I have enough time I have two minutes left so if you're interested I can write this out now so if you do the the Hadamard gate tensor into your identity matrix then you apply it to your zero zero state right if you do that you're going to get one over square root of two of one zero one zero now what you do is you flip the C not gate you're applying a C not to this and that will give you one over square root of two so you're flipping it so what do you get did I maybe made a mistake here sorry the zero zero is one zero zero zero what is your one one zero zero zero one right so you're flipping this so you get one over square root of zero zero zero and then I need here a one right so now I have both of these states in here and now you know you're getting their wave function which you were looking for okay so I said that I'm not going to go through any kind of quantum computing but just take this away right so your classical bits deterministic your quantum bits deterministic you have a probability you spin left right at the same time right you don't know until you get measured measurement is collapsing on the block sphere and to the top at the bottom it's actually you can do a measurement calculation in your bracket notation with your projection operator we're not talking about that and then pretty much what a quantum algorithm is you take your input state function whatever it is it's defined by the Schrodinger equation you evolve it over time by applying gates all you do is rotations on the block sphere and then eventually it's a matrix multiplication if you think about that and then you're measuring out what you got if it's going to be up up down down or whatever and so on you have tens of products that go into there unitary matrices are very important these are your operators and they must have the properties of you you dagger giving you an identity matrix and if you keep all this in mind you will be perfectly set up to do your algorithms so next after lunch you're going to learn about Ticket how to actually program these circuits into software development kit right and then once you know the tools we then go into algorithm studies the rest of the day so enjoy your lunch and thank you for your attention