Review of Quantum Framework Functionalities

A technical walkthrough of a quantum computing framework's core features: circuit constructors like Bell and Grover's algorithm, measurement types including POVMs, and how it connects to Qiskit and QuEST backends. The speakers also cover the framework's internal abstractions and flag some UI issues they plan to fix.
Chapters
Thanks, Cassidy. Good morning, everyone. So our plan for today is diving more into our, you know, quantum circuit operator, focusing more on, you know, some named operators, name circuits, do some, you know, the problem solving, and then we are going to have a sort of, you know, free discussions on a few interesting features of like, you know, our framework that you would like to share with you guys. So again, like, you know, a reminder, you know, whenever you think about, you know, a quantum circuit, you know, remember it's a composition of, you know, operators. And what I would like you to remember is that you can see this composition in the usual sense when we say composition in like, you know, everyday life and also composition in Wolfram way. Like, you know, you know, like, you know, composition had a very, very specific meaning, you know, in Wolfram language. So that's like, you know, both of them together. For Nick, you know, you can show one example of, you know, composition of two functions, three functions. And you see, like, you know, it's like a series of like, you know, and like, you see H, you know, acts on like, you know, X and then G and then F. So that, that's, you know, the same approach and of course, like, you know, the common convention that we have in the literature. So it's gonna be like, you know, the right composition of like, you know, so let's just show right composition two in case. So you see, it's like the one that you put on the left side F, it acts first, then G and then H. So right composition is like, you know, the, the. Your thing to remember, like, you know, whenever you are thinking about, like, you know, our circuit operator. So one approach is giving them a series of like, you know, operators. The other approach is going with the named operators. And remember, most of the time people, they are interested to apply a quantum circuit operator on a register state. So you don't need to bother like, you know, defining your register state. If you just like, you know, acted on an empty, you know, bracket, we would understand it like you are acting that on a register state. And we do all the computation behind the scene. So either you can give this state explicitly or if you don't specify the state, we would treat it as a register state. Okay, let's go through some of our name operators. In our framework, we have a collection of, sorry, named circuits. And that's one thing that you have to be very careful. Like in our name circuits, like in our different from name operator. So this is the Bell circuit. And of course, the result is like in a Bell state, this is the you know, the usual magic. What you see here is like you know, the application. Now we have magic. So like you know, S Toffoli state. You know, that's the common decomposition of the Foley. Like you know, gate Fourier. And then for Fourier, like you know, remember, like you know, you can specify the number of, you know, qubits by default is 2. But you can add, you know, more qubits. For example, the next one is like you know, 5 Fourier. Quantum Fourier transform is a very common like you know, circuit that has lots of application. The most famous one is in phase estimation.
It's equivalent quantum operator. Same as just quantum operator, But in just for two qubits.
This is the two. One other like you know, argument in the Fourier transform that is interesting is that let's say that you know, for example, you have a fourier circuit on 5 qubit but you would like to shift it down. For example, you would say, you know, let's apply that starting from for example, you know, third and then you know, it shifts it to the third. So it means initially it's going to apply on basically force qubits. Let's look at the diagram and you see here like you know, now it's we shift it down and it starts with you know, force qubit. So that third argument also helps you like you know, to position it wherever you want. As we said, like you know, quantum Fourier transform has lots of application by the way, like you know, we also have inverse of that. So like, you know, let's also show the inverse in case. So you see, like you know, it's exactly the same thing. Like you know, literally the inverse. Like you know, just so you can also go with the inverse. What else by the way, like you know, for a circuit, you know, one interesting feature is that like you know, you can also ask for like you know, you know, the inverse directly. For example, you can have your Fourier and then on four year you can directly ask for the inverse.
Is it inverse? I think it dagger.
Yep. So you see, it's like not. What is interesting like you know, is that, let's see, like you know, they are exactly the same. I don't know, like you know, some people they prefer like you know, going working directly with the inverse. Some people they prefer like you know, to see it in this way. So remember, dagger was a feature that we had for states for operators. A property for all of them also for the circuits and the usual. Exactly the usual meaning that it has, you know, in. In quantum asset. Quantum Fourier transform is a very popular circuit. The most important application is in the phase estimation. So for the phase estimation we have basically like, you know, two other arguments besides specifying the name of your operator. So this is the phase estimation. So the first argument is a unitary operator that you are interested to find like you know, some specific features feature of its Eigen functions. And then the second argument, you're saying that like you know, how many steps. So for your, your estimation, the procedure, the accuracy of your estimation depends on the number of steps. So this is the case with three can add, you know, increase it more and like, you know, your estimation will be a better estimation. And it gets, you know, more and more complicated. Of course, you know, as you increase the number of qubits like you know, your estimation for the corresponding phase of that unitary operator will be a better estimation. Okay, so there are also like, you know, some textbook, you know, versa by zero bv, you know, circuit. So here like, you know, the main purpose of the circuit is you know, finding it, you know, a circuit string that's you know, and usually like, you know, some of like you know, this come, you know, let's apply it, you know, on a register set and let's look at the probabilities. You see here like you know, we are saying that the secret string is 101 and you see, you know, in our measurement results that's exactly the result that we get. Okay, for all of most of these, you know, not all of them. For most of these like you know, named circuits, we also have the corresponding oracle. So like, you know, the oracle is usually the name you would see, you know, in the Grover we also have it the name of that basically circuit followed by the oracle at the end. So that's basically how you can get the corresponding oracle. Let's look at the questions. There has been some issues with the note. So Cassidy, if you can just refer them to the right link for today's notebook, that would be helpful. Victor, he has a question. Is it all applicable to the irreducible tensor operators? Not sure. I'm not sure if I understand the question. Like you know, it referring to what. So that, that part I do not understand. Like you know, definitely, you know, irreducible tensors. Like you know, we use, you know, all over like you know, asset behind the scene. Everything is tensor for us. But like you know. Nick, do you have any comments on that? Maybe. Yeah, the issue, I'm so sorry. The issue with that notebook is that the one that you gave Yesterday that published operators 1 people don't have permissions to it. I have uploaded, so my bad. Sorry about that guys. Like you know, I made a mistake.
And.
I copy and paste the wrong URL. So it's on the community. So Cassidy has already shared the link for the community. So if you just go there, you can find the right link to that. So it's already. Let me just find it very quick. Let me just copy and paste it. This is what happens when you copy and paste very fast. When I did it yesterday. Let me just find it.
Give me a sec. Is it the one about operators and memory?
The one that you get? I made the same mistake. Like you know, you remember that one?
This one, right? I posted it into chat.
Yes, thank you, Nick. So that's the one that you can get it. And Sid will do that. Like you know, all of them. Like you know, we also like, you know, put it on cloud. So Nick, would you like to comment on that? You know that question by Victor about reducible?
I'm not sure because over tensors are just tensors. How would you act on the irreducible. In what sense they would be represented as irreducible tensors. Like if you make an operator or a state, it's a just a tensor. Like I don't quite understand.
So basically like the Victor tensor is basically behind the scene. Everything for us is a tensor. Like you know, but not to like you know. So let's move on. If you can elaborate more on your question, we'd be able to answer that. So those of you who are familiar with like you know, you know, like, you know, there are two kind of famous approaches to do quantum computation. One of them is the usual gate approach which is what we discuss almost all the examples. Yeah, all the examples that we have shown you so far. It was a gate based approach. Another approach is measurement approach. Okay. We could they usually called usually measurements like you know, based quantum computing. For those approaches there is very famous like you know, a very entangled famous states that they use that the state is called graph states. So the, the corresponding circuit. So let's say that you know, you have this graph and then the corresponding operator means whenever there is an edge apply is you know, control Z between like you know, the corresponding, like you know, vertexes. For example, you see between one and two there is an edge. So we are applying is you know, a control z between 1 and 2. Between the vertex is 1 and 3. Likewise 1 and 4. So that's the corresponding basically graph circuit. And remember we also have you know, a state called you know, graph state that Also named, you know, a graph that we have. And you can easily show that the relationship between the two is like this. If you apply a collection of Hadamard on the top of this graph states, the result of that circuit on a register state is exactly the same as our graph state. So basically, in other words, remember this is what we discussed last time, a series of Hadamard. Nick, let's show them the diagram. They would say, see it there? So you see those initial Hadamard always when you see a collection of Hadamard on your qubit, it means prepare a uniform quantum superposition. So some, in some, you know, literature, they include that piece into the circuit with the Hadamard. In some literature they drop that. So just, just be careful when you're reading the literature. Like, you know, some people, they always start with the register state, all the qubits in zero state. Some others, like, you know, they include some initial preparation. You can kind of like, you know, include it into your, into your circuit. We will, there is a question about time evolution. We'll come back to that question. D Like, you know, we are, we will discuss about it after we are done with the circuit operator. Okay. A very famous family of, you know, quantum search is like, you know, basically Grover. So for the Grover, you have to go, sorry about back. Just give me a sec. Sorry about that. So what we have here is that like, you know, your Grover, you know, the circuit and a Boolean function. So the, the main purpose of like, you know, Grover algorithm is to find the solution of that very particular Boolean function. Okay? And Grover can have many different oracles. One famous one that you see here, people call it Boolean oracle. So the idea of Boolean oracle is that given basically the number of qubits or basically the number of elements that you have in your Boolean function, you see here is four. You add one ancillary qubit because you would like to save this solution. So you see here, you know, it has only four variables. So the idea of Boolean oracle is to save the solution in the an ancillary qubit. Okay, let's, for example, let's just explore it using different functionalities in Wolfram language. For example, we can find all the solutions for that Boolean function. Okay, the last comment, the replacement that you see at the end is just replacing true and false like you know, to 1 and 0. So these are all the solutions for that very particular Boolean function. Now what we can do, we can prepare like, you know, these quantum states and of course the ancillary qubit in the ground state zero. So this is the collection of states that we expect them to be the solution of that boolean function. Okay. Now if we apply the boolean oracle on all of those states. Now let's look at the. Just show them the traditional form. You see, for all of them, the last qubit is switched from zero to one. So basically that's how we save basically the solution of a Boolean oracle on the top of our ancillary qubit. And of course this is not the end of Nick. If you scroll up, show the Grover one more time. So that's just a boolean. And then the next step is the amplification. Basically, like, you know, you amplify that amplitude in a way that like, you know, after a series of like, you know, Grover algorithm, you can increase kind of maximizing the amplitude for the solution. And if you do the measurement, that's the solution that you will get with the highest probability.
Separately.
Right?
Diffusion or amplification?
Both of. Yeah, either amplifier. So that, that's the part that you can also get it directly. So here like, you know, the. So for Grover there are. So let's discuss about all the details that you can have in Grover. So one thing about Grover is that so it has two parts, your oracle amplification, okay? You can extract both of them. You see here like, you know, this is the diffusion part. You know, it is also called amplification. You know, both of them, you know, we support that. One other thing is that you know, remember whenever you have a sandwich of two Pauli x not around the control one, it is the same as control zero. Okay. You see that like, you know, that yellow part of, you know, Grover, you know, amplification part. That's why, you know, in some, you know, textbook, instead of like, you know, control one, they show you control zero. Okay? And we also have it in our framework. So the only difference, you know, remember like, you know, they are exactly the same in the top one, it's control one. Now here is control zero and we also have all of them in our. For example, for the amplification, we also have amplification, magnification zero or diffusion zero. Like you know, we can also add it there. So it's just like, you know, the different conventions. But they remember like the operation is exactly the same whenever like you know, one more time. It's an interesting feature when you have two knots, remember like, you know, not gate and poly X, they are the same. So when you have two of them sandwiching on the control one. It's like doing control zero. One other thing. Let's go down, scroll down. Yeah. So this is one potential oracle for Grover search algorithm. So we save the solution in another ancillary qubit. Another approach that is called phase oracle. What's happening here is that this time we are saving the solutions in an overall phase of all those qubits. For example, this time like, you know, let's prepare. So this time there is no ancillary qubit. So let's prepare our states like, you know, again, the solutions of the same boolean functions. And this time if we apply, you know, the phase oracle, you see, this time the solution is in the phase of that state. Okay? And by the way, since we have a superposition of many states, this phase here is observable, okay? It's because the phase is added only to the solutions, not to the, the overall state of your quantum system. So whenever you're looking at the log, you know, different Grover cells algorithm in the literature, just, you know, pay attention. If they are working with. Yeah, that. That's actually a very good example. So you see here those that are solutions, you see like, you know, there is a, you know, phase negative. It's like having it flipping the phase in front of them. So you see those that are not solution, it remains as positive. And of course, like, you know, in the next step, like, you know, when we apply like, you know, the grower, you would amplify like, you know, that those states. And by the way, remember, the effect of, you know, grower is like, you know, it's. It's an oscillatory behavior. So after a few steps, like, you know, you would maximize it. But if you keep doing that, you know, it minimizes like, you know, that effect. If you want more information, let me just find it. If you go to the community and under my name I have added a series of like, you know, examples. Let me just put it in the chat here. In that community post, you can find like, you know, many different examples of like, you know, Grover applied on, on your quantum set. It's you know, this step of like, you know, repeating, you know, Grover. It's a little bit tricky. Like, you know, you know how we should do that? Like, you know, which part is like, you know, the nested part. Because like, you know, you just need to, you know, Nick, the tricky part is like, you know, there is a not operator on the ancillary qubit. And then like, you know, keep doing that so that.
No, I think you have to also Apply the oracle.
Yes. And applying oracle again. And then there is also like you know, the. An analytical formula which is called Grover probability of success. If you look at that community post, you can easily see that like you know, that analytical formula and the numeric that you get out of, you know, the simulation, they match perfectly. They are the same thing. You know, Grover is a very you know, popular like you know, search algorithm. So you guys can explore it and you know, see all this interesting feature. But again like, you know, remember when we talk about, you know, that's the part that when, when in the literature, whenever you see a repetition iteration of like you know, any algorithm, it's very important to understand which part is repeated. Is it only like you know, the diffusion part or including the oracle? Like you know that that's a tricky part. I'm sure you guys can explore it on your own. What else for our named up circuits? Nick, is there any interesting feature that you would like to add for the named circuits?
Let's see. Maybe I haven't tried it in a while actually have controlled and then act on another circle. Circle for example. Not quite.
This is actually last night. I was also thinking about that. Right now it's broken but we can revise it quickly today and making sure it's working. Basically what Nick is telling you is that you can have a name circuit and then you can have that name circuit in a control manner.
Yes, because I quantum circuit. Well already fixed to the first and second one. I can't control it on the, on the first one. So I have to pick something else.
And by the way, like, you know, what is not nice right now is like. Let me be clear, show the diagram. So this diagram, you know what, what we are going to do would be like this. So and this is the part that it just needs like you know, a little bit of like you know, coding. I think like, you know, today can easily take care of that. It's much nicer if we put the whole bell in a box. So as of now like you know, it's like we are expanding that in a not very, you know, trivial way. Like you know, this circuit is kind of. At least the diagram is non trivial. Okay. But so what we are gonna do, we are gonna keep like, you know, at least for the sake of diagram, we are going to keep the name circuit inside the box and then like you know, control and everything that you have like, you know, it's gonna. Yeah, that, that box, you know, we will, we will keep it, you know, as it is and Then you're gonna have, like, you know, these are the boxes that I mean, and you are gonna have your control. And then you would see the whole box. As of now, you don't see it. That's why, like, you know, it's not very nice. And by the way, like, you know, you see, like, you know, look at the notation that we have for the magic state. You see, like, you know, that label on the top, it's literally a Quantum Wolfram composition. You see, it tells you, like, you know, you have a tensor product of S, then you have Hadamard, and then you have C naught. Okay, so, like, that's the composition that we have. And let's just comment, because, you know, this composition is an interesting feature for the composition and a circuit. What is interesting is that you can directly do the composition with operator. For example, Nick, add quantum measurement, which is like, you know, it's not a circuit, but, like, you know, it's sort of an operation. And you see, like, you know, we understand, you know, what's happening here, and the result is a circuit. So, like, you know, we are just, you know, saying that, like, you know, okay, like, you know, at the very end, you know, apply like, you know, your measurement or any other operator. Like, you know, you could have, you know, I don't know, another Hadamard at the beginning. One comment. Like, you know, the, you know, just, you know, when, whenever you are using that, like, you know, pay attention to, like, you know, the usual composition. It's not called, like, you know, left composition, which is called just composition. And the right composition that we have, like, you know, so for composition, we have, you know, two syntaxes. If you use, you know, AT and, you know, star, like, you know, the order would be different. Like, you know, one of them is, like, applied on the right side. The other one, by convention, is always with the left side. So just. Just, you know, whenever. I'm sure you are familiar with the syntaxes, but in case, just. Just pay attention. So this time, like, you know, that poly X. So you see, it. It acts at the very end. So this is why it is called right composition. Okay, so this is the left composition. Left composition, sorry, this is right composition. Yeah. What else? By the way, you can also do it with the circuits. Like, you know, let's just show, like, you know, two circuits. Composition of two circuits, like, you know, as they, like. So you can also do the composition of, you know, different circuits, the composition of, you know, different circuits. You know, it will come very handy when you are doing you know, variational like you know, circuits using our framework because you are applying a series of like, you know, similar circuits on your quantum systems. What other interesting features for the circuit?
Oh, I don't know. Compiling it. We already showed it.
Oh, you know, do you want to comment on different way of like, you know, different methods of calculation?
Yeah, why not? It's by default we already showed previously that's it's a basically tensor network contraction. In order to compute this quantum operator or whenever you activate on a register state or measure it, you're just contracting the standard network with some pre acup pre filled tensors basically. But there's some. But because we already support like basic composition of operators which is just multiplying product intensers together like you usually do like this. You can apply this to another operator. Right. You can just do it for the circuit instead of just doing something efficient like contracting tensors all at once in some fancy algorithm. It's basically a different method to this property that computes on the parameter method and you just compose those. Right. And the same kind of method goes for when you apply it to a state or to an empty register like this. We also have giskit method. Hopefully it works. It's gonna be dangerous. Basically underneath it's going to compile it to a qiskit one, run it through the using qiskit and convert back to a state.
Yeah.
It's going to be numeric at least. Yeah. As a result because it can do symbolic and exact numbers. Yeah.
For the key skit like always numeric. Remember guys like you know, it's.
And also another additional backend if you want to quest but you have to do some magic before that.
You know, quest. Those of you like, you know, it's a very interesting, you know, package developed by one of our summer school alumini. You know, he already got his Ph.D. i believe, you know, from University of Oxford. And like you know what they do like you know, they go to C and like you know, they do you know, their computation there and then they come back here. So for some numerics like you know, quest can be very fast.
Yeah. For big circuits and it usually better works for bigger circuits, more deeper and more wider ones. It's much better than the other methods that we have.
So there are some questions like you know, seed like you know, I took a quick look at you know, the list of those names. Many of the. Almost all of them are there but for some of them we have some generic designs. Like for example we have this big rotation Generic rotation. So for example, the ising type of interaction, you can easily create it with rotation. So we do not have a very specific name only for that very particular one, but we have some generic ones that you can create that. A few of them, there is not a sort of agreement in the literature how they should be called. Some of them, for example, we already discussed about magic, it's a very popular one. There is a sort of agreement that it is called magic, but for some it's not a convention there and that's why we haven't included them. One thing that we didn't show is we have some decomposition feature for our operators. For example, we have the usual ZYZ decomposition. So let's just generate a random operator, show the decomposition which represents basically a circuit. So basically like, you know, what you see here, the first one is like, you know, like you know, any unitary, you can decompose it as a series of like you know, the phase multiply. But what usually called in the literature U3, which is basically like you know, a composition of three rotation and that's the decomposition that you can find for any operator. Remember this decomposition returns like, you know, a circuit. So the result is a circuit. There is another question by Douglas, I guess you know, Nick has already commented that, you know, on the comment community, like you know, from our framework to qiskit is, you know, it's included in our framework. The reverse, you know, Nick, would you like to let you know again, you know, please refer to that community post for more detail.
But Nick, you know, compose it back to a list of quantum operators. Yeah, well, if you, if you already have a circuit, you made it somehow from the qiskit like it could be any circuit. Like that's just. It's already a list of operators by definition, right? So I guess that's, that's. That was the question.
So I guess you know the question maybe Douglas, you meant something from qiskit like you know, a qiskit object, you know, into our framework. I guess you know, his question is mostly about that one.
Well, I think he asking if you already make, make a quantum circuit from the qiskit one, how you decompose it on the list of quantum operators. But if like making it from the, what I showed in the community post, I think this notebook, right? You can, you don't see it. Hold on. Yeah, let me share. Like in this notebook, if you configured your qiskit environment and you can use Python language cell here, you can just use it to construct your qiskit circuit. Inside of it and then just use a Wolfram client and make a qiskit circuit object out of it, like this.
One.
And hopefully I just try it.
Mm. Like, you know, one thing about Kiskit is it is in Python. So that's why, like, you know, you need, you know, external evaluate to.
To deal with that. I'm not sure whether it works now or not as, as an object itself, because ideally you can basically use it similar to the quantum circuit in the framework. You can apply it to states. Right. You can make it into a quantum operator. Let's see whether it works. Well, it doesn't work for measurements, I guess. Let me point it out. You have this kind of without, then it works and you can apply it to states. It also doesn't work for some reason. Ideally it works sometimes.
So that part, like, you know, using the usual, like, you know, thing is that, you know, the, the, the communication with qiskit, like, you know, from our framework to qiskit is very straightforward. The reverse maybe need some massaging. Okay.
Like, at least you can convert it to a circuit. It works a little bit. But using the qiskit circuit object itself, maybe not.
Yeah. By the way, like, yeah, Douglas, let's just be clear. Like, you know, what Nick was trying to show is just stay at the level of qiskit and do everything. With qiskit, you can easily, like, you know, given a qiskit, you can get it, bring it to our framework and then do everything using our framework. And I think, like, you know, this is honestly, you know, we believe we already have, you know, enough functionalities for the those who wants to bring their qiskit circuits into our framework. So we don't need to support everything done qiskit way. So that's the best way, given your. Look at the top one, like your qiskit circuit object, just get it in our framework, which is the quantum circuit property of that one, and then do the rest of computation using that Wolfram quantum circuit. That's the best strategy because if you want to, like, you know, basically the. It doesn't make sense. Like, you know, from the very beginning till the end if you want to be in qiskit. So it means work with qiskit. Not, not, not this framework. Okay. Any other interesting feature about like, you know, oh, by the way, like, you know, one another. Let me also put it in the Zoom chat. There is a very recent, you know, big development on all the fancy visualization that you can do with our. Let me just find the link. There are tons of different options. Let me just copy and paste it here. I'm putting that in the chat. This is the link to our resource, our documentation. There are lots of interesting feature that you can do for your circuit diagram. Like, you can change the colors, you can change the background. You can change like, you know, the sizes. You can add. Like, you know, for example, one interesting feature is like that I personally like, is the connectors. Nick, just. Just show them, you know, one option with, you know, connectors. That. That's something.
The diagram.
I mean, diagram. Yep.
You have a magic one. One diagram has. Is it wire connectors?
Show show connectors. I guess show connectors. True. Show connectors without.
I. Yeah. Two, two W. Two versions of those.
Yeah. So basically, like, you know, what is interesting here is that like, you know, because you may have a big box. Okay. Like, you know, for example, like, you know, a composite, you know, operator acting on many qubits. And it's not clear for you. Like, you know, does it passes through some wires or does it, you know, acts on some wires? You know, this correct. You know, connectors, like, you know, it helps you to. You see, like for example here, this one, you know, it's acting. For example, maybe that interesting case would be like, you know, for order. Change the order. And then like, you know. Yeah, you see like, you know, the, the. When it acts on a different situation from those connectors. You can see that. Okay, so it's acting on this one or on the other one.
Sometimes it's maybe not the quantum. How would you do it? Just recently it become a little bit smarter. So if you do this kind of unit three because it's a. Change the label, I guess just called Q. Like this.
Yeah, that's what I meant. Like, you know, when you have a big box, you know, that big box is acting only on first, third and the fifth one, you see like, you know, you can kind of see that. You see like, you know, the wires, you know, this second wire and the fourth wire, they are passing through that big, you know, box. But you know, sometimes like, you know, it's not very obvious for the people. So those connectors, like, you know, they can help you to have a better understanding of like, you know, how gates are acting. I don't know. Is there any other interesting feature?
I don't know.
Do you have any level example in your mind, like, you know, the sub circuits.
Yeah. Where we had a bunch of circuits like this? Well, I can do it. Have multiple circuits inside of another circuit. It kind of shows them. By default. In these boxes. But you can hide it out. And even those boxes can contain other boxes. And so the way you control it is by how much level deep, how deep of a level. You want to show your sub circuits. So it's like the lowest One is the 01. You can just hide them out like that. If you, if you make a level one now they shown completely as a sub boxes like that outlined.
This leveling. Like, you know, it's, you know, spatially when like, you know, there's a big, big box kind of conventional. Some people, they would like to show it, some people, they don't want to show it. So like, you know, your choice, like, you know, how you want to, you know, deal with that. So you see like, you know, here is you know, quantum Fourier transform. And we just show it as a big box. Especially like, you know, it simplifies the representation. Because like, you know, let's say that like, you know, you, you know, people, they know what is quantum Fourier transform. At least nowadays, you know, it's a very common thing and you don't bother showing this detail. So just calling that the usual abbreviation. It helps for the sake of visualizations, you're going to get a smaller representation. Okay, so let's see any other question, any other comment? Okay, let's do some of those, you know, those are very simple but like, you know, it's a quick overview of like, you know, interesting, important design feature of our quantum circuit operator. Let's go through some of those questions. Let's see the first one, a random unitary only on the qubit number one. So let's design a circuit the random unitary. So like, you know what, what is important there is that like you know the order. Okay, so you can go with the named. So remember this a name. And then you know, on the first one it is by default. And then if you change the order, it acts on any other cub. And my debate, like you know, you can have like, you know, in, in case, like let's, you know, Nick, show the diagram here. So like you see those labels. Like you know, you can customize all of them. Like you know, it's, it's your choice. Like you know how you want to show like you know those labels. I guess you have to. Rapid of quantum operator.
Maybe not.
Oh, that's interesting.
You have to specify ordering. This is quiet.
Okay, I think like, you know, after this session, you know, we are going to add also that we are going to support the case, the generic case here. So we can directly apply the label because Having that content operator is just an extra headache.
You don't have it. You just have to specify how many.
How many.
I think this should work. Hopefully.
Yep.
This one as a second argument.
Okay, so let's move on. Like, you know, let's have like, you know, square root of X on second qubit. Again, like, you know, I know these are simple examples, but like, you know, just, just as a practice, like, you know, so it has, you know, we have different, you know, it's, you can call it sx, you can call it V. But like remember, you know, each of these, you know, building names, what you see as the label, it could be different from. For example, if you want to see explicitly, if you want to see explicitly like you know, the label square root of X or just square root of X on X, you know, that's the best strategy. So like, you know, it's, you know, either you go with like, you know, those, you know, definitions that you would like to see exactly like you know, the square root or the conventional labels. But remember those labels, you can all customize all of them. The next one, like you know, let's, let's go a little bit fancy. Let's say that like, you know, we would like to have like, you know, a depolarization channel with the probability P on, on the second cube and the third cubit. So we never discuss about that. But like, you know, remember, you know, we can, we have, you know, quantum channel in our framework. And the way that you can apply it is literally as before. So your quantum channel, let's go with the named, you know, channel which is the polarization and then specify like, you know, where you want to act it. You see like, you know, the format like, you know, it's very similar to like, you know, that cross the sandwiching that you have. But like, you know, you can change it as you like.
And also some does some label scrambling unfortunately.
So a homework for us like you know, making sure that the labels working fine. Okay, next one. Like, you know, we have a collection of like, you know, the X on 1, Z on 2 and Y on 3. So remember in our framework there are many different ways. But as you may remember, like, you know, we also, so this is the way that most of the time we discuss about it. But since, you know, in the literature people also like, like, you know, you know, Pauli Xstring as a, as a gate, you know, Nick also showed the case that you can just give a string as an input for your quantum circuit operator X, Z and Y so we understand it like, you know, as that particular order. This is like, you know, very common. Like, you know, poly string is very common. Okay, let's see the magic circuit and then, you know, measuring, you know, both qubits in the computational basis. So this is the composition that we discussed. Like, you know, you can have your named circuit and then measurement, I guess, you know, we never showed in a circuit diagram. Let's just, you know, that's an interesting look. You can have, you know, saying it's like, do the measurement on one and two together and we show like, you know, the measurement box, like, you know, the big measurement box. Or you can say like, you know, measurement on qubit number one. Measurement on qubit number two. The difference here is that you just see two different boxes for measurements. Remember, these are two different states, so their measurements are independent from each other.
It also will be different in the actual final measurement. If you actually measure something because this way you're going to measure something four dimensional because you measure it at once. So your final measured result is four dimensional. So it shows it as a. Four kit. But in this case it's see it.
As like, you know, the label one and two.
Yeah.
There is a question by Douglas. Yes, we know about that. It's not us. He said, you know, graphics on cloud. I think, you know, Nick, you have a hacky way, you know, state diagram. You remember like, you know, we had this issue with the circuit diagram on Cloud two. So for any diagram. But let's just make sure that. But you know, we can not a. Not that, you know, no estate, you know, quantity. Quantum state 1 and then diagram the tensorflow diagram of a quantum state. Yeah. So this like, you know, on cloud, like, you know, right now it shows a black box. You know, it's a cloud bug. You remember like, you know that graphic bug that we had before on Cloud.
Yeah. Is it the same?
Yeah, yeah, just the, the hacky way that we had like, you know, we had to change some options. So let's just change some options so people, they can see those diagrams on Cloud two.
I'm not. Remember what.
I'll. I'll send you, I'll send you the information. Like, you know, like, you know, what was the issue there? So it's, you know, Doug, short answer. We know like, you know, that that's a graphic, you know, error on cloud. It's not our framework. Okay. The next example I think, you know, is trivial, but again, like, you know, it's a reminder that, you know, please remember like, you know, Order is your best friend. And you know, you know, this is example. Like, you know, those of you are asking why this sort of example examples like you know, permutations, like, you know, it's a big deal in quantum computing. And like you know, a series of swap, like you know, always you can create, you know, a corresponding permutation. So that's why, you know, these are an interesting example. Next one. Like, you know, it's again like, you know, fancy way of order slash composition. So we have quantum Fourier transform. Not on Qubit 1, you know, Nick, you know, 1, 2, 3, 4. All of them 1, 1 through 4.
Yeah.
And then Fourier. Okay, then just, just so, so you see, like, you know, you may not like it, we totally understand it, but let's create it using the composition. So with the composition.
You mean composition of circuit.
Two circuits. Yeah, And let's just kill the order 2, 3, 4 and let's just say 3 and comma Fourier comma 3 and 1. Using that feature. Now they can. It looks nice.
In this case it was a single operator.
Yep.
Now that's single tensor.
Yeah. So that, that's the whole thing. Like you know, there are some common names, like for example, like you know, Fourier quantum, Fourier transform or Fourier operator. It's, you know, that, that's how it's been communicated in the literature. Okay, I know it's confusing, but when you are, especially when you are, you know, designing a circuit, make sure that, you know, you pay attention to similar names. Actually the only one that comes to my mind is the Fourier transform. Maybe it's a more, maybe there are more. But you know, some of them, some operator, they have a very specific name, especially Fourier. And then you have a big circuit with the very specific name. So when you are like, you know, working, you know, with circuits and some operators just, just be mindful of like you know, this minor differences. And of course, like, you know, the diagram always helps you to have a better understanding. Like the top example that Nick mentioned, like, no, it's like you're applying single ones on each one. And then the second example is actually the circuit that we call as a Fourier transform.
Three dimensional one.
No, it's still like, you know, it's still interpret that as, as operator. I guess there if you. Composition. Yeah. Unless you wrap it around quantum circuit operator. Yeah, that's another way of doing that. So circuit inside circuit or a composition of circuits. Like, you know, it's just, you know, different way of, you know, constructing a very complicated. And the last example, like you know, the this is the last example example that I had that we had prepared for today. Let's say that like, you know, I meant bell circuit. So bell circuit. Yes, Bell circuit followed by. Quantum channel of bit flip P1 which goes on the first one and then we have quantum channel. So that's what we have here.
Besides this label.
Yeah, the label. Like, you know, I make a note of that. Like when it's not one, you know, the label kind of acting crazy. So of course remember that like, you know, the quantum channel is basically describing the effect of the noise on your system. So that's how you can include it.
Yeah, quantum channel is a bit raw operation at the moment, especially when you compile a circuit with inside. With quantum channels inside of it using Tensor network.
What else? I'm thinking like, you know, what other interesting features. Would you like to comment on? Like you know, the, the, the one that we discussed yesterday regarding like you know, quantum measurements and.
And POVMs.
Yep.
Oh sure.
Because, you know, nowadays like, you know, it's.
Or maybe in general how every object is related to each other.
Yes. How nesting is done.
That's also interesting because we haven't finished discussing this last. Yeah, right.
Yes, let's discuss that one.
The most elementary thing in the framework is names of kids. Maybe you've seen those. This is just names that don't have any semantic meanings. Right. Those are usually just seen in the formula. Right. The next thing that we have is a quit basis which is basically the name on names with some numeric representations. Like if you make a qutit basis usual one for the qubit out inside of it is just a list of representations like this. Right. So you have this zero kettle on the first QIT and some representation, usually some vector 01 and normal. It's like 01 representation. And get number one has an orthogonal to that representation. Okay. So this is how QGIT bases are represented and it's this kind of association of representations with names and nothing else. Another step in the abstraction is quantum basis. This is basically a bunch, a bunch of QIT bases and some meta information like pictures and so for example, quantum basis, usually usual quantum basis for a state for a single qubit state contains an output qubit basis which is exactly the one that I showed you above. And the input one is just a one dimensional quidditched basis with no qubits. Right, but so it's. No, it's.
It's.
You can't say that it's. There's no input. You can only say that it's just one dimensional input. It just doesn't take anything. Okay, so that's what quantum basis of a quantum state is, for example. And it also contains some meta information like labels. And by default it's none picture, which is just usually not used at all. But we just have it in case we're going to need it soon in the future. We actually have some plans in order to use those in fact, especially for face space representation. What else does it have? Oh, like parameters, but we haven't showed them yet. So this is the quantum basis. It's just the most essential part is that it contains two QGT bases for output and input. Okay, next step, this hierarchy of presentations and abstractions is the quantum state is a bit more general than just quantum states in the usual case. So if you construct a quantum state like this one for a single qu, right underneath it is just this list of amplitudes and the quantum basis, nothing else. So it also has a basis like that. Exactly, the one like this, like this one basis or here and the list of amplitudes. Or maybe you call it just a state vector, right? Which is a sparse array. In this case it just contains A and B as an element. And this is the quantum state when it's of type vector. But you also can make a different quantum state of type matrix, right? Which is also the has the same exact representation. The only difference is that instead of a list of amplitudes as a state vector has a density matrix. But it also has contains the same exact quantum basis underneath. Right? So all right, now what? Now we have a next thing ahead or above it is quantum operators, right? And the quantum operators is actually this particular quantum state because it's very general. The basis can actually have a different output and different inputs. Dimensionality on those are different, can be different. So quantum parameter underneath actually contains a state, right? And in this case it's a little bit more general than the usual state. It's a pure map. So now it has an output dimension if you ask for an input basis. Now it also has a two dimensional input with one qubit in it. That's the main difference for the usual operators. Now its input basis is not one dimensional for the state, but it's two dimensional. And then also so basically quantum operator is a state. And one additional thing the quantum parameter has is an order. So we can think of an operator as a quantum state or this general quantum state version with another and another allows for quantum operator to be essentially a quantum gate. So you can, without modifying a tensor or underlying state in Any way or basis you can put it anywhere on your circuit. You just specify an order and it's very easy. Modification of quantum parameter. You just change its order and nothing else. All right, so that's the quantum parameter. It's a quantum state.
Possible Nick, you know, sure. Like you know, the two qubit forgive C naught. Show the order for the C naught. Just, just, just as another example, two.
Qubit operations, it's going to have an output order and an input order. You can even change one of them. It's not going to be well represented in the circuit layout. But in general if you have like this. Quit it. This operator 2 quidit operator, you can generally change only one of them. Like you can change 3, 4 as an output and 10 and 20 as an input. So now it's like an unoperated attacks on two quidits on wire number 10 and wire number 20 and outputs on the completely two different quits. So you can have objects like that, but you don't have support for them in the diagram of a circuit. But you can work with them by just composing them together.
So like, you know, one interesting take home lesson for our students is that, that like, you know, although the typical conventional diagram and the wires is a very good language or metadata to understand what's happening with, you know, quantum operations, quantum transformation in general. But remember, it has also many limitations. For example, in a framework like this very last example that Nick is showing you, like, you know, you could have some very interesting features, very useful for, for some like, you know, very, you know, nifty computation. But practically there is no nice representation using the diagram. Okay, so that, that, that's like, you know, one of the headaches of like, you know, dealing with, you know, the only diagram. So one thing that I always tell a student is that diagram very interesting. Like you know, I know especially among, you know, computer scientists, they love it and like, you know, and they work with it a lot. But if you are like, you know, pure quantum researchers, this is one of the many options and it doesn't include everything. So keep that in mind whenever you are working with quantum diagram. Yeah.
Okay. So, and basically here I've just showed that you can compose different things. So if you have output on the third qubit but, and fourth qubit but your, another operator that you composing it with has a different order. It's going to add it appropriately. So it expands the operator. And, but if it's on this acting on the sum q digit that already part of an output or just acts it naturally. So now it's the same dimension of a tensor.
But by the way, you know, Nick, these two examples, can we like, you know, the, the, the, the difference between them, does it reflect on the tensor network of the corresponding like, you know, circuit? I never think about that. Like. So just. Do you have any thought on that?
Well, you can't really put it in the circuit normally. I, I'm. I no longer think how the circuit going to behave if you have this weird operators in different input outputs.
Okay.
I can't really speak to that. It's like.
So the, as of now, like, you know, the, the tensor network for us is only when like, you know, we wrap it around, you know, properly as a quantum tensor. As a quantum circuit operator. Right. We do not have tensor network only when we have operators like this.
Well, I don't know. Let's just be dangerous and see what happens.
Okay.
If you actually have a quantum separation IT operator with this list of tenders here, instead of applying them, composing them on, on the spot, let's see what's going to happen. Probably not a correct diagram because it's basically doing something weird. But maybe tensor network is somewhat meaningful. In the indices.
Yep, yep.
Tensor network index graph. Oh wow. It kind of expanded it. It's very big tensor. So it actually made it up to the 20. Up to 20? Yeah, it makes it complete.
Okay. So at least like, you know, we see that and if you, let's, let's look at another tensor and this time let's have poly only on the first one. I guess like, you know, then we would be able at least, you know, at this metadata level, you know, we can see the difference kind of.
Yeah, just. It will only will be visible on the index here where it contracts in a different position.
Okay.
I think it doesn't really create this giant tensor in memory. It just creates the indices.
So, so that's, that's it okay for, for some quantum states like you know, and the quantum operator show the ret. Like, you know, we never discuss about that.
The RT just means.
Like.
Property rg. It's almost the same as width. It's just if you have a operator acting on some order that keeps a bunch of Q jets still going to maintain the arity, but the width is going to be. So RT is basically the length of the input. So if the wires are not occupied, it takes it into account, but the width is the maximum. Okay, I want to continue on this.
Yes, please.
Abstraction about water. So we ended up on the operator. Now the next one Obviously is the measurement one. Right. So the measurement operators in this abstraction order is basically an operator, but it has some information about what we actually measuring. And it's nothing else. It's just something like another order. But we call it the target. So it's like that measurement target. Basically underneath it's still some quantum operator, right? Which we know already that it's some kind of quantum state with order. But quantum measurement operator is an operator with target. Okay, so nothing, nothing else. For example, if a quantum measurement is turned into POVM1 so that it's now it's like this signature is not square anymore but a rectangular which also means that this, this each diagram has an additional output. Basically means that it's underlying quantum operator has an output with two qubits with two quidits as an output. And we use as a convention this non positive qubits in the order as some special qubits. Like in the case of a measurement it's where we put put our targets. And also in the case of a channel, which is also basically the same as quantum measurement operator in the PVM case, like if you have a quantum channel, it also is just a quantum measurement. It's also quantum operator. Even without any target specified, it's. It's basically just a quantum operator. It's only difference is how it composes with other stuff.
And does it always happen whenever we have those, you know, super operators? Yeah.
So if you POVM is basically a super operator. If you convert if your POVM measurement is what we call a super operator. So this is going to be a super. A corresponding super operator for this measurement operator. So yeah, so this is like an extra quit. It by default by convention is not positive. If, if you measure like 2 cud instead now it's now put. Now this extra qit is four dimensional. And what we were showing you previously, if you do it in differently, if you actually compose two measurement operators instead like that maybe. Right. This differs by the number of qubits instead of creating one extra quitted but it's four dimensional. Now it's four, now it's two extra credits but still of the same dimension. So this is like the difference between those. But semantics is the same. If you actually want to extract probabilities and so on or maybe change your basis.
The extra ones like you know, for our students we always add them to the left. So like you know it's going to be 0 negative 1 and it goes like.
Yeah, that's how the conversation we add them to the Left because it makes sense if you have normal digits as a positive number going 1, 2, 3, 4, it's much easier to make to go on the other direction instead of just adding them, those classical bits to the right. So that's why we like in our measurement or with our measurement and circuit diagrams to have a classical wire on top because it's kind of, if you read it on the left, if you turn it on the side clockwise, it's on the left of the all the other qubits. So this classical wire has index 0 minus 1 minus 2, depending on how many measurements you performed. So that's the explanation where we like this convention more.
Yeah, and this is also related. You guys remember like, you know, we had that discussion like, you know, whenever we have a measurements we go to a higher dimensions and like, you know, we do some fancy things. So that's kind of like, you know, another way of, you know, looking those at those higher dimensions. Because when we do that like, you know, there are tons of interesting information that we can save especially for future operations. Otherwise like, you know, you're going to have a big headache if you want to do like, you know, some future operation on the top of your results.
Basically this holds for channels to. It's also a quantum operator with an additional output. So those are the quantum channels. And I guess what's left is quantum measurement is when you measure stuff you usually get. This quantum measurement object and underneath it also have no more additional information that quantum measurement operators already have. So underneath is just if you ask for a quantum operator, it returns a measurement operator, but the POVM one, but it has no output. So basically the measurement object that we have is this weird measurement operator with no inputs, right? So it's all the inputs is one one dimensional input. It also has this special classical quit or qubit which is 0 minus 1 and so on, but has no inputs. So this is how we treat measurements. And all the information about probabilities, post measurement states and other properties of quantum measurement can be extracted from this measurement period as a tensor, this particular dimensionality and orderings. And I guess this and the quantum circuit operator is, you already know, is just a bunch of a list of operators and nothing else. And I guess this concludes all of this abstraction layering.
Thanks, Nick. So like, you know, it's. I know it's maybe too much, but this development, it went through lots of iteration and what you see here is the big overhaul that Nick did to have a sort of unifying metadata to address many different things that can happen in crypto quantum from measurement to like, you know, usual unitaries to this, you know, super operators, each case, like you know, fancy case. And like, you know, in order, like, you know, this language, this metadata helps us to unify all of them together. Those of you, again, you know, as I said, having it kind of like, you know, a knowledge of like, you know, what's happening behind the scene, definitely very useful. But the way that we design our framework, you don't need that knowledge at all. When you're working with our framework. Like, you know, it's exactly the usual approach that we have in quantum theory. Like, you know, you apply operators on quantum state, you get another quantum state. You do this measurement, you are gonna get, you know, a bunch of probabilities. You do quantum channeling. So like, like, you know, you're gonna get it like you know, mix state, etc. So that, that's how it, it works. There is a question by Mike. So basically whenever we are using you know, prefix that add sign like you know, we all. We call it Compose. And when we have like, you know, composition, we also call it.
It's kind of similar if you, if you use just the add sign basically meet compose function with some argument. Right. It kind of also can be called compose. Maybe it's not correct to call it. Yeah, but we kind of mean it in this way. We can. When we compose an object independent of their nature, how we apply them together. Yeah, to make some new object.
Yeah, like, you know, Mark, like, you know, if you want to be very picky and following the Wolfram language like you know, terminologies that at sign we should not call it compose. But then it's going to be very confusing how to explain that. So action of an operator, an operation. I. I don't know what is the best way of, you know, describing that. But you are right. Like you know, composite composition. And I guess, you know, that's one of the reasons of like, you know, it's called composition in awful language. So maybe. Let's see, do we have.
Composition is usually called this thing. Yeah.
So like, you know, so we don't have like actually there is no compose. I thought I just checked that. I was not sure.
Like you know, we don't have just Compose.
Yeah.
This is just. I think it's weird old version of Composition.
Yeah. Since version two Compose, it has been superseded by Composition.
Yeah.
Version two. I wonder, Mark, if you have been using in the Wolfram language since version 2. I know for power users it actually.
Immediately acts as A PI.
Yeah.
So in this sense it's the same as this. So in the sense it's correct to call it a compose.
But like, you know. Yeah, it's maybe Apply is the closest, you know, you know, very, you know, the closest to Wolfram language. We should call it Apply. But like, you know, that, that, that's.
Interesting because most apply is also incredible correct. Apply.
Yeah, because it has like Apply has a complete. Like it's different.
So it's usually I think the construct.
Yeah. Even the syntax is different for Apply.
Is it construct or why is just by default, without anything else, it's not going to work in this case. You see, it kind of destroys it. It changes the head. That's the idea. Destroys the set, replaces. That's what Tapwa is doing.
So I guess Mike, that's why we had a hard time. You noticed that correctly. We call it composition. Mostly for these purposes that Nick explained here. I think, you know, we can wrap up our study group. It was fun. We learn a lot every time that we are interacting with you guys. Like, you know, we learn a lot. Let us know what you think. Like, you know, how you are using our framework. You know, if you notice anything like you know, you can contact us quantumorphram.com you can comment on the community community through wall from you. Whatever guys you are more comfortable with. Like, you know, let us know your thoughts. You know, we would be happy to offer, you know, more trainings. Some of you, if you are in academia and if you would like, you know, some training for your students, please let us know. You know, we can also offer, you know, those particular trainings and you know, just diving and explore our, our framework and let's see, you know, how we can come contribute to this, you know, big third quantum revolution. So the first one was the beginning of quantum. The second one was like, you know, the research on foundation by people like, you know, John Bell and others. And the third one is technological, you know, development using quantum technology. So thanks everyone. Thanks Nick. Thanks Cassidy for your help and thanks everyone for attending this series.
Thanks everyone.
More from Guy

Cheryl Strauss Einhorn | The Human Edge: Smarter Decisions in the Age of AI | Talks at Google

Rachel Glennerster | Innovation and the Center for Global Development | Talks at Google

Rebecca Winthrop | Rethinking the Purpose of Education in the Age of AI | Talks at Google

Dr. Robert Wachter | A Giant Leap: How AI Is Transforming Healthcare... | Talks at Google






