What is the Wolfram Quantum Framework?

Mazarami and Nikolai Nicola walk through the Wolfram Quantum Computation framework, a Wolfram Language tool for building quantum circuits, operators, and states. It handles symbolic computation, tensor networks, and exports to Qiskit. They cover installation, circuit objects, and the framework's interoperability with Python.
Chapters
Hello everyone. My name is Mazarami from Wolfram Research. Me and Nick are the main forces behind what we call as Wolfram Quantum Computation framework, which is practically a packlet, a collection of functions to do quantum computation. Okay, so let's see how we are gonna like, you know, handle, you know, this week you have already, you know, we have provided a collection of notebooks, you know, containing everything that you need. And like, you know, it's a very like, you know, that typical format of like, you know, all courses. But our presentation, we are going to like, you know, do some tweaks, some minor changes. The main reason that we are doing that is basically like just, just to challenge you and trying to, you know, trigger your interest and get you engaged more. So again, you know, like everything that you need is like, you know, in those notebooks. But, you know, what do you see here might be a little bit different from like, you know, those notebooks. We usually call them like flipped classrooms format. Like, you know, we give the material to the students and then, you know, you know, when it comes to representation, we do something a little bit different. Okay, let us start with, you know, talking about our quantum computation framework. Remember like, you know, the Wolfram as a company, like, you know, especially because of our CEO Sieben Wolfram, there is always. There has been, for any name that you see related to our company, lots of discussions like, you know, why that particular name and why not, for example, quantum computing. So let me just be very clear from the very beginning. The main reason that we call it quantum computation is mostly because it's about, you know, doing computation for a discrete finite dimensional Hilbert space. Okay? So it's not only those topics, those computations that we conventionally call as quantum computing. It's everything quantum. And of course, because like, you know, we have a, you know, complete, you know, functionalities, everything that you in quantum computing is also included. Okay, you would see like, you know, there are lots of functions, there are lots of, you know, interesting properties that we are going to review. They are very interesting. It's if somebody is doing very abstract, like, you know, quantum computing type of research. Of course a big portion of logino functionalities that we are going to discuss are directly related to what we call as Quantum computing and etc. But anyhow, so that was just a quick intro about what we are planning to do. I guess you are familiar with this environment. There are some folks who are very well aware experience in Wolfram language and also our quantum framework. Any question, you can put it in the Chat people, they would respond to those questions and if needed, they'll bring to my attention and I can comment on that too. So as I told you, this framework, the main forces behind that, me and Nikolai Nicola is also here. It's a packlet in our packlet repository. This is a link for that. And you know, if any issue, any question, any comment, any feedback that you may have, just contact us at, you know, quantumorphone.com so this is, this is the best way of, you know, communication you could have with us. Now let us start with packed installation. What is the idea of packlet installation? Basically, you are going to add a collection of, you know, quantum functions into the building functions that you have in Wolfram Mathematica. So that's the idea of like, you know, a packlet. There are two ways of, you know, installing that. The one that is already deployed, you know, this is the link literally, you know, packet install, you know, Wolfram and Quantum Framework. But since, you know, this is, you know, an ongoing project that and literally me and Nick every day we work on that, you know, do debugging or like, you know, updating, you know, and adding, you know, proper functionalities. We recommend you guys to install it using this link because, you know, this is the latest one, one that, that basically, you know, the most updated one. And if any bug, you know, we take care of that, you know, on daily basis. But you know, both of them, you know, they should be almost the same. So I'm just going to bravely, you know, evaluate this cell, which is for the package installation. Grinding gr. It should be faster. It depends. My Internet connection and the platform that we are using for the representation is taking a big. What's happening? Hold on a second.
This is some connection issue.
Yeah, I know. That's. That's what I said. Like, you know, it's. It has nothing to do. It's just the platform that we are using for the representation is consuming all of my bandwidths. My laptop is very slow and.
Oh, just pretend you installed it with that link.
Do I have all the functionalities? Yeah. Okay, so anyhow, like, you know, just, just install them and let me just show you. Like, you know, see, what do we have? Like, you know. Okay, so these are the collection of, you know, functions that will be added. By the way, you know, these two links works like, you know, the error that you see here is just my connection, you know, as I'm representing, you know, it takes like zoom. It's even worse than zoom. So anyhow, these are the collection of Functions like, you know, to do any quantum computation, some of them are designed for something very specific. For example, quantum basis is for quantum basis. Quantum channel is for quantum channel. Quantum circuit operator. That's the function that we are going to use for circuit design. But some of them like, you know, are not for a very specific like you know, quantum object. For example, when we discuss about quantum distance. So this is basically a function to quantify the measure between two quantum states or quantum entanglement monotones. So like, you know, this is to measure, you know, the entanglement monotonous between two quantum states. Quantum entanglement Q like, you know, asking if a quantum state is entangled or separable. So as you can see, you know, some of them are for some particular, you know, objects that has a very specific meaning. But some of them basically that gives you a new meta result or like, you know, a true false. Okay, so what I'm gonna do, I'm gonna start with those functions that are basically, you know, returns a very particular object. Okay, so like, you know, these are your objects that you would do like, you know, quantum computation. We had it sort of, you know, discussion, me and Nick, like, you know, how we should represent our framework historically. Like, you know, it's funny to say historically because, you know, this framework is basically, it was born about one year ago. But anyhow, in the past year, whenever we wanted to represent that, that was our workflow. We started with the basics. We would have started by talking about quantum basis, how to define your Hilbert space. Then we would move on, you know, to the quantum state. After quantum state we would introduce the idea of quantum operator, some transformation for your quantum state. Then we would introduce the idea of, you know, quantum measurement operator to basically work with the measurement at the very end, you know, we would, you know, comment on quantum circuit operator when you have a composition of, you know, different operators. By experience we learned that like, you know, maybe this is not the best approach. Starting from the very first fundamental ideas and like, you know, telling people how to do the constructions and etc. That's why like, you know, recently, very recently we decided to do a sort of, you know, reverse approach. So what I'm going to do, I'm going to start from the very end, quantum circuit operator. Because like, you know, many of you, you are interested to learn how to deal with the, with the circuit, how to construct your circuit. I'll give you the big picture. Like basically like, you know, look, you know, this is what we are going to do. This is how we are Going to like, you know, set up everything and, and then like, you know, step by step, you know, we are going to dive in and we are going to explain each of those functionalities in much more detail. So at least like, you know, in this way you have a bigger picture. So basically, like, you know, we can refer to other functionalities whenever discuss like, you know, different functionalities. Okay, let us start with the idea of, you know, quantum circuit operator. What is, you know, a quantum circuit? This is the way that we recommend to see a circuit operator. So it's basically a composition of no bunch of quantum operators. When we talk about quantum operators, see them as like, you know, some transformation happening to quantum states. And quantum states is basically the mathematical tool describing a quantum system. I have seen, you know, in some literature, you know, quantum state, you know, they replace it by quantum data. I do not like that terminology. So I still prefer to call it like, you know, quantum state. But anyhow, you can also see it as like, you know, quantum data. So when you have a composition of bunch of transformation on your quantum data, this is what we call as a quantum circuit. Okay? And of course, when we talk about quantum circuit, you know, what is important is, you know, a sort of, you know, a stepwise transformation. So like, you know, like, like you are going to have a collection of operators in a very particular order and like, you know, you are interested, you know, to get a very particular functionality out of that collection. Okay, so that's the idea of circuit. So circuit is a composition of, you know, quantum operators. So fundamentally for us, what is important is quantum operators. Okay, Keep that in mind. So quantum circuit. Interesting. But behind the scene, like, you know, it's practically a quantum operator, how we should think about like, you know, constructing a circuit. In our framework, this is the most important basically like, you know, pattern that you have to remember. So you would start with your quantum circuit operator and you give it, you know, a list of operators. So that's one approach. Another approach is that like, you know, we have a collection of named circuits. Practically, you know, these named circuits, they are a composition of bunch of operation for a very particular goal. For example, you want to do quantum search algorithm using Grover algorithm. So instead of constructing everything manually as a collection of operators, if you can, I know sometimes it's a headache to construct to understand what is the true oracle for this very particular situation. But anyhow, behind the scene, you can do everything automatically using our name circuits. I will comment on each case in more detail. And then if you are interested to see what is the action of your circuit operator on a corresponding register state. Register state means like, you know, all of your quantum states are in the ground zero state. You know, that's basically the syntax that you have to use, basically. So here you can also put your quantum state if, like, you know, if any state other than register state, you can, you know, add your quantum state. But you know, most of the time it's going to be a register state because conventionally, if any transformation on the register state, you know, you know, researchers, they include it as part of circuit operator. Anyhow, so let's go through some examples. Like, you know, look at, you know, the very first example that we have. Okay, so let's look at like, you know, the first circuit. So we have quantum circuit operator and the input is X. So basically like, you know, it's a circuit with polymetrics X. There are two ways. Like, you know, the. What you see here is a traditional form, basically the circuit diagram. And the previous case, it shows you an object. So like, you know, this is the object that you see. Each object, it has a summary box. If you click on that plus sign, you see, like, you know, it gives you, you know, some more information, how many gates, what is the dimension, what is the order and etc. So some people, they prefer like, you know, the diagram because it gives you a better visualization. Some people, you know, they prefer like, you know, that summary box. Let's look at the second example. So now what we are giving as an input is a collection of like, you know, poly Pauli operators. So we are saying XYZ so automatically behind the scene, you know, our framework understands it as Pauli X on the first system, poly Poly Y on the second system, and Poly Z on the third system. Okay, now let's say that, you know, you only have one gate. And this time instead of like, you know, that gate acting on the first qubit, you want to say it acts on the second qubit. So what we need to do is just, you know, we're defining as a rule and like, you know, that too later on, you know, we are going to exploit and this is the order of your operator. So literally, like, you know, that code means Pauli X acts on the second qubit. And as you can see on the first one, when there is nothing, it means, you know, practical identity. And of course we can have a collection like, you know, a collection in a very particular order, which is basically the next example. So before evaluating, let us just try to understand like, you know, what's happening There. So what we are doing there is Pauli x on the second qubit. H is for Hadamard. As you can see, Hadamard, it has no, like, you know, no other arguments. So automatically, whenever nothing is given for the order, we would interpret it as one. So you can add one or you can just, you know, remove that. It doesn't change anything. So as far as the order is one by default, you know, we are going to set it as one. And when you evaluate that, you would see so X on the second one, Hadamard on the first one, and then Z also on the second one. And look at the order because, you know, the order is also very important. So the circuit, you know, diagram, we read it from left to right. So it means like you know, the Pauli x first, then Pauli Z. So the time order is from left to right. You know, in the circuit diagram here we are just using like, you know, the operators that are separable. So like, you know, when we are applying that harder mark, you know, it doesn't, you know, it's not important. Important. Of course, there are many operators that simultaneously acting on more than one system. For example, CNOT is a control gate that basically has a control qubit target qubit. The example that you see here, as you can see, no input is given other than just the name of that operator. So it means automatically behind the scene, by default, we are going to set control as the first target as the second one. Okay, so that's basically the situation that we have. And like, you know, the notation that we are using is the conventional notation. Now you can change that, you can say that, you know, look, you know, I would like a C naught this time, C naught. The second one will be your control and the first one will be the target. Okay? So whenever we have the solid, you know, circle is for control, one qubit. Now behind the scene, whenever we talk about, you know, quantum circuit operator, you remember I told you a composition of operator, composition of gates, you know, that's what we call them, how we can see that operator? So if you just ask for the property operator, this is the collection of operators that we see. So the first one is Pauli X. It's a quantum operator, Pauli X acting on the second qubit. Then we have Hadamard, as you can see, each one has a summary box. And inside the summary box you can see like, you know, all the information that you need. The second one, you see, it's the Hadamard, there is no argument. So automatically the order is on the first one and the last one, poly Z, it acts on the second qubit. As you can see the summary box, it contains some other interesting information. For example, if it's Hermitian, if it's unitary, etc. So you can get it like, you know, directly, or you can get it like, you know, manually, like, you know, through some operations. By the way, each of those objects, they also have traditional form. For example, Nick showed the traditional form of one of them. So you see, like, you know, all of them. Actually, this is a traditional form of all of them. You see, the top one is Pauli Pauli X. The second one is Hadamard, and the last one is Z operator. Okay, so again, like, oh, by the way, the shorthand for traditional form on Mac is command shift T. Or you can literally at the end just type traditional form. So both ways forks. So that's how we can see the traditional form. So here you see that circuit as a, so that the other one, you know, N standard form. And then you can easily, you know, switch between the two. So you can see them as the object with the summary box or this traditional from, I don't know which, you know, format you know, our users prefer. Like, you know, I know some users, they log in traditional form. Some other users, they are good with the objects. Remember, like, you know, for simple operators. Yes, traditional form. Like, you know, I know most of you, you understand the traditional form like, you know, better than the summary box. But as you increase the dimension or the size of your gates, the traditional form will not be very helpful. Okay, so like, you know, I don't know, just let's go one example, a random unitary. Yep. In Dimension 5. And you know, look, this is basically the traditional form. And by the way, like, you know, this is the representation in the usual bracket notation. You can ask for other properties. We will discuss about that very soon. Now, another way of looking at the circuit. Instead of a collection of operators and their application one by one, you can ask for one single operator representing the whole quantum circuit. So basically what I'm telling you is that do the composition and then the result is just one single operator. So the circuit operator gives you that result. For example, you see here, like, you know, that quantum operator at the end is basically the result of like, you know, applying all those, like, you know, operators on the top of each other. And you're gonna get one big, basically operator representing the circuit. Okay, so that's one way of looking at the circuit. But remember that, you know, most of the time when People talking about, you know, quantum circuit. For them that decomposition is very important. So they would like to see that sequence of operation. So circuit operator is not very interesting. But anyhow, if you want to see what is the actual operation, you know, that's one way of, you know, looking at. And of course, you know, quantum circuit operator, you know, it can be. It contains collection of many different things. For example, look at that, the, the last example that Nick is showing you. So we have Hadamard. Let's try to read the code, you know, and you know, compare it that with the diagr. So as you can see, the first one is Hadamard. It has no other arguments. So it means Hadamard on the first one, look at the diagram. Exactly, Hadamard on the first one. After that, look at that we have the CNOT operator. And for cnot there is no argument. So automatically by default, first one is the control one and the second one is the target one. After that we have the square root of Pauli X. So the square root of Pauli X is applied. There is no argument there. So it is applied on the first one. What you see here barrier is just for the sake of visualization, okay? Like, you know, again, you know, some people, they prefer to see like, you know, different segment of like, you know, a circuit operator. So that's how you can, you know, visually separate. And after that, look after the barrier we have root swap. So that's a root swap, root swap, you know, it acts on two, it's a composite, you know, operator. So as you can see, it acts on like, you know, qubit number one and qubit number two. After that, look, you know, the next one is complicated, but let's try to understand that it's a rotation. The corresponding angle is theta. It represents poly X on the first one and poly Y on the second one. So practically it is like, you know, using the standard formulation, it is the exponential negative I theta over two. And then poly X, poly Y, the tensor product of those two. And that's what we have as the next operation. After that we have permutation. So for the permutation, so it's a permutation. And then for the cycles we say like, you know, permute first one and the second one. And if you look at the diagram, that's exactly what's happening there. For example, like, you know, let's change that. So look at here, you know, this is a more complicated situation. So this is another permutation using different cycles. So like, you know, that's how you know, we would represent that. And by the way, like, you know, you can change any. For example, for the root swap, Nick, make it on the first and the third one. For example, just to show you, like, you know. Now if you look at the swap, as you can see, the root swap is acting on the first and the third, you know, qubit. So that's, that's the case. So the second argument for the order, you can go with the default one. Or if it's given, we would just consider that very specific order. Look at, like, you know, for example, after the permutation, we have another interesting, like, you know, quantum transformation. That's a quantum channel. That's how we would represent the effect of the noise in a deterministic way. So it's a bit flip with the probability P. And as you can see, like, you know, one interesting feature about, like, you know, this framework, very similar to the usual Wolfram language. You can do the symbolic calculation. Okay, that's one of the many upper hands that we have compared to many, almost all other, you know, quantum platforms out there. We can safely say that, you know, this is the only platform that you can do symbolic quantum computation. So what you see here is basically sandwiching of like, you know, some cross operators, you know, representing like, you know, bit flip. And, you know, that's basically the operation. So, like, you see, that's the representation of the bit flip in a traditional form. And then after that, you know, after a quantum channel, we have a barrier and then measurement on the first qubit, measurement on the second qubit. Remember, like, you know, there are lots of details that you are not familiar with yet. We are trying to give you the big picture. So like, basically, like, that's the big picture. What's happening behind the scenes for quantum operation Operator. So this representation, we usually call it, like, you know, the shorthand representation for our circuit operator. So here we are using a collection of named operators, and then behind the scene, we do the calculation for you. For example, we automatically understand that, you know, when you give any string edge. This is the quantum operator Hadamard. You can give it explicitly. For example, you know, nothing is wrong if you just literally type quantum operator and then Hadamard. But you don't need to do that. Okay? So it's just like, you know, that that's exactly the same thing. Like, you know, basically like, you know, we automatically wrap each of those, you know, named operators by quantum operator, and we take care of all the ordering and everything else that that should be done. So take home Lesson here. So what's the take home lesson here? Whenever we think about the circuit operator, we have a collection of named operators that we can use and each of those operators. The most important argument besides the name of that operation is the order. If you do not specify the order, we would treat it automatically. But if it's specified, we go with whatever specification is given for the that order. Okay, so that's the overall, you know, picture. Overall review of like, you know, our circuit operator. So before we move on to the next topic, any comment, any question? And by the way, like, you know, look at here, like, you know, these are the objects acting on your quantum system in the order from left to right. First that quantum operator, then the next one and the next one. And look at that, each one, they can have different dimensions. They can have different like, you know, qu dates when we use Q did with D, you know, it means like, you know, a very, that's a very generic term meaning that, you know, your quantum system, they can be in any dimension and we say qubit, it means there are two dimensional quantum systems. Any comment, any question? Before we move on to the next topic? And again, remember, I'm just giving you the big picture. There are lots of details that we will discuss like you know, later in the following sessions. It does look like there's a couple questions in that QA panel. I think if Nick is showing, you should be able to look at that in your browser. Okay, so let's go. Y, RX and Ry are connected by wire. Very good question. So like, you know, for example, you know, niche, you know, one con, you know, take that R rotation operator. Yep. So, so that operator. So what's, what is that operator? This is basically the exponential negative identity. So like, you know, we can, you know, do it manually if you so and yes. Yeah. So in a sense, you know, it's a very bad terminology in the literature, but like, you know, that's how people, you know, talk about that. So remember you have an exponential term. You have two operators, X and Y. Therefore you cannot write it down as the multiplication of, you know, two operators because they do not commute. Okay? There are like, you know, some decomposition how we can do that. So how we can, you know, communicate this idea that, you know, look, you know, since these two do not commute, pay attention that you know, they're exponential, okay? Like, you know, it's not the same that exponential. Like you know, practically for some operator, it represents, it's very similar to the time evolution. It's not separable. How we would communicate that we just put a wire between the two. Like, you know, these two examples that Nick is showing, look at here. Like, you know, here we have two separable operation, X and Y, completely separable, but the next one is not separable. Okay? So that's the main reason that like, you know, we connect them by a wire. So it's just one way of, you know, reminding you that, you know, look, look, you know, it's. You cannot like, you know, that tensor product, you know, in the exponent, in the exponent. It doesn't mean like, you know, the tensor product of like, you know, two operators. Remember that. So let's see, Robert, how do you switch between the different output display form, Like using, you know, the shorthand. So the shorthand is, you know, for Nick type traditional forms at the end just to tell people what you are doing. Shorthand is literally the coordinating.
The diagram itself is the same, almost the same. It's just making the traditional form.
Yeah, so there are like, you know, let's say that, you know, three different way of, you know, doing that. You can just evaluate your quantum circuit operator and you are going to get, you know, a circuit object. This is what we see with a summary box. Then you can look at the traditional form using the shortcut command shift and T. It shows you the traditional form. The traditional form of a circuit operator is literally the diagram, the output of that operator. That's how you can switch. And if you want to again see the object, you should command shift and you go back to the standard for why it is important. Because look, the diagram is only a diagram. So a diagram, you cannot apply a diagram on a quantum state. But if you keep it as like, you know, a circuit operator, because it's a circuit operator, it understands like, you know, it can act on another quantum state or you can form, you know, a composition. So the shortcut for the diagram is basically command shift T on Mac. So if you just double click for your Nick, double click on the circuit, you know, quantum, the circuit object or the cell, it doesn't matter. And then command shift T. You can see the diagram. Cassidy, there is a question by Hendrik. If you know, the questions is available only to presenter or everyone in this session. So I will read all the questions. I. I do not know if you guys can see the question by other.
Visible when we answer them.
Oh, okay, okay. What else? And by the way, like, you know, again, remember everyone, like, you know, we are giving you the big picture here. Like, there are lots of details that you know, we will discuss in the following sessions. But I know, like, you know, we just give you the, basically a final interesting thing. So like, you know, that's why, that's why, like, you know, kind of, like it's kind of cheating. But like, you know, it helps you to have the bigger picture. Okay, so like you remember we said like, you know, there are two motivations to have quantum circuit operator. If quantum circuit operator is only. If it's only, only a composition of operators. So fundamentally, you could have told us, like, okay, so what's the point? Like, you know, you're just, it's just diagram, which is very nice, very beautiful diagram. But is there more to that? And the answer is yes. So if whenever you are doing a very complicated, you know, calculation using the quantum circuit diagram, we have different methods for calculation that can help you to do that calculation faster. So I'm just going to give you the taste, just one taste of that. Okay? Just, just to give you an idea, like, you know, why the circuit, you know, is a good object. For each circuit operator, there is a tensor network representing like, you know, basically that, that particular the operation and how you can see that. Just ask for the property, you know, tensor network and this tensor network behind the scene. For example, look at here. We start with the initial and then like, you know, the H vertex represents, you know, a very particular, you know, gate. And you go from one and then to the other one. Okay? And by the way, each label on the vertex, that's the label of the operators that we have. That's the label of each gate that we have in the circuit. So we can also extract each one of those in case, if somebody is interested to do that. The way that we do the computation, we do not always do. Actually by default, we do not do the conventional Schrodinger approach that you are familiar with, meaning that just multiply bunch of matrixes and like, you know, that this is what we call as a Schrodinger approach. And then on the quantum state and get the final result. What we do behind the scene is a fancy, using next terminology, tensor juggling, tensor indexes juggling. And this is faster than the usual Schrodinger approach. So that's why whenever you have a complicated computation, a very good practice is to write it as a circuit operator because the computation will be faster, of course, because of the visualization. Circuit operator also helps you a lot to have a better design when you have a composition of, you know, different operators. Okay, so that's one reason, like, you know, circuit Operator is a good function to work with now behind the scene, as you see, like, you know, all. So what we have is a transformation of quantum state. And that transformation for us, you know, we represent it as quantum operator. Okay, so just to give you another taste, like, you know, how things are done in our, you know, framework, let's very quickly review, like, you know, another important, you know, object that we have in our framework. And that object is quantum operator. So the most important thing that you have to remember about the quantum operator is that you give an argument and then the second argument, basically the first argument you are specifying your operator, and the second one, you specify the order. And by the way, by the way, like, you know, before, you know, we go into the details, Stefano, you know, his question is that if I have a complex circuit, can I full simplify it? The answer is always yes. So, like, you know, all those, like, you know, usual operations that you can do, like, basically all other mathematical operation that you have in, like, you know, in Wolfram language, you can also apply it here. Okay, but you just need to be very specific. Full simplification. If you mean full simplification and getting another circuit, that's tricky. But you can do the full simplification on, for example, the corresponding metrics or the overall operator representing your system. For example, like, you know, look, you know, Nick is showing you two examples here. Maybe on the traditional form. Yeah. So you see here, like, you know, we just apply like, you know, the full simplify, like, you know, on our.
Circuit, we applying it to the final state. Yeah, we just simplifying the final state after composing all the gates on the blank register.
Makes sense. Like, you know, I know again, like, you know, there are lots of details like, you know, we will discuss about all those details. I wonder if you guys notice that, like, you know, for example, a very interesting, you know, equivalency test testing that Nick did. Like, you know, Nick, if you scroll up, like, you know, that's a very useful approach you see here, like, you know, literally, like, you know, that type of a sort of, you know, icing type of interaction, you know, we just created that manually. Like, you know, look at that. There are a couple of interesting operations happening here. We are applying exponential on a quantum operator. So behind the scene, like, you know, we understand these sort of arithmetics apply on quantum operator. And then you can check the. If these two are equivalent, if these two are the same, and the answer is of course not. Yes. Anyhow. So let's. Let's go to the quantum Operator. But feel free. Like you know, as we discussed, please, you know, type your questions and you know, we are going to answer each of those questions. So let's go to the quantum operator. So the first argument you specify your operator and then the second argument you are specifying the order. For example, here, I don't know, X, Y, Z, whatever you want to do. Now this time Nick is saying explicitly the order is 2, meaning act Paul x operator on the second quantum system. Because Pauli x acts only on qubits. Two dimensional quantum system automatically we understand that, you know, look, this is a two by two, basically a matrix representing that quantum, representing that quantum operation. You can go like, you know why I'm telling you that? Because in our framework, all the operations that you do, your quantum system, they can have any dimension as far as they are finite, okay? So like, you know, you can go in any other dimension and behind the scene, you know, we would take care of like, you know, all those like, you know, dimensionalities and housings acting, you know, on different system. For example, like, you know, if you are familiar with the generalized, you know, definition of like, you know, Pauli x in, you know, three dimension, look at here, this time your operator, the dimension is three because the operator Pauli X, it's three. And then you know, likewise, you know, you can also go to higher dimension. So it's just a generalizing of poly X, you know, in higher dimension. And of course, like, you know, this generalization, you know, we always follow the conventional definitions that we have. Like you know, in quantum theory, look at that like, you know, look at the, like, you know, the, the dimensionalities that we have there. Like you know, it's dimension four. Like, you know, it's acting on. So the meaning of that system is that behind the scene, because you are applying a Quantum system in 3D, we understand that, you know, the corresponding quantum state should be in 3D. Okay? These are the things that, you know, we do behind the scene. So after specifying basically the nature or like, you know, the name of your operator, the most important argument is order. Remember, the order by default is one. If it's, you know, a complex operation is one and two and so forth. For example, look at that quantum operator swap. So that quantum operator swap, by default it acts on two systems. So the order is one and two permutation. Okay? So they're saying the permutation. And of course, you know, we already showed you like, you know, whenever you are not confident about like, you know, the order or what's happening Here, the corresponding diagram in quantum circuit. It helps you. So, like, you know, look at here. Like, you know, now you can see that. Oh, okay, it's a permutation between like, you know, the first one and the second one. Okay, so that, that's how you can basically see that. And look at here, like, you know, Nick is adding sop, like, you know, into that. And we can also change the order. For example, you can say that, okay, what if I change the order of swap? And how, what's going to happen? Like, you know, if you, you are not familiar, like, you know how order works. Just, you know, wrap it as a quantum circuit operator and look at the diagram now. It gives you a better understanding. Like, okay, now I have, for example, look, the first swap, first one and the third one. Then the next one, second one and the third one. And then the next swap, it adds on the first and the fourth one. So like, you know, you see, like, you know, you can customize that, but if you do not specify that behind the scene, like, you know, we would just, you know, set it, you know, by default. Or look at the permutation here. The permutation, the cycle is 3, 1, 2. So basically, you know, here we are saying that, you know, switch the third one by the first one and then automatically, it's like a clockwise circle. So the third one goes on the top and then the first one becomes the second one and then the second one becomes the third one. And you can add any other fancy permutation. And whatever you do, look at here, this time, the last example first, what we can do, you can give your permutation and with no order automatically would assume that. Oh, you mean the first one and the second one and the third. Qubits. Now what Nick is doing, Nick is specifying a very particular order. Nick is saying that, you know, look, I have that permutation. Now let's, you know, play with the order. And then like, you know, you can, you can play with the order. I know, like, you know, the example that Nick is showing, maybe it's, you know, too complicated, so.
A little bit broken.
Yeah. So you see here, like, now look at the order. So this is the same cycle, but this time you're saying that, you know, look, do it on the 2, 3 and 1, the corresponding cycle of like, you know, 3, 1 and 2. Again, like, you know, if you are not confident, like in a diagram always helps you. And if you feel like, you know, you have a very complicated, you know, quantum operator. And if the diagram does not make Sense to you. Just send us like, you know, an email quantum.com because to the best of our knowledge, all of the operations and the corresponding diagrams, you know, are represented correctly. But maybe there is a very fancy operation that, that you have and like, you know, you are not happy with the diagram. Or maybe there is a better representation for that. Please let us know. Like, you know, we would be more than happy to include that. Let's see, Nick, scroll down. Let's see what other information. So you already have shown all those example. Let's comment like you know those, you know that, that the one next to that. That's a very good example. Now makes your life easy. Look at those three different ways of constructing, you know, a composite operators. Either you can act Pauli X on the first poly X and the second one, or you can define it as a quantum tensor product, which is basically what we all learn that like, you know, in our, you know, quantum courses or in our framework. The easiest way is just saying that, you know, look, I have poly X the order applied on the first one and on the second one, one. All of these three different constructs, they are the same. You can easily check that like, you know, all of these three are the same. There is no difference between them which way you want to construct it. I would say totally up to you. But you know, our recommendation, focus on order because order will make your life much easier. So if you just focus on the order, you can easily like, you know, do all your construction as you can see in the quantum tensor product. Like. So there is one question, Douglas. Like, you know, how would you represent, you know, the density matrix is, you know, that's for the quantum state. We are going to discuss quantum states very soon. Okay, like, you know, let's see, like, you know, Nick, let's just go to the quantum state. Just, just for the sake of representation. Because that was just question. We never discussed quantum. Quantum state. So remember, for quantum state, there are two ways of representing a quantum state. If it's pure, go with a vector. So just the amplitude, basically your state vector. That's one way of representing that. And then if it is, you know, you know, a mix, the input should be a matrix. Okay, how we can see the corresponding login or density matrix. So just ask for the density matrix. Maybe if you show the matrix form like you know, so that's a density matrix. Now if you want to see it like, you know, Nick showed in a traditional form like you know, that those bra and kids like, you know, directly on the quantum mistake so as usual, this is basically your. What Nick did here is literally like, you know, the same way that we do it for, for operators and the circuits just ask whether a traditional form or ask for or asked for like you know, the density matrix and the corresponding like, you know, matrix form. So for the quantum station or remember like, you know, there are two ways for the pure go with the state vector. For more than that, go with the matrix. Look at the matrix example. Like, you know, I wonder if you guys notice in the summary box it says the type basically the. Your quantum state is unknown state. Why it is unknown state? Because we do not know if it is, you know, semi definite. And because of that semi definite positive. Because that's a very important constraint for density matrixes. But in our framework you can go beyond the usual like, you know, definition for density matrices. Basically you can release that like, you know, constraint. Those of you who are familiar with the zx, you know, formulations like, you know, ZX formalism, ZX calculus, they're like, you know, what we call as a quantum, you know, states like, you know, it can, you know, you can release lots of constraints that we have on the top of your density matrix. Let me just comment on one thing. Like, you know, maybe those of you who are familiar with quantum. Look at that quantum state and the corresponding formula. Like what you see there. Like, you know, whenever you ask for a formula, because formula like, you know, it's like, what is the state vector? What we do, we understand, that's how we would interpret it. It would say that, you know, if you mean something that is not pure and if you ask for the formula, we just go to a higher dimension. Because whenever you have a mixed state or an unknown state in lower dimension, you can basically, in some way you can purify that in higher dimension. And that's how we would represent like, you know, that formula. So that's why, like, you know, what we are doing here is in two dimension. But when you ask only for the formula, you can, you know, we go into one higher dimension. It's the usual purify, unpurified. We will discuss about it like, you know, next time. I know, like, you know, right now we are giving you lots of information, but our goal was like this, just give you the big picture. And now what we are going to do next time, in the course of one week, we are going to focus on each of these objects in more detail and we are going to discuss about all those details. How we can do different design, different operation, how we can Basically do partial transports. How we can do, I don't know, realignments, all those fancy operations that we can do with the quantum state or like, in operations, we are going to explain, like in the course of one week how you can do each one of them. So I think that's a very good point to wrap up our session. Any particular question? Comment? Again, sorry about that initial issue with like, it's. It was my Internet connection, I guess, Nick, you have a better laptop than me. So my laptop, like, you know, he couldn't handle like, you know, broadcasting live and like, you know, cloud connection simultaneously. Did Mads, did you want to run any of the poll questions? We can do it next time because, like, you know, but let's do it next time. So let's do it like, you know, we are gonna. Basically making sure, like, you know, you're engaged and you're listening and you have a good understanding. So let's do it next time. Any comment? Any question? Like, so let's. Nick, scroll up at the very top. Let's. One more time. Like, you know, remember, like, you know, it's a packlet. So like, you know, just like, you know, these are different ways of, you know, installing the packlet, always go with the development version. Because, like, you know, if any issue, we would just take care of that like, you know, immediately. For example, you notice like, you know, the wiring for the permutation, they were not, you know, very, you know, nice. That's one thing that we just, me and Nick, you know, it may take 10 minutes or less. So like, you know, if you, next time, if you upload your packlet one more time, that minor issue that you saw in Fancy permutation, like, you know, it will be resolved by the way, for the same reason, whenever you are doing any computation, remember, install the latest version. Because if there was any issue in the previous versions, I don't know, like, you know, maybe there's an issue with the diagram or etc. We just take care of that. But like, you know, if you want to see like, you know, the correction, you just need to install the latest version. Well, so a healthy practice, whenever you are working with our framework, make sure that you install the latest version from the development site before doing any computation. Let's see, let's look at the questions. So, Miguel, like, you know, regarding, you know, quantum circuits from Wolfram to Python, we are going to discuss, you know, yes, you can do that. You can ask for the Kiss kit. You can, like, you know, do all those things. Like, you Know it's. You can easily go.
I can preview it a little bit. Yeah, if you want.
Let's just show one example. Yeah, For example that, that's the Foley. You can ask for the qiskit. And by the way, you know the moment that you say you know Python, remember like you know, your external evaluate, etc. You just need to set them up. So this is the qiskit circuit. And like you know, it's not only.
That we work the same way as our circuit, it just goes for a Python environment.
Yeah.
Simulation there and returns it back. For example, if you want to apply to an empty register, it will go through the qiskit simulation.
Yeah. And by the way, remember that like you know qiskit like you know what we do here, all the simulations that you see, it's. I shouldn't call them simulation. It's because it's not a simulation. Because Wolfram Mathematica understands like you know, probability and statistics. Many of the things that we do here, they are exact. Okay, so like you know, that's a very fundamental difference between like you know, the ours and you know, other like you know, simulators out there for us. Because again like you know, Mathematica understands probability and statistics. All the calculations are practically exact step by step books. You know, there is another question. Are there any good step by step book guideline? I would refer you to our documentation. Okay, so like you know, the documentation that we have, you know, that's the best place that you, you know, it provides all the details, how you can get it done. But if a bear approach for step by step is needed, let us know in our future wolf on you events, we can provide that step by step. Register state. It means in whatever. So there is another question about register state. Register state with no argument, just saying register stated means all the quantum system that are in the ground state zero. Okay, so like you know, that's. But like you know, you can go for, you know, because you know, like you know, you know we also have register index state. Okay. You can have a third argument like you know, and then show the formula, you know the show the traditional form like you know they would. Yeah, zero, one. Yeah, two. And. You see here like you know the usual order for register state. But if you just say register state means usually again all of them are in zero state. Any reference. As I said, you know our documentation very similar to logging on the documentation that we have in Wolfram Mathematica. You know, we did our best to write it in a way that is self consistent and contains everything that you need. Besides that, like, you know, there are lots of good textbook on quantum computation and quantum computing. So any textbook, you know, different, you know, people different, you know, backgrounds, different textbooks. So pick any textbook and try to implement it in a framework. Okay. I think, you know, we are good. Let's call it a day. So thanks everyone. We will meet, you know, tomorrow and please let us know any question, any comments, any concern. Like, you know, let's make sure that, you know, it is like in a sort of interactive, you know, sessions and you know, based on your questions, you know, we will be running our study group so quantum@wolfram.com and also that link that Cassidy shared like that community post, let us know what you think and we can basically answer your questions. Thanks everyone. See you tomorrow.
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






