 Good so I want to Show you today how to actually use a quantum computer once we give you one to solve the real like Pornic Nick near structure problem or quantum chemistry problem or a hubbub model or recuperate superconductor on a quantum computer The basic idea is due to Feynman. So those are mega references to read if you want to learn about how a quantum Computer works and the gate set and the boy child rhythm and teleports and so on and there's this great textbook the standard book and In that you should read the first 200 pages That basically covers what I did yesterday in a bit more detail The basic is due to Feynman. He said okay on a quantum Computer you can do physics Sets Lloyd then had the paper Decade later saying that you can do a quantum simulation of the gift lettuce models or on the quantum hardware Well, he mentioned then a bit about how you can do it in principle for the Negahubbub model those papers did not go into details of the Circus yet the simple mention that it can be done, but no details yet the paper by Ortiz and summer they showed The first time how you can do things how you can both things under Hamiltonian for example But just the time evolution the paper by Which field and This group that paper showed the explicit quantum circuits for the first time that you need to act Bevolve the wave function with the full electronic Hamiltonian this paper is written for people in chemistry and so it really explains what a quantum Computer is what a gate is and so on and it and it's a nicely better to the logical we wrote about six papers in the last years you find them on the Archives by looking for papers with Troyer Hastings and Wacker as authors Now what we learned yesterday is first we learned about cubits and how with And cubits you can store the wave function And spins or of End of over to Feminine orbitals then we learned a bit about quantum algorithms and quantum gates and What I wanted to show there was that the example of the Poetry algorithm we saw that a quantum computer can do Exponentially more than a classical one was very hard to read out the answer and did need some smart thinking To find something that it can do well First we learned about quantum gates and the gates that we use is the Harlem arcade. We use the C rotation gate we use The y-basis change gate. Let me call it H y and we use the C naught gate and more We don't need to actually build the quantum circuit for quantum chemistry and material science and quantum physics then We talked about how do we prepare a state? We learned about the adiabatic state preparation the the eigenstate cleanly we also learned about the quantum phase estimation and then I showed you circuits for Gabon model and circuits for an icing model and a spin model other questions about these topics what I want to talk about today is How do we actually solve let's say like The structure problem you want to for example you want to Find the room temperature superconductor, and you have an idea that a certain corporate if you push things around might be one So I want to take you to the properties of that or There's a very Important application you want to make fertilizer Who knows how we make fertilizer use the Haber-Bosch process for which you take take Nitrogen from the air and you take methane High pressures high temperature you squeeze it together and out comes ammonia and And you make fertilizer that uses 5% of the world Natural gas and 2% of the world's energy who knows how plants get fertilizer They have microbes in the root system But just make it at room temperature ambient pressure One knows the structure of the molecule that does it but to solve it you need to do FUCI with 200 orbitals and There's no way you can do that on a classical computer if you had a quantum computer Maybe we can do it find out and make cheaper fertilizer that could be useful or you might want to just solve a frustrated spin model But you can do all of that on a quantum computer So how do we do it? Generally, we first start in some basis and then I can do DFT on it or Focus something that gives me an approximate Counter wave function and that makes the basis set Orginal and then I write the negative the Coulomb problem in in that basis and I get Model like this to solve. How do you solve it? I? prepare a ground state and I face estimate if The Hartree-Fox state is not good enough what we do then then I start from the Hartree-Fox state and I Theopatically evolve from the Hartree-Fox state to the true ground state and then I Get the ground state wave function and the grossed energy After that, they still need to measure things that I want To measure my energies measure forces this measure property spectrum and so on But I want to focus now on just how hard is it to actually just get the ground state and The way we do that We learned yesterday We start from some state like the Hartree-Fox state and Revolve it under this Hamiltonian. There's lots and lots of terms Then leave the end to the four terms, but it's no problem. We just use a trotter break up Trotter break up and revolve with each of these end to the four terms in every single time step And so each of the terms there are circuits and we had them the CNOT strings and other Mars and basis changes and rotations it's just like what We did yesterday for the Hobbit model this was the hopping term here. We had that and this here is the Coulomb term which just has more of these gates. There's no problem. The complexity is polynomial as n to the four terms and each circuit has the string of CNOTs. That's at most n gates So it can implement every term with the other n gates And it can do one total time step with n to the five So then with this It seems it's really really efficient because we can do a time step in a n to the Five gate operations and we just have to to vote for the certain time to find the ground state and this with this we can do The Quantum chemistry, materials science and do many many things and it's efficient And so we then looked into the question is what if we have a small quantum computer If we have one with about a hundred qubits or 200 qubits then we can do the full CIA on 100 orbitals and we cannot do that classically So that could be very very useful If we can go to a thousand orbitals or ten thousand hay then we are really amazingly good But already with just 100 qubits or 200 we can do things that are classically impossible So we asked the question then can we do quantum chemistry? Can we solve an interesting problem quantum chemistry if somebody gives me a small quantum computer with just about 200 qubits? So can we solve some classically infractable problem on a small quantum computer in my lifetime? We then change the question quickly because of problems I'll show you in a moment to Can a classically impractical problem be solved on the huge quantum computer? And then we ask the question whether they can be solved from the largest imaginable quantum computer Let me now discuss What are the problems and the problem is we can do it we have n to the four terms each term Needs all the n gates Because then you have this you're the Wigner string Then the question is how large can I choose the time step when you look at the total formula? Then you find that the time step that the t And I have has to be chosen small enough that I have a bounded error and and Let me call this number of terms m is the number of terms and the time step has to go like o of One over m to the power of three half in a second of all the thought composition That means it has to go like One over n to the six This means that the total number of gates I need to to evolve for certain time t I need to make t over delta t time steps Order n to the six time steps each time step requires me to implement order n to the four terms Each of these terms need or needs order n gates That means in total I have order of n to the six times n to the four times n Order n to the 11 gates n to the 11 is a polynomial time algorithm Has anybody run it an n to the 11 algorithm? Let's just make a quick estimate Let's assume we can do one gate operation in one second. Let's not care about Constance, but let's say we can do one gate operation in One nanosecond Extremely fast. Let's say I can do one nanosecond per gate I want to choose something small, but classically infractable Let me choose n about a hundred and this is about roughly ten to the twenty two Gate operations times ten to the minus nine seconds This would be about ten to the thirteen seconds Which is about ten to the six years? so a rough estimate Gives me a potential runtime of about a million years Well, it's of the order of a million years. That's the unit now. It might be a hundred years. It might be a billion years It's rough. So we have a problem with that scaling and That's when I say it's not enough to just prove that is polynomial time complexity But we also need to have the constants be smaller. I didn't care about them yet I didn't really count the gates just look at the scaling that you also need the power to come down a lot And that's when he said that we have to have people think about How we would actually use a quantum computer? It's not enough to just prove a theorem that asymptotically it outperforms a classical computer because yes asymptotically n to the 11 is better than 2 to the n But it's still useless Into the 11 algorithm will never ever be useful. We need people to think about actually writing quantum code And that's why I'm teaching you this now because We need people who know about applications start thinking about it So then we said, okay, we need people kind of quantum programmers quantum software engineers applied quantum computing scientists Tests like you to think about what one can do and let me show What we've done and how it can be improved We said is we don't want to start doing start with the Cooperative superconductor, which is just near thousands of Electron, but let's look at a small molecule and interesting think they're chemical Reaction, let's look at something that the needs about a hundred to maybe four hundred written gas been orbitals What? My chemistry colleagues want is they want the energy to about the micro heart rate possible But at least to point one milli heart rate at the same only for a milli heart rate The challenge here is that the total energies are roughly 60 kilo heart rate so I need to get the energy to at least six decimal digits So this is the seventh and eight digits where people fight about it's those case which are of the Rum temperature and Those case matter and then we took a simple so for the real problem a big one one might need to run longer if You want to go to a milli heart with an immediate least list near 10 times longer in time To a micro heart at least a thousand times longer Then we calculated it for a simple Molecule with the needs near 100 years 18 qubits and we found that just using published state of the other algorithms It turns out that The total gate count comes out that comes to about 10 to the 18 If it do things in parallel what I can do in parallel I still get to about 10 to the 17 and the estimate the runtime is about 30 years and that's when we say that is Not feasible. This is not realistic. I don't want to work wait 30 years To get the first scouts that way first prepared that I need to write my master's thesis That's a no-go. If that's what it looks like then it's a theoretical Beautiful idea to do quantum chemistry on a quantum computer, but it will never ever be useful What do you do when you're faced with that? Do you have a suggestion? You try to find a better algorithm. Yes good idea and the ideas Something better than quantum phasor estimation for getting energy. This is optimally as can be shown by Heisenberg The principle the time you need has to scale with one over the energy accuracy that you need So, okay, but we can maybe do a better time evolution So this scaling we can't get rid of But maybe these calings here can be improved And so we don't want a better algorithm as such we want a better implementation you want to optimize our code even class if you just write the code it will be slow and you have to optimize it and We know classically we can easily get about the fact of a thousand or ten thousand faster speed if we optimize our code and So what can one do one can try and optimize things? And let me just show you some ideas and those were the Next papers we in the end got something like about the factor of a thousand times n squared improvement How do we get it? Let me show you One trick here. We have these order n gates Per term. I mean not per gate. We have the order n gates per term and that comes from these long strings of See nots that we have for the your than Wigner with these long see not strings that takes Takes roughly and on average terms But now if you say I want to hop for example from here to here a term in one step and then the next term is something where I go For example from here to here then most of the calculation here was to calculate the parity of Electrons between two sites if I've calculated the party down to here if they go once one side further I don't have to uncomputed and recompute it. I can reuse the term ahead and just add one extra term to it So these long strings can be Reused and collapsed make space here So if I have to hop for example from this site here to this site in one term Then the next one I go from this to this and I have calculated already this parity here I don't have to redo it. I just take this plus plus this site That takes these long chains of strings and makes them easy if I sort the terms in the right way That gives me a factor This becomes not constant per term the next idea is what if I have multiple Terms can I do multiple terms at once in parallel and that can be done easily in a spin model For the spin model. We did it. We had our site and we said I want to apply The transfer field I can just just apply the transfer field rotation Rx term on every Cubid at once because those terms commute You can just do them in parallel and they can do n terms in parallel Can I do that for hopping terms? Yes, it's not really because of those got the Finger strings they touch all the cubies in between. I can't do this hoping term and that hoping term in parallel because They overlap, but if you think It's more cleverly about it. Let me Draw them them like this my sites here if I do one hopping term that goes between these two sites That's easy Then I can do hoping term between these two sites At the same time why? Because yes, this happens as well, but this hoping term here does not change the parity of electrons It might move one from here to here. It doesn't change the parity between the two sites and This one here as well can be done at the same time Because these terms here do not change the parity and all the need to implement this term here is the parity of the number of Electros here, if it's other even the same with this term and the same with these so though it seems at first that I can't do it because cost We are the touch the same cubits you first calculate the parity of these two sites in the page with these four and these six and these eight Then after that, I can do all these terms at once That means I can do again another fact of n from making things parallel So that means that actually I go here not I don't have n gates But I can do n terms in oh one Gate so the constant number or with log n to get this part is calculated with log n gates or n terms when I'm smart So we gained the fact of n squared the things become much easier now So the end to the 11 I'm down to enter 9 There's this then We can do another thing You can improve the phase estimation. I Showed you the phase estimation It's I have an anciller and when it's zero. I don't do it Anything when the answer is one I evolve with the Hamiltonian right And then I measure the face Here's a better version that naively seems two times better. That is actually four times better What they do now is simply if the pillar is zero I vote backwards in time when it's one I go forward It takes the same circuit just wants to go backwards and wants to go forward now This is giving it gives me twice the face. So I need to run only half the time to save the fact of two Where's the other factor of two come from that comes from the cost of doing a controlled rotation What we didn't talk about yet is Well, what I mentioned but which I didn't go into details yet Is let's say We do some term and it's just the evolution under a term minus h times sigma ic a simple magnitude in a field term or we can do also No more terms then and this basically just becomes a rotation the rotation by some angle theta or Sometimes that but now remember the phase estimation With the phase estimation algorithm We had an enceler But we said to zero with this the harder market so that we get zero plus one times one over two and Then controls on this I wanted to apply my unitary evolution to my wave function psi that means I should rotate only if This enceler is one and not if it's zero That means that here now I have to do in this case a controlled rotation should control I should rotate only If this is set to one, but we don't have a controlled rotation gate do we Be never talked about one So how do I actually do the control rotation? Who can see it? All I give your rotations and other mass and control knots I want to do something now that if this is zero does nothing and if it's one does a rotation Then here's the trick at first do Just a rotation and do a rotation by Some angle. Let me call Let me do a rotation by an angle the half the angle theta over two now what I want to do is if the enceler is Zero I want to rotate back backwards To undo it if it's one I want to rotate forward What I can do now is I can do a control knot operation here And if this is one then I'm now flipping the spin when I'm flipping it That means and even now to a rotation by minus half the angle Then we'll change the basis again by undoing the control knot What happens now if this control is zero then I'm rotating by half the angle and I'm rotating backwards by half the angle And they've done nothing If this is one I'm rotating by half the angle I'm flipping the sign of the variable of the spin and I'm rotating thus again by half the angle and it totally I've rotated by the angle When there's in the silver I don't do anything when it's one and rotating by the angle But it means that to do a controlled rotation. We need to do basically two rotations by half the angle and And notations are expensive you'll have to to express them through The tea gate and other gates and it's about 50 gates or so In the end Now when I do this type of phase estimation Then I just want to go forward the backwards depending on the enceler So it's not a control, but just the sign is dependent on the enceler for this Quotation when I just want to change the sign if the enceler is one then all I need to do is I Need to do a C naught based on the enceler the rotation and The C naught again, and it's only a singular rotation to save effect of two because I need to go to only Two half the time I save another factor to because I Can't do a simple rotation gate instead of where gives the control rotation and thus I Need only half the number of Expensive rotation gates So that's another factor for that I have and finally It turns out that the total error is fortunately not as bad as the worst-case boundaries if you and The reason why it can be improved is again tricks We have lots and lots of terms here we have and to the four terms But most matrix Elements will be small Very small some will be large many many many will be small and the trick that saves us there is that the small terms I Don't have to do it every time step What I do is for a tiny term for example, I do it only every tenth time step But then with ten times the time step So I use large time step for the small matrix elements and use small time steps for the large ones a Tiny term I can just do to less often, but then I do it all at once with a bigger angle And that way you can gain another at least factor of ten and scaling improves so if we then estimate what comes out at the end for this molecule that we looked at is with all of these improvements when you smart We then we can also make the circuits a bit better that gives us another factor of ten So we get the factor of n You know your things in parallel factor n by simplifying The other giving the strings effect or for by making the circuits Faster than what I showed Effect of four with a better phase estimation effect or ten by doing the Small terms with the larger time step and another factor of ten by Smartly sorting the terms I have many terms here And if I sort them in the right way I can make the total error even smaller so being smart here gives Me another the effect of ten and a total then we have about the fact of a thousand n squared and The runtime of what looked like 30 years Comes down to about two minutes and two minutes that sounds totally reasonable I still needs a fast machine where we have a gate time of Nanoscience he has to be stable for minutes and this is a challenge to build But at least not no longer seems like science fiction But it seems like this could actually be done So and I think we can save save more time here by providing even smarter codes So this is doable For small molecule now I want to discuss two more things the first is I want to first scale up Now don't want to just a molecule now. I want to do a room temperature superconductor that I want to decide and Before I do that. I want to kind of check whether I understand the cup rates And there we have about 50 bands per unit cell And I want to look at per correlation functions over at least the distance of maybe 20 times 20 Then it's about 20 times 20 unit cells Which then gives us about 80,000 spin orbitals The number of terms is n to the four and even if we get this scaling down from this to optimistically into the about 5.5 Or into the five If when you plug in 80,000 into that then you see the time is now a few billion years And it's about the age of the universe and it's not much people would indeed do thousands of The electrons in DFT DFT is not Exact as we know on a quantum computer. We can do it efficiently in polynomial time But because of the scaling we have When you plug in the numbers It again looks like science fiction. What do we do now better algorithms? Yes, but I've already optimized things Nearly as much as I can okay. You want to do something that's maybe better than trotter But you can't get it down to below n to the four Because that many term I just have in the Coulomb Hamiltonian They can't really get it much better than that Because at least I have to feed in the terms that I have any idea Hubbard model. Yes, we can go to effective models. Let's for example go to the Hubbard model See I magically quantum mechanically moved your idea to a slide now What does it look like for a Hubbard model? in a Hubbard model and Each has about one band per unit cell I take the same number of unit cell It's about 800 the number of interaction terms is only n Because I have two hoppings and one new term per site I can do the same nesting tricks to basically do all terms in parallel Meaning a time step only takes about log n time. Oh, it's not oh one, but it's all the log n and So the time to do the phase estimation scales with the logarithm of the number of sites So it's milliseconds again, I have to find the ground state so I have to a Theopatically Evolve it as I make a guess for what is the ground state may be in a good D with your Superconductor I start from such a mean field state. I evolve to the full Hamiltonian with the with the Yeah, but the state preparation the gap closes at the end the gap closes with one over the linear size so the so Scaling of the total time with preparation is linear in the number of sites that I have So instead of millisecond might take a second but basically in a second I Can't prepare the ground state of the to the top of model and have the way from you on it 20 times 20 lattice It's okay. That's not big enough. I need 100 times 100 Okay, that might take half a minute then half a minute I can have then the ground state wave function of the Hubbard model prepared easily now What will the Hubbard model tell us about the material? You've heard talks that people talking about Hubbard models or quantum spin models. You have heard talks that people talking about DFT and materials There's a bit of a disconnect between the two groups groups most of the time one look at models to understand the mechanisms For that the Hubbard model is great The other group looks at the real material and wants to have quantitative numbers for a material And if you talk to a material scientist and I did that I Asked one About whether she would be excited if using quantum gases for example optical Lettuces we could build her a machine that can solve the Hubbard model and solve it and She answered no, she wouldn't even look at the paper Why not because the Hubbard model is not relevant for any material. It's too simple a toy model Okay, I challenged her then okay. Why don't you design a material this model by? The hubbard hubbard model and she did now, but she's not so convinced that the Hubbard model is interesting So yes, we can easily do lots and lots of interesting quantum lattice models That will be great for those people working on quantum lattice models But you've heard yesterday about function as PBE that paper has been cited 60,000 times the high DC paper Has been cited a few thousand times So the field of the material science is an effect of ten to a hundred bigger than lattice models So can we use a quantum computer then also to simulate such They're correlated material and it's a question. What methods have you heard about you've heard about DMFT That can be combined with DFT You can get them if the effective model extracted from DFT calculations That is more realistic than the hubbard model and then you Can solve that how large a problem can you solve with DMFT about five orbitals? That's tiny. You can't really do it for complex material But not just think about what you learned about DMFT and you have this Quantum of the color methods to solve for a tiny purity problem How about if we if we replace that QMC solver by quantum computer? as to DFT plus DMFT and then use a quantum computer to solve that problem on a big impurity system We can do many bands in the MFT Soundly interesting and we can do much better so what that means is For these materials everything thing you learned so far Will remain important even if I give you a quantum computer? because the codes Codes will use in the end will not be I just running brute force on a quantum computer And I wait for the age of the universe That is not the way to go that will never work Simply because the number of terms is too large you can't do it exactly so we need some hybrid methods where I do most things classically Where do do most of the band structure classically and then I define an effective impurity model or effective Colleges model for the important The correlated bands and this effective model I can then solve more accurately on a quantum computer But it will have to be be such a hybrid method of classical plus quantum Such as so it will in the end be a supple team in your big Package for example in vast brothers. They will then call a quantum I'll Go with me somewhere and the way that most people will maybe in 30 years use it Is that just pick another solver somewhere or some flag somewhere quantum equal to or something? But we need you potentially to actually write this package for them or this plug-in That's how we would actually use it Not brute force that the quantum Committee will change everything because the scaling can be too bad Well, so not have a quantum cell phone probably Because most things for which you do your near cell phone You can't do well enough now. You don't need a qubit in here So then the next thing you want to do is what do we do once we have The way funds prepared because that's all we talked about now they teach Minutes of seconds or hours or a long long time to get the ground-state wave function What do you do once you have the ground-state wave function and the energy? Is that what interests you or if I give you here? So who's that have a new if I give you here a Quantum register that contains the ground-state wave function of the hub and model Which and I'm the first machine it took me a year to prepare it and here it is What do you do with it? But You want to dope it up? So here's a new way from up to another year. Here's the dope tablet model Here's the the constant wave function. What do you do with it? So how do we find out what exit what phases we have and how do we find that out? You have the wave function here Tell me how you would get it You measure something right? For example, let's add we just want to measure the density Okay, then I measure one of the qubits and they get for example one or I get zero right because they can only get one or zero so then you and then you get one and Or you get one one zero one or so, you know when you measure that The whole was here and here for example and the wave functions collapse is gone I can measure density correlation measure the density here density there and have a density correlation But I get only one child to get either zero or one right Basically do Monte Carlo sampling because you have the way function and the way function tells you the probability of measuring either zero or one and and the big advantage you have when you run it on a classical computer is Yes, you need exponential memory, but then you have the way function. It can really calculate all expectation values Precisely because you have the way functions stored on a quantum computer I Give it to you in this very compact with only n qubit instead of two to the n classical numbers it's much much shorter but You can't read out all the entries of the wave function You can sample it but if you want to get all of the values it takes exponentially many samples because they are exponentially many measurements you have to do So yes, you can sample it like Monte Carlo you sometimes get zero sometimes get one So you don't need it just one. So let me give you now a million of these wave functions With a million of this way function you can do the measurement to tend to the minus three precision because you basically do Samplex statistical sampling. So we don't have to prepare just once in seconds But after we did it we do a measurement and we get only a single bit out zero or one per qubit that we have The sampling area just goes down with one over the square root of the time So if I want something to three digits, I have to run it. I have to prepare it a million times So we don't need just but I want it to be fast. So I might just get a cluster of a thousand quantum computers It's it gets expensive. And so what one should think about now is we should think about ways of how we can actually Do it better. Can we get a better algorithm? Can we do the sampling? so that it doesn't take one over the Securecy squared But it takes one over the accuracy Okay, it might be easy to make the ground state But it might also be very very hard because there's a tiny gap and they have to run it The athletic state preparation very very very slowly and it might have taken me a year To make that grounds the way function that I gave you So don't want you to destroy it because when you destroy then you have to wait another year for the second one Or we build a million quantum computers So do you know a way of measuring? without destroying The way function that I gave you I want you to measure But don't touch the way function Can we do that? Let's make a vote who thinks we can Who thinks we can't? What if I measure something? Then I measure again. I get the same because once I've collapsed into an eigenstate. They always get that eigenvalue so we can If we only measure the eigenvalue When it's an eigenstate when it's an eigenstate of the measurement operator then it can measure without destroying it For example once I have prepared the ground state I can measure the ground state energy Without destroying the state a statement. So can we do measurements just by measuring ground state energies? You heard about the Helman Feynman theorem, which is when what is it? Can you tell me? Will I tell it? When you perturb a Hamiltonian Then the change in ground state energy is the expectation value of the perturbation in the original ground state I have the Hamiltonian H and I have its ground state. Let me call it GS or Now let me look at H plus some small epsilon times some perturbation O and from this Okay, this and the ground state energy. Let me call it E GS from this here. I can evolve to the ground state as a function of epsilon but by Slowly they are switching on the perturbation and then I can also get the ground state energy As a function of epsilon and what we know is that the ground state energy of Epsilon minus the ground state energy at zero Is just epsilon times the expectation value of O in the in the original ground state plus terms of order epsilon squared. So to measure the expectation value in the ground state It just has to measure. How does the ground state energy change when a slightly perturbed? The Hamiltonian with the operator that I want to measure so I start in H I slowly evolve it is it to it The epically go to the ground state of H plus plus negative epsilon times the operator I mean the ground state Then I do it again the phase estimation to measure the energy The energy difference tells me the expectation value that I wanted and then I take the ground state back It did epically to the original state That way I've measured an expectation value Without destroying the ground state. Then there's another way of doing Measurements, what I can do is I can take take my wave function and Then measure something Let's let's say this is the ground state and then measure some qubit and now I get at a zero one And I'm now in some egging state of the measurement. I have taken that state and I have The projected it on To a negative state of the quantity So I've destroyed my ground state But I've changed only a single qubit and there's a trick now to use the Hastings that we published in June What one can do now is So I've only weakly perturbed my ground state and now I do another measurement and then measure a single qubit again and measure if I Am in the ground state Which was a single qubit measurement whether I'm in the ground still or not. How can I do that? I Can for example do a phase estimation, but I don't measure it I just check whether the bits I get are the ground state energy and I measure that single bit That tells me that the phase estimation is either the ground state or not If that measurement of the test whether I'm in the ground state says yes, then I'm then I won If this is yes, then I'm back in the ground state Because I just did a test whether I'm in the ground state or not. It tells me I'm in the ground state I've won if I'm not in the ground state What should I do? I Don't have here. I'm now in some state. I don't know what state it is I'm not in the ground state. That means now I'm in an excited state or I'm in a Position of excited states What I can do if no I just measure that one quantity again and Measure that qubit again and now I'm back to The ground set projected into one of the eigenstates of The measurement and the try again When I try that if you a few times and at some point I come out because I have only four possible states It can be the ground state or not the measurement can be Zero one so that's a four dimension a subspace of the big Hilbert space and that space I make random walk by measurements And we see our one the state and can be ground state or the other state and I do that a few ten times a hundred times and Most of the time of the a few ten times I'll be dug out and I have the ground state fixed No, it could be by chance that the state I get here is orthogonal to the ground state Then I'm never in the ground state That's a tiny tiny set of measure theorem but if I hit that by chance then I See after a thousand times I don't find you then have to give up and start again and make it new but it's rare Most of the time I do it a measure and then after a measure Let's just check I'm in the ground still not if I am I'm done. If yes, I fix it When I did a single qubit measurement, I do a week for the patient and I can't fix it again another trick you can do to speed it up further is We learned how to do phase estimation and phase estimation gives you a quantity to our epsilon and time that goes like one over epsilon On the Carlos sampling the time goes like like negative one of epsilon squared So we can put this into a phase estimation algorithm and we don't measure here But we get a phase depending on the outcome of the measurement and when instead of measuring you advance They're still up by a certain phase when you do the Phase estimation then you get speed up in the measurements So there are lots of tricks how one can do measurements Faster and more efficient and those tricks are mentioned in the paper. They mentioned so let me Stop here with that part and ask if there are questions Yeah, I'm actually one qubit when I measure all cubits, then it's just totally destroyed I have any cubits and measure one cubit. It's entangled. It collapses into the eigen state the eigen space of that measurement so Is unchanged This cubit becomes zero one if it's zero then it take out the wave function where this is zero if it's one then it's that that one and and the rest is The state it was in when that cubit was one so so Let's say the state that we measured here was that one cubit we had which could be zero one and we can write it in the The Schmitt decomposition as some let's let's go the alpha times zero times some psi zero on the rest Plus beta times one and the psi one on the rest that's how I Can write the ground state here If I measure zero then that is zero and that's the rest of the system if I measure one then that's One and that's the rest of the system And now a measure whether I'm in the ground state when I measure this then I Can either Go back to this state or go to some other state. Okay. I can do a quantum phase estimation for example Let's say I do the quantum phase estimation then measure the energy and I read out all the ancillic cubits Then if I read out the ground state energy Then Yes, I'm in the ground state because I've won but if I don't Read out the ground cell energy then I have a problem because now I've gone into some excited state and Which one depends on those cubits that I've collapsed so I've collapsed into some excited state And it can be any of the two to the unexcited states and I've lost So what they would do is it would do the phase estimation. I have my energy register here and Have my wave function psi here I do the controlled. Okay. These multiple controls 21 and to the quantum Fourier transform and then here now I have the binary representation of my ground state and then off the energy I So these are now the pits of the of the energy of the state, but still in a quantum superposition I've not collapsed anything It's still the same wave function if a measure then a collapse But now I don't measure but now what I do is I do a single measurement namely a check is this first bit the first bit of the ground state energy and Is the second bit of the second bit of the ground state energy and it's the third bit the third bit in the fourth bit the fourth bit And the only measurement I do is whether all these pits agree with the ground state energy or not That way I measure only a single qubit and now I've either collapsed into the ground state Or I've collapsed into a single well-defined other state There's only two states the ground state or the coherence of a Position of the other states. That's just a two-dimension Subspace because I measure just a single qubit if it's the ground that I've won if it's not the ground state then I repeat the measurement of that quantity and I go back into either this or that Then I try again some people like Hastings are really smart So yeah, but so I'm not allowed to measure those pits because then if I'm not in the ground said I'm lost I'm somewhere so just check whether the all these bits agree and do a Compare and check whether they're all the same if they are then so in so in this is In a circuit I write and then there's a single bit, which I measure like in the Deutsche I've written I wanted to know whether the function was constant or not and that single bit I measured and Then I'm safe and I can't do that that way you've measured without destroying the state that can help you a lot because Phase estimation might take seconds making the state might take hours and you've saved a lot of time What do you want to do dynamical measurements? Relation functions. I take it up by the operator. I evolve it in time apply To the next operator and the measure what we want to do a spin correlation function The cubits have to measure for the spin up or down But we want to do a pair correlation function Just take a pairing term here in the measurement and they do it not then to end the first part of the lecture. I Want to discuss with you? Why besides solving the Hubbard model and spin model and maybe some materials we want to build a quantum computer Just get a slide for that Yeah, because I mentioned that we need to know if you see Okay, first one, so you want to have a quantum computer after what I told you now Do you want one who wants one now? I told you yesterday it will cost a lot of money We'll cost several billions Okay, you'll be great to build and it will take another 15 20 years and we want to do that But somebody must give us the money And if it in the end to really scale it up if it costs tens of billions We need to convince companies to actually give us the money and that's a non trivial sum of money 50 million 100 million that easy research funding basic research. That's not hard Okay, it takes time, but that's not hard to get a billion or 10 billion is much harder And then they ask the question. What can you do with it? So what are the important applications? That the problem that you can solve in a quantum computer. That's one thing Queuing cancer might not count you there's how do you cure cancer with a quantum computer? So you have to come up with an idea Let's say you have an idea how you can do that Something that you can do on a quantum computer in a time scale that's less than 30 years or a million years But also that you cannot do on the best special purpose Classical hardware that you can build with the same 10 billion in the next 10 years You have to be better than anything I can build classically in that application for that problem If we can build it in 10 years with 10 billion in a special purpose big class signal supercomputer, then that's cheaper So that's the question that they're being asked by Microsoft IBM Nokia Intel and others Since a few years now since they realized companies are getting involved and The others also want to join Okay, why are we investing that much money? Yes, we have to invest the money because the others are doing it But actually why are we all doing it and So I showed you one application we can use it to solve quantum models Materials to find new materials Maybe think about can we do a room temperature superconductor to make be understand how to make a negative catalyst For making up to fertilize and so on so we can find great applications that are worth billions in Material science or chemistry But those companies ask is that all they state so we just sell it to one pharma company and that's it but They want to have a bit more applications and when you talk to people in quantum computing then The first tell you yes, there's Grover search Who has heard about Grover search? So Grover search is a very interesting thing something they can prove that the quantum computer is Faster than any classical computer can ever be What you get is you get a database, but it don't give you access to the database I just give you a black box that you can ask What is the number stored at entry number 735? And tells you priester And you ask what is stored a number 289 and tells you all You can just access it with an index and it gives you what's stored there and now we have to find Where is Venetia And the only thing you can do classically you have to really go through it until you find it because it's not sorted anything But only on quantum hardware You can cure it with a superposition of all indices And then Grover showed that it can be done in with square root of n curious to this black box oracle Classically you have to use at least all the end so it's provable quantum speed up And it's beautiful. However They just assume that this black box exists and then the call is free You just count how many calls you do to it But somewhere there's a database stored in there in order to answer the query I have to load the database in and they have to go through they have to load the database and If you come with a superposition of all entries in the quantum case Then I have to load all entries and give you back a wave function with all the entries and They cannot implement that faster than with the number of cities that I need to read from the database Just can't be done faster because I need to access them all and instead of doing this black box Oracle that loads this wave function from the database. I Can't just give you Another one that while loading it just checks where's Vanessa and gives you the answer back So implementing a single call Takes order and when they're in and restored if it's stored in a database because I have to load them all So actually I'm not doing doing root and times but in doing root and times The cost end of implementing the Oracle so it goes like into the three half Which is worse than classical where while reading I can't just check where it is And if you want to look it up multiple times in a classically I can sort it and it goes down to log in So go over search for looking up things in a database is Useless the experts know that it's just how it's presented. It's just how the textbooks do it But if you think about implementing it, it's useless Not totally it's useful if this database can be calculated on the fly So it's useful if this is not a database But the function of which you want to know at which value is a function that it can easily compute is it for example 5 or 7 for finding the Roots of functions is very useful But now we have to think of Applications where finding the root of a function is useful their cases There are math problems was useful. I haven't found a real application yet to a real-world problem. That's okay. Yes That's what it's at least worth to pay a million to buy such a quantum computer. We haven't found that yet So that's one show one homo for you find the problem But this really shows an important real-world problem with somebody would pay money to solve it Next is factoring is hard. I give you this number. I promise you you will not be able to factor it. I can Here are the factors How could I do it? Is it because I had a quantum computer just didn't tell you about it The opposite I took two prime numbers and multiplied them One was easy the other way is hard Unless you have a quantum computer the quantum computer this can be done in n-cube time if you have here 2m plus 3 cubits With about 3 n cubits you need n squared time with n squared cubits. You need linear time it goes fast and That way you can crack encryption But it's useful and you can crack a crack encryption in a short time But the moment we have one which has changed to quantum cryptography or To let this get by schemes that are not vulnerable to quantum attacks and Not an application anymore the new things we send Will be safe and in 10 years Whoever was interested in reading our encrypted emails lose interest because they're too old and nobody will buy a quantum computer anymore Now let me show you another pitfall there's a very beautiful paper by leader's group who looked at quantum page rank page rank on a quantum computer finding The the best hit when you search for the web page and And was nice in this paper is that that's one of the few papers that really works out the complete cost for Implementing everything the detail and not just saying the scaling if I have a black box or actually is asymptotically Polynomial, but it really worked out the numbers and all and really showed how things can be implemented And while theoretically log and cubits are enough We showed that's very hard to implement, but we can easily do it if you use and cubits And then you just have to implement this emetonia and you have to the time evolve it and to energy space estimation This can be done in an analog machine that you build and Something things like the way for example If you have all those couplings, but you need n squared couplings in here that you Build and then he finds that with n squared hardware resources He can solve the page rank problem in a time this case with n to the power 0.2 In the best case maybe goes up to n, but it's always better than n and it goes goes like n squared So like n to the power 0.2 well classically to the page rank and need to multiply like a matrix this with vectors and Maybe ten times a hundred times and the complexity of each one is the number of non-serials in the matrix and that's case with some constant which is Links per web page times the number of web pages But it's at least linear. So he says look there's a quantum speedup From constant times n they go to n to the power of 0.2 potentially Do you agree or do you see a problem here and he thought even he said okay? This is the best Classical algorithm he found published anywhere This is how it scales And he can beat it what he did not think about is That you could invent a new and better classical algorithm that also runs parallel Because yes, it's true. This is the complexity and memory is about n qubits versus n bits. It's the same scaling but then Let's know assume. I give you not only n squared Quantum gates, but I also give you all the n squared classical gates Then I can build a special purpose classical computer with an all-to-all network with n squared network links and When I do that then the time complexity for doing you may expect a multiplication goes down to log n on hardware It's One third because people typically Network with your nearest neighbor links But if I assume n squared hardware and all to all links for the quantum hardware Then you should also allow me all to all links for the classical hardware and building Even that then the time goes down to log n with actually only t times n harder instead of n squared hardware if I specialize it for a certain matrix and The classical parallel version performs faster Than the quantum algorithm So that shows that you should not compare a Parallel special purpose quantum computer against the general purpose single CPU of a classical computer But you should scale the hardware in the same way and say what if I build the same way a special purpose device then boom sometimes quantum speeder vanishes There are more application. There's a great paper Terror and co-workers who show that you can Solve a linear system in logarithmic time on the quantum computer and the only thing you need Okay, you have it fit than a qubit so you can read out only to log n bits But it might be just that you want to know whether certain property is larger than a value or not So when you don't want the full vector, but just some property of it then it works It has to be well conditioned and you have to be able to evolve The vector with the matrix and The basic idea is you evolve with a when you do this we can Do quantum phase estimation The quantum phase estimation basically calculates all of the eigenvalues and eigenvectors Then they can divide by the eigen Value and then I can transform back so you go to the eigen basis I divide by the eigenvalue and I transform back and That way you've multiplied this with the inverse of a and you've solved a linear system with only log n qubits but you need to evolve with the matrix a and For a general matrix if you just give me a matrix stored in memory That has n squared entries and they need to read in this n squared entries So I cannot do the time evolution faster than an n squared time Those at least have to feed in these numbers In n squared time. I can solve it classically. There is a way. There's a proposal by Lloyd's group That you can do something like a q-ram a quantum ram. We just read it from that But that q-ram needs n squared hardware and With n squared hardware. I can solve the problem also classically in logarithmic time even worse If you give me n squared hardware for log n qubits With n squared hardware. I can build a quantum simulator for two log n qubits I can build you and a simulator for a quantum computer With the same hardware resources if you don't need more than two log n qubits So they can just run it on the simulator with the same scale. So That tells you if you have to read the matrix from somewhere then you're lost once you have to read the matrix and Then your system can be solved efficiently classically. This is not a hard classical problem It's one problem that we know how to solve so it's not surprising that you can't speed it up because we can solve it In the time it needs to basically read in the matrix So then there's nothing to improve because we have to anywhere reading the matrix But it can be realized if you don't have to read the matrix, but if you can calculate it If you know the matrix and there's some closed-form equation like you have some mesh and you want to do some wave scattering of elect or Magnetic waves and you want to do that on an extremely fine mesh In this case we can calculate the matrix and that way it can be faster And then it is exponentially faster than a classical algorithm And there was a nice paper in PL that showed how it can be done and they also really Calculate it most of what it takes to do the calculation and counted in the number of gates and They found that yes asymptotically. This is really better than a classical supercomputer and it wins once the the mesh is so fine the problem side is so large that you need about a Millennium to solve the problem So if the calculation takes more than a thousand years Then use a quantum computer and it will be faster. What does that tell you? Linear problems are hard, but we it tells you don't give up improve the algorithm think about it can be too faster, but One should not look at the easy problems But we have to look at hard classical problems, but hard classical problems for which there are quantum algorithms That brings me back to what beat it before if you look at The first codes in the world that reach the petaflop The first five codes that run then it more than the petaflop were all doing material science chemistry material science Or the science they all solve the Schrodinger equation These are hard problems which really need the biggest machines and These are problems for which the Feynman already. We know that the quantum computer can solve them so Solving quantum problem really seems to be the killer application for a quantum computer And that's why that's what we have to work on because that's where a quantum With Really shines because the user quantum mechanics and if you have something that uses quantum mechanics Then it can clearly be used to solve quantum problems. And that's the native application. The rest might be hard so what I Showed you know that will really be the main application once we have a quantum computer That's what we have to argue about And make it happen in the next 10 or 20 years in the next lecture part we go to the Computer room as we give you a simple Python in file that implements Mints near quantum gates and then you can actually simulate a quantum computer apply a harder market apply rotation to a quantum phase Estimation and trying to run the quantum algorithm That's after the coffee break