Quantum Basis and Quantum State

A technical walkthrough of quantum bases and states in quantum computing. Learn how to define bases with custom names, construct pure and mixed states using density matrices, test entanglement with concurrence and log-negativity, and manipulate quantum systems through purification and qubit permutation.
Chapters
Hello everyone. So the plan for today was to discuss quantum basis and quantum states and how can you create it in our framework. So Mads prepared some nice notebook with some homework even at the end of it. But because I know much more about actual internals, I hope to just improvise and show you how it actually works underneath during this discussion because. Yeah, why not? So, and without further ado, I guess I just go ahead and see what, what the hell is the quantum basis and how can you create it and make it work for our states and operators? Probably in the end. So the idea, the idea here is that everything, every quantum object in our framework has a basis. Quantum states has a quantum basis. Operators, measurement operators, quantum channels, and there is a quantum basis. Quantum basis is just some numbers assigned to each particular state. Because we work in the discrete space. If you have a quantum state, as you usually have, like already seen yesterday, if you have a simple zero, but it actually means that this get vector actually assigned a vector, right? And it's some computational basis, it has a vector. So if you ask, if you ask for a basis, you return a quantum basis for the state and we're just going to look inside of it and see what it actually is and then we just look ahead and help to create it. So quantum basis, and if it just contains, first of all, it has some names, as you will probably noticed. If it's a two dimensional computational basis, it has a zero ket and then one cat. It's a two dimensional computational basis, right? And each of those is assigned a vector. You can element. If you ask for elements, you actually get each vector, a vector for each of those names, right? Maybe a more convenient property would be just, you see an association of the kit with its representation, right? So for example, if you actually had some arbitrary state, if you give it four numbers, it's going to be two dimensional. Now it's going to automatically have a two dimensional basis underneath. So there's going to be four representations for each individual two dimensional ket. Right? Okay. So one, another point is that quantum basis is actually more, you know, here you can see that it contains some ket vectors. But because in general for operators there's also brass. This means that you also have like rows and columns, so it distinguishes between those. Usually if you have a quantum state like here, your basis only going to have an output basis. An output basis basically means that it only contains the ket vectors. But just a preview, if you had an operator like a Hadamard, its basis, if you ask exactly the same Thing as above, its association going to contain like these are matrix elements where each element is some kind of also have a similar representation which is going to say it's just like a tensor product of 0 and 0 here or tensor product of 1 of 1 here. But it's like nicely packed in this combined representation. But underneath it actually this combined basis is also is just tensor products over input basis and an output basis. It means that it has a representation for brass and cats individually like this. Sometimes it's the sparse array, sometimes it's not. It doesn't matter in sparse arrays. It just helps you to pack things more tightly if you have a high dimensional. So okay, we just go ahead and create some other types of basis. For for example, if you just provided an integer, that's how you can create basis basically by yourself without underlying states or operators. So it's a three dimensional basis. It means now has a three associated names with three corresponding representations. Right. If I have provided two numbers it's gonna by default the first one is going to treat it be treated as a dimension and second one as a multiplicity. So now you're saying for a quantum framework to create a basis of three qubits or three two dimensional qubits. Right. Now it's a free. It's like this notation, it's hidden by default but you can kind of see and interpret it as that. This is the output state. It's a quantum basis with free output quidits in zero input quidits. Right. A hidden feature. Right. So this is a. In total it's eight dimensional basis. Or you can just provide a list of dimensions. And now you can have like three output qubits with three different dimensions. All right. You can even specify your own names and your own representation by just giving it an association to quantum basis like that. And now it's association going to campaign whatever you're giving it. So if you. And you can use it. Oh, I'm going to show it later. And you can use it to create your states with your custom basis like that. Right. And of course there's many name bases like that. If you like use an after complete feature. Why is it skipping anyway have like a Pauli basis like X, Y and Z which related to the eigens vectors or Pauli matrices. Like right. You can create see the actual representation for all those. You can create states and operators in those basis too. All right. I guess I can also say at this point that maybe these are some questions at this point. Is there some questions? Guess not. Yeah. All right, I just wanted to say some additional feature on top of the quantum basis. Quantum basis is a higher. It's a higher object in this framework. There's a lower one because as I said, it contains both input and output basis. So it's kind of the same thing that works both for states and operators and other stuff. But there's a lower level thing which is just works for a single or input, an output channel. You can see like that. And it kind of takes the same arguments. You can also create the skewed basis. Basis is a single thing without any extra stuff like separating inputs and outputs and also having the labels like computational and pictures. It's kind of. That's why quantum basis is a more high level thing, has like pictures, labels and. And QT basis doesn't have anything like that. It only contains the associations with the corresponding representation. So you can work with QD basis directly if you want to create your quantum basis out of it. All right, so now we're going to go and describe some creation of quantum states with those custom basis. So as, as you recall, maybe we already told you about how to create quantum states. You just provide a list of amplitudes, right? In the traditional form you already know what it is. If you provide a list of amplitudes, it's gonna. It's the numbers that kind of displaced near your kits, right? That's a. By default, it's a computational basis. So you provide amplitudes for your zero and one kit. Okay. In three dimensional it's going to be similar, but now you have an additional number two or it's number three if you count from zero. Okay, but now no. Okay, yeah, but if you. If you're going to. This comment says that if you provide less amplitudes then the power of two is going to automatically pad it because it by default assumes that you only deal with qubits. So. So it's going to pad that additional 1:1 ket by 0. So we don't see it in the traditional form, for example, and its amplitude is actually zero. Right. So here's some reminder I guess of how to create states. Okay. I guess at this point we could just say show some of the examples how we would create state on the different basis. So if you. As a path, if you have an amplitude for quit it, you can just say in what basis you want to do. You can, you can just provide the name or you can just provide a whole basis if you want. If you construct it is customary with some names, associations or whatever argument that works for quantum Basis should work for the second argument of your quantum state, specifying what basis you want your quantum state to be. Right? So now in traditional form it has a new names that correspond to a new basis, which in this case a power legs basis, right? So, and this is the same amplitude. I think it's important to, to know that it's not converting your computational basis with A and B amplitudes into the Pauli X basis, but you provide amplitudes in this basis. So it's like important distinct, it's important to distinguish those. If you want to actually kind of change the basis from this, from this one to your X basis, you just make an additional wrapper. Now if you have this computational basis, you want to convert it to an Pauli X basis. This is how the change of basis works. Right now it has an actual new amplitude. And now because it's a conversion, this kind of equality holds, right? It doesn't matter whether you change your basis or not, or if you solve it times shows you each individual equality or equation for each of the amplitudes, right? If you solve it, you solve the amplitudes. Amplitudes are the same. Okay, maybe something more advanced. Maybe we should try some 2 qubit basis or 2 qubit one in a sum and the product of x and Y. Or maybe Fourier. Right now it's just two quidit basis and a composite basis. Two quidit state in the composite basis where the first quadit is the next basis and the second qubit in the Fourier basis. So you can do things like that and the similar stuff as above, changing basis works and you can obviously do it with the matrix. I guess I can also solve the matrix case if you have a ABCD density matrix in the X. Now it's a mixed state, mixed matrix representation state in the new basis, not the computation. Okay, what else? Okay, any question at this point? List of the built in basis states, the actual list. Oh yeah. If you don't want to use autocomplete, it's not exposed in the global system context, but you can extract it from package scope. There's a bunch of variables that are not exported from the package in the package scope. And all of the names, usually named variables usually start with a dollar sign. So if you want quantum basis pictures, maybe it's a qutit basis name. I guess it's gonna. Yeah, that's how you can get the names for the that work for your QT basis. So if you actually map QD basis or quantum basis over it, you get. If you don't, without any arguments so either queued basis or quantum basis should work. Just quantum basis assumes that by default you're creating an output thing. Okay. So QG basis assumes that you're creating a qubit as an output. Okay. What was the other question? Is it possible to see this basis in block sphere representation? Sure. If you have a quantum state have a property for quantum states. If you have random P1 for example have a block sphere blowtacking which has block sphere. Blocksphere. That's how. That's a graphical representation for the quantum state. Right. So you see the usual basis but there's no way to customize it. But we can create it here just it's a nice idea maybe to customize your basis that you decompose into my default. Yeah. So if you. So it's not going to change if you have an X or 01 it points this one. It doesn't matter which basis you are creating it. It's going to always point. Oh, that's what. That's it. Because I'm not converting the basis but I providing amplitude synthetic spaces. Right. So you can can move R like this. I guess if I do the other way around it's going to point to plus. If you want to do in Y basis point to R to the right ket but 01 going to point to the L. That also works for mixed ones. Random mixed make a box sphere. When your arrow is not necessarily. Much shorter than the radius as expected. We're going to just update this notebook. As soon as I finish with this. I'm going to just put this notebook as I type it in in the series materials. Of course I'm going to just delete this notebook here. I'm going to upload it. Right. Okay, moving on. What name states? Name states. Yeah, because we are discussing states. Yeah. There's a similar similar to quantum different quantum basis names. Of course as we already seen we have a bunch of you can extract it similarly have a quidit basis names. We also have the quantum state names some reason Patrick scope floats additional for additional time. And this is the kind of named states that you can create. What is the most interesting one? Here's a Werner state. You probably know Bell State Classic 1 GC. Graph state. I think it actually takes a graph. I don't remember how to use it. All right. Yeah. So this is like going to be create a state with seven quidgets which equal to the number of vertices in the graph. I think it's similar that we already showed you last time for the quantum circuit. The same Graph or similar one. Just compile the circuit to apply it to an empty register state. Resulting state is what, the same as this one? Maybe. But maybe it's something different. It doesn't look the same. Yeah, it's a loop. It's something different. I don't remember what the actual. What the graph is. I'm gonna leave it curious curiosity sake. Okay. What kind of. Well, uniform superposition is very common state. Basically what you get after applying Hadamard to your empty register. Right. Uniform superposition is just a simple superposition with the same probability. And you can for each of the ket states. So if you give the qubit number of systems now it's a uniform superposition across three qubits. And you get this thing right. And this should be the same as applying adamart on all three Q digits on an empty quantum state register of three systems. All right. All right. So now I guess I. I'm gonna tell what you can do with the quantum states besides just creating it. Some. Some arithmetic works. So you can multiply quantum states by some coefficient number. So just symbols. Because everything's symbolic. You can add them up and get like a resulting state, which is what you would expect it to be. Right. One of the things that. For people who like nice notation. If you want to actually show that you create the state as you usually create it in the usual mathematical notation, if you evaluate your things in place, you can evaluate in place every sub expression, even inside your input cell. For example, if you select your quantum state, evolate it in place, you get this nice output summary box you. Which you can again select and convert to the traditional form as we already taught you how to do. Right. So you can do it like this. And you can do it for every state. And now you have a nice notation which also evaluates to a box. But you can. That you can still create. So you can still turn this into a nice traditional mathematical notation. That's a nice trick to know about. Okay. Which are the output forms that you can apply to quantum states? Well, only the traditional form. Traditional form is just. Yeah. By the way, I should say that whenever we say whenever we press form traditional form. Because there's only a traditional form and a normal form. Traditional form is just the same as task for formula, maybe formatted differently. Traditional form is just basically asks to show you the formula for the underlying state or operator or measurement. Operator channel itself may be an exception as a quantum circuit. For quantum circuit. Traditional form is just a diagram. Yeah. And there's no other. Other forms. If you have any suggestions? Maybe? Because usually it's like what kind of formats there. There's not. There's no like distinguishing between in the Wu form language. There's just a few forms to work with. You either type things in your cells using the input form as an output form. You usually see a standard form and traditional form usually used for mathematical nicely formatted notation. There is no like other choices to choose from. There's like a formatting style that's a bit different things. Right? Okay. It's kind of side. Okay, you're presenting all matrices which are two dimensional. I mean polymatics. I want to know these positions in general. What do you mean by general? I already showed how to make a arbitrary symbolic matrix, not just Pauli one. So I'm going to show you what you mean by general two by two matrix for a basis. Maybe you mean can I use a representation that is symbolic? I know we have to clarify it. Then the unit metrics. But what do you mean whether should they use it? If you're using unitary matrix, you usually mean you have a quantum operator that is unitary. And you could use arbitrary matrix for your operator. And you too. It's a. It's a quantum operator story. Basically we have to have a quantum operator. Okay. It's a preview of quantum operators. Right. We also have different name quantum operators. I think you have U here. See. So you can have. You can create U operator. I think it takes three arguments. Create a quantum writer like that, which may be the familiar matrix for it to you. This is an operator of the unitary thing. It's a usual presentation. Very, very common quantum parade or quantum gate, a parametric one. You can construct anyone, any single qubit gate. You can just construct by using this guy up to a global phase. I believe. All what else. Normal. The question is. Normal is a. When I apply normal, normal is not a quantum function. Normal is a general Wolfram language context converts different stuff to some normal representation. It's like if you have. For example, if you have a sparse array like every matrix, Again, if you convert it to a sparsely it has this special representation, but it has a normal form. It just looks like a nested list. There's a bunch of stuff in the Wolfram language that can be normalized in this way. And we don't have any normal for quantum states or quantum parameters. When they probably called normal quantum state. I actually called it for the sparse arrays in the association or something like that. I don't remember. Normal doesn't do anything for the quantum states at this point, I think I'm not sure what it should do. All right, I think, I think I've done with the question. I. No more new questions that I haven't answered yet. All right, moving on. What, what else? We were discussing how, how we, we can use states to do some arithmetic on those quantum operators. This is some clarification that it's. That's already told you how to do that. You can convert states to a different basis. Yeah, this is just a change of basis. Okay, now we should discuss I guess the different functions that we have to work with states and. Yeah, the basic quantum framework functions. So the one very use, very useful one is to do partial tracing of your states. If you have a state, this is just our single qubit, you just create something arbitrary. This is a symbolic one, a two quit state. But now how do we discard or trace out which are kind of two different operations. But what you usually mean by tracing out one of the systems, because this is a system of two qubits. If you want to trace out the second one, that's what you usually get with a complete expand. In this case, yeah, it looks like it didn't trace it out, but because when you usually trace out one of the systems you get a mixed state. Because now it's a matrix state of 1 quit. And because it's a matrix state, it contains two row and column indices. So you have to display it as two kind of things usually. This is one of the point that we should have done earlier. If you have a quantum state, which is a mixed state or matrix state, right. Usually see in the literature that you have like for example, if you have any random mixed thing, it's a raw density matrix which usually abbreviated by raw, right? And you usually prefer, see it as a, as this thing actually not in this notation when you have a double ket, but a BRA and ket. So you actually prefer to see your density matrix mixed state as an operator. And we kind of distinguish it because it's not, it's very ambiguous. When you display your state that looks like an operator, right? Because it's not by default, it's not an operator state. So it only have to have an output, so it only have to represent it by ket. So it's important to distinguish when your state either it's a pure one or a mixed one. It only should contain ket vectors. But an operator is something that contains both input and output. So it's allowed to have inputs. Brass and kits. So your mixed state is displayed usually like this and that's why when you trace it out your pure state, if you trace one of the qubits in your pure state, you get a mixed one, which is a matrix. And that's why it shows up like this. And if you actually show it as an operator form, maybe that's more maybe together. To group some of the things. Right now it's a more familiar form of a matrix state that you get after tracing out one of the qubits. Okay. And partial trace. Yeah. So the notation for partial traits works for not just states, it works for operators, even for. It's not shown here. But you actually can trace a quantum basis itself. And what it means if you have a quantum basis, two systems and two different ones, X and Y Pauli basis. If you trace one of them, you just get a new basis. So you can just discard it. In this case you don't have to trace some arbitrary matrix. In this case it just means discarding one of the systems completely. So you can use this basis for. In your newly created states, for example, or just change basis in this new basis and things like that. All right, so this is the quantum partial trace. By the way, if you have a function, you have like a quantum basis functions quantum state basis. The documentation ready should be come pre installed with your packet. So the usual way how you search or browse documentation in your session usually should work for the symbols in the packet. So it's the same as online documentation in this case. So there's more examples. So the quantum basis and the partial tracing, there should be more examples about how to use it. Yeah. So this is example tracing out the quantum basis. All right. Oh yeah. I just realized you maybe haven't seen them. The notebook that they showed. Yeah, because I was sharing. Hold on, I just want to show it. What I meant the documentation. What I was showing is documentation. All right. And that it works. Okay, moving on. Next we have a. We can test for entanglement. So usually when you create a state of more than one system, so more than one qubit or qubit. Right. For example, you can create a mixed state for two qubits in whatever way you like. For example, this is a named furnace state, which is. Which creates a mixed state of two qubits, you can ask whether it's entangled or not. And for this particular named state, for the runner state, there's a property that if you have your probability here is more than half, then it's not entangled. But as soon as you lower it below it now it becomes Entangled. And I can explain, I guess what. What does this entanglement test actually is doing in more detail. So what is actually happening? There are a bunch of. Oh, okay, I'm just gonna explain it a little bit later. So. And you can do it for other different steps. And you can ask which particular systems if there's more than two, you can ask which pair you want to ask whether those systems entangled or not. Okay. And underneath it what is doing is computing some something called entanglement monotone on your quantum state. It's some numeric property. We have a bunch of those monotones implemented by default. I think it's a concurrence. Right? The concurrence entanglement marathon is just a number. So you give it a state and it just computes some metric basically describes some kind of degree of entanglement of this state or systems in this state. And then there's just some equality that's happening. If it's for example, this thing is entangled, but this thing is not because it's a zero. And I think condition is when it's not zero or higher than zero, then it's entangled. And I think it works. This kind of condition works for all kind of different monotones here. So for example, lock negativity. Lock negativity for this state that we know this not entangled is still zero. And. And how this what is entanglement monotonous computes in detail also can explain a little bit further because when you create a state, because you can test quantum states, even if they are not directly shown as a two system states, for example, you can create an arbitrary like four dimensional state. Right now it's a one qubit. I think you still can ask whether it's entangled or not. Oh yeah, you can do it and what it's doing underneath it by partitioning your state. There's a property for states called by partition. You see, by default it will before bipartisan and it was a single four dimensional qubit. But after bipartitioning now it's a two qubit, two dimensional qubits. And now you can ask of this particular state, because it's an equal one should be equal to it. You can ask whether those particular systems that bipartitioned into whether those entangled between each other or not. And you can do this repetition for any kind of state. So it just divides your dimension with some. Maybe the more advanced example would be for example, if you actually have create not a four dimensional one, but. 10 dimensional. Now it's a 10 dimensional thing. Now if you by partitioning by default it's gonna create 25 by 2 because 10 is divisible by 5 2. Or you can do it the other way around. If I say the first system, make a first system two dimensional. Now instead of five two, it's two five. And if it's some kind of other number that divides for example 12, you can make 2 by 6, you can make 3 by 4, 6 by 2, so on. You can even make 12 by 1 if you want. It kind of looks like it's the same as. It's the same as before, but. But in principle we can support one dimensional qubits too. They're not useful, but we can kind of work with them too. All right, I think it's time for questions at this point. All right, if you have any random state, how to check whether the state is pure or mixed? Well, it just says there it's a random one. Right. If you actually create it like that, it says right here. But you can also state with a property your state. But you can also ask it for a mixed one. So it's over matrix states. Right. This is a mixed state which contains a density matrix underneath. But you can still ask whether it's pure or not. But it's not pure. But there may be a metric state that is pure. For example, if you actually convert, there's a way to do it. It's like if you already created a pure one and you just turn it into a metric state. Right now it's still a pure state, but which is represented by a matrix or by a density matrix. Right. But because I've created it from the pure one and the density matrix can be only have a single eigenvalue, non zero eigenvalue, it's a pure one. You can say either just look at this information in the summary box or the pure state Q property will tell you that it's mixed or pure. I guess this information here, besides having possibility states, it's either pure mixed and it's also possible to have generate I think basically a state with those zeros. I think that only three possibilities there. Yeah. And it's also known when we unknown matrix, if you have a matrix, maybe symbolic one for which it's impossible to compute eigenvalues or compare them, but it's zero or no, it's going to be an unknown state of matrix type. So this is the kinds of states that you can create. Okay. I hope it answers the question. Okay. All right, so now we just gonna explore some more additional properties of states. Okay, we already explored that. We have the way of creating mixed ones, pure ones. Here's just a list of all the properties that a state can have. It doesn't matter whether it's a mixed or not. The list of properties would be going to be the same. And now here is also the. Some of the. Yeah, some. Some mention of by partition that I already did. Okay. Decomposition. Well, decomposition is a. Interesting thing. Yeah. So it's a way of doing. Of decomposing your state into pure or separable components. I would rather say. So if you have some random 2qubit system 2qubit state like this, right. It's usually some kind of looks like some inseparable gets inside of it. But you can decompose it into sum of products. So for example, if one of all those are. You can decompose it into a sum. So the outer list says that it's sum and the product. And this is only contains a single queued state. And you can say. You can kind of. Oh, I kind of have it the same here. But it's not for the. Is it. Just. I wanted to show it in the computational one because this one is some new basis that we converted it into that looks like basically a single get vector which is not normalized. And you can recover. The idea is that you can recover your initial state from this decomposition by just doing quantum tensor product in each individual pair and then summing it up. This resulting state should be equal to the original one. But you can use this decomposition to do some interesting stuff. Maybe it depends on your application. All right. Disentangling this is very common to decomposition. But instead of having a pair of the single queued things, I think it just already pretensor protected. It's a decomposition, but you tensor protected. And I think if you have a disentangled state like that, you just sum it over again. We cover the original one and we have a bunch of stuff like this. You have a purification which is a more such thing. It's like if you're given some mixed state in three dimension and you purify it. Well, it means that if you trace out one of the systems, you should get the original one right. It's like add one additional purification means it's like asking for what would be the additional system that you have to product it with the original one so that your output one as a pure one. But if you trace it out that system that you just added, you recover the original state back. The idea for this is the idea of the purification. Okay, this is a bunch of interesting properties. So maybe there's some questions about them. How can I in the state description with just a click. You're asking again about this kind of manipulation. It's just. I'm just turning it into a form and normal form. I already. I think I answered this question in the community forum post somewhere because it's a common one. So maybe just there's an actual key bindings how to do it. All right, all right. What else do we have? Oh, some kind of structural manipulations. Because we. Well, we have a bunch of properties of states here. Some of them are making you decomposing your state or. Or like purifying it. Those are actually manipulating amplitudes. But there's some also structural things like if you can just swap states around. So this is like a underlying thing without making the operator permutation operator and acting on it in the circuits. In the circuit environment you can just manipulate states directly like permuting qubits around. For example, if you had this kind of state amplitudes going like this. If you permute your second and first and second qubit swap them around. You should be seeing amplitude change a 2 go to a 3. Because 0, 1 and 10 should swap around. But everything else stay the same. Yes, this is a just swapped around the qubits. So crisscross those amplitudes around. Okay. What. What else we have a projector. An operator is a kind of very similar thing. Yeah. Operate of property. I already showed you in integration to density matrix. Right. If you have a. If you had a density matrix state, its operator would look more similar to you in terms of traditional form. But what it's actually is underneath. If you have a pure mixed matrix state doesn't matter projector. It just kind of makes. It doubles your. First of all, it doubles your number of systems so number of qubits. Because you see, it's like before it had I plus this two quidit state projector doubles the number of qubits and also doubles it in a way that creates not an input one, but an output one. And this is kind of a hacky way because now you can ask doesn't look like state anymore. And you're right because it's not a state. It's a little bit of a hack. If you ask for projector it says pure map. Right. So this way we can represent states. That's how we distinguish states from operator. So apparatus is kind of can act like states but they have an additional order because you can Think of operators more like a gates because you know where you apply it in the circuit environment. But you can still forget about circuits completely and work with pure maps. But they're going to be displayed as states. I don't know how to just explain it more clearly but basically we're cheating a little bit here. We can. Our states are more general than actually states. We can. I told you about that. It can be either pure one, mixed one degenerate or unknown state but actually can also be a map and even depending on whether it contains brass or column vectors inside of it which can. It can only. It can also do. And if you wrap around well, basically if you're. This is like if you have an actual quantum state it draws in it which is a pure map. Actually you should just wrap it with quantum parameter. It automatically works now it's a more. Usual representation of this object if you say if you wish it just sometimes it's just very useful to work with quantum states instead of quantum operators that also have this additional other thing in relation to circuits. All right. We maybe we will discuss it a little bit more detail in more detail later. How can I get a list of name states? I already showed you list of. You have to dig inside of the quantum framework code. It's inside of package scopes. We have a. I guess I can say what kind of different named things we have listed here have quiddit names, basis names. You have quantum state names. You have operator names, you have quantum panel names. I think we have many quantum measurement operator names, but I think I still have them. Just one we are not going to include it. And we have quantum circuit. And maybe. Quantum distances maybe useful one and. Covers the most of the named stuff that you can just use in relation to those objects. Give it a look. Diagram. Diagram is very important useful thing to know. So okay. It's very. It kind of explains the situation of projectors turning states into operators and back. So for example, if you have just a pure state like this, you can represent it as a simple diagram. It's not a circuit diagram. It's some. It's just a simple graphical object that shows you what is this object in relation to string diagrams. If you know what is what string diagrams mean. That would be the usual kind of notation of it in the string diagram case. And what it means here just shows you the label and how the outputs and inputs are how many of them and what are they basically for your state operator channel whatever it is. For example your states when they are actually states when they Say that it's a state. It usually means that you only have some output or multiple outputs. Like here it has one output, here it has two outputs, right? You can have three outputs. That's what I usually mean by a state. Also if you take a dagger for your state like this. Now you can turn your state into a bra or cats into a bra. And your state is technically called effect. It's another thing and it's diagram. It means you turn it your diagram around. Now your outputs become inputs. So if you have a diagram that only contains inputs, you technically call it an effect like this. And underlying diagram looks like this. And for quantum operators, when you have both of those you also have a diagram. But now they're going to like be displayed as a box with both inputs and outputs. And the usual gates in the quantum circuits. Like let's take a full year one. It can if you have more, if you operate acts on more than one qubit, it's gonna just gonna have more outputs and inputs. But it's the number of those gonna be the same. That's usually. That's what the gates are. They have the same amount of inputs as the outputs. And that what distinguishes it's a more like advanced thing. What distinguishes usual operators in this framework from the measurement operators, Quantum measurement and channels. And also channels quantum measurement par diagram would actually contain default. It's going to look like it's going to be some. We just change the basis show the basis label. But if it's a projective measurement it's going to show up as a. As an operator diagram. But if it's a POVM or because we turn everything projection even projective measurement into poem in the end they actually have more additional output. That's what you see quantum circuits with measurements. If you have a diagram for the quantum circuits you have this additional arrow. You have like usual operators like this just have the same number of inputs as outputs. But quantum measurement you can discrete and pretend that it actually has one more additional output that outputs stuff to a classical to a classical channel. And that's why this kind of diagram that only displays its outputs kind of shows it. And you also have the similar one additional output diagram for quantum channels. Create some random channel like bit flip. This diagram is going to also contain one additional output. It's not shown in the circuit diagram. Unfortunately that's. That's what we are thinking about how to actually show it. Because it's not storing that additional output anywhere, it contracts it immediately. That's the property of quantum channel. So when you measure stuff you kind of outputting your additional outputs into some classical channel bottom how quantum channels act. They also produce this additional output underneath. But you immediately contract it. So that's why you're not displaying it. But it actually underneath it contains this additional thing. So in this sense quantum measurement and quantum channel the same thing. All right. What's the shortcut of okay, how I did the dagger here? Well the usual do is you. These are dagger thing. It's escape dg. That's how you create a dagger symbol. Right. But there's a. It's a property of the whole home language. If you have this dagger symbol in your per script or power. Right. And underneath it interprets it as the super dagger. It's a special symbol. And that's when you have this special symbol acting on a state. It knows that you are daggering it taking it conjugate. We can just. Instead of doing this fancy notation, you can just use a property called dagger which is the same as this. About big picture and books. Oh, I don't know. Well actually I can advise one more. I have a one favorite picture when I learned all this diagrammatic approach to quantum computation and quantum theory in general. It's called picture in quantum. So it's a book recommendation Picturing quantum diagrams. Something. Quantum diagrams. I don't remember how could not the diagrams processes. Processes. It is by. Okay. That's when you can learn all about diagrammatic approach to all about this kind of boxes and how they compose and all other stuffs. All other related stuff. I don't think. I don't. I have another recommendation. But it's a. That's. That's a good one. All right. Okay. Other questions. If you do a circuit diagram. Kiskit is it pure kiskit or inverted? Oh yeah. We. It's kind of using an opposite convention to Qiskit1. So as I know qiskit numerates quits from bottom to up. Right. It also. If you have a quantum circuit. We just enumerate our Q jits in a normal sense. This is like a first one, second third one from left to right. Right. I think qiskit does it in a different direction from bottom. It also has a measurement line. If you have an actual measurement operator applied to it compost. Also TSCIP likes to show the measurement line on the bottom. There's a reason that we by default showing it on top. Likes to show it this way. But there's a reason why we showed by default on the top. And maybe I can explain next Time why it's related to how do you treat these outputs? Because this additional one is on the left right for the measurement thing. The classical one is the left one makes sense to put it on the left. So if you treat your circuit from left to right it's on the left to the output. So it kind of makes more sense to put it on the top. So that's my interpretation of it. Parallel computation so does the framework allow parallel computation? Well, it's kind of depends what you know you mean by that we have parallel functions some parallel support in the Wolfram language itself. But if you mean whether we use it anywhere inside of the framework. No, we don't use it anywhere and there is no much. There is no many places you can use it because in what setting you want to use a parallel computation. If you want to compile your circuits parallel. It's a hard problem already because all the compilation production great compilation of circuits we can to we can't do anyway we like rely on something like qiskit or other frameworks. We have like we have two separate backends in traditional to a pure Wolfram language that just contracts tensors in the tensor network. We have some Qiskit translation combining there which may be using parallel parallel code in order to do that but we not doing parallel directly unless the contraction of tensors doing some parallel computation underneath which I don't know, maybe it's doing something parallel but it's a. At least it's a vectorized nicely vectorized procedures so they can should work relatively fast if you're just dealing with numeric values not symbolically but if your circuits and operators have symbolic values in them. So it's kind of harder so I doubt it's going to be some part of there and so I don't know. I'm not sure how to answer. Okay, how many. How much time do we have left? We're already seven minutes over. Oh yeah. Really? So time flies. I just don't remember when supposed to end. Okay, then we should. There's some kind of. I just mentioned that Matt's created some homework for you to do here. I haven't seen what it is all about myself much, but you can. We can save this notebook with the stuff I wrote in it in the. In the materials folder and you can go ahead and solve some problems that. That are in the end of it and that should wrap it up.
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






