Bridging Quantum Computation and Practice with Wolfram Language

John, Mads Baromi, and Nick demo Wolfram's quantum framework. It handles tensor networks, noise modeling with Kraus operators, stabilizer formalism for efficient Clifford simulation, and discrete Wigner transforms for phase-space representation of quantum states.
Chapters
Hello, everyone. We are back to talk about the Wolfram Quantum framework. So as you can see here, and you should be seeing in the stream chat, there'll be a link to this page where you can see some things. So if we scroll down just a little bit, you can see some examples of quantum circuits that you might want to create as part of working with the Quantum framework. Another thing to draw people's attention to if we look at the bottom of that page, are if you want to work with other frameworks. So, for example, you want to do something in the Wolfram Quantum framework and then work with either Qiskit or Braket, or then send some kind of request to a piece of physical hardware to check the experimental result with what you're getting for theory. There are some links to examples of how to do those sorts of things on that page too. So today we have people who work on the Wolfram Quantum framework. And so Nick and Mads will let you introduce yourselves and we can jump right into talking about some of the new functionality that is, I think, developed since the last time we talked about this about a year ago.
Thank you, John. Like, you know, hello, everyone, Mads Baromi here. Like, you know, I'm manager of, you know, academic Innovation Team at Wolfram Research. And like, you know, one of the projects that we are handling is our Wolfram Quantum framework. And you know that we were very lucky to have Nick as a developer of this framework. So, Nick, go ahead.
Well, as you already said, I'm the main developer of this framework, so I'm just eager to share it with you, the new functionalities that we have and all the ideas on how it works and answer all the potential questions that can arise.
Yeah, and as always, if you do have questions about anything we're talking about, feel free to put them in chat because we do get to see those questions and respond to them. So before we get to talking about some of the new functionality, I'm curious, are there examples of that that made it to that main page or are they still. You have to go deeper into the documentation to find these.
So people, they can go to our documentation page. Basically, I feel like, Nick, if you go to your notebook, so when they install, like, you know, I think like, you know, the best workflow would be like, you know, on the notebook, of course, like, you know, this is the same on cloud, but from a mathematical notebook. After installing the packlet, which is basically like, you know, those two lines of code, they have a long list of, like, you know, functionalities and almost all of them, with the exception of a few, some. Some very specific ones that are kind of like, you know, still in progress. Like, you know, they do not have the documentation, but almost all of them, like, you know, they have very detailed documentation. So that's how, like, you know, they can go after documentation. But, you know, we will try to add more and more and like, you know, the workflow for us for like, you know, development is very similar to the rest of like, you know, functionalities in Wolfram language. Basically, like, you know, we do our best to make our code readable. So like, you know, if they just look at the code and like, you know, just read it, like, you know, everything should looks, you know, very, you know, familiar.
Speaking of which, we also have a link to a GitHub repository where you'll see all the Wolfram language code that's used to implement the Quantum framework. And so you should now also be seeing that here pretty soon into the YouTube chat. And so if you're not familiar with GitHub, you can submit pull requests to, you know, locally download any code that's there. And then Nick and Mads, do you want to talk about what, what the process would be if people want to implement something that, let's say they have an idea for? Oh, this would be a really nice named circuit to have and the team hasn't gotten to it yet. What would the process be if people want to contribute those sorts of things?
Definitely, like, you know, they highly motivate our users, like, you know, to contribute. It will just go through a review process and like, you know, making sure, like, you know, it's kind of like, you know, there is a peaceful marriage with the rest of like, you know, functionalities that we have in Wolfram language. By all means, like, you know, we will add it to our framework. So, like, we highly invite everyone to contribute. This is the GitHub page of like, you know, all of the functionalities and behind the scene, all the codes. How Nick has done like, you know, this, this magic of like, you know, quantum computation so they can get it from there, even like, you know, there is a folder. Then notebooks, even like, you know, for us, like, you know, the scratch notebooks, like, you know, whenever we do any acceleration, like, you know, kind of, you know, behind the scene people, they can see, like, you know, how we would basically explore different ideas and like, you know, of the notebooks, they're like, that you would see they have very bad structure or like, you know, it's. You see that there is a Different version of like, you know, going through the same. Yeah, it's a mess. But again, like, you know, we just put it there because, you know, people, they, they might want to see like, you know, how we do all the development. So it's there. Besides, you know, GitHub, like, you know, for any packlet, our users, they should know that like, you know, any packlet, even if it's not on GitHub, after installing the packlet, you have all the codes on your end. So basically like, you know, you just need to go to the folder that the packlet object has been installed and you can look into all the, like, you know, basically documentation. Like, you know, you see here like Nick is showing like, you know, the link on his end and like, you know, if you go to that directory, you can look at everything, all the code. So basically like, you know, the, in a sense, like, you know, it's like, you know, all the sources and everything is open and you can look at like, you know, how all those developments are done.
And there are also functions for being able to find files and things like that. So let's say that you know the name of a packlet, but you don't necessarily know where on your machine it's located. There are functions that can help with that, that can help you find the absolute path to get there. So that is definitely worth mentioning. So as far as some of these new features, you also have mentioned that at other points. So once you've installed this packlet, there are new features that are being developed. So if people are wanting to keep up to date with the latest features or even experimental features, is there a special link that they should go to to get the dev version as compared to the stable version which is in the packlet repository.
So like, you know, there's another, like, you know, what Nick is showing like here, like, you know, there is another link to install our packlet, which is basically, we call it like developer links. So that's the most updated one. Like days and nights, like you, me and Nick, like, you know, we discuss, like, you know, we update it, making sure, like, you know, there is no bug or etc. Or if any of our users, like, you know, if they report like, you know, any bug, like, you know, we would take care of that immediately. So basically that's the link, the link that Nick is, you know, evaluating right now. That's the basically like, you know, the development link and you can install the latest one there. So like, you know, that's why like, you know, usually we Recommend our users just go to that like, you know, development link and like, you know, and download the packet from there.
Awesome. One last thing that people sometimes don't even realize you can do. So let's say that you've gotten the latest thing and there's a new symbol that's been added, that there's a documentation page for it because it's literally just been written. What can people do from within a notebook to find whatever symbols they have access to? Yeah, so it's a handy thing that people don't always realize you can do. Right. Is once you've installed a packlet, all of the symbols are then there in the context that you can look up. And so that was question mark. And then Wolfram quantum framework backtick, and then whatever the regular expression is that you want to take a look at of what things are there. If you are working with the versions that are even newer than what there's official documentation for, do remember that you can do that. Hopefully that's the basics of getting access to the latest stuff. Let's talk about some of these actual new features. This is not the newest feature because it's been in there for a little while. But we didn't really talk about it last time that we talked about the quantum wave work. And that's tensor networks. Let's spend a moment to talk about tensor networks and what those are doing for us in terms of working with quantum computation. So as many of you know from, let's say, textbooks, you know, you might have a density matrix representing the state that your system is in. But if you're working with, you know, very large matrices, this has a certain cost to it in terms of, you know, actually performing the arithmetic operations. And so there's various other formalisms you can use in order to buy yourself some not having to worry about, you know, large sparse matrices, let's say. So let's, let's first talk about why tensor networks. What, what are you, what are you. What's the advantage of using this tensor network formalism? And how can they see these tensor networks in the quantum framework?
Well, the way you can see it is just the easiest way is just make any kind of quantum circuit, right? And it has a quantum diagram, quantum computational diagram and tensor network correspond to each of those quantum circuits. And it can be constructed by just a single property.
Right.
And underneath is just that. What we mean by tensor network is just a graph. It's an annotated graph which annotated with tensors and indices around those tensors.
Right.
So this is just a usual graph object. You can ask whether it's a graph, it's going to be. It's going to say that it's a graph. And if you want to work with it as a graph, you can do it. So all the familiar functionality on graphs would work with this kind of objects. And in addition, we also supply a bunch of functionalities to work through these tensor networks to like constructing them, maybe adding more tensors to them, turning them back to quantum circuits and all of that.
So one immediate thing people might want to know is you mentioned that the edges on this graph are representing what to contract. So let's see, they want to actually see those contractions on the graph. So these are being stored as.
They just tagged edges. So this is graph. So in each graph you can tag the edges. And what we do for this particular representation of the tensor network, we tag each edge with an actual indices that are being contracted. So it's like a pair of indices. Each of the pair corresponds to what the output index of the, like the outgoing tensor and what would be the input index of this ingoing tensor? Right. So if you extract those indices explicitly, you basically this will tell you what indices would you contract in order to output the actual tensor that corresponds to the final result of the quantum circuit.
And then these can also be used as, you know, constructing arguments for doing the tensor contractions. Is that right?
Constructing arguments. But what you mean maybe like constructing a path of your contraction because it's not unique? What do you mean? Gotcha. Yeah, right. Actually I think I can show you there's like this, it's an experimental thing, right? It's not going to work for everyone, unfortunately. But you can take the tensile network and you can just compute just the contraction path of the tensile network. So hopefully it works. Yeah, so basically that would represent the list of not the indices, but the actual tensors, single tensors or pair of tensors that you would just combine to contract all of the common indices between them. So if you do it in this particular order, you just actually will contract the whole network. And computing this path is a very complicated algorithm. It's not NP complete in general, this is one. It's just a greedy algorithm that computes it. But there's some optimal ways of doing those too.
So I'm now curious to dive into that aspect a little bit further. Right, so you mentioned that there's not a unique way of doing it. So what's picking out the way that's returned when you're Doing this as opposed to some other way.
Well, the result is going to be always the same. It's just the order of your contraction is going to be different. And, and the way you usually optimize this kind of computation of those paths is for example, you can optimize for minimizing the size of intermediate tensors or maybe minimizing the number of flops of the actual multiplication of numbers when you're constructing those tensors. So depending on what you want, and there is no good way of doing it in general, but you can do it in some way in a greedy way in an optimal way when you have a very small network, maybe. But usually if you have a big one, the greedy way is the only one, is the only practical way of doing it.
So I also noticed there's tensor network netgraph. So what is the use case of that function particular that is in there?
Well, net graph is as you know, there's a Wolfram has a nice neural network framework. Right. Constructing your network. This is also an experimental function that can turn every, any tensor network like this into with a particular contraction path into the net graph object. But it's not going to be in general functional. But I think I can see. Can you show you this particular example? So tensor network graph. Right. Net graph. If you just feed it this net and fitted this path. Haven't done it in a while. I'm not sure whether it would work.
Yeah, so this one is still experimental.
Yeah, but yeah, in general it would just construct an actual. Oh, I'm forgetting something. The reason that it's not going to work directly is because neural network framework doesn't support complex numbers and tensors in general do have complex amplitudes. Right. That's a limitation of neural network framework. But we can kind of go around it with the actual. Another feature that we also implemented recently is just improved it not just implemented is the phase based formulation of the quantum computation.
Ah, okay. So well let, let's put a pin in that phase space formalism. So we'll come back to that. We had another audience question which was so you in the argument to that, that first circuit you did, you put in to Foley. So that's a named circuit. So can we back up for just a moment and briefly go over so how can people see what named circuits are in there? And you know, let's maybe see some examples of why having named circuits is helpful so that you can save yourself a lot of typing for common. Common circuits.
Yeah. So. Well, there's an autocomplete for all the named circuits that we implemented so far. So you can just see it like here there's some private variable if you want to extract. Maybe it's somewhere. If you usually quantum circuit something names. Yeah, it lives somewhere in the packet, it's not exported. But this is actually all the names if you want to extract them programmatically for some reason.
So some of those, like. Let me add one comment. Some of those like, you know, named operators, they are basically collection of gates that helps the users. It's like for example Toffoli or like you know, Bell or Magic. It's just, just a collection, okay. They don't take any other argument so it makes your life easier. But some of them like, you know, behind the scene, they actually do some operation. For example like you know, let's say that like you know, you want to have the Grover search algorithm of a Boolean function. Okay? So it's, it's not an easy task actually. It's a very non trivial task. You would say like you know, given a Boolean function, what is the corresponding basically you know, quantum circuit. And that's how like you know, you can use it like you know, as an input. You would say like, you know, give it. Any boolean function here is like you know, and A and B and X or with C and you see that's the corresponding circuit. So this family of like, you know, named circuits, they help a loss when you're building like you know, any, any quantum algorithm. And we support like you know, I can say like, you know, almost all famous like you know, or common named operators like all the family of Grover Boolean phase Oracle, like you know, everything there. We support like you know, basically the like you know, Vazira New Oracle. Like you know, it's, it's a collection of basically like you know, technical examples that we support. And more than that like you know, we also support like the graph which is very common in you know, measurement based quantum computing. Like you know, it's like you, you will not find it in any textbook like. So the idea here is that given a graph, whenever there is an edge, add a control z between like you know, those two vertexes. Okay? So like you know, that's basically the graph and that's the corresponding circuit. So those named circuits, it helps a lot with creating relevant algorithms.
And so let's say that you're working with one of these named circuit algorithms and you want to add a noise channel. So I know that we have the capacity to do that via. You can specify cross operators or they're also sort of named schemes for including noise too.
Yeah, there's a bunch of built in quantum channels those are basically used to implement noise or as models for noise. They act exactly as operators or other gates with a little bit of feature hidden feature that they actually underneath they're doing something more crazy than just acting on a wire and producing another wire. It's like you can, we can show that if you make quantum circuits with some kind of channel in it, bit flip, whatever, it has a nice label looking thing can be symbolic. So this natural probability can be not just one half, but actually any integer. So if you make it into a diagram, but you also show the extra QGITS thing, the extra qgits that come together with the channel, you can see that it looks something very similar to how we also show measurements. For example, I also add a measurement on the second quidit, see. So in that way you can also see the channels act exactly some kind of interaction with in this case environment. So this extra quitted or extra wide outputs, you can think of it as an environment. But in case of measurement you can think of it as this basically system that you have to trace over in order to actually get your probabilities or whatever. But as tensors and tensor networks they act fundamentally in the same way.
And something I'm now curious about. So how much explicit control can you have over the properties of this environment? Is it just through the operators that you use to couple it or are there there other sort of parameters that, that you can set to, you know, say for example, the dimension of the, the Hilbert space that this environment is living in or things like that?
Well, it's simply the, the set of cross operators or whatever define your channel is that is the way you control the environment. You can int if you just forget about quantum computation altogether and you just think about how you do tensor index juggling or whatever. You just. If you have a bunch of operators in form of matrices, if you stack them together, what do we get? You get a tensor with one additional index, so it's one rank higher than each individual matrix. And this is just what this output wire fundamentally represents is because you stacked a bunch of operators together and now you have this additional output index and we treat it as an environment that you fundamentally have to trace over in order to actually get to probabilities.
Okay, great. So we've showed it here an example. So aside from now specifying we have some noise channel and we've done a measurement here, what are some of the other, if we want to run through. Actually, something I've seen that you.
Showed.
Before is so if you take a look at these tensor networks and you do something as taking an operator and then the dagger of that operator composed with the operator. Right. So what would that look like in terms of tensor networks? Just for illustrating for people what the wires that aren't connected to anything, or I should more specifically say the edges aren't connected to anything in these tensor networks. So these are representing ins and outs. So let's maybe take a concrete look at some of those.
Yeah, let's make a quant circuit that consists of just a state and its dagger. Right? So in a circuit notation, there's just going to be a state looks like a gate without an input and it's conjugate is just something like that looks like a gate without an output. Right. And if you just compose them together, you get something with no input and no output and that's just the number. Right. So it's not a vector, not a matrix, it's just a single scalar. So if you actually take the circuit and evaluate it or contract the underlying tensor network. Actually let's just take a look at the actual underlying tensor network. Right? It's just a single edge. So if this is a tensor, this is tensor, it's like in the graph you don't see what are the free indices. Right. But you also can extract the actual free indices and in this case there's going to be none. I think there's also a function for that. So this is the function the network and tensor network, three indices is going to be an empty list. So there's no free indices. There's going to be a tensor of zero rank. So if you contract it, you get a pure scalar. Right. And in traditional form, just one. If that was for example for non normalized or some actually different.
Yeah, let's pick a slightly more complicated operator here. So we can see.
Yeah, well if you, if you get, if you just multiply it by two, you get actually the scalar times two. So this is not the actual one, this is the basis. One dimensional basis notation for basis. Yeah, so that's how we basically show.
One dimensional basis notation using the common terminology of, you know, quantum theory. Like that circuit is basically the corresponding inner product. So like you know, the inner product of like, you know, the first quantum state and the second quantum state. And those quantum states, they can be anything as far as like, you know, of course, like, you know, you see, like Nick is showing you the traditional form like, you know, you see, that looks nicer. So we are considering a trivial case when like, you know, it's, I don't know, add a random like, you know, set state, maybe too much parenthesis.
That should be the same. Yeah.
And in a sense, like, you know, this is kind of like, you know, how we should call it a new interpretation or like, you know, more semantic into the usual picture of like, you know, wires that we have in a quantum circuit operator. Because when people think like, you know, in, in conventional way about like for example, an operator, let's say like, you know, we have Pauli X operator acting on second qubit. Nick. Let's have a circuit and X goes.
To two, for example. Okay.
So like the way that like, you know, people would see it is like, you know, the normal interpretation is like this. They would say like, you know, there is an operator, unitary, et cetera. It has some features, but it is acting on the second operator. But the way like, you know, that the, the bare semantic would be like this. This is an operation with the input, the second wire. The output is also the second wire. Okay, so why this interpretation is interesting because in our framework you can change input and output. Okay. For example, like, you know, Nick, like, you know, as an output, give it. I don't know, let's make it to the first one. Like it goes from the second one to the first one.
You want to like make a different operator or what?
No, like, you know, the same Poly X but the output instead of like, you know, you can do it with Pauli X directly, but that one also like, let's do it with Poly X.
It will look ugly though, right? Yes, but like, I'm going to make one. Yeah.
Still like, you know, this is basically like, you know, it gives the idea. So like, you know, actually it's nice. It's not that much ugly, but anyhow, like, you know, people, they get the idea. Like these are like, you know, what, let's call them unconventional basically approach. But like, this is truly like, you know, what, what is happening behind the scene and like, you know, the freedom that you have. So this is also like, you know, a quantum operation. But here like your input and output are different. And that's basically a very nice visualization for that concept of like, you know, behind us in the tensors that we have. Like look at the, like, you know, those two examples. Like, you know, now it's Poly X. It's the same Poly X, but the input wire and the output wire, they are not the same.
So we're permuting the names of the indices basically. Right. You could think of it, you know, as an abstract thing or you could literally think of it as, you know, you're hooking up, you know, what, what you're measuring now under different names.
Yeah, you can think of this just like wire bending around. Yeah, that's why the string diagrams, you can think of those wires as strings and they can bend all around. And you can represent not just quantum computation, but in general, all linear algebra.
Let's look at a very famous, you know, circuit that people have seen in the literature. And Bell circuit, like, you know, Bell second is a harder mode and you know, C not. Okay, so like, you know, this is basically the textbook example that we have now. This is the same as having a cup. Okay, so like, you know, now let's show you like, you know, sort of like, you know, minimal representation of that. So basically like, you know, these special.
Operators that just render, render specially if you, they're shown as just like wires, but underneath they are just as other tensors. They just rendered as a wire so that you can basically close your eyes and don't even see them. So in an actual computation, applying this circuit to the register, maybe it's kind of missing some of the things here. If I do the 00 on the left, like here. Right. So all of this construction is equivalent to this guy. So if you construct this tensor network, tensor network for this circuit, and just take this operator that represents a wire, and the wire is just a reshaped identity. So it doesn't matter which direction it's looking, it bends or whatever, it's just an identity. And that would be the same thing.
And so when we're using tensors to represent these things, and then we're intelligently picking what contractions we want to do in order to actually evaluate the outputs of these circuits, what's that buying for us computationally? Right? Because I mean, the other way of doing it would be to, just as the textbooks do, you just take some giant matrices. But of course, this is horribly inefficient. So can you talk about some of the improvements you get by thinking about things as tensors?
Well, in a way, we already mentioned it. It's like when we discuss the path of contraction, right? Because when you compute the path, the actual all the intermediate tensors can be much less small in size. It's like if you just want to construct the tensor network naively, what we can do is just tensor product all the tensors there. Then in that way you're going to be just very high rank tensor that you can't even fit in memory. Right. But if you do it intelligently with some kind of particular order of contractions, all the intermediate results can be very small, but you get ultimately to the same result.
And so are there. It would be interesting to see maybe in examples at some point somewhere, some comparisons of what you would get if you did it. You know, not the more intelligent way of making sure that your intermediate results are staying small. But anyway, that might be getting slightly far field. So the basic point is that if you want to do things involving tensors, right, you don't want your computational load to grow as 2 to the N as you're working with more qubits. Right. That would be bad. And so if you're working with tensors and using some of these other methods of making sure that your overhead stays smaller, you can in some situations at least avoid having that bad situation happen where you're getting just an exponential overhead.
Yeah.
Okay.
If your intention not to compute the actual state vector that represents this giant tensor tolerant of size 2 to the N, but you actually want just maybe one scalar output as your result, your actual path of contraction is going to be very important. There's going to be like hundreds of qubits, but you can still can efficiently contract it quasically to get the single number.
So another thing that is a new feature that has been added since last time we've done one of these are things to support the stabilizer formalism. Before we jump into stabilizer formalism, is there anything else about tensors that we haven't talked about yet that might be good for people to know?
No, it's not like we completely abandon them. We're going to come back to them in both stabilizer formalism and the rest.
So yeah, if any comment like, you know, this way of thinking about like, you know, circuits and everything, like, you know, it gives you lots of freedom to have like, you know, more generic operation. Okay, for example, let's say that like, you know, you would like to have an overlay of like, you know, basically two circuits. Okay. You would say like, you know, look, you know, I have a copy or I don't know, I have the complex of the same state. But instead of like, you know, looking at them as like, you know, two separate thing, I would like just, just marries them on the top of overlapping like, you know, on the top of each other. And that's basically like, you know, what people usually like, look at this case like you have two copy of like, you know, bell and you would say like, now look, each of those wires are two dimension and everything is the same. What if I just like, you know, the lower part, I just cut it and you know, overlay on the top of, you know, the first part and basically having an overlap. This is basically the concept of double and notice like, you know, what is happening to the thickness of wires. Now like maybe like, you know, Nick, if you show like in a diagram with like, you know, show wire dimensions. So you see here like, you know, now we go from like, you know, the wires that are two dimensional to the wires that are basically four dimensional. And this is like, you know, it's very handy because later on when we discuss about, for example, phase space and et cetera, like, you know, for the phases space of like, you know, quantum circuits, you need these constructs. Otherwise like, you know, you have your to bang your head to the wall if you want to have the phase space representation of a quantum circuit.
Yeah.
So there's been a couple of things that people should make sure they pay attention to. So you can show wire dimensions, you can show the edge labels which are just going to be the edge tags in those tensor networks. So there's several things like that that if you want to see. In other words, there's extra data that's coming up when some of these visualizations are being shown. And so there are a few shortcuts like that to be able to quickly get those and not have to put them in yourselves because there is extra data that's there. Okay, so yeah, let's go ahead and talk about the stabilizer formalism. So the stabilizer formalism comes up in quantum error correcting. And so I know that there's some new features that have been added related to that, where you can see generators that you might need in terms of being able to create various error correcting schemes. So let's take a look and see what sorts of things we have in there.
So the entry point to this thing is just a single super function. So super object that we have, we call it tentatively as polystabilizer, but it can represent both stabilizers and clifford operators, like in a single object. So it's still an experimental thing, I guess. What should we start with showing?
Yeah, let's start with a quantum state. Like what's the meaning of stabilizers for a quantum state?
Yeah, there's some very greedy algorithms of how to actually turn a quantum state, if it's possible, to its stabilizer representation. I think it's loading something. Right. So this is the stabilizer object that represents this state. Right. And I guess what you do focus on this thing, understand, is that it contains a list of stabilizers, is that this thing is just a list of actual poly strings with potential sign. And it can also represented by this tableau, which in full form is, also includes destabilizers, but in this short form, just stabilizers. Right. And you can extract all the information about the state from this, just this binary, just this bit matrix, basically because it only will contain 0 and ones.
And the other basic idea that maybe we should mention for people is that the stabilizers are going to commute with whatever you're wanting to go through the channel without having errors. And by virtue of this, you can construct a larger quantum circuit that has more physical qubits, or qubits, I suppose. But after you have got this physically larger thing, this is representing a smaller collection of logical qubits. So that after you get the thing out the other side, whoever you're sending the information to, if there was noise in there, that is going to introduce operators that you didn't intend to be in that circuit, you can use this stabilizer formulas in order to try to figure out, well, what errors were introduced so that then we can apply some corrections and get back to what we were, we were meaning to logically send, rather than this larger collection of physical qubits.
Yeah, right. I guess we're not gonna talk too much about error correction application of this thing. Okay. Right. But we can just touch on some of the properties that it has. First of all, yes, you have to. You can see that if you increase the number of qubits, the nice thing about this representation, because this is the whole information that the underlying object contains, is this bit matrix. Instead of exponentially increasing in size, as would quantum amplitudes do, right. It just linearly increases in size. So in principle it's very compact object. But the downside is just you can't do it for every state. So this is just some particular states that can be represented as a polystabilizer. And states that do not are usually called magic states. So because the underlying quantum computational with magic states can give you the universality, but without it, you can't do the universal quantum computation. But if you restrict yourself to just working with the states that can be represented as that, as this kind of objects, you can essentially do your quantum computation much more efficiently, even on classical computers. So if your quantum circuit is the one that contains only the default operators. Yes, you can also show that you can take some operators and also turn them into into polystabilizers like that. So they both can kind of have this dual nature. They can both represent represent either a Clifford operator or the stabilizer for state. And if you have a circuit, you just. If every operator within a circuit can be transformed to that, you can classically more efficiently simulate it to extract your measurements. So I guess that's the idea.
So as you mentioned, there's a somewhat greedy algorithm that goes into finding this representation. But then once you have this representation, what do you envision people doing with it here in the quantum framework?
Well, hopefully it's not going to be even visible to usual user. It's like what we're planning to do at this point I guess is just have it an additional method to contracting your or just computing your circuits. It's like as soon as you can detect that your circuit is Clifford 1, you can instead turn everything into polystabilizer and classically simulate it much more efficiently. But they also just experimenting that even for non clifford circuits, what kind of computation this kind of thing can allow you to do? For example, if it works because it's well known that T operator T gate is not Clifford, so it can be represented as this, but you still can represent it as some kind of superposition of those. And because everything is symbolic in the Wolfram language, you can just add them and represent just a usual expression of those kind of objects with some amplitudes. And in general you can do it for more complicated circuits, I guess, like the one that just showed above. Like the Tafoli circuit, it contains a bunch of those non clifford T gates that can be represented. If you take this circuit and turn it into stabilizer, what it's going to do, I think I haven't done it in a while. If you just compile this whole state into this giant superposition of stabilizer instead. So this kind of object I personally haven't seen anywhere. So just this thing of thinking about superposition of states that your stabilizer states, right. So you can immediately say what it requires, the magic states or not in order to construct it, or just you can simulate everything with a single one. So if you have this superposition you can classically you can figure that each of those individual 1 stabilizers you can simulate classically efficiently. But if you have a superposition and there are many of them, you can. That's where your exponential complexity is going from is coming from.
That's a quite interesting point. So yeah, okay, so in terms of Showing these generators that are going to be what you get that create the subgroup that is the stabilizer you mentioned, you know, you can do this in. So what's the sort of most abstract way that you could represent these things as well? So here we've been doing it on specific circuits and states. So what's the most abstract sort of least connected to a circuit diagram way that's currently in the framework? Just out of curiosity?
Well, I can't even say immediately. It's like not what you're asking for. What is the most non connected to circuit diagram object?
Yeah. So for example, one reason why I'm interested. Right. Is because even just representing Clifford algorithms, Clifford algebras is something that typically you would have to work in some kind of package for. Right. Because there's not like a native representation of some of those mathematical objects, at least not in a way that's easily surfaced. And so I'm curious if people are wanting to, if people are seeing something here and saying, oh, that's an interesting branch of math that I didn't even realize you could handle in this very concrete computational way. So that's sort of the motivation behind my question. There is what are some of the, the, the mathematical machinery that goes into, to finding these stabilizers that people might not even realize that you could do in a concrete computational way, especially in the, in the Wolfram language?
I don't know because the algorithm I'm using here to convert states to stabilizers and operators, they're kind of very well known for quite a few decades maybe already. And I'm not even using the most like state of the art ones. So it's just having them all in one framework interconnected with all other objects is pretty nice. So that you can immediately see and like what would be the effect of having one and how they transform can compose with each other. That's kind of, I think it's pretty neat.
Yeah. So you mentioned that currently you had things mostly collected into a super function. What are some other things related to working with the stabilizer formalism that are surfaced that people might find interesting to call as functions?
Well, one interesting feature is like a. Start with a stabilizer and then add like, like. Okay, one of them is this name, like, you know, the features that we have. A random stabilizer is basically. Look at that, it's a random stabilizers. If you convert it into a quantum, you know, the circuit operator. Now you would get a random circuit. Okay. So it's like one way of generating random circuits.
It's going to Be a random feedback circuit. Yeah, yeah. This is one way of doing random things. Our idea would be this is one would generate a random clifford one. But when you want to generate, this is going to be just like one way of generating random circuits. If you start to do random clifford1 and then sprinkle a bunch of magic operators like T gates to get just an actual random unit tree. That's one idea that we may be going to explore in the future.
Interesting. Okay, yeah. What are the other built in things that you can add as arguments to that polystabilizer that people would find of interest?
For example, like in a list you.
Can convert your states, operators, circuits back and forth. It's not going to work for all of them. Maybe they fail. You can construct it manually from the actual tableau like this or the list of generators. I think it's also going to work. Try. Yeah, you can just give it like that. So just this is like the constructor and the object itself. That's why there's not much other functionality is built in around it. It's just they work together with just by composing and constructing one object from another.
Gotcha. But the input there could be a circuit, could be the list of generators. Could be something like random. Okay, good to know.
Yeah.
There's another example it sounded like you were going to touch on. Did we cover it already forgot.
Like, you know, let's have poly stabilizer of like, you know, I don't know, like you know, five qubits. And then let's have like, you know, I don't know, like, you know, let's have an operation, I don't know, like in a Hadamard on, I don't know.
Like, you know, just you can operate on it. Yeah.
So like, you know, this is one other neat feature that like, you know, that all those like, you know, algebraic features that we have in a stabilizer formalism for like, you know, how the tableau will gonna like, you know, change due to some operations like you know, you can do it here. So like, you know, the effect there that you see is Hadamard acting on the third like, you know, qubit and you see like, you know, how it changes like you know, your stabilizer formalism. And like, you know, that's the effect of T gate that that creates like, you know, that's the preposition, that superposition idea. I feel like, you know, I said like, you know, maybe like you know, something like original and it was exploring more but like, you know, we haven't done it yet. One of our to do lists. But again, like, you know, if, if anyone, like, you know, graduate students, researchers, like, you know, we are open to collaboration and interact much more on these topics. And like, you know, the best way, like, you know, maybe we forgot to mention quantumolfram.com so if any question or whenever they want to contact us, quantumorphone.com that's the easiest way of reaching out to us.
And this would be another good time to mention that you also provided at the beginning of the stream a link to a GitHub repository. So you can, in the packlet repository, you can see code for all sorts of packlets that are there. You can look locally after you've installed the packlet. But there's also, in the case of this one and a few other projects that Wolfram works on, there are GitHub repositories where people can submit requests to contribute directly in that way as well. So that's definitely worth mentioning that. Yeah. So let's say that you're thinking about working the stabilizer formalism. This sort of idea of superposition of stabilizers is something that's interesting. You want to directly collaborate, feel free to reach out via those channels and that could be the start of a very interesting conversation.
And of course, we have a big community of users, professional users in our Wolfram community. So that's another venue of interaction. So there they can not only interact with us, but with many other users, people, they can share their ideas, they can ask their questions. So Wolfram community is also another way of interacting with Wolfram users.
So we've seen underlying representation you can do as tensor networks, you can represent things using polystabilizers. And in the case of something that doesn't directly admit representation as a stabilizer, you can sort of look at this superposition of stabilizers, which is quite interesting. So then the other thing, which is a new feature that is also relevant to some of these things that we've been talking about, and it came up once already in the context of exporting to something that doesn't support complex numbers, is this idea of a phase space representation. So this is also something which is new since last year when we discussed this on a live stream. So let's talk a little bit about phase space representations.
Yeah, okay. So I guess the entry point to that kind of topic is what we is one other function that we have is called quantum weakness transform. So people should know that Wigner transformation and usual quantum computation is basically transforming your usual quantum states, wave functions, into their phase space, corresponding Phase based representation. Here we also implemented the or improved, I guess it did exist for a while, but we improved it on how it actually works and generalizes the same concept for discrete ones for discrete systems that we're working with. Right. So what you can do with the Wigner transform, you can transform quantum states, operators, circuits into one particular representation. Or as we're going to see soon, it's just a basis transform basically. For example, we already showed you what this double must mention this double operation and what phase space transformation is actually is in relation to that. It's just this is the same as doubling your operator states circuits like this by increasing your squaring your dimension or thickening your wire, but also then turn them just convert it to very special unique basis where all your amplitudes become real and can be interpreted as probabilities or quasi probabilities in general because sometimes they can actually take negative values. So for example, if you take the state some random mixed state two dimensional one because it's two dimensional state, right? This actually has one qubit but if you transform it, it's going to be one four dimensional qubit. Now and as before, while before the weakness transformation, it just was represented as a density matrix with some complex coherences on the off diagonal. As soon as when you transform it into WIGN basis, those numbers become real. The same quantity of numbers, the same count as density matrix, but they're all going to be real and they also squared and can be treated as probabilities. And you have a bunch of properties that can actually bring this probabilistic properties to the surface more conveniently rather than just looking at this amplitudes in the special basis here. I don't know math. Maybe you want to talk about this more.
So like, you know, there are a few like, you know, details regarding like you know, the, the Wigner transform for even and odd dimensions. So let's do some cheating. Like you know, for the time being let us not not mention them. Okay. Like you know, again like you know, I'm saying that explicitly that like you know, it's a kind of like, you know, cheating but like you know, let's not like, you know, get worried about that. So this is basically the vignette transform or one other thing. Like you know, people, they can do is like, you know, they can ask for some properties of the, you know, that estate. So this is the state in the computational basis you can ask for. It's like you know, phase space. Okay, so like you know, phaser spaces gives you like, you Know the corresponding representation of the phase space. And for single, like you know, remember for only single, the queued systems, when you only have one particle, phase space and quality probability are the same. Again like you know, let's like, you know, for the time being let's not talk about the difference between quasi probability and phase space. We will comment on that very soon. But let's take any of them. Like you know, phase space, quality probability for single particle are the same. And what you can do is like you know, you can do this summation over rows or summation over columns. Okay. Like you know, that's a very like, you know, simple task. And like you know, so this is a summation over column, summation over rows. And like you know, these are basically the quantum probabilities corresponding to the measurement in position. Let's call the position and also like you know, momentum. So look at here like you know, the computational basis those 0 and 1. Let's read them as position and the other one like you know, it's gonna be like basically like you know, the momentum and what's married.
It's kind of bad state for beach. It's always this almost the same looking. Oh this is this.
Let's just chop them like you know, those are like, you know, the precision ones. And yeah, now they, they are different. So you see like you know, you see. So like you know, basically like you know, it's like, you know, some people, they would call it like you know, the, the quantum in phasia space. Like you know, treating quantum as a sort of like you know, a statistical mechanic approach. So like you know, but like, you know, keep that in mind here. Like you know, it's called quasi probability because like you know, they can also be negative. Look at like, you know, the representation on the top. Like you know, some of the elements are negative. So we won't be worried about like you know, as you see like you know, oh, it's two dimension and if I like you know, measure like you know, in the, you know, position space. Like you know, why there are four results because like you know, every other one like you know it's going to be zero. Okay, so like now that's how like you know, it's everything is consistent and it's not going to cause any issue. Now everything that you see here is the simple case of one qubit in two dimension. Remember like you know, in our framework you can go to higher.
I want to describe how this labeling comes around of the actual what is the 0 corresponds to. If you want to label the actual quasi probability.
Rawson's okay, let's discuss about that.
Yeah, because the discrete case is quite a bit more of a headache than the continuous case. Many of you might have seen the continuous case in like a quantum, I don't know what number course. But basically in the continuous case, rather than dealing with the states, you can do a Wigner transform in the continuous case and get something which again, it's not quite the same as a probability density function, but it's pretty close. And so everything works out. There's some weirdness about oh, it can go negative, but if you actually compute the things that you would measure turns out fine. So as you're just saying, the same thing happens in the discrete case, but in the discrete case there's sort of more things to worry about than in the continuous case.
Yeah, so basically here what we have is the way that you can think about it is this transition quasi probability. Like, you know, see it like this. So it's a transition quasi probability from one point in the phase space to another point. And by definition for us like you know, the first like, you know, block of quadrants of like, you know, your quasi probability is for momentum space and the other ones is for like, you know, position. Now look at like, you know, that, you know, nice table representation that Nick is showing you. In the Wigner transform you would see only a few elements. Okay, it's only like, you know, four. But when you look at the transition quality probability we say, oh like you know, it's, you know, four by four is like, you know, 16. What's going on here? The main reason is like the elements of transition clausi probability, not all of them are independent. There is a nice like, you know, algebraic relationship between them. Like, you know, it's next time like, you know, we can dive in more into the detail of like, you know, phasor space and we can show you all of them. But again, the main reason that weakness transform has less element compared to quasi probability is because many of those elements have a relationship. There is an algebraic relationship between them. Now look what we have here. For each element on that table, we can interpret it as a quasi probability of transition from row to column. For example, the first one, which is negative 0.0747572, this is a transition from X plus to X plus. The second one is going to be X plus to X negative. So it's like, you know, rho is like, you know, you go from this state to the other state. So now what's going to happen if I do the summation over all of the, you know, elements in a row. So what I'm going to get, I'm going to get all the outgoing amplitudes going out, for example, from the starting point of like, you know, those elements. And as you can see, like, you know, going out from all of them. It gives you basically zero for those that kind of like, you know, cancel each other. Look at like, you know, the part that Nick is highlighting. You see, like, you know, they simply like, you know, cancel each other. Because again, like, you know, there is an object, right?
This is the finger that can, like, this is the actual that contribute to your probabilities. This is the probability in your computational basis. Because I'm summing over my rows. That's how marginal probabilities in either computational or X basis can be extracted from the transitional comparison probabilities. It's like if you sum over rows, this part of this table is going to cancel. Because this part is not going to cancel if you do it other way around in some columns. Instead you get different set of probabilities that are going to correspond not to probability and computational basis probabilities of your state, but probabilities in your X basis.
So basically like, you know, look at like, you know, the first one that we have, total. So that total is basically like, you know, it's like adding all the rows or the different way of saying that is look at each column. Just add up all the elements in each column. So if you add up all the elements in each column, it is as if, let's add up all the ingoing quasi probabilities into that very specific point in the phase space. And as you see for like, you know, if you do it like that for momentum, you will get zero. This is basically the representation of probabilities in position space. If you do it the other way around, you would say, now this time I'm gonna add to add all the elements in a given row. It is basically outgoing to a very specific one and it corresponds to the probabilities in momentum. Remember, like, you know, the very last line of code that you see here is basically a simple. Yeah, that's, that's much better. So like, you know, we totally forgot about like, you know, this transition graph. Let's look at like, you know, labels now. Like, you know, it's much more clear. Like you get here, like, you know, each of those states, like, you know, there is a, like, you know, edge between them. It represents like, you know, exactly like, you know, those numbers if you want, like, you know, the adjacency metrics of like, you know, that graph, it gives you exactly like, you know, that quasi probability that you had on the top. Like, you know, those two are like, you know, there's a one to one correspondence between them. Some people, they prefer the terminology of like, you know, adjacency metrics. Some people, they like, like, you know, that visualization of the like, you know, graph. Like, you know, if you ask me, like, you know, I do not know which one like, you know, people prefer, but like, you know, both of them, like, you know, they, they are there for the simple case of a qubit, the transition graph. It helps, but believe me, like, you know, the moment that you go to higher dimension, that graph becomes so practically you cannot get anything out of that. But anyhow, like, you know, pick any basically vertex, add up all the amplitudes going into that vertex, or vice versa, like, you know, add up all the amplitudes going out from that vertex. That's how you can get probability in position space, probability in momentum space. Of course, like, you know, you see here, the quasi probability is a square matrix. So you can get only probabilities in position and momentum. If you want to have a sort of like, you know, a variant, you would say, what if I get the one in momentum for particle number one and I don't know, like, you know, position for particle number two. These are like, you know, the moments that you have to go like, you know, to the concept of like, you know, tensors and do like, you know, something, you know, fancier than that. But again, like, you know, here is a single particle, so you don't see the distinction, but okay, let's do it. I know, like, you know, we don't have that much time, but bravely let's show like, you know, yes, let's get into it like, you know, a quantum state of like, you know, I don't know, like, you know, random mix. Like, you know, here we go like, you know, two by two. So it's a mixtape and if we like, look how messy it is. But anyhow, you see here, because Nick is asking for full transition graph. Now you have a graph and you have the connection between everything. This is basically like, you know, a sort of like, you know, you can also read it as a tensor. Okay, so it's like this is a graph representation of that particular tensor. Now pick any vertex, if you add up all the probabilities going into that like, you know, vertex, that's basically like, you know, probability of like you know, that very particular basis, then out is going to be like, you know, the other one. Remember like you know, for whenever we talk about phase space, like I guess like you know, by mistake I call them probabilities, but remember they are quasi probability, okay? Like you know, many of them, they can be negative. So practically instead of thinking about like, you know, everything that you can do with the amplitudes and like, you know, I don't know, like you know, operations, etc, you have this statistical picture of like, you know, your quantum whatever, your quantum object, your quantum operation. And then you would treat it like statistical physics of like, you know, your quantum theory. Of course, in a discrete space, this is a discrete representation of like, you know, basically Wigner formalism in a continuous case. Then you, you can have whatever you want. Like you know, like for a circuit you can have the corresponding like, you know, Wigner transform. And again, remember the vignette transfer is literally going to a higher dimension. That's why if you look at the diagram, the diagram is that double diagram and that's again now maybe our users understand why we have those features and why it's kind of doable in our framework to add phase space for modelism. Because when you have those tensor concepts behind the scene and tensor network, et cetera, adding these features, it's gonna be like, you know, easy. But if you don't have them, good luck. Like, you know, it's gonna be like, you know, really, really difficult, like you know, to, to, to get them done. Let's see, for the phase space, like, you know, I'm thinking about like, you know, looking at like, you know, many features that we have, like you know, which one looks nicer for the representation? Let's see.
Oh yeah, so that's the example that didn't work last time, right? Because I'm getting something because it was.
Like, you know, the complex numbers.
Yeah, I saw a complex in that sparse array. I'm not sure what the extra step would be.
Just trying to understand why it's there. Maybe I'm forgetting something.
So while you're thinking about that, one other question. So as you're discussing before, right, so by using this Wigner transform, you can think about things in the sort of usual position basis, which is I think more the difference between momentum and position. I think in the continuous case is more straightforward for people to wrap their head around. But so let's say that you want to measure something where effectively you're measuring a momentum. In this discrete case, how can you use this Vigner formalism to do that.
So basically like, you know, it depends like you know, if your system like you know, remember, like oh, okay, now like you know, so that's basically like before, like, you know, what was the.
Thing we were forgetting before? So when people are trying this, they know.
Well, I was forgetting this because by default I get every circuit. When I convert every circuit to tensor network, I convert every operator in it on one computational basis so that it's unique across all operators. But when every operator is in the phase space, you don't have to do it. You just take whatever amplitudes are already computed by transforming it to that phase based presentation and make those tensors your actual tensors and the tensor network that you're going to contract and those are going to be real. And because now, because now they're real, you can actually contract them using a neural network framework if you want and maybe do some quantum machine learning. In principle, that's what we're building towards here. Even with that limitation of absence of conflict support complex numbers.
So, so does the, the reverse. Is that functionality also implemented currently where let, let's say that you have a, a net graph and then you've adjusted weights and, and things like this. Can you go back to a circuit or is that something that will be forthcoming?
Well, in principle, yeah. Well, because net graph I don't remember. Like let's see if, if this is your net graph, I don't want to recompute it. If this is your net graph, I think you can ask for computational graph. Remember what's the property? Do you see some kind of graph in here? Not graphics, but graph like maybe this one. Let's see now, yeah, let's make a smaller, smaller circuit just for Bell state as an example because there's some other kind of limitations. So smaller net graph. So in principle this is the graph, right? You also have a functionality. So if this represents the computational graph of contracting your tensor network, in principle you can just wrap it with the quantum circuit operator. Again, I've never tried it actually because I have a functionality to turn any kind of graph into the circuit. Let's see what it's going to do. And it's going to turn every node in here into some random. So it's going to label it with whatever label it. Was there some kind of ugly thing? Sure, yeah. Basically that's how you can go backwards.
Nice.
Overall, I believe like you know, this phase space representation, like you know, it has lots of potential because like you know, it's, it helps you. Basically that's the entry point of like, you know, connecting everything quantum with like, you know, more conventional approach that we have in a statistical physics. Like, you know, you can think about like, you know, everything else that we have there, like, you know, and you can apply like, you know, the same here. And I think like, you know, that's one reason that like, you know, for example, many chemists, because, you know, chemists, they have more classical like, you know, mindset about like, you know, all the processes. Many of them they prefer like, you know, Wigner representation of like, you know, things rather than like, you know, the usual Schrodinger one. Because, you know, when they want to study chemical kinetic, that phase of space representation, it's kind of more into, more connected or closer to our like, you know, intuition of what is happening, like, you know, in this space. And of course, like, you know, you can have lots of fancy things like you know, like how X, for example, momentum and position, they are basically, literally shifts like you know, in different direction. It's like shifting your face, especially the right shifting it down or up. Like, you know, we have all those features like, you know, and Wigner is one of those like, you know, things that, you know, we spend time and its documentation is very detailed. Like for example, like, you know, we are a bit behind for Poly Stabilizer. So like, you know, we don't have documentation for Poly Stabilizer, but our Wigner transform, it has a very detailed like, you know, documentation. So people. Yeah, that's, that's the one that I'm talking about. Like, you know, look at here. Like, you know, when you're applying like, you know, generalized momentum or position is like one of them is shifting like, you know, to the right, like, you know, the other one is shifting like, you know, down. And that's literally like, you know, the shift operators that we have in phase space.
That's great. And also, especially if you're looking for a nice easy way to illustrate these things here we have things which are animated right there in the documentation page. So you don't need to worry about re figuring out how to do that yourself. There's a couple nice examples here. So another really interesting thing about this Wigner transform in finite dimension is the difference between even an odd dimension. So we may not have time to get too deeply into that this time. But I know that there's a really interesting many things that could be talked about there. So is there anything initially that you want to say about that today?
So basically like, you know, when the dimension is even, we have to Basically double everything for the sake of like, you know, consistency. Like, you know, if you want to treat everything on the same footing, like you know, you need to, you know, for the even ones, you have to dabble like, you know, your space and it's kind of related to that, you know, at the very fundamental level. Remember like, you know, when dimension is odd, when dimension is even, you know, in one case you have fermions, the other case like, you know, you have bosons and like, you know, having a unified like, you know, formalism treating all of them, in a sense, you know, it's related to that. So we could have done two different things. One approach would be treating them completely different and it was kind of a hacky way of like, you know, treating even an odd. But we decided to have one unified approach and for that one unified approach, like, you know, we are dabbling this space of like, you know, even one. For example, Nick, if you show like, you know, the phase space of, I don't know, the four dimensional state.
Hold on, I'm lagging a little bit. So like trying to open some nice pictures and it froze.
So that's an excellent time for the audience. If you have other questions, make sure that they make their way into the chat while we're waiting for a nice picture to load here. Looks like we don't have any other at the moment.
Because of this maybe animation. Right.
Also, I always notice that zoom tends to greatly eat my computer's resources when I'm bringing up high res stuff.
That's what I wanted to show the difference in those phase based topologies for order versus even dimensions. Basically odd dimensional systems. If you increase the number of dimensions like into its continuous limit, definitely the, the applying of those shift operators, you can now think because it's going to be always be two dimensional. So represented by two dimensional surface. You can think of the odd dimension as moving this surface of a single donut like this. If you apply shift operator X or phase shift like this, they're going to like move around this donut like this. It's going to be a single one, but for the even case it's going to be the only way to represent it nicely. We found that the only thing you can do is have four of those instead, but they're going to have this negative symmetry to apply to each. So it's like the same kind of size but each of those has this instead of a single texture here it's like in this case there's only one bolt, one single bolt on the surface of a donut. Right. But in the even dimensional case, each of those have four of those four copies, but they reflected differently on one of them. There's a one positive one, but you have negative of this bolt on the other side. Right. And you basically all four combination of those represent the whole symmetry of the space. Space symmetry by over applying those different shift operations of them. So that's kind of interesting.
Yeah. So basically you need like, you know, four version and on purpose, you know, we don't call them like, you know, copies because it's not a copy of the same thing. But like, you know, there's a relationship between them. And you see like, you know, since we have four quadrants, if you look at the representation of our Wigner basis, I don't know, like you know, maybe you have it somewhere. Nick, like you know, by convention there is a superscript and that superscript represents actually these four different like you know, versions. Like you know, I guess like you know, we had it somewhere like you know. Yes. You see here like you know, when it's like, you know, the second one like you know, the, the top right one, we call it number one and then we go counterclockwise. Okay. So like, you know, it tells you like, you know, where in that, you know, quadrants like, you know, they are located. So and that's basically the motivation behind the super script that you see in our Wigner basis.
And each of those four basis elements has a different identification made with what would have been the edges of the manifold, if I understand correctly. In other words, there's a different gluing rule for each of those four basis elements on those tori that you were showing.
Yeah, basically each of these quadrants represent those separate torque tori. Maybe this picture may be not faithful enough. It actually has to be four different pictures on all of them. But they have this symmetry because as you can see for this simple two dimensional case, just a single number for each of them, but they are different numbers. So it has to be four different pictures. If you increase it, increase the number.
Of dimensions if you want dig a scroll up. I guess we had, you know, the fully 100% the previous visualization. The other notebook. Yeah, that's basically full 100 like you know, quantum representation of that. So like, you know, by the way, this is the very first time that we are explaining that. So we were not sure like you know, that this topology that we explained from the picture of sailing boat, is it more like, you know, a better explanation or the picture of like, you know, the actual Quasi probability and you know, break it down into like, you know, four quadrants. Like, you know, which one is better? So our users, you tell us, you know, which one is a good, good explanation.
Yeah, that, that would actually be a very useful piece of feedback because I, I personally am more well studied in the continuous case and so that, you know, spoke to me, but I have no idea about what other people are going to feel about that. So.
Yeah, yeah, so you see, like, you know, this, this, you know, the fully quantum version, it tells exactly what we told you. Like they are not actual copies, but there is a relationship between those elements. And in the Wickner, like, you know, transform, whenever you see, for example superscript number one, it is top right and then go counterclockwise, like, you know, that's the notation that we have. So that's basically the phase space. But overall, like, you know, since, you know, we are also like, you know, short on time, like, you know, There's also one question from one of our users. Let me see if I understand. So traditional bits, they have two states and qubits have four states. What do we speak, three states? I'm not sure if I understand the question, but if any response like, you know, you can, like, there is no limitation in terms of like, you know, the dimension of your quantum system. Okay, as far as it is finite dimensional, like, you know, we have full support. You can have, I don't know, a composite one. Like, you know, Nick showed you, like, you know, we had quantum state, you know, in the state, you know, 2 and 3 quantum estate. Like, you know, let's have it in 2, 3, 4, 5. Like, you know, it doesn't matter. Okay, like, and they can be at any order. Okay, so there is no limitation. So if we skip that, it was just for the sake of like, you know, explanation.
I, I think the, my interpretation of the question has more to do with if you're trying to represent a qubit classically, it takes more classical bits to try to represent a qubit. And so I think the question was why do you jump from why does it go two to the end? That's my interpretation of the question. But yeah, if you want to refine that question a bit. So basically the reason why the three, if I understand the question correctly, doesn't come up in that conversation, is that things are growing 2 to the n in how many classical bits it would take to try to represent something which is a qubit. So if you're working with a quit, let's say instead of a qubit that story would change. And so you can get other numbers in that progression as well.
I think this answer can. There's going to be a good answer with the stabilizer formalism when you just can represent classically some states, but not all of them. And it all boils down to the size of your group. The underlying Clifford group or underlying Clifford +t group, which is actually quantum versus quantum Clifford +t because the groups actually have different sizes.
So one question that some users might have, and I'm also curious, so when you're thinking about the group theory that goes into this, what computational tools are you using to figure out this group theory? I saw there was something that was a tensor network related function that was to remove cycles. Right. And so what are some of the group theory tools that you were using when you were thinking about these things in order to build out this functionality?
There's not much group theory involved in the computational purposes of those stabilizers. For example, it's very straightforward applying your Pauli operators to a state and see them at a day stabilize it or not. Something like this, that's like the minimal group theory application. There's no heavy theory involved in there.
And that's what you meant by a greedy algorithm to figure these things out, right? Is you're basically just seeing what commutes. If I understood your answer correctly. Yeah.
Okay. The way quantum states is turned into polystabilized object is kind of stupid right now, but for operators it's a little bit better. It's like I'm still. You can actually use. There's like basically two ways of doing this. If you. You can do it directly. There's some very naive algorithm of converting state into a stabilizer. Or you can actually convert your state into a circuit because we have an algorithm for that. And if that circuit can be converted to each individual operators, you can contract it into one operator and convert that. It's going to be maybe less stupid, but it's.
That is the advantage of dealing with finite groups. Right. Is that in principle a computer can just chug through the whole group and see what happens.
Yeah.
So I know that we don't have too much more time left. So if you have other questions, do feel free to put them in chat. So what are some other takeaways that you want people to have if they've caught this stream and they. They haven't been keeping up with some new developments here that we're adding to the quantum framework? Any other takeaway messages that we want people to have?
I would say Always install our packlet from our developer page because that's the most updated one. Our documentation is updated. So always check the documentation. If any issue, Let us know quantumolphram.com Feel free to reach out to us. And I have like, you know, one generic comment. Like, you know, remember, like, you know, everything that you see here, it is written in Wolfram language. Wolfram language is a functional programming language. So when you are coming to this environment, which is a mathematical notebook, keep that in mind. Like, you know, you, you need to speak the language of this environment, which is Wolfram language. Okay? It is totally fine. Like, you know, you can write procedural code, okay? Like, you know, it's not like, you know, not that it doesn't work, but like, you know, if you code in a procedural way in Wolfram language, oh gosh, like you're gonna suffer a lot. Okay? So like, you know, the, you would not appreciate like, you know, the neat, you know, features that this functional programming language has. And by the way, like, you know, Nick is sharing like, you know, the notebook. So if you just, you know, take, take a picture, like, you know, you can see the notebook immediately. So it's like, you know, the example that we discussed, like now it's going to a country, so learn the native languages spoken in that country. Okay? You are in like, you know, mathematical notebook. So try to write down your codes in a functional way. Because if you don't do that, like, you know, as I told you, you would not see like, you know, how powerful it is. Nick, what do you think? Any advice you have for our users.
Just contribute. I want more contribution. So if you have an opportunity to do it, please do. It's like right now it's just, I'm the only one just developing the functionality, but I would highly appreciate any help or like in any direction of quantum computation.
Yeah, and I mean what, I mean the lowest hanging fruit there, right, Is that so if there's some, some named circuit, right, where there's a common thing that you might want to do and you see it's not added to the list of named circuits that have that automatic support, but I mean you can build it using Gates explicitly and you can check out some, either documentation or some of our previous YouTube conversations about how you can do that. One, one very low hanging fruit way to contribute would be if there's a name circuit that you're interested in, feel free to implement that and that, that would be a really interesting and nice way to contribute. So I don't see any other user questions at the moment. So that's good. Hopefully that means that we've answered the ones that people have it currently and remember. So when you're dealing with the quantum framework, because you can handle either symbolic objects or numerical objects, these are handled differently in Wolfram language. So if you want to have things be numbers that have some, you know, machine precision, you can do that and sometimes be able to go through a computation faster, because numerical methods can sometimes be faster. But if you want to handle things symbolically and get an exact result so that you're not computing, you know, just some approximation to the theoretical result, and then comparing it to what you're getting on on quantum hardware, but you want to see the actual exact thing with symbolic parameters and everything, you can handle both sorts of things. So, you know, because the Wolfram language has support for both of these paradigms of working with representing mathematical objects, you can do the same thing in the quantum framework too. So that's worth mentioning. Is that another thing to learn how it's handled if you're wanting to use this framework, is that one over square root of two is a different thing in its underlying representation than that numerical thing that you're seeing by calling n there, right? I mean, in many circumstances it doesn't quite matter which one you're using, but in this language, they really are genuinely different things and so you can do different things with them. Okay, so still not seeing any other new user questions coming in. So again, thanks all very much for joining us today. If you have not been keeping up with some of the new functionality, remember you can install directly the developer version if you want to get the absolutely latest and greatest even before they show up. In the Packlet repository version, you can represent things as tensor networks, which is something that we didn't talk about too much last time. The stabilizer formalism has been added more recently, which is quite exciting. And the Wigner transform is another way of thinking about how do you represent quantum systems that has some interesting applications. And definitely looking forward to having a future conversation about Wigner transforms, because as we're just getting into at the end, there's some exciting ways that you can try to explain to people. Okay, what's the deal with this Wigner transformation?
Thank you, John. Thank you, Nick.
Thanks, John. Thanks, man.
And thanks for joining us.
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






