 OK, thank you. So I want to teach you how to really solve a strongly correlated model on the right kind of hardware. Because this cool is about, OK, we need two different microphones. Yes, great. One is for recording, one is for the room. OK, good. OK. So I want to teach you how to solve quantum systems on a quantum computer. Who of you brought a computer with you? And who brought a quantum computer? Nobody yet, you're laughing now, but I think within your lifetime, if you stay in physics, you will use one within the next three or four years, a toy machine in five years, something interesting. And in 10 years or 20 years, it might become what you're just using class even. And so I want to teach you how you will use one once you get one. Because if you stay in physics, then you will use one. So you should start and learn now how you use it and what to use it for. But first, you had two weeks of lectures, lots of different methods, this morning on DFT and so on, a full CI and a couple of clusters. And it was always, it's hard and you can't do much and it's hard and so on. Why is it hard? It's hard because we're trying to simulate the quantum system on a classical computer. Now, classical computers have been around for a long time. Let's see if this doesn't work. So let me just click here. The first ones were the Greek, 100 BC people built a machine with 30 wheels that could calculate the positions of the planets and the moon and the stars. It was very complex at the time. Then a long time, nothing much. And then in the 19th century, Lord Kelvin built a four year analyzer that could predict the tides in the channel. It was a complex machine that could do the Fourier transform in an analog way. It is easy to build such a log computer because basically you build something that when it runs, works according to the equations you want to solve. And by running, it solves the equations. They're simple, but they are hard to scale and they're hard to calibrate. People built machines to add numbers, plus multiply them. They were well easy and fast, but you couldn't go to more than four digits. And if you want to sum up a million euros and 2 million euros and 5 euros, then you need six digits or seven digits. So then people switched to a digital machines like the ENIAC. Those machines were much harder to build. They took much longer to build, but they were general purpose. You can program many different things on one and not just what you can build with your Legos. They can also correct for errors simply by doing the same calculation twice or three times and checking how many agree and that's number you trust. And they are scalable and you can build it up and scale it and now we have bigger big machines like the Milky Way 2 machine which runs really amazingly fast. And with Moore's law, things go exponentially. We had over the last 50 years an exponential increase in the speed of the fastest machine that's here drawn from 1990 to now. And basically the speed doubles every year on average. So within 10 years, we get a machine that's 1,000 times faster. So things that were slow, 10 years, go will be no problem now. We have this exponential increase and that seems like we should at some point be able to do whatever we want. With doubling, we can do the full CI. Basically every two years, we can add one more orbital to it. And in 20 years, we'll have 10 more orbitals. In 50 years, we'll have 25 more. So we just need to wait. And at some point, we can do thousands. But there are two problems. The first problem is we get this fact. OK, first, I don't want to wait 50 years to get 25 more orbitals. The second problem is that we get this factor of 1,000 increase in 10 years by making the CPUs faster by factor 10. And the rest comes by putting in 100 times more CPU cores per decade, going up from about 10 to about 1,000, 10,000, and 3 million now and soon about a billion. But even using 3 million cores means you have to write a code that you can parallelize over 3 million different cores. And that means that 99.99993% of your code has to be perfectly parallel, or you can't even split your task over 3 million cores. Just think you want to do something. And I give you 3 million students to help you. It's hard to use them sensibly. The next problem is power consumption. As long as you could just shrink the transistors in three dimensions, it all worked nicely, and the power used stayed constant. And the supercomputer needed always less than a megawatt of power. But now the scaling has stopped in the third dimensions because you cannot make an insulating layer less than about four atomic layers take. So the two might still work when you go to one or half an atomic layer, then it's no longer insulating. So the scaling is now just in two dimensions. And the consequence is the power consumption is going up. And it's going up exponentially recently. And because it used to be about the megawatt, then three, now it's about 20, and we could build the machine now that runs at the extra flop or more, but we might have to use the gigawatt of power, and one megawatt of power costs about a million euros per year. So a gigawatt would cost about a billion euros per year just for the power bill. And don't think we get that money for our calculations. So there's a problem here. And what people think about in hyper-computing is what can you do when to go beyond the extra scale? So beyond what we are thinking of, but we might be able to build in the next years. And when they ask that question, then they're not just referring to a yatta flop, meaning 10 to the 21 flops, so a factor of 1,000 more than now, but just thinking about what can one build to do things that are just impossible to think of now? What can it do when, again, let us do totally new things that we can't do now? And one of those ideas is to define man. He wrote a paper in 1982 where he asked the question about what are the limits of simulating physics with computers. Can you take a physical system and simulate its evolution? Can it be done? And I think you all sit here because you believe it's possible. But what we know is for quantum system, it's really, really hard. And that's why you had lectures on many different approximate methods or limited methods. QMC works without the same problem. The DFT works when relations are weak and so on. But when it's strongly correlated, then things just get hard. And Feynman then had the great idea to say, OK, if we want to simulate a quantum system on a computer, then on a classical computer, it's hard. But then he had the idea to just use quantum elements in the computer to actually simulate quantum physics. So if you build a computer that works not based on classical physics, but on quantum physics, then he argued it should be efficient to simulate a quantum system. So one could build a so-called quantum computer to simulate quantum physics. And that's when that word first came up. And it was invented for simulating quantum physics. Now, why do we talk about quantum computers today? We talk about it not because people found there's such a great idea that we should invest lots and lots of money to solve quantum problems. That was a great theoretical idea. But nobody was excited to say, yes, I need to build a quantum computer now. Who knows what changed it? Yeah? Yes, there was Schwarz's algorithm that later on, Peter Schwarz found out that if you had a quantum computer that you might be following Feynman's ideas, then you can use that to factor integers. Let's say 21 is 3 times 7. Why is that interesting? It's not interesting because that's such an interesting problem to factor integers, but it's interesting because it is classically hard and nobody knows any efficient algorithm to factor integers. And that's why this is the basis of what we use now for public key and encryption systems for your e-banking and so on. It's all based on the fact that if you have two prime numbers, when you multiply them, you get the big number and it's very, very hard to find those prime factors. If you have just the product, you can encrypt it. But to decrypt the message, you need to know the prime factors because that is hard classically. This is a good cryptosystem. But if you had a quantum computer, then you could find out the prime factors and you break it. And so if you have a quantum computer, then you can use it to break encryption systems. And that led to the typical interest in people think about building one. Now, why do they build one? Because it's so interesting to crack encryption. Is that the reason? I don't think so because people have never worked already on post-quantum cryptography. You can think of systems, cryptosystems, that you cannot crack with a quantum computer. So the moment we have a quantum computer, we just change our software and we're safe. So that's not the application. But it costs interest because, and I think the main application is not because you want to crack encryption because already years before we'll have a big quantum computer that can do it, we'll switch cryptosystems. So if you're some entity with some old documents, 20-year-old ones, you still want to decrypt them, yes, then you need it. But I think the main reason of the interest is you want to know whether the enemy can build a quantum computer. So whether you want to know whether your cryptosystem is still safe. And the only way to make sure that the others don't have one is you need to be the best and you need to try and build one yourself. If you can't build one, you're pretty sure the others also can't build one. But if you can, then you know your system is unsafe and you have to change cryptosystem. But once you change, you don't need the quantum computer anymore. So that's not the real application. The real application, I think, will be doing quantum physics in the end. But we might get one because of code breaking. What do we have at the moment? We have devices you can buy in Switzerland that give you quantum random numbers. Perfect random numbers. It's impossible to get it classically. This classically, I think, is a deterministic. You can do quantum cryptosystems. You can encrypt information. You think quantum mechanics that it's provably safe. You can build a quantum simulator. That's a lock device using, for example, the quantum gases to simulate the quantum system. Again, like in the classical world, analog is easier to build. These things exist already now for millions of particles. But like in the classical case, they're limited by calibration problems, cooling and temperature problems. And you can only build whatever the particles, the legos you use, have as their couplings interactions. It's not flexible. If you were to build something digital, then it's more flexible. But it's much harder to build. You might have heard about D-Wave, the quantum optimizer. We don't really know yet how much such a system could do. They built one just because it can be built now. It works. It's not faster than a PC at the moment, how it scales. Nobody knows yet. But what we know is if we have a quantum computer, then there are many things we can do that we cannot do classically. But this takes a bit longer to build. But if we have one, OK, let me just stop here a bit now and ask who of you knows what a quantum computer is and how it's built and how it works. Besides Baylor, you should stop talking. You're building one, aren't you? Who of you is building a quantum computer? Who of you has used a quantum computer? Who of you has heard about the quantum computer? Who knows how it, yes, I told you about it now. Who knows how it works? A few. OK, so basically it's a computer, like a classical one. But instead of bits, it uses quantum bits or qubits. And classical bits can either be 0 or 1. And the qubit is something that can be in a quantum superposition of 0 and 1. So it can be something like alpha times 0 plus beta times 1. And you all know that there's just the simple spin half system. Just like alpha times up spin plus beta times down spin. If you know what the spin half is, then you know what the qubit is. And why does that make a difference? In classical computing, there's the Church-During thesis, which states that basically every type of classical computer you could build is essentially a equivalent bit, a cell phone, a computer. And the During machine makes no difference. They all can basically do the same thing efficiently. And so the quantum systems is hard. What Feynman said is that if you take such quantum bits and build a quantum computer, then you can do things that no classical computer can do efficiently. And basically, you see that already here. Classically, we have one bit. In a quantum bit, I need two complex numbers to store the state of one qubit. Of course, alpha squared plus beta squared has to be 1. So it's just then a bit fewer numbers. But if you want to precise this store, you need infinite precision. So you need two complex numbers to infinite precision to just represent the state of a single qubit. Now, we might not want to get infinite, so just we need to store two complex numbers. What if we go to n qubits? We go to n qubits, then you have n spin 1 half. And we need, of course, two to the n complex numbers to store the state. That's the problem why it's hard to simulate the quantum system, because my state can be just the sum over all possible states of the qubits I1 to In. Some constant, let's call it A, I1 to In times the state which has the first one in the state I1, I2, and so on up to In. You just have to store that vector and the Hilbert space is large. So you see, a quantum register of n qubits, if you want to describe its state in a pure state, needs two to the n complex numbers. So it needs a huge amount of classical information. That tells you that it might be able to do much, much more than any classical computer. And you could think you have exponential advantage. But it's not so easy, because the problem is what can you obtain if I give you these n spin 1 halves, these n qubits? Let's say I give you n qubits. How much information can you tell me? You can measure the qubits, right? That's all you can do. And when we measure a qubit, we get either a 0 or 1. We just get the classical state. And measure the second qubit, I either get 0 or 1. So when I measure, the measurement gives only n bits of information. So to describe the state, I need two to the n complex numbers. And it has this immense information need to be described. But when I want to read out something, I get very, very little. I mean, just n classical bits. Just n bits. That's what's written here. I think this screen is in the way. I don't think we can move it. We can just tilt it. That's all. So that shows you that it has immense power or potential, but it's very limited at the same time. And that's actually the good news. Because some magic solution doesn't exist. There's no magic device that can do anything. But because this is limited, but still has this potential, it might help us. The next problem we have. So this is the good news, the bad news. The next bad news is called no cloning. Who knows about the no cloning theorem? About a third. No cloning simply means if I give you this quantum register here, and I ask you to make a copy of it, it's impossible. We can't do it. And it's basically easy to see. The simplest way is it takes some state psi that you want to copy. And it gives you some T register as well. Let me call it zero. What I want to do on this, I want to create psi in the copy of psi. And the easiest way of seeing that there's a problem is, you might just want to start with a zero. And zero, zero has to go over into zero, zero. And 1, 0 goes over into 1, 1. I'm copying the 1 here now. And now I apply the same cloner to a superposition. Then if I apply the cloner to alpha, zero plus beta, 1. And so then I just get the superposition of these things. Then I get an alpha times 0, 0 plus a beta times 1, 1, which is not what I wanted. Because what I wanted was psi psi, which would have been alpha times 0 plus beta times 1. And the next one is also alpha times 0 plus beta times 1. Why does it have to be linear? Can you do something nonlinear? OK, we can try. Let's say you give me something, some magic thing. Let me prove that it's not possible. And the way I prove it is it should be able to clone any arbitrary state. And whatever it does, it has to be unitary. So let me start with the state psi 0. And I calculate its norm. And I take another state, phi, for which it should work. It should work for any state that I give you, because you don't know the state beforehand. So let me calculate. And we have your cloner. The cloner takes this over into psi psi. And the cloner takes this into phi phi. And the cloner does not change the norm. It's unitary. It does not change the inner product either. So let me apply this to and let me calculate the inner product of these two. That inner product is 0, phi, psi, 0, which is just phi psi, because that is 1. That has to be the same as the inner product after my unitary cloner, which is phi psi, which is phi phi, psi psi, which is phi psi squared. For this to be true, it can only be true if phi psi is either 0 or 1. So your cloner can only work if the two states are identical or orthogonal. It can't work for a general state. Because quantum mechanics is unitary in the time evolution. So we can't even copy. And that's another restriction we have. In classical computing copying, we do all the time. We copy variables, we write codes in parallel. We copy our inputs, farm it out, run it on this million cores, collect it. We can't do that with quantum information. So we have another restriction. We can't even copy our states. But we still have this big potential. So now let us think about, let's say we want to describe what such a quantum computer does on a classical computer. If you want to store the state of 10 quantum bits, I need to store 2 to the 10 complex numbers, which takes 16 kilobytes of memory. My watch has more. I can simulate the unitary operation on that in microseconds. So with 10 qubits, my watch can do it easily. If we have 20 qubits, it takes megabytes of memory. It takes milliseconds on my phone. Could do it here. If you have 30 qubits, it takes 16 gigabytes. It needs a big laptop. And it takes seconds. Now it's getting slower. I need my laptop. With 40 qubits, I need 16 terabytes. That's a big machine, and it takes minutes. With 50 qubits, I need 16 petabytes of memory. That's kind of the biggest machines that exist. And I need it for days just to do a single operation. With 60 quantum bits, it needs 16 exabytes. We don't even have that yet on any machine. It will take a very long time. If you go to about 80 qubits, the memory just fits into the visible universe. And the time is longer than the age of the universe. So when you go to 800 or 200 qubits, then we just have no way to simulate what it does. So we have this thing here that's basically it's been one-halves, our quantum bits. And we can do two things on that. And once we have more than about 50 or 60, then this thing can do things that we cannot simulate classically. The challenge is, what would we use it for? And where are we? How do we get such qubits? Who has a qubit at home, or in the lab, or has a friend who has a qubit? You can use superconducting circuits, use fluxes, for example. You can use, what do you say? Irons, you can encode in the motion state of irons. You can even use quantum spins, spin up and spin down. That's quantum spins. You can use many things. The problem is, we want to isolate them totally. Because I want this qubit to stay coherent forever. We basically want to build the Schrodinger cat. Who has seen a Schrodinger cat? Nobody yet. Because it's hard because of something a bit coherent. So you want to actually have something very, very isolated. The best ones are a bit north of here. Here are the irons. In the INSPOR group, they have 20 irons strapped nicely, isolated. When you don't touch them, they stay coherent for many hours. When you work on them, you can do about 100 operations. And then they start to go here. They might go up to about 40 or 50. That will take about five years, I guess. The operation times are slow. It takes microseconds for the operation, while your laptop runs at 0.3 nanoseconds of gate times. Superconducting qubits are much faster. They live much shorter, about 100 microseconds only. But the gates are much faster, so you can still do about 100 operations as well. It's easier to scale them. You can take a trap and you trap in 20 irons, maybe 50. But beyond that means you use more boxes. Superconducting qubits, you build on a chip and you can more easily scale it up. But the more you build, the more noise there is, the more coupling there is, and it gets harder to keep it nice and clean. You could go much better if you have had topological qubits. I think Baylor is working on one, or his company is. The idea is, if you can encode the qubit in a topological property of the quantum state, then no local noise can know the state. And so no local noise can actually destroy the state as well. And you can do that, in principle, if you find the migranian anions, they may exist in some quantum wires, we don't know yet for sure. If they exist, then these might live much, much longer and would make it easier to build a quantum computer. But we don't know yet. So we are that we have about 20 quantum bits so far, and we might soon have 30, 40, 50, or 100. Once we get to 100, it starts getting interesting. So what do we then do with it? Let's do that. So the first ingredient are the qubits we need. The second ingredient is we need the classical computer to control them. The third ingredient is we need to actually do something with the qubits. And that was also already shown by Feynman. And he did it just like for classical. What do we do with classical bits? If I give you a bunch of classical bits, how do you compute something with them? You reduce it. Yes, so you don't say I use Python. But basically, what you can do deep down in the hardware, you reduce it to very simple operation. You want to work on many bits, but we can't build any program just from having things that work on a single bit or two bit. The simplest thing, if I have a single bit and that's a line that feeds in the bit, now I can do, for example, a not gate. That's a gate. I feed in A here, and I get out not A. If I feed in 0, I get out 1. If I feed in 1, I get out 0. Then I can build more gates. I can build a classical AND gate. The AND gate gets an A, B, and the output is C. Taking A, B, and the output is C. If I get a 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0. And 1, 1 only is 1. That's the AND operation. C is equal to A and B. Who knows other gates? Can build an OR gate? A C equal A OR B. I can build an XOR gate. C equal A XOR B. And I can think of many, many, many gates. But what has been shown is that theoretically, you need only a single gate to actually implement any classical algorithm. So if I give you a bunch of classical bits and a single gate that you can get many, many times, then you can with that write any code you want to write. And that's which gate? There's the AND gate, the NOT AND. So if I give you the AND gate, that's enough. I just give you a pile of AND gates and some classical bits. You can write down a circuit that can't do any classical computation. It's easy. From the AND gate, we can build a NOT gate. Just by fitting the same signal into here, we get a NOT. Then with NOT AND, they can make an OR and so on. And a kid can build up any gate they want and any program they want just with a pile of NAND gates. So this homework, you should write a program to multiply two numbers with eight bits and just with NAND gates. And you can sit down and start writing it. It can be done in principle. And it might be nice to actually do that, but not OK, why don't you just do it at night, take NAND gates and write something to add two one-bit numbers? And you can write down a circuit and do it. The reason why it's instructive to do that is because on the quantum side, we usually work at the same low level. You would never do it classically. You just call Python and type 3 plus 7, for example, and it works. But deep down, the hardware is operating on those gates. And what I teach now on the quantum side is at the same low level. So what's finally proposed is you can do the same on the quantum side. So what can we do on a quantum computer? We take some state psi. And the only thing we can do is we can take it over into some unit area of where the u times psi. That's all we can do in quantum mechanics. But it's enough. If we can do that for an arbitrary unitary, then we can do anything that we want to do. Now, I don't want to make an arbitrary unitary simply because this is extremely hard to do. Just to write down this matrix, this is 2 N times 2 to the N times 2 to the N matrix. There's no way I can build this operation with less than 4 to the N hardware because I need to feed in the numbers. So the only reasonable way is to do the same as in the classical computing. And we want to look at simple gates that act just on one or on two qubits. And there are many, many gates you can think about. And most of them you know. Let's look at single qubit gates first. You can take in a qubit, and you can apply some unitary operation into it. And the simplest might be signal C operation, a C gate. That's the input, that's the output. How do I write what it does? It is not just the truth table, but it's a matrix now. The basis is just 0 and 1. That basis, the matrix is just sigma C, 1, 0, 0, minus 1. What else can I do? You might have guessed that I can do a sigma x matrix into sigma y. These are the Pauli gates. For these gates, I cannot build any arbitrary matrix. What I can do then is I can do next to the Hadamard gate, gate to H. And that is a matrix 1 over root 2 times 1, 1, 1, minus 1. And what that does is it changes the state. So that for a spin flips the z-axis to the x-axis. So this takes the state 0 into 1 over root 2 times 0 plus 1. And it takes the state 1 into 1 over root 2 of 0 minus 1. So it takes the plus x state, sorry, the plus c state into plus x and the minus c state into minus x. Then there's something which I call the HY gate, or sometimes called Y basis, or sometimes Y. So Y might mean more things. There is 1 over root 2 times 1, i, i, 1. That takes the plus c state into plus y and minus c state into minus y. Then we might do more. We might apply phases. So you can do a phase gate. Let me call that theta. That phase gate just does 1, 0, 0, and e to the i theta. Now I have a problem with that gate. Who sees a problem with this gate if I want to build it? It's unitary. Theta can't take any value. So how do I calibrate it? How do I control it? It's an analog gate. I can choose any value for data, and I might need to control it to 10 to the minus 20, and this is just very, very hard. I can't do that in general. So what people like doing is just some discrete angles that they can really control well. That's much easier. So we don't like that in general, but we might like something like the phase gate, the s gate that is just 1, 0, 0, and i, for the t gate, which is 1, 0, 0, exponential of i pi over 4. And this is called the pi over 8 gate. That's not a typo. It is called the pi over 8 gate because it can also be viewed as a rotation along the c axis. And we might do a rotation r, c of some angle theta, which you might define as exponential of i theta over 2 of i theta and exponential of minus i theta. That's just a rotation around the c axis by some angle theta. And if you choose that angle to be pi over 8, then it's the same as this up to a global phase that's trivial. Now, many papers don't defy the rotation gate this way, but with a division by 2 here. The argument of the convention that you may want to keep track of and check in the paper that you read. Then we can do a rotation also around the x axis and one around the y axis and so on and so forth, and we can build many, many, many gates. And of course, it's not nice having so many gates, so we want to simplify it. We want to reduce it to as few gates as possible, but we don't have to build hundreds of gates. And one way to reduce it is easy to see if we want to rotate something around the x axis. Let's say you have a qubit. We want to do a rotation around the x axis with a certain angle. But I don't have the rotation around the x axis, but I have the other gates. What can I do? I change the basis from x to c to the Hadamard gate. Now x is c. I rotate around the c axis with that angle, then I do another Hadamard gate. And so I don't need this and so on. And one can then show that it is sufficient for one qubit operations to just have the t gate and the Hadamard gate. For those two gates, you can approximate any one qubit operation exponentially well. So in principle, it is enough to have the h gate and the t gate. In those two gates, you have to build well, and those two gates can be built well using the topological methods. Yes? If you have a discrete set of gates, you can only ever create a countable number of rotations. Right? Previously. You have an uncountable number. You have complex entries in it, right? There's an uncountable number of entries. But now I want to approximate it. I approximate the directionals. And the question is kind of how many of those gates do you need to get two within some error? And you can make the error is exponentially small in the number of gates that you choose. That's the so-called Solowake-Titkel theorem. They show that it can be done. The best paper explaining it, because there's no real reference to that paper, the best paper explaining that is by Dawson and Nielsen. That's the quant pH on the archive, 0.5, 0.5, 0.30. And the fastest test we're getting in, the unitary is by the Welsh et al. And that's archive 1412.5608. They got it down to the shortest sequence of gates that's known to approximate any one qubit unitary. Now, so far we thought only about single qubits. Next we need to go to two qubits and more. And that's pretty quick now, because there's only one basically a classical gate that you need, which is the control not gate. And that gate, the two qubits coming in, the one is a control bit, that's the dot here, and here I do an XOR. And what that does classically, for a classical gate is AB, and this gives me out, so here there's A coming in, here there's B coming in, here there's A coming out, and there's A, X, or B coming out. Meaning if A is set to one, I will flip the bit B. If A is zero, nothing happens. So classically the truth table here is if AB, and let me do A, X, or B here, when A is zero, zero, zero, and zero, one, that's unchanged, zero and one, when it's one, then it flips it. And that's zero. Quantum mechanically it's a matrix now two by two, which is one one here, the rest is zero, and here when that bit is one, then I'm flipping it. So it flips that qubit if the control is set to one, and it does nothing if the control is zero. There's a control not when this is one, then it do a not operation on this one here. So this gate, and the T gate, and the Hadamard gate, the H where did I have it, with these three gates you can build any quantum algorithm you ever want to build. But it's at the same level as me giving you just a pile of NAND gate, and I tell you write an algorithm to do whatever calculation you want to do. It's very low level. So in what I'll show, we will use a bit more, a few more gates. To make it simple, I also will use this white basis change, and I will use an arbitrary C rotation. If you don't have that gate, then read that paper and it tells you how to rewrite it into the H and T gates. A long sequence of that. Which means that any algorithm will tell you every rotation has to be rewritten into about a hundred or more other gates. And if a rotation takes, and if a gate takes on I and T, for example, the 10 microseconds, then such a rotation might already take a millisecond. This machine will become very slow. Do you have a question? So before we use it now, and do things that are classically impossible to do, which we'll do in about five minutes, I need to mention one other problem we have. Not only that things are slow and that we can't copy and that we can't read out much, but there's also the problem that our qubits are not perfect. I mentioned the qubits we have now. They live for iron traps hours if you don't touch them. They live for about a hundred operations if I do something to them. The superconducting ones live for about a hundred microseconds. And then the cat is either dead or alive. So we need to find some way to keep it alive and that's called the quantum error correction. Classically we have the same problem. Classical memory is not perfect. Classical qubits are not perfect. But we fix it by duplicating information. I keep things in memory and I store an extra peritabit or two peritabits or I simply copy it. When I copy it and I have three copies, I can keep it forever because when one copy differs from the others, I simply fix it to again be like the other two. I can do that because I can copy. Quantum mechanically I can't copy. I can't do such a simple code. But there are ways of encoding it that I can fix errors but it gets much more complex. I don't want to mention the details but it can be shown that if you have qubits and gates that are good enough, then you can fix, and if you can fix errors faster than they appear, then you can keep a quantum state alive forever indefinitely. But that means you have to be able to fix it fast enough and that's the threshold. And if you can do about a hundred operations of the qubits without an error, then that is just good enough to in principle keep a state alive forever. But if you just add the threshold, it means you need an infinite number of qubits and you have to replicate the infinite number of times to keep it alive. If you affect of ten below, you might just need a million qubits to keep one qubit alive. If you have about the effect of ten thousand below, then you might just need a few hundred. So what's really nice now and exciting is that the qubits one has now are just good enough that we can start doing that. But with those qubits we have now, you will need millions to keep one qubit alive for a long time. So not only do we need not just 50 qubits, we might need 50 million qubits, but it's also harder to build than programming, so we are still a way off. But what we can do with what we have now is we can run things for a few hundred operations. We can do about a hundred gate operations on about 20 qubits that you can do today if you go to Innsbruck, for example. Once we have more qubits, there's a better than one could keep it alive for longer. So now what can we do? Let's say I give you one qubit and those gates. Who has an application? Something that's impossible to do classical. Something that you can sell that can make money. One qubit. If you want qubit, you can choose one of the gates and you can do measurement. Let me initialize the qubit in the state Sierra. Let me apply a Hardmer gate and let me perform a measurement. I showed that in this way. There's a tile and measure what comes out What does this program do? And if let it to zero, I apply one gate and a measure. This is a perfect quantum random number generator. I start from this state. So here I get the state one over root two of zero plus one. Then a measure. And the outcome of the measurement is if quantum mechanics is correct, it is truly random. This is the way how you can get two random numbers which is just impossibly classically because classically physics is deterministic. Here you can have two perfect random numbers. You can sell it. You can make money with it. Who needs perfect random numbers? Monte Carlo's emulation, I would like to have it all the time, lots of them, but it's a bit expensive to buy it. If I'm into security and they want to have really perfect encryption, then I make a one-time pair. They want a sequence of random numbers that they share secretly with someone. Then we both have the sequence and then I can use that to encrypt it in an unbreakable way. If I'm a lottery and they want to... Then I use these balls typically that fly around and pick out numbers. Now that might be biased or fake to somebody who could manipulate it. If I use quantum lotteries then it's provably perfect and nobody can sue me for biasing the lottery. Random numbers. What else can we do? If I give you two qubits. I give you two qubits in the few gates. A really useful application. We have 20 qubits already out there so you can get two qubits. You can buy them somewhere probably. What can you do with two qubits? Peter, you may answer. Two qubits you can start sharing a secret key, yes. You can do untapped encryption. The one-time pair they make here somebody can read it while I mail it to him. With two, what we can do is we can prepare them in a belt state. So I start with them being zero. Then what we can do... What can I do? Let me just take a qubit here and apply a Hadamard. I have the state here and now I do a control knot operation with the second one. Now the state I get here is 1 over root 2 times 0, 0 plus 1, 1. This here was 0 plus 1. When it's zero, this one is unchanged. When it's 1, that one also gets flipped to 1. So now the two qubits are in the same state but it's random which one it is. Now I take this qubit and I take it to ETH, Zurich, where I work. I take this qubit, I send it to Microsoft where Baylor works and then when we have them, then we both measure. Nobody knows what we measure but we'll measure the same thing because it stays entangled. And we have the shared secret. To turn this into a negative system we have to be a bit more careful but that's the basic idea. If you want to know how to turn this into a negative system then ask me in the break. We cannot only use that to share a secret. We can also use that for something else. We want to have two qubits. I send one qubit to Baylor. What can I do? I can use it to teleport information. I send one qubit to Baylor. I keep one myself and then I want to send some state to Baylor. And I might not even know the state. Somebody gives me a qubit psi and they want to teleport it to him. What would I have to do classically? Classically that state is alpha times 0 plus beta times 1. If I knew the state which I might not know but if I knew the state I would have to send two infinite precision numbers to Baylor which in principle needs an infinite number of classical bits. And now here's what I can do. I'll put down this here. Now what I can do is I can take this. What I do is I do a control knot gate of my unknown qubits with the one qubit that I had from before. Then I measure that qubit. And of that unknown qubit I do a Hadamard to measure essentially the x component of the qubit. Then I get out two classical bits which I draw with the double lines. These are two classical bits that I get out. And these two classical bits I send to Baylor. And then he does something to his bits that he has a station q at Santa Barbara. And what he does is if this bit is one he does an x operation. And if that bit is one he does a c operation on his qubit. If I measure one here then he applies a sigma c. If I measure one here he applies a sigma x. I send him two classical bits. He applies this and then the magic is that out here comes the state psi. I've teleported it just by sending two classical bits. If you want to see how it works then what you do is you start with this here alpha times zero plus beta times one and you write the state zero zero plus one one and add the one over root two in front of it. Now you apply the control knot operation here meaning you get an alpha zero zero zero plus beta plus alpha zero one one plus a beta one one zero plus a beta one zero one then you, and then in three lines you see that the state you get depends on if this is one he has to flip the x component if this is one he has to flip the z component. This is a five minute homework. It's worth doing because then you see how magically the state is teleported just by sending two classical bits of information. I can't even do it classically. Okay, this is magic you can do with two qubits or three qubits you can teleport. After the break we'll go to physics applications. Now before I want to show you one more thing there's something that is just impossible to do classically. If I just have two qubits that is I give you a function f of one bit. So a function f that goes from zero one to zero one and I want you to answer the question whether f of zero is the same as f of one. Is the function constant or not? But I give you a function that you can call only once. Given a function f can you decide whether it's constant or not? With a single function call. There is obviously not, right? Now is this interesting? You have to help me think about it. I didn't find an application yet. I think the best best that was I found so far is what if something comes and holds the gun to your head and tells me whether my function is constant but you only get a single function call. Okay, but it's obviously classically it's impossible. Now quantum mechanically it can be done. If you have a quantum computer then you can decide that with a single function call. And that shows you kind of how a quantum computer can do much more than a classical computer can. How do we implement such a function? We make it a gate. Here's the input x. And here's some input y. And there's my function gate. Uf it must be this unitary. And this output, it keeps the x the argument. And the output down here is yx or f of x. So if I feed in 0 here, then here I get f of x. And I can use that in a classical way. I feed in the state 0 here and 0 here. Okay, so let's feed in 0 here and 0 here. I get f of 0. I feed in 1 here and 0 here. I get f of 1. Now I use the quantum hardware and that's the quantum version of the function. And I feed in, not 0, but I feed in a superposition. I apply a harder market here after the 0. So I feed in here the state 1 over root 2 of 0 plus 1. What do I get? This output. This output I get 1 over square root of 2 of 0. Another one is f of 0 plus 1 f of 0. The output contains both function values. Or I do that with n input registers and I get the function evaluated at 2 to the n function values. I have the register here with the function evaluated at all possible inputs. I have it for all values at once. So I have exponential advantage over any classical operation. Or so one thinks at first. Because what happens when I measure the output? When I measure the output, the X collapses to a randomly chosen input. And this one just goes to the function value at that point. So if I measure this, I measure either 0 and the function value at 0 or I measure 1 and the function evaluated at 1. So when I measure it, I just get the function evaluated at a random input. And that is easy to do classically. I choose a random input and I call the function only once for that random input. So what we see here is we have in principle in the quantum register the function evaluated at all possible inputs. But when I read it out, I read only a single value. And it doesn't help me. So what can we do? Who sees the solution? We have to somehow manipulate the output in such a way that the bigger measure gives me the answer to the question that I want to ask. And the question that I want to ask is f of 0 the same as f of 1, or basically you want to calculate f of 0, x or f of 1. If I can somehow make that one qubit gets into this state, then I measure it, then I know the answer. Let me rotate the x with a Hadamard gate and then measure it and see what happens. So let's do a Hadamard here and then we measure it. So what do we get here? Now this is a bit complicated. This can either be 0 or 1. So now we have to make different. So I do the rotation on the x. What do I get? I get 1 over root 2. Now I do a rotation on the x with a Hadamard. So I get the 0, I apply the Hadamard. So I get the 0, f of 0, 2 plus 1, f of 0, plus I get the 1, f of 1, minus 1, f of 1. So that's the 0 plus 1 and this 0 minus 1. That didn't do it yet. They want to do something like this. The trick is I feed in a 1 here and do a Hadamard in it as well. When I do this, when I feed in here 1 and the Hadamard and also put that into a super position, that is the Deutsch algorithm, then I get out something very nice. And I might just want to show you where to have the notes. So when I do this, then it works out. Last bit before the break and after the break we then apply two, more than two qubits. So when I have this, I start from the state 1 half and the first qubit is in the state 0 plus 1 and the second one was in the state 0 minus 1. So this is the state 1 half and I get the 0, 0. Then I get minus a 0, 1. I get plus a 1, 0 and I get minus 1, 1. Then I apply the function f to it. This means this goes over into 1 half of 0 and this is f of 0 minus minus 0 and this is now the f of 0 inverted because I do the xor with 1. This gives me 1 and f of 1 and this here gives me 1 and minus the f of 1. Now I don't like this too much because I don't like having the function written in here. I want a 0 or a 1 here. But what I can see now is you see this appears here as the f of 0 or minus the f of 0 inverted. That means if the f of 0 is 0, then the 0, 0 appears with a plus 1. But if the f of 0 is 1, then the 0, 0 appears with a minus 1. Same here, if the f of 1 is 0, the 1, 0 appears with a plus 1. If the f of 0 is 1, sorry, if the f of 1 is 1, then the 1, 0 appears with a minus in front. So let me pull out a minus 1 to the power of f of 0 times 1 half and then this gives me a 0, 0 minus 0, 1. And here's the f of 1. So they pulled out the f of 0. So here, now I can write this as minus 1 to the power of f of 0 x or f of 1 times 1, 0 minus the 1, 1. Now we see that the second qubit is always in the state 0 minus 1, 0 minus 1. So this is just the global phase. I can't just walk away because I can't even measure it. This is just 1 half of the first qubit is 0 plus minus 1 to the power of f of 0 x or f of 1 times 1. And the second qubit is in the fixed state 0 minus 1. Now I want to measure the x component of this. So now I do it again. The hardware here and the measure. That gives me the value of f of 0 x or f of 1. That's the magic. That's easy, isn't it? I don't think it was easy that this is a very simple circuit. Four gates, one measurement. It is easy to see that if I have a function gate and apply it, and I call it with the superposition of inputs, then I get a wave function that contains the function evaluated at all possible inputs. But you've also seen that it's very cumbersome to actually extract information you want from this. You have it in this big wave function. And if you had the wave function, then you would know the function at all possible values. But having the wave function means you have to know exponentially many numbers and that takes exponential time, no matter what. You can't just read out a wave function to give you a quantum state, but you can only read out n bits. So the trick is to then come up with an algorithm that takes the state and changes the basis in such a way that when you measure the one bit you want to measure that you get the answer to your question. Once somebody gives you this, cake-creating is a simple exercise. It takes five minutes and you're done. Coming up with these algorithms is not easy. After the coffee break, we'll apply this to quantum systems. How do we solve quantum spin systems? How do we solve electronic systems? How about model, molecules, materials, whatever? And this is quite a bit easier. It's easy because you know a lot about those systems already. Other questions? How hard, yeah? This was done already. The STFs group in Paris, because these are just some basis changes, some pile sequences you do, the function, that's not too hard. What you need to do, if you want to do it, to do it, you need to look at the hardware, be it the irons, be it the, I guess, the collecting qubits, and they typically don't have the gates that I've used here. I use the Hadamard, the Controlled North, and there are a few others. They might have different gates. Now, what you have to do is you have to see how can you implement the gates I use in terms of what they can do? Then you get the big sequence that's not optimized. The trick is then how do you optimize it? Can you change it a bit to get the shortest possible sequence? But this can be done in the lab. It was done that, yeah, teleports can be done, the Deutsch algorithm was done, the random numbers you can buy, quantum cryptosystems you can buy, so these things exist. The next hours is that I teach you how can we use that hardware with 2, 3, 4, 5, 6 qubits, we have up to 20, but now to solve quantum physics problems. And what would we need to solve things that we can't do classically yet? So when will we use it for real hard problems that we can't do yet? And that might already be in a few years down the road. And if you help us with better algorithms, then we might make more progress. But because in five years or 10 years, you'll have these things, or on thank you bits, you will probably be able to use a quantum computer even in the cloud already within the next year from what I've heard. Yeah, you might have access to 9 qubits somewhere. Of course 9 qubits is something we can do on a smartwatch, as I said, but at least you can already start using these things soon, as toys at first and then in 10 years it will be bigger and then your student later on will then maybe run things on a quantum computer and solve problems and do a thesis on a quantum computer. And that's why I'm teaching you now how to use it for the time when we have something really interesting. Right now it's just cool to use them. In 10 years, they might do things that we can't do on any PC. Maybe, I don't know. So there are those nanowires in Delft. If you take two of them with four Majoranas, that will be one topological qubit. Now, we don't know yet whether the end modes are Majoranas. If they are, then they have a qubit. If they're not, then they don't have a topological qubit. What one has to do is one has to break the anions in there and show that it is, and that will still take a couple of years. Once one can break those anions, one topological long time-stable qubit. You need not just the qubits, which you might have already. The wires could already be thousands of qubits, but we don't have any gates for them yet. You need the qubits and the gate set. Whether they have the qubits depends on whether the end modes are Majorana anions. If yes, then they are. But they can't really initialize them yet. Nor read them out, nor manipulate them. So I think that in a few years we'll know whether there are topological qubits in those nanowires. So they have these wires, and they see modes at the end of the wires that so far look like what one expects from Majorana anions. But in order to actually show that those anions need to break them and show that you pick up the right phases when breaking them, and that has not been done yet. That needs to be shown. That will still take a couple of years, I guess. And then either it works, in which case it's great. We have qubits. Or if it turns out to be just a boson or a fermion, then okay, bad luck. That didn't work out. But those qubits should live much, much longer and should then make it easier to scale. So we don't even have one yet. But if we have one, then it will be easier to scale it up. We don't have one yet. But once we have one, it will not be hard to entanglement. You just break them. You move one around the other. And it's entangled. With ion traps, we have 20. Superconducting nine good ones or a thousand bad ones in eWave. They have a thousand qubits in there, yes. They don't live longer than a few nanoseconds. But they manage to scale it up to a thousand and that's quite a challenge. They should build a thousand that work on the same chip. With good qubits, we have nine and now it takes a while to scale it up. That's hard scaling it. Scaling and calibrating and testing it. It will happen. Yes, you can build a quantum annealer. That does not need perfect qubits. It can have bad qubits and it still works. The question there is, is it better than a classical computer and there the answer is nobody knows. They said, okay, it takes decades to build a thousand or more good, logical, stable qubits. And again, that will take forever. But there's the chance that using bad qubits. They were the best qubits 10 years ago, so it's not really that bad. But what can we do using those qubits that don't have if one scales it up and one can build quantum annealer with them, a quantum annealer can solve optimization problems. This is a big important application. Whether a quantum annealer can solve them better than a classical optimizer nobody knows, but it's a gamble worth taking and that's what they tried. So far one has not seen advantages yet. So it's not clear yet whether it paid off. What's about as fast as my laptop? Which by itself is amazing that you can build a quantum device that works as fast as the best classical CPU. But it's not really useful as a product. If when you scale it up where it starts working can get better, but it has quantum speedup that one does not know yet, for those problems that one tested it, we didn't see any quantum speedup. They tried. What is the quantum annealer? It depends on what you define by quantum. This consensus that whether the device depends on your definition of the quantum. As a physicist I will say this device uses quantum effects in how it operates. It uses quantum effects in the way it operates and its behavior is consistent with what I expect from a quantum annealer. So it looks like a quantum annealer, but it performs worse than a classical annealer. It can simulate it efficiently on a classical computer. So for the computer scientist, its computational power is the same as that of a classical device. And thus it is not a quantum computer in the computer in the scientist sense because it can efficiently simulate it. But we have many both only quantum systems, PCs and so on, that they can simulate efficiently. Physicists still call it quantum. It's still a quantum gas, a B.C. But you can solve it by mean field. There is a mean field theory, so it's trivial. So if you call a B.C. a quantum liquid, then D-wave is a quantum device. If you call it just a classical field, then D-wave for you might just be a classical computer. I think there's coffee.