Full transcript of “2025 QUANTUM PROGRAM ❯ Day 9 ❯ The Art of Block Encoding (Dr. Guilermo Alonso-Linaje)”. Click a timestamp to open the video at that moment. Need another video? Use the YouTube transcript generator.
0:00 Welcome back. Um, you know, good morning, good afternoon, good evening, wherever you are in the world. And, uh, today we are now in week four of the program. We are in day 10. And, you know, we're almost halfway through the program. It's going by so fast. So, today we have a very special session planned for you. You know, this week, you know, we already had a very intense session on Monday talking about how do we solve differential equations on quantum computers and then there was a change of pace. We, you know, we talked about quantum entrepreneurship and we did a lab tour on Wednesday. So today we are kind of diving again back into the technical uh area focus area of this uh summer summer workshop and you know today we're going to be talking about block encoding. So this is one of the key concepts that is fundamental to any quantum algorithm. If you take pick up any paper on quantum algorithms, you would see these words being thrown
0:45 about. Oracles, linear combination of unitaries decomposition, block encoding, you know, these are like uh techniques to, you know, that serve as data access models for a given matrix. And today we in order to talk about this, we have with us GMO Alensor Lin. He L GMO is an expert on uh GMO is an expert from Xanadu. He's an expert specializing in quantum machine learning and algorithms. Not only is he an expert on the research side, he also has experience serving as an educator in quantum computing and is a perfect person to teach us about this exciting topic. And some fun facts about Gearmo, he is an expert playing foosborn and know he he calls himself a pion of
1:30 uh quantum computing. um you know you should ask more about that later and very welcome to welcome to the program GMO hand over to you thank you thank you very much for the presentation I'm going to start sharing the screen okay I hope you can see it can you see it okay okay perfect thank you very much yes so I I think uh to to start it will be nice to mention why I'm familiar with this particular topic and when I've been working in different projects in Sanadoo and one of the biggest one I've been doing this year is what we called the quantum algorithm toolkit that basically the idea of that project was to work in the main quantum algorithms let's say quantum estimation amplitude amplification with all the variance quantum signal processing algorithms and
2:16 we were trying to detect what are the main uh building blocks. So we find those building blocks then we try to optimize them and included in penny link and one of the main takeaways of that particular project is how important was block encoding that is one of these technique that for some reason maybe is not the one that you learn when you are starting quantum computing but again appears everywhere and also in a more recent project in a collaboration with Rolls-Royce and Rolls-Royce we were doing some optimizations in their workflow and we realized that the main bottleneck was blocking coding. So we spend a lot of time trying to figure it out how to reduce the cost of this particular super tip. So that's the reason well I know this topic I really like to talk about it and and I'm going
3:03 to divide this presentation in two main parts. In the first one I'm going to talk about the most famous quantum algorithm for block encoding. Maybe you have heard about um LCU or prep cell prep and I'm going to explain it in a different way. Instead of just showing the algorithm and see that it works, I would like to to explain it in the way that any of us could come up with idea that I think is a good approach from an educational point of view. And the second half I'm going to try to talk about block encoding for differential equations. I know it's one of the is the main topic for this particular event. So I think it's worth to to pay part attention to to that. So saying that let's start with with the first block.
3:49 So to start it's good to know some basic definitions and the first one is what is quantum computing. Right? There are a lot of different definitions. I choose one that actually fit very well what what we are doing here. that is the process of encoding computational problems into quantum circuits evolving quantum state via unitary operators and then recovering the classical information through measurements. So as you can see one of the key words here is encoding and one of the main examples of that is quantum chemistry. In quantum chemistry, we are going to define the molecules through some objects that we call Hamiltonians and we we think that quantum computing could be a perfect example to find some
4:35 properties of that molecule of that particular object. So the first step that we have to do is somehow get that Hamiltonian that object and encode it in the in the quantum computer. So block encoding is going to try to solve one of those problems. Um so the first question is well what is a Hamiltonian is from a mathematical point of view is a hermission matrix with a physical meaning. Hermesian means that the matrix is equal to the adjoin of the of the matrix. Um just to confirm can you see the mouse or you just see the slides? Uh we do see the mouse. Yes. Perfect. Nice. Thank you. So knowing that the Hamiltonian is a matrix and we know that
5:22 a quantum circuit can be represented as a matrix we could say perfect let's just put the Hamiltonian as the matrix of the quantum circuit and we could think there should be a gate H that is our Hamiltonian however this is not possible and the reason of that is that all quantum gays does satisfy a property they should be unary and to be unitary means that the inverse of the matrix is equal to the dagger of the matrix. That's important because they have to preserve norms and reversibility. But as you can see, it's not the same property, the hermission property over the unitary property even if they are similar. Therefore, we cannot do this um directly in the
6:08 in the quantum sequ. So then what people start to do is okay let's think in a different ways to encode the the Hamiltonian. This is not block encoding. This is a different technique but I want to give you the context of what people was doing here. And and something a property very cool is that even if H is not unitary E to the IH this is going to be unitary. And here I have a um short proof of that that basically if we see to this first equality we know that e to the i the hamiltonian time e to the minus i the hamiltonian is equal to the identity. This is clear because the exponents at zero and something to the
6:55 zero is one. What that means is that e to the i h minus h is actually the inverse because it's two things multiply and you get identity. It means that this is the inverse of this one. And now we can see okay what is the dagger of that matrix. So for properties of the exponential this dagger is equal to the dagger of the exponent. And the dagger of the exponent is um well dagger means transpose and conjugate. Because it's conjugate, we change the sign of the i and we just take the dagger of the matrix. And because this is our mission, we note that this value is exactly to
7:40 the same um matrix. So we get that the dagger of our of our initial matrix is minus ih because these are the same it means that the inverse is equal to the dagger. Therefore we just prove in two lines that actually this is always unary. So what we are going to try to do is we try to encode the Hamiltonian beer h through this approach is build this matrix and without entering details because again this is not the main topic of this presentation. This is done through some techniques called product formulas. We are able to to approximate this gate but multiplying more simple
8:26 gates and maybe you have heard the name of troter suzuki trotter. So those are just product formulas that are ways to create this h. But then researchers started to think there are more ways to embed the encode the information in a in a circuit that is not through this evolution and well someone say okay something that we can do is block encoding. So block encoding is this alternative technique uh to to encode the information and the idea is very simple in as we know this this Hamiltonian is not unitary but maybe something that we can do is uh put it as a block for instance in the top left of a bigger matrix and try to look for some
9:14 values to put in the other part of the matrix in such a way that now as a whole the big matrix is unitary and therefore we can embed it in the quantum circuit. So this idea is block encoding. So the first question we have to answer here is is this always possible given any Hamiltonian there exist values to put here in such a way that as a whole is unitary. Well, it is always possible and to prove I decide to choose just one random example where I adding these different values in the other parts of the matrix. So I'm not going to enter too much in details but basically what I'm doing
10:00 here is calculate the transpose sorry the dcker and then I multiply them because I get the identity when I multiply them it means that actually this is the inverse and that's the reason we just prove that this is unitary because satisfy this property that the dagger is equal to the inverse and in practice this is not those are not the values we are going to put But I just want to show you that at least we know that is possible. So let's think how we can do that in the main examples that we we do block encoding is when the Hamiltonian is expressed as a linear combination of poly words. So the gates
10:47 pies are the ones that we are familiar with like X Y set or identity they are poly words. So our Hamiltonian is expressed as a linear combination of those particular words. For instance, here we have an example. We define our Hamiltonian as 1/4 of set in the first um space 1/3 of x in the second one minus 1/4 of the product of two poly sets. That does as a result give us a matrix. This one that we can see here. uh that matrix is calculated just again we just have to calculate the individual matrix of each term and do the linear combination and these kind of Hamiltonians expresses in this
11:34 particular way are super super common in the applications as we mentioned before in quantum chemistry and normally the number of polyors is sparse there are not too many terms in compared with the size of the space so this is very useful to to work with. So the main algorithm for block encoding is focused in just this particular scenario when our matrix that we want to block encode is expressed in this particular way. So how we could do that and again what we are going to do is try to figure out how we could come up with this idea but ourself. So the first hint that we can h realize is that each term of this
12:21 Hamiltonian these polies actually have a secret representation because api have a cool property that is mission but also unitary. So we know that at least if we just take one of the terms we can create the particular circuit that apply that that cake. We could think in put them together or something but if we put this case together they are going to multiply each other. However what we are trying to figure it out is how to combine them with additions and some and some weights. So the the first thing to to think about right okay is how we can add things in a quantum circuit and if we
13:06 are if we don't know how to do it with operators something that we know is how to do it with states. So something that we could try is let's um build this particular state. So because we have three coefficients 1 4 1/3 4th I'm going to create a state with four with three basis states and I choose the three first one in order 0 0 0 1 1 0 I could take whatever but the important is that I'm able to create this state and I just codifies the coefficients in a quantum circuit. So this is a first step. We now have the coefficients in the computer. Of course, I will have to normalize this, but just
13:52 to keep the numbers more beautiful, I'm going to leave it like that. So, we are getting closer to our target to have this Hamiltonian. So, the next step could be h okay, I have the coefficients, but somehow I need to say which coefficient goes with which poly word. So, actually that's not difficult to do. We can do something like this. Um to each index we just do a tensor product in a different register with the particular poly set zero x1 set zero set one. And this kind of um index operator index operator um
14:38 approaches is something that we can do through circuits circuits like this here. First of all, what we are doing is this prep box, this preparation is going to give us this state. And now what we are saying is if this is a zero and this is a zero, apply set in the first um register. So that's what we're doing here. If this is a zero and this is a zero, we have this pi. Now if this is a zero and this is a one, apply x in the second one. So we are doing this expression here. And finally if we are in one zero h we have set set. So as you can see this size of two is really
15:23 really close to our Hamiltonian. So we are in a good direction. If we calculate this matrix to see where are we right now we are get something like this. The reason it's a vector is because we have these two projections here starting by zero. But what I want to show is that at least all the coefficients and the polish are codified in the quantum circuit. So we are going in the in the good direction. So now we could check okay what we have actually in the top left because it's the place where we want to encode our Hamiltonian. So the way to check it is just project here with zeros. Basically the zeros here tell you we take the
16:09 first column and here we take the first row. And if we do the math what we see is that we have in the top left just the first coefficient of the Hamiltonian. So we are still not getting the results that we are expecting. We we are improving because we have all the information there but still this is not a block encoding. So the question that we will have to ask ourself here is what kind of operation I could do in such a way that when I applied all the information has moved to the first uh position and this is something not difficult to realize that if we multiply this vector by a matrix like this whatever in
16:56 different positions but in the first row one one one if we do the matrix multiplication we are see that actually we are moving to the first position the addition of all the all the column. So here we will have our Hamiltonian. So what kind of matrix what kind of operation have this particular shape? Well actually none because 11 one is not unitary. But if we make sure this normalized and we take one over two one over two one over two um this matrix is actually just put hadamars. If if you take hadamars and you calculate the the matrix you're going to see that the first row and actually the first column are always um one over two one over two
17:43 or depending of the dimension. That's the reason why we use had to create equal superpositions because apply to zero it means in the first column we have this positive h equal amplitudes h so therefore it means that if here we apply the the hadamar in the circuit we are going to create a block encoding of our hamilton. However, here there is issue. Um well, we have the block encoding, so we we could be happy with that. But we are adding um a factor in front of the Hamiltonian that is going to decrease exponentially with the number of cubits. Um here in our case, n equal 2 is when we get this 1 /2. But if
18:29 we have 10 cubits, this is going to be 1 / roo of 2 to the 10. H and that's not ideal because we are losing the information that we are trying to encode. Therefore we have to modify somehow this algorithm in such a way that this factor disappear. So here someone had a really nice idea. Well again to clarify this even if we are talking with vectors if we remove the zeros we achieve the block encoding. So this idea was that okay what happen if instead of load the coefficients that we have before we load the square root
19:16 of the coefficients. If we do that um and it makes sense sounds like a random idea but you will see at the end that makes sense. If we do that, we apply the same circuit and our vector will be this one over four where the square root of the coefficients with the polies. But now we have to think okay what kind of operator? Now I have to put here in such a way that when I multiply for our vector I get our Hamiltonian without non coefficient before without not exponential decay. Well, this is a good moment to stop the video if this is someone is watching it at other moment. So the solution will be
20:05 this particular matrix is we don't care about all the values but in the first row we are going to put again the square root of the coefficients. And why we do that? Because now when we multiply them we we can see that the multiplication of the square roots actually give us the original values. So we are going to have well a square root and a square root. We're going to have 1/4 of set zero, 1/3 of x1, and 1/4 of set zero, set one. And that's the reason we apply the square roots because we are we have to multiply them again to create the original coefficient. And this is one of the main problems the errors I see people when is trying to learn this algorithm that they forget always to
20:52 calculate the square roots when they try to prepare those particular states because it's not intuitive if you don't understand the details why I have to do that if I never do that. So I hope that with this intuition that we generalize now you always are going to remember the why you have to do square root and you get the the correct results. So saying that not all the matrices can be efficiently represented as a sum of power operators and um main example of this is the differential equations. the kind of matrices that we are interested in used to be the diagonal and the as the one that we can see here. So we will need to think different approaches to
21:38 solve this particular block coding. So saying that I think it's a good time for solve questions if there are any regarding to the first half and after that we can go to the block encoding to apply to these particular problems. Is there any question? Okay. Yeah. Thanks a lot. Uh we had a couple of questions in the chat but uh Catalina has been kind enough to keep answering them on Discord itself. Uh let's let's wait for a couple of minutes. I see uh some participants typing in but yeah I I'll let you know if you do have any more questions. So yeah maybe this is a good time for a reminder to all the participants. If you do have any questions please put them on our live chat on on our discord channel and we can then order them and uh yeah share them with
22:24 Yeah. Also at the end we will be solving questions. So also and at the end we can answer questions of the first half if you prefer. Okay. So I do have uh some questions coming in. Do we need to do amplitude amplification for block encoding? That's a good question. Um so it it depends um the the particular application you are using it but yes one of the problems of the block encodings used to be that you are adding some constant in front of the Hamiltonian that is going to decrease this the probability to get that particular um state when you do block encoding
23:11 you are not getting always the the information of the Hamiltonian. So in this kind of a scenarios is when you have to do amplitude amplification to try to improve the probability of that particular operator and but instead of the typical amplitude amplification in this particular scenario the method that we have to call is called oblivious amplitude amplification. that this is a variant of amplitude amplification born for block encoding. So the person who had the question uh I would recommend to to read about that particular topic. Okay. Um yeah have we have a lot of questions coming in now. Uh another question we had was okay why is block encoding
23:58 essential for simulating Hamiltonian evolution on a quantum computer? Yeah. So it's um QP quantif estimation is the main algorithm for well for a lot of different applications. For instance, if you want to find the ground state of one particular structure of a molecule, you normally use quantum phase estimation. Um Hamiltonian simulation the E to the H is one way to use quantum F estimation. But there is another version that is called kubetization based quantum estimation that instead of you Hamiltonian um Hamiltonian simulation use block encoding and it's still not clear when to use one when to use the other one probably they have different regimes but my personal opinion here is
24:47 that quantum face estimation through block encoding is going to be h cheaper than thro in the long term. So I think we should go even if it's not the standard algorithm to to explain we should use quantum estimation with with the block encoding approach. Got it. Uh we have another question. Um how do we get the metric with those square roots and can we do that for any coefficients? So yes, so what the problem that you have when we are with a molecule in chemistry is that I say always quantum chemistry because it's very typical example. They give you already the coefficients and the polish. So you don't think in the matrix you think just in what are the coefficients of me of my
25:32 linear combination of polish and what are the polish itself. So that's a list that you have and and you just take the square root. they are not going to be imaginary and maybe the question come okay what happen if it's negative right so there is a small detail that I didn't go in details here but as you can see here the initial preparation that's the square root h and here we keep the negative number but however here I didn't put the negative number so this will be the preparation of the same state of all the elements positive so in that way when you multiply them you keep the original sign but the only problem will be with imaginary numbers that in general that's something that I don't think even if is possible because wouldn't be a mission so we are safe
26:19 here wonderful okay maybe one last question before uh we let you continue um yeah one of the parts is curious as to why the particular form of state is chosen as and how do we know what's the correct starting point I I didn't understand can you repeat the question please yeah why the particular form of state is chosen as and how do we know that that is the correct starting point? Are you talking about SI here? Yes. Yeah. So the the only important thing is assign coefficients to basis states. So I I could choose perfectly here 0 0 1 one and 0 one or if I have five cubits could be 0 0 and one one. So it's it's not important at all. The only thing
27:06 that you have to know is exactly what index you have because in the select part this block here you have to say okay for this particular state that bas basis state that I choose to put the amplitude put now this g so these are not relevant it's just state preparation of the amplitudes in the basis states that you that you want maybe I can ask oh I think the the question was more about the fact that it's not normalized Like I think that's what is like a few people are asking like if Z is not FI is not normalized and so on. Oh I see I see. Um yeah we we will always have to normalize and so actually I'm putting here Hamiltonian but it's always Hamiltonian divide the
27:54 norm one of the Hamiltonian H and this norm one appears because we are have to normalize these these values. Um so there is always also a prefactor here that I'm not considering but that prefactor doesn't depend of the number of cubits is going to depend of the Hamiltonian itself but yeah always we have to normalize that's I I should have choose a a better example probably thank you no problem okay I'm going to continue then that at the end you can continue asking with no problem so what we were saying is that in the case of differential equations these particular matrices the diagonal it means all zeros but there are some diagonals that we have to put some
28:40 values are super super important so in one slide I'm going to explain what is the case even if you are not familiar with differential equations I think I can convince you so let's go for it imagine that we want to solve in a quantum computer this particular equation we have we we want to find a function u of x where x is a value that go from 0 to 1 such as u of x plus u prime of x equal to 1. That's what we want to solve. H again this is a simplification. Normally you need boundary conditions but let's focus just in in this toy example. So how we could solve that? The first approach is discretise the variables. So instead of say that x is a continuous from 0 to one
29:27 we are going to do um equidistance grid. So we have x1 x2 xn where this x i are equal to i by n. n is the number of terms in the partition. Therefore what we are going to try to get is not a function u but the points of u evaluated in our grid. So we want to find u sub i one to n where u sub i is equal to u evaluated in x sub i. If we have a very small partition like steps, we are going to get a very accurate solution to to the U we are looking for. The next step is somehow remove this derivative because it's a
30:14 bit difficult to work uh with that. So we are going to try to approximate that derivative. And how we can do it? Well, by definition, we know that u prime of x is the limit when h tend to zero of u in x + h minus u in x - h / 2. Normally this is not the standard definition. Uh but here we are taking a step uh forward backward because from a numeric mathematical point of view this is a bit more accurate um for a small h. So if we choose one particular value and the one that we are going to choose is 1 / n the size of our partition. What we know is that u prime of x sub i is equal to u evaluated in
31:03 the next point. It means x sub i + 1 minus u of x sub i - 1 by 2 / n. So we now have expression of the derivative in terms of our variables that we are looking for. Therefore we can write the equations um based on our variables. We we know that ux plus u prime u prime x is equal to 1. Therefore for all i u sub i plus the derivative definition that we just calculate h is equal to one. And we know that's true for all the elements of the partition. Therefore, we can organize all the equations in a matrix. And if we organize this in a
31:50 matrix, we are get something like this um a three diagonal matrix. Then here we have the incognitus the use and here all these ones of all the equations. The reason that they appear three diagonal and three terms is because each of these equations have just three variables. And actually they are consecutive like minus one zero and and one and they're going to move if we increase i. So to solve this differential equation is equivalent to solve this system and here is where quantum computing appears. What we are been trying to do is encode the this matrix
32:36 encode this vector and then use algorithms like HHL or matrix inversion via Q quantum signal processing. So different techniques to solve this system in the quantum computer. So that's in one slide how it works more or less and I was using just that to motivate how important are in this differential equation context these h diagonal d diagonal matrices. So let's see how we can encode them because this is something that we can express efficiently with poly words. So let's start with the base case one diagonal block encoding how we could create
33:21 operator like this where here in the top left all values are zero but we can pick some particular values a a sub zero a one a sub 2 a sub3 this particular example is straightforward if you are familiar with operators and the particular matrices and the thing is that These gates the multicont control rotation wise have this matrix. So if we do a control control zero of rotation y this is the matrix that we get a cosine of theta in the zero's position and then all ones and then well other stuff here. If instead
34:08 of control over 0 0, we control over 01 the angle theta is going to be in the first position and we can do that with all the values. Therefore, if we have that in mind, we will just have to concatenate and multiply all the control rotations consecutively. So if in the first case my angle is arro cosine of a sub0 what I will get in the first in the fther the position is cosine of ar cosine of a sub0. Therefore cosine r cosine cancel each other. We are just put here the value that we want. And if
34:54 we do that with the different erh indices we are able to embed this this particular structure when we have all the control combinations of rotation wise is what in the literature we what we used to call multiplexer or uniform control rotations and they have cool tricks to compile in a very efficient way. So even if you are seeing right now this with controls in a very beautiful clear way in practice in in hardware is very different. We we are able to apply a cool cool tricks but let's assume that we know with this how to do diagonal block encoding with one limitation. The
35:41 diagonal have to be in the in the middle has to be the main diagonal. So how we could create again a base case of one diagonal but in a different position and here is where appears the quantum arithmetic. Quantum arithmetic it was one of those uh building blocks that we detect in the quantum algorithm toolkit. Um and without entering details how it works I'm going to tell you the behavior that it brings. So if we apply a quantum other for instance of plus one in in our block encoding what is going to happen is that we are going to move to the right one position the diagonal is is
36:27 something easy to check when you know the matrix of the other that actually the result is going to be that movement of the diagonal. If we want to move to the left we will do minus one and we can go to the cave position just with with others. So that's great. We know how to load one diagonal and we can choose the position. So the question is how we can generalize this idea to the diagonal matrices. And also this is a good time for stop the video if you have the chance because you have now all the ingredients to know how to do it. And now we are going to go to the spoiler. So imagine we want to to solve to encode this particular example this three diagonal matrix where we have the diagonal the next one and two layer. So
37:15 we know that with this multiplexer that normally we represent with this when you see a circle with a line in diagonal we represent all the combinations 001 blah blah blah. So with this operator we do the block encoding of the main diagonal. Then we know that with a plus one of quantum arithmetics and our h multiplexer we can have the second uh diagonal. And again if we do a plus two here we get the third one. And these are circuits that we know independently but we would like to combine and to add them. and how we can do that with the algorithm that we say that we see in the
38:01 first half of the presentation. We are going to do a prep cell prep. Um because we know each individual term and what we want to do is to add them to check that it works. It will be something like this. Our initial state in that case I put it normalized h is going to be the equal superposition of the number of diagonals 1 /3 1 / roo of 3 of 0 0 plus 0 1 + 1 0 again you could choose different values if you think it's better and sometimes it's better are less entanglement if you choose a specific basis state so it's easier to build but let's assume we we take them in order 0 0 1 1 0 when We apply the select this block here. We are saying
38:48 okay if this is a zero and this is a zero apply the main diagonal. If this is zero and this is a zero we have the main diagonal. If this is a zero and this is a one diagonal one and the same with this one. So the vector that we just generated when we start here in 0 0 is this one. All the diagonals encoded there. Therefore, if we now multiply for the adjint of the preparation, we are adding here one uh well this this state here. And when we multiply them, what we are getting on the top is the addition of all the diagonals. And because all the values of the diagonals are zero outside the diagonal, we are going to get exactly the the diagonal like the
39:35 addition of one we other are not going to to conflict. And that will be the way to encode these matrices h using that algorithm. Uh so again to to summarize after that what we will do is prepare also this particular state and again go to HHL or QSBT to do the matrix inversion and solve our differential equations. So to finish with some conclusions h we know that as I saw you block encoding is a fundamental block in a lot of different quantum sub routines and they appear very natural in quantum chemistry because the molecules h have a very simple poly representation and in
40:22 differential equations because of these techniques to do h the diagonal block encodings super important different inputs require different methods There is not one that solves all of those. As you can see, we have different approaches for these two applications that we have mentioned. And finally, this is an active area of research and this is not a solved problem. We are continue working and trying to find better methods because it's something that appears everywhere. So, thank you very much and happy to answer more questions. Okay, wonderful. Thanks a lot, GMO. Um, let me bring up the Discord chat again. We have more questions and we have a lot of them.
41:07 Okay, wonderful. Okay, so here's a good one. Uh, why would we require to use uh discretization for employing block encoding? Like for example, is it possible to have multiple overlapping continuous intervals or would that be a problem? So I I would say that in the moment that you think in the quantum computer always you have to discretise you cannot work with this continuous thing but the cool thing is that if you add one the the size of the grid h increase exponentially with the number of cubits so you can be really really accurate but just adding a few cubits. So I I will say even if we are thinking in the discrete version it's it's going to be very continuous like sure uh let
41:54 me just scroll through uh yeah the these questions to find the problem for you. We can go um somebody asked this looks uh hard to do by hand. So how do you do it? I know that we have the tools for that but maybe you can recommend some. Um yeah in in penny lane if you are coming from the size of LCU for instance like you have a linear combination of polies h it's very easy to create a Hamiltonian inside your circuit you have your your coefficients you have your polish in a list so you have the object and there is a template called gml prep cell prep that you just
42:40 have to say okay this is my Hamiltonian and it's going to work everything under the hood. For the case of the diagonal block encoding, we don't have right now the implementation for that. But the fact that you have um prep and select also as different blocks, I think it's going to make your life easier. So I would recommend anyway to to try because it's always the the way to learn and in the future we will have probably support also for the the dials matrices. Oh, wonderful. And uh there's a doubt on your last slide. So if you could explain the last quantum circuit a little bit in more detail, especially what that bubble and the flash net mean. This is good I guess. Um okay. So here what we are what
43:25 we saw before is that well let me go to the original one2. Okay. So here what we're saying is if we want to do the well the addition of this Hamiltonian we need three parts. First of all a part that prepare the state well this one. Then a second block that is select that create the particular unitaries that go with each coefficient because set is Hamiltonian but is al is admission and is also unary. So this part assign the indices with the unitaries and then prep join to compensate the square root. So here what we are doing is exactly the
44:12 same prep because we want to add the four diagonals. we have this equal superposition and then what we control is over the unitary that goes with that index. So this gate in blue is just the circuit that h prepare the diagonal in the middle. The the green circuit is the one that prepares the unitary that block encode the diagonal in the second position because this is main diagonal but this is the operation other plus one that we see that in arithmetic h the other is the one that move to the position that we want. And finally this uh third
44:59 circuit is saying that in the index 1 zero we put the unitary that block and code the diagonal in the third position. So these are the diagonals and the prep and the prep are join is to combine them in the top left of the map. Okay. Um so yeah onto the next question. Um yeah there's a question like are the participants have learned some encoding techniques in the past. So are angle encoding, computational basis encoding, these kind of encodings related to block encoding like what are the key differences in their purpose implementation or application? Yeah. So all that um maybe moist state preparation, angular coding this basis stuff are techniques to to encode vectors. Uh somehow block encoding is a
45:47 way to encode h matrices. So that's that's the the main difference are different ways to do it. Normally in those methods for instance the angle encoding you lose a bit the track of how the vector is added in the circuit because you start to have well all these tensor products. So it's not so easy to visualize. The cool thing about block encoding is that it's super clear. You know your matrix is there in the top left in the top left. So it's easier to to work with that. So answering the question, one is focused in embed vectors. This in embed matrices. Okay. And maybe a follow-up question here would be how many types or how many varieties of block encoding techniques are there for molecular? It it depends. So there are a lot and
46:35 and normally this prepell prep is not the one we use. Um there is something that we call well internally we put it that name like smart select. So right now the preparation and the selections are very independent pieces. Um but there are techniques that they make sure that they are built together in such a way that you can reduce the cost a lot. Um and also it depends of the kind of Hamiltonian. For instance in chemistry there is a lot of symmetries and you know that if this coefficient and this polyore appears here the negative is going to appear in a different place. So you can encode in such a way that you just need to prepare one and then maybe with a hammer or with something split in
47:21 the two. So there is always um some little tricks that that you can do and and a lot of literature there for sure. Um okay this next question goes back to the previous slide. Uh can you explain why there is a zero at the bottom of these matrices? When there is a zero sorry where? Yeah probably this one. Uh I'm not sure if the participant can clarify maybe the question is can you explain why there is a zero at the bottom of the matrices. Oh okay. So so maybe so yeah normally actually this is not just three diagonal and it's going to appear some terms in this corner. H this is something that we can see here. If we have this diagonal and we apply the other the the B3 is going to go
48:08 here. It's not just a zero. So assuming that's the the question the thing is that we are just interested in the diagonal matrices this is something that is not helpful to us. So what we can do is just choose that value to be zero. So when we are doing this particular block encoding in in the last B you you can choose the value. So you can force to have the diagonals but if you do do that they're going to appear some terms in the in the bottom left. If that's not the question, you can reformulate letters and we can try to figure that out. Yeah, they they mean it for the 1 + 4 matrix which you showed the one + 4. Not sure which one. Uh I I don't know what matrix are you talking about. Okay.
48:54 Yeah, maybe we can uh hold on for this question for the time being. Uh but yeah, we we'll uh some of these questions and we can share them with you over email as well. So whenever you get time, you can uh share back your answers. Yeah. Also feel free to contact me probably LinkedIn. I used to take a look. So you look for GMO Alonso Lah and feel free to to connect. Wonderful. Yeah, that's that's amazing. Uh also for all the participants, Catalina from Zana is pretty active on the squad. So you should find her in the chat as well. So if there are any particular questions that are bugging you, she is also a very good person as well. I see a few more participants typing up in the chat but I'm yeah assuming these are more of discussions rather than uh specific questions like the chat is pretty active
49:39 right now. Uh so yeah maybe we can start wrapping up the session today. Uh yeah. Yep. Okay. Yeah. Thanks a lot GMO. This was really fun. Uh thank you for the interactive session and for all the participants. Thanks a lot everyone for being here today. Uh we'll all meet on Monday for another session by Xanadu. So yeah really excited for that. For all the participants if you did not catch up our vote sessions I would highly recommend those too. We had a very interactive lab tour. Lap tours are something which are uh way less common than these lectures and and we make a lot of efforts to put these and and bring these labs for all of you. So definitely u watch that session and we
50:26 also had a pretty interesting session on Wednesday with a lot of uh CEOs with different quantum startups with the elevate quantum region. So if anyone of you is interested in starting their own startup or building something in the quantum space, I would again recommend all of you to watch that. Uh one final point I would like to mention are the projects which would be announced next week July 1st we'll be announcing three projects for all of you. Uh so stay tuned for that as well. And with that I think this is a good time to start wrapping up. I'll still be around um for any more questions. So please feel free to bring the questions on Discord. But otherwise yeah have a great day. Have a really good weekend and see you all on Monday. Thank you everyone. Thank you very much.