- "Why do you want an iPhone"<br><br>- "I don't know, it looks cool."
stringlengths 1
962k
⌀ |
---|
let's talk now about entanglement so so far we talked about superpositions and basically so far so good so this means you can see that a system made out of three cubits kind of B he's like three cubits together kind of right so you can apply gates and different things and then you know earth matically and intuitively it all makes sense the problem is when we start using as we saw in the arithmetic video when you start using certain gates that like in effect two cubits like the control operations you you basically get those qubits entangled this is the reason why this happens is just quantum mechanics is so the physics really underlying the implementation of those of those quick qubit and this is good and bad at the same time so it's it's good because it allows us to to kind of create correlations and the most seem the simplest the simplest of them is this one right so you apply Auto Mart and right into your first qubit and then you're gonna use that keep it as a control qubit or something else so literally literally now you've create an entanglement between these two qubits because you're not gonna no you're not you're not able to know what the value of these QED is when you measure it unless you know this one and vice versa right because basically the country whether this whether these ex gate is applied or not depends on on on whether the qubit is it is in a state 1 or 0 and incidence for position of both some and you know what what this really means is that you cannot you can once this has happened you cannot really explain or you cannot just take a look at each qubit separately and then and then understand how the system is made overall because this cubed if you just think you look at this cubed right basically it is a superposition so it gives system sense you're 50% 1 and if we take a look at this cubed after this operation it's also in a superposition you know someone because we don't know what has happened to the control gate but then if both if you know if both are like fifty percent zero fifty person one you in theory classically you would say if if if cubed one can be 0 or 1 and cubed 2 can be 0 or 1 then basically with 50 percent probabilities then basically you would say then my overall state is a commune ition of all the all the possible all the possible values right because because basically each of them can be in all the positions but that's not really what happens here as you can see here is um and ignore ignore the first the topmost key maybe I'll just exactly so so basically now you've got only these and this state are possible so this means that they will always agree when you measure one of them um they will always like the other one you will know immediately immediately he will know what the value what value it has and um I said this this is good and this is bad it's good because it was it asked to create correlations this means that we can implement algorithms to share information algorithms to share sort of you know secrets between each other because of you know those these types of correlations and but it's bad because at the same time it limits the way we can use is it's it makes the way we build circuits really unstable and we'll see this in the next videos but basically the idea here is when whenever you're using qubits if now if now I were to reuse this cubed for something else right I might end up spoiling the other cubed right so if I but if I if I do something you see by applying a hot amount here I've basically also done I've changed stuff in the whole system and that's me that's a bit messed up I can't come on example but that's basically the idea is because it's entangled we you know basically you risk spoiling all the qubits and that's something that you have to be careful with and I'm gonna I'm gonna think in then in the next couple videos we're gonna give an example of how to solve that problem but basically intuitively that's when you have to understand that entanglement is good and is bad at the same time because it makes our circuit circuitry delicate and but it's good because it allows us to do things that we cannot do classically |
okay so um this is the paper i was recommended to read in terms of just to close up on the um parameter sheet uh primachief rule and i've been quickly scanning these now and i'm quite like so there's some things that i want to take a look at uh first of all the paper talks about the um uh the primary chief rule is a promising approach to available ingredients of chromatic quantum circuits it's the promissive rule states that if the generator of the gate g has only two unique eigenvalues easier in e1 then the derivative of the circuit expectation with respect to the gate parameter is proportional to the difference in expectation of two circuits with shifted parameters so this is and at least he is is put in a more you know kind of neat way so you've got like the general formula in here what is the generator of a gate because whenever i hear the word generator i feel like groovier or something gate generator or quantum game generation roots of quantum logic gates what is this this position case will establish general relations fundamental quantum gates the explicit form of the generator and roots of matrix gate so finding the generator of a logic gate helps understand the underlying logical operation while any root of a given kid is itself a new kid i guess what they just mean is the matrix but i'm not so sure now so the two unique eigenvalues is what kind of um yeah what makes so it's not the symmetry that i was talking about but it's this question of why why is it like that it's two eigenvalues and maybe that's kind of what really gives because if i remember well let me just open up just open up the portfolio stuff it should be the notebook because if i remember well um yeah that when i was just playing with with the you know y and x and power rotations they all kind of had like and they do have to unique kind of eigenvalues one and minus one right and and actually they they do then like actually have you know the uh so you have the eigenvalues right you do have they do have like i mean if i just uh calculate the eigenvalues of z so did i import all these i think so what's that of x you know z like just you do have like you know these now the question is if the paper means like strictly too unique or like if it has more than two but the uniquely looking at it it's just two then it's it's enough because that that really kind of uh tweeter what was i that really when you do these when your circuit is just like these right and you even just have like like a one cubiet and then you do the tool d plotting that's that's what you get right like that's it's that symmetry which really allows you to do that as soon as you add as soon as you add like okay but it's about the gate really so the problem that i'm having here is this is really about the gate like if i'm adding if i'm adding another qubit um and this qb just has like uh say like x pocket exponent like whatever right like so but we're just parametrizing one sorry these should be we're doing so we're doing the same set and i should change this because it yeah whatever oh god like i just don't see the symmetry here that's the thing the thing is that that just becomes quickly messy right so that's what's not clear wait a second we're talking about we're not talking about we're really talking about yeah that's wrong so we're really talking about the the condition is not on the observable eigenvalues it's on the gates eigenvalues and so if the gate that i'm using is the y gate but really like what we're having here is actually like the chronicle product of these two that will be that would be the gate that we're having so but i think that's what the paper is claiming is that you can if you can decompose that then it's fine but if because if if i'm now okay so let's do it like this so what's the what's the gate of the x the the y palgade what's the sorry what's the matrix can i get uh i mean i just i guess it's so circ okay you return matrix okay i just want to make sure i don't make mistakes okay uh circuit i'll get the circuits unit target that's what i want to do so once i have the circuit i get the unitary if possible okay cool i like that so it's not the observable it's really yeah yeah right if the generator of the gate g and that's the unitary yeah yeah that's that's not like a here is the observe the observable okay cool so if i have the circuit now say print print media circuit unitary please please okay do i have to actually give it like i think i have to give it a yeah there you go okay so you have these call if i do if i do print the eigenvalues of of that so so all what i want is the unitary and then what i want is the the circuit eigenvalues and so we want these to be here i don't think that's what i want though yeah so you've as you can see here okay so can i just add this modifier here doesn't matter because i see it's a oh yeah no it should be just complex numbers wait a second yeah correct okay the fact is that there they are the fact is they're not like unique right so they're not two of them so it's one plus one plus one j like or almost because it's really small e like minus sixteen two plus one minus one plus yeah almost kinda zero effectively zero plus one so basically they're not too unique and so this means in theory you should not be able to apply these into this circuit now that is why that is why these differentiation rule shouldn't be applied here now this this claims here that if you um if you can't break this down into uh indicates where you can do that that it should it should work gradients of such concern okay so yeah promising approach to the classical optimization step include creating the sense the primary chief rule approach to quantum gradients can only be directly applied to gates with two unique eigenvalues however here in we will discuss how parameter shift gates can be evaluated for a much wider range of parameterized cases in the product rule of calculus provided we can decompose our gate of interest into a product of gates which each of which is primary shift rule differential differentiable we will exactly but that's the key right it's parameter differentiable now each of which is primary shift ruler for two cubic gates it's going to supplicate the composition in detail okay let's try to do so in classical simulations we do not need to resort to the parameter shift rule since we can apply non-interpreters to we'll conclude with the discussion of how deficient calculate gradients of quantum circuits are classical hardware let us review why the permission works suppose that generator at the g to gate is unitary as well and then the prefactor and then g is also important and with euler's identity we can express the gate as okay so that's the idea why this works is because you can express it's because you can express the gate like these and because it's a cosinus and a sinus in those both cases we know that that these differentiation rule works this is y i'm not sure i fully understand it but i like if i see these i i get it so just thanks to the fact you can express it like these then you can do the differentiation the key inside is that even if g is not unitary unitary if it has if it has only two unique eigenvalues then we can always convert the generator the generator a j to unitary operator by adding and multiplying by real constants the additive shift can be neglected since it only adds an irrelevant phase therefore for any real constant a and hermitian operator g with two unique eigenvalues we have these up to a phase and a special case of five we have okay now that the river that the derivative of the gate is okay so yeah yeah the root of the gate is like you take the exponent down minus iag whatever so we can now derive the primary chief rule so they go ahead and then okay they they replace these stuff uh yeah kind of we write out the gradient using so then the product rule blah blah blah note that the value of the shift constant depends upon the parameterization for instance the one qubit power rotation gates are all parameter shift differentiable with r one half here the pilot mattresses on the other hand it can be more convenient to represent the same gates as powers of the pauli operators but in that case the shift constant is pi divided by two okay how do you find that though how do you find the shift constant constant i don't know primary shift gradient via gate decomposition okay a direct application of the parametric rule requires that the generator of the gate have only two i can have only two eigenvalues however we can evaluate gradients for gates that do not meet this requirement by decomposing the dynamics into a sequence of gates each of which has generator of the requisite form as a trivial example because it took you canonical gate this kit is interesting that's the reason i actually have these i actually opened that because i forgot what those gates were the icing gates but you can see already here that they also have this form it's in theory if i should be if i could decompose like these right into yeah well i i know i can't because i know it's this y and these x it's just it's the chronic product of those so i know i know i can because i just made it up like these so but how do i have to modify then the the shifting that's the more than two unique eigenvalues can increase respect to any three parameters in the primary fifth rule you can evaluate the gradient with respect to any other three gate parameters because x x y y and z that terms in the hamiltonian all compute and the canonical gate can be decomposed into sequence of x and x y y and z so these parametrizations of the x x y y and z decades we have pi divided by two more zero we can decompose any two qubit create into a canonical gate plus one cubic gate provided we can determine the functional relation between the original k parameter theta and the parameters of the composition we can evaluate gradients with the product rule what is the product rule okay that i can okay since an arbitrary token has 15 parameters we may need up to 30 expectation evaluations to evaluate one gradient of a two cubic gate note that there are many essential equivalent choices as to how to parameterize the local molecular rotations we use the x y x euler angle the composition rather than the more commons at why's that so what's this the t1 figure 1 the t1 parameter and first derivative of the cr canonical gate decomposition for b one half and one and three halves blue orange and green now that t1 exhibits discontinued discontinuities but these are largely already factual since same as i don't know and then figure two t7 parameter and first derivative all to see our canonical gate decomposition um the three natural parameters of circuit can be expressed using elementary functions see arcade the precision components here gets as follows first case circuit answers by examining numerical decompositions in zero gate we're left with three undetermined undetermined parameters since the cr gate is equivalent to an xx k blah blah okay so this is where it just goes too much i think m is the magic gate which transforms to magic bases what is the major i think i've seen this before magic states well that's a nice magic pdf okay whatever uh where was i here blah blah blah in a classical simulation again that's already not i'm not interested in here okay so that's it uh i would still expect this to i would still expect it to see visually you know what i mean i would still expect this to be seen like somewhat visually t1 parameter first derivative 2425 god um so basically as long as as long as the circuit is made out of gates that have like two unique eigenvalues then you should be able to apply the rule but that means you'll be able to apply to kind of like everything right because you can just compile down the circuit to all this stuff i mean i'm going to see now let's keep interaction this parameters the three non-trivial parameters of this circuit can be expressed using elementary functions of the cr gate the procedure to decompose the cr gate is as follows the physics circulators maximizing microscopes here gate we're left with three undetermined parameters since here gate is according to an xx gate uh okay so here what they're doing is they're try their they're trying to specify what those parameters look like with respect to the original theta is it that what you're trying to do 2047 t1 d4 d7 the circuit is a natural gate for certain microwave control transmon trans monster conducted qubit architectures it's okay it's these it's got sb and c canonically canonically decomposes a circuit of one cubic gates and the next gate okay so uh there you go the s i was just looking for that and i couldn't find it s b and i'm missing c are here c okay so this is how you were then this is how you're going to parametrize these things in this case if you wanna i mean that's probably important right like because this means you're calculating the shift of these parameters that's what you want you want to shift these parameters the s the p and the c that's the ones you're trying to optimize and so if you're using this decomposition you should just you should what you should do is you should calculate what's the shift of these not like the t1s and d4s and d7s or whatever and so that's the relationship and those are the derivatives so we can therefore calculate gradients of the crk by using the product rule 8 expectation evaluations using the primary shift rule and the following derivatives so you got to do the derivative of you've got to do the derivative of those parameters i'm not i'm not sure i'm fully i'm not sure i'm not sure i i would need to do this in a practical setup i think to better grasp but i i guess i know what is because i'm just used to think about like i'm just used to think things i'm just used to thinking in terms of like the typical gate like from like you've got like the polygates and you've got like the control not gate and all this kind of stuff which like they all have already they all feel that the the the condition of the two unique eigenvalues and so you know kind of talking about like crcr gate and this kind of things maybe the the u3 gate would be a practical example although i already know the eu3 gate the composition is also a pali matrix it's a poly so that doesn't that doesn't also help whatever i mean i think it's just like kind of all good but at the end of the day regardless of all these because that just tells you how you how you would need to calculate the derivative right um how you would really need to calculate the derivatives are the shift parameters i guess you can calculate base out of out of these right okay so it has four unique eigenvalues in general however if c is zero there are only two unique eigenvalues and the primary shift rule applies now that's smart okay so here's they explained that if one of the parameters is zero and you just add these then this one has two eigenvalues and then so you can just go ahead and do this okay um but still okay so steel so this is one thing then you need to find that shift that's good that's that's okay um i love to do that but i'm like i want to explore other things as well but it's still you should be able to see that visually shouldn't you like regardless of these like that's just a tooling there's just something that tells you okay am i able to do these or not but if i plot the thing as a function of the angle okay so if i'm just plotting so this is my circuit i i should at the end of the day see something that is like a like a repetitive pattern right i just i should just need to like the thing is maybe the plotting that i'm using is just confusing so that's the circuit right we'll call this alpha alpha cool uh we're not going to print we're not going to print this and now let's not let's not get too hanged up on the let's not move right so let's just do like a static i love it how python is like just don't indent me man how can i connect the dots and how can i make that bigger so i want to do like a 50 50 and i want to have like a fixed size why isn't this working i want the figure to be bigger this is working here but it's not it's just like these working right am i not using this correctly well i probably should put it i before i should just do it here yeah there you go uh now we're talking now we're talking okay and now i just want to make a scatter plot with a line with a sequence line connect this category yeah that's all i want call my poker plot with x a sequence of x around this comma plot with the next to connect each point in order okay okay so if i just say plot oh there you go okay 50 plus 50. like what's what do i see here too many points but it's yeah like i get it it should be like it should be differentiable using these like i don't know it's a bit stretched but i see it's it's a kind of like a it's kind of like a wavy pattern right if i sorry that's the wrong one there you go i wanted to i wanted to stretch it a bit more so i can see these better that's uh yeah i'm just stupid why i didn't do this before yeah and now i can just say like give me like give me like a hundred and give me like way more precision make that even bigger let's see what happens yeah there you go okay cool yeah now what will be an example of something that's not differentiable just just so i could see just just so i could see the uh the difference but i think i'll gonna have to leave these for the next video so there was a because the cr gate is not something that i can this work can i parametrize the swap gate c swap gate control sub gate sub gate right key yeah okay i'll i'll see i'll see if i can do this so i'll see if i can do this in the next in the next video later um later today i'll just go back to these i just wanted to kind of see a difference get it get a because for me like i feel that's much more intuitive than just like going through the miracle part of the numerical part like it's probably much more convenient and at the end of the day if you in a comedian but like um formal right and if you really at the end of the day you actually want to figure out how you want to differentiate this whole thing then you you better do the analysis actually try to figure out what's the shift that you have to apply what's the shift that you have to apply and all that stuff right this is of course if you want to use the parameter sheet for all like i guess you don't have to i guess you can also just use other optimizer technique techniques which we're going to take a look next in the next video which is basically this paper here low depth mechanisms for quantum optimization i'm hoping that it's going to be some bunch of interesting stuff in here in terms of how to optimize circuits just so i can you know kind of be able to be more intuition around these and i think i'm going to leave it here like after this paper and then kind of come back to the multiverse quant to the multiverse computing paper the portfolio optimization one and to you know kind of go back and actually finish up the lagrange thing for the for the d-wave finish up like the tensor network stuff um yeah and then basically just you know give it a quick run and see if we can just at least get something to run we'll see would have been a long project but i think it was worth especially for for these part like i i'm happy that i dived into these you know like also the tensor network stuff i think it's going to connect a lot of the things a lot of the dots that i want to um a lot of things that i want to explore later uh later on but now i i feel a bit more confident about like knowing the details of these squares like okay it's not just you know the primary chief rule shouldn't just work out of the box and there's many more optimization techniques one can use um which we will definitely explore i mean one for me it's like one that it seemed obvious to me always is like why can't you just like say take a look around your point and then you know just do a bit of a sampling around your um whatever dimensional space you have and then see where is it going down and then just peek that direction right um sort of like if you imagine like a 3d surface you just like take a look at a really small um you know circle or circle around you and then in terms of you know your x and y coordinates and then see you know see the one that's going down like it's a it's a naive one but like why maybe it's naive but like that seems to naive naive but like inefficient but that should work shouldn't i mean like it's it's like you know it's really like actually in the real world just walking around and you kind of see where the heel goes down right and just follow that path kind of so you don't really need to rely on the derivatives probably the derivative is just with the derivatives just makes it more efficient to calculate that because if if you have like a higher dimensional space it's going to be really complicated to take a look at your hyper or your high dimensional circle kind of around you so to say three four five parameters yeah awesome |
to work today um and again i don't as typically i don't have a lot of time it's complicated these days but let's see because i got all the standard contracts in here right but i mean these things import stuff from from the local file system which obviously i don't have and this one for example um i hear a messed up but here's other examples oh there's an nft example simple nfd but i mean you see these things um kind of import from the open zeppelin contracts uh oh it's actually stacking stuff from open zeppelin that's interesting okay but how do i know so packages opens up like how do i know so i think in the readme there was something about this which is basically um getting started run pre-install packages from open zeppelin contracts to install the solution packages that are distributed on npm make sure you install them using the package installer on the sidebar oh but these are for the npm based ones but there's just something from maybe maybe everything i use is from sampling anyway so that'll make it easier right i mean let's take a look at the i had a token in an nfd one here okay but that's definitely super simple in terms of token and then in terms of nfd so okay extensions because what i have here let's focus on the coin one so there's the um uh this is the standard and metadata and then udls and the question is why so these are things are pre-installed this means if i go to replay actually let me just so my browser history does not interfere with all these replied i mean how does these installing packages so or what's more even like sampling zeppelin packages and contracts how i don't know how that works though is it that is it that basically this is just internal internal stuff so let's for example i need to figure out how that how that works at all like i i want because i know that what what this what this repo does so what this project does is it just runs whatever it's in contract that's all and i want to have these things in separate files so okay i guess this is because of the way this ui is at what point is contract sol be the one that's recompiled it can be it can be this it may be i'm sorry um compile oh there there's the compiling happening contract song there we go okay so can i just for testing purposes can i include these in here so can i just say for example what's happening with the okay so can i just say know like import right so can i just say from here uh just delete everything can i just use that to just say import for example ansys coin soul and and says nft saw like would that will that work if i do that and if i run that it's gonna break probably uh but i mean let's see if it actually breaks by because of because of you know missing the imports here right so let's see what it does doesn't look like reloading page whereas if i just copy paste this guy here and i stop and run and that's gonna probably break connect wallet put the okay and now it breaks it breaks because of these okay cool so let's try to go back to what i had here okay cool so it's breaking just let's let's just top it and start it again let's make sure that um that this is is at least correctly okay yes it seems like this is the this is the re this is the the thing yeah so if i if i have it in the in a in a separate page well it's still like okay so will will this work automatically if i uh if i now say i don't want to see these because i have it here and so uh let me just change i'll just i'm just testing something okay so i'm just doing that and because i'm this is not updating so i'll just rerun it or refresh it not rerun it but refresh it yeah okay oh okay cool so it's catching that um that's nice oh so i don't even have to so i can just say and i can just go here refresh the page and that should work yeah there you go okay so what i am trying to do is basically now try to find okay so i can i can and this is just for testing purposes right i just want to make sure i have something to run and play the contracts and play with the contracts um here and i want i want to get them to run at least today right so i first first things first is i want to see if i can just by copy pasting that i will it will work or not you know so essentially like i have no idea where these things are uh it could be that they are here let's see so yeah call back and call back not support it okay so this is not found so open zeppelin uh opening contracts contracts token let's see if that works yeah that seems to work so i just have to find where this is just the github structure the path structure so i just have to find where where this guy is but it's probably uh search in this repository contracts interfaces and then context of the soul in utils import utils so contracts access uriels or contracts some here and then what utils does is it goes okay it's it's contract slash utils okay so that should work actually okay uh-huh there's something in line okay so now there's just uh something in in here is it or what sorry and yeah that's complaining now about this one so he is cool here i guess just in case what i should do is i should probably copy the same but this is seven to one it's my guess um this is all utils so i'd say it's probably these for all of them do i have multi-line editing no no because it highlights so there must be a way to use multi-line here for sure uh so i do that and then uh what is the where is these and where is this in this repository its contracts interfaces and then uh oh sorry this is this is here and then the receiver the receiver as in token okay so it's it's in in this one it's in the same okay so this is in the same and then input answers coin okay so actually what i can do is only import the nft contract that's all i care about because that imports already the answer is call so okay but now now it's everything seems to be okay now i'll be back in a second so we're back um cool so what is he complaining about and sees little a string private name too much python well is that what is that solidity sorry guys um boom okay what's all that declaration error i undeclared identifier did you mean i erc 721 and line 122 so oh because this is uh-huh okay so same will happen here i guess i call that and see an ansys coin so and i think you know what to be like who cares about the name like i'll just i'll just call it like i'll just call it like that right no it shouldn't be like this man so i actually i i should be able to call it whatever i want but then i need to find where any of these is used anyhow nowhere and then here match case oh select all you see there is is it's being used that's awkward because that should be so if i search for these right there are seven of them this one one two three okay the thing is i guess i guess this is basically to be replaced with this right so i go for these and i uh can i replace no what am i done sorry i press refresh and i'm looking for [Music] i'm looking for erc721 dot something and so can i just can i just replace it for these i am not super familiar with replied so i i i can't use all yet all the sort of shortcuts and power tools so i'm slow but eventually i'll get there because i can i can do a regular expression and probably can do a replace or something like that okay so but now uh there's still seven of them i think that's a bit of a bug um but okay so what about now oh cool i think it worked i think it worked okay so now i have basically okay so now i see these contracts in here and i can deploy them and and these net and i have one ease i'm gonna get another ease can i get more eve i mean you know but how does this work let's say i want to deploy i want to deploy that but i haven't really given it a name right is it that i have to call the constructor probably i have two ethan bridge so i want to deploy the nft contract deploy missing argument in contract constructor um yeah exactly but how do i do that i mean how can i put the contract is it that i have to um constructor memory name memory symbol how do i mean how to deploy deploy contract and call the constructor with an argument to put the contract with arguments and also pass the options uh i guess it's a limitation of i guess it's just a limitation of these specific implementation here of you know uh deploying multiple contracts like if i take a look at the examples i think none of the contracts actually have the constructor oh so wait a second you can actually just do these as in like calling the parent so ansi is coin okay so this just creates so i guess name and symbol hmm but how does these how does this know then anything how do i know like i can't uh uh [Music] i can like i i'm not sure i understand how this works so you can pass in your own ft name and symbol cool sure but this is calling the constructor of the um erc721 contract right and here we're actually implementing it so i can't just do that i need to create can i have a con so so let it solidity construct her well you know what actually what am i doing like why do i even need to do anything like that i don't care about these i just doesn't have any arguments and i'm gonna well i'm gonna harcode the name it's ansis nft and the symbol hmm ansys answers nfd answers do and if this need a near symbol does this need an actual token name popular nfts oh that just takes to the crowd to the webpage there is a standard and there is a ah another name for any for nfts in this contract so i guess ants is nft uh ants is nft and then anses uh i don't know that's not super original but let's see what happens because now i can say deploy this contract and that's telling me it's gonna cost me whatever and it's deploying looks like it's deploying that's cool if we get it to deploy and and do something with it then i'll just leave it here today and move on and then we'll do something else oh cool look at this so it's there um okay now i have basically an interface to test stuff right proof balance office so this is cool because this is all generated out of the contract so this is really really nice um but i have no idea run aw cool owner off token id okay i don't have any balance off approve token uri transfer why there's no mint because it's a private is it what is a proof okay so essentially we've deployed it and we have the coin contract now in here right but we we've just basically that's what i've done so there's just no means what there's no here is this no mean method well there's safe means but these are all a bunch of internal methods right why this why isn't there was there like why isn't mean part of the interface that's actually an interesting question right so this is definitely the mean one so address two and then the token id [Music] okay but it requires for the token id not to exist okay because essentially i mean that that's the mean thing right so that's what we're gonna do the ansys coins reward and stuff like that but there's no um i guess we would need a public method that takes in simply a um an ipfs uri and uh and you know it allow us to mean an nft and so what that's gonna do though is as we said it's gonna mint it but it's gonna it's gonna put it into sort of an approval queue right and so okay so i think we're i think now i think now we're ready to kind of build on top of that um that's just very generic stuff the mean what the mean does and what is it why is there safe mint save as i don't know what safe means hmm i don't know okay but you can burn thing you can you can burn so there's the internal stuff you can transfer proof but then the public methods of these contract are basically proof so safe transfer from safe why there is just two okay one has this data bytes here transfer from so transfer one nft from one address to another address the symbol obviously supports interface face id set approval for all operator approved this whole thing with a purple sound i'm not i think this is the same like with um so what is the approval stuff bounce off one off name symbol token uri baser i approve the so require can i go to to this method so okay you approve the two address to open token id okay cool so you you're allowing um others to they may basically um move the token id as well so we have approvals okay great um yeah i want to make sure i understand everything so it's not really easy to exploit or whatever but it's it's kind of a bit of a standard thing so i'm going to trust definitely that that's built in a nice way i mean ethereum uh themselves are like linking to these so i assume it's it's it's kind of a safe bet to work on these but yeah uh that's cool so basically that is really going to be like there's not going to be um this this is really not going to be a do i have to fancy coin how is that how is that even working didn't that break or anything how does it even know where it is and this coin oh there you go i imported this contract interesting but it's like is it technically that that contract is as well deployed like i don't know how that works but okay you have these um you cannot interact we'll see we'll see we just have to work on that cool i'm gonna leave it here um happy i mean we could try i'm just like i don't have time but i'm tempted uh let's say so so this is a token id i mean let's say that i have a and i'm gonna add my own functions probably like at the end so i make sure that i you know uh custom functions or something so i have no idea whether what i'm doing is correct or not mean and then um you know address two and then this is basically um ipfs or just uri right and so uh what is it gonna do is it going to basically it's going to basically use the the mint token id um yeah i guess we can just use that huh i guess we can just use these as the uri i mean just let's try it it's a dummy thing right well let's um do i have to uh what do i have to do why is it not working address two identify here oh sorry um again missing the semicolon ah noticeably specified did you intend to add public yeah well probably um do i have to add the public modifier for things that are not um function a public virtual okay public virtual public virtual i don't know what virtual means in this case i'll just leave it like that so do i have to redeploy the contract probably um yeah probably deploying and so let's see if that if that works and you know in a way so here i have my wallet address and i'm just going to open up ipfs okay so so i have connect page i have this file here copy cid no share link so i'm going to copy the but that's that's that's a link that's not what i want maybe what i want is a content id right because that's more the unique thing so i wanna now we have mint okay so and i wanna do this and then i wanna basically copy my address and uh run involve big number string okay but that's not an end that's just a string that's why it's not working so can i just call it string and then reload the thing memory don't to be honest i've never used that before so i have no idea why i have to put things like memory it's like using strings for you end string private name yeah they they put memory i don't know what that modifier does but uh we'll have to look for that conversion from string memory to uri i'll just put something um what is uri i mean mint and it's just a token id it's just a mint okay so okay um well just kind of like i'll just put something random okay so um i just want to test that things somehow work i don't know why but it's probably stupid a news function parameter oh god um can we whatever it is can we just like can we cast something no i need to create a token id from that right create so ideally i have this uri and i and i want to turn that into a unique token id so uh which is what we'll put in here so probably solidity i can hash it or something um turn ipfs kind of id into token id can i just a hash or one generate pen i mean okay so content hash okay it there's some kind of content id that's being generated um for now yeah so for now i just wanted to i just want to see what happens so so we'll just make a random thing here um that's not and the thing is i want to know whether okay so i actually have to redeploy the contract you play the contract testing is important you don't want to do that in ethereum in the ethereum network come on so essentially we will need basically here a generate uh to generate a unique token id out of the ipfs but i'm sure there's some i'm some standard way of doing that anyway so here we have and then we've got mint then i'm going to copy my address and then we'll run it and see what happens so it's going to tell me around this thing and there we go and now i have to balance off and i can take a look at my address and it says zero that's not good because that has supposedly transaction hash well maybe it's because it takes a while transaction hash yeah there you go we got a one so we've got one nft mint it mean tip there you go one okay i like it it's uh it's easy it's intuitive um and to be honest it's so easy to get set up with replacing this stuff so now i need to work on here right so i need to basically take that in put it into i'll outline the concept sort of in the next video i need to kind of put that into a queue of nfts to be approved and then what i need to do is i need to basically have a way for people to uh for addresses to kind of register themselves as uh validators and they need to stake uh heath or something yeah and uh exactly and then once they do that these people if they are validators they can get access to the cue of uh pending pending videos to approve they can approve the videos and once they proof the videos they get a uh they get a reward they get a kickback and then the uh owner of the nft gets the actual ansis coins as well and that's it really to be honest the thing is i'm not gonna these these nfts this is just so they are minted as as nfd's right so you kind of cannot upload the same video twice so it's going to be the hash of the content probably in there and stuff like that to generate the token id and and so yeah you can always trick that right you can always kind of have small modifications to the content so they it counts as something else but because it costs money to mean then you expect that you know that kind of brings in the game so people won't just do that massively right because it's just gonna cost them money uh and uh and then essentially once you're once you've done that uh yeah basically you you're you get your reward and that's it but you can't really do anything else with this nft i mean this nft itself then belongs to the contract uh okay not to the contract to be honest no i mean the nfts the nfts are yours you can do whatever you want with them i don't really care actually if people want to then put them in openc or something like it's their thing like uh the nfts that you meant out of that where we're gonna give you we're gonna give you uh currency in exchange just because you've done it but then you still own it uh yeah i think so anyway see you next time |
Hahaha, was following you for quantum stuff. Seeing you work on Solidity i like :D, @asd asd happy to hear my quantum content is relaxing xD<br><br>Sadly its too easy to criticize things like web3 when there aren't any crazy obvious use cases yet and cause of its financial tangents its an easy target for scammed. I see it as a great opportunity to create truly decentralized systems with proper skin in the game mechanics, @Uncertain Systems I don't understand to much of all that quantum stuff besides the basics. When i watch your quantum stuff its mostly to feel myself stupid while relaxing.<br>Crypto has become my live for a year now. Have specialized myself as hard as i could, from algotrading to coding. Seeing you interested in that space gives me tailwind(lots of people don't think its a legitimate cause, that every cryptobro is a gambler etc, you probably know yourself)., Bit of both :) still doing research but now building a smart contract to encourage ppl to upload also raw research vids |
yesterday i came across this tweet and this this tweeter thread from jeremy clean that like it's literally like i mean i think i haven't read all of the details yet but like i think these really caught my attention um when he says that you know rather than being uh defeatist and how you pronounce that i think it actually encourages thinking about learning as distinct from computation this was was was a bit of a it's like i know it kind of broke my brain to be honest because i've always i've always thought that i've always thought that learning is computation or you achieve learning through computation like at least if you think about modeling learning as you compute a model of the world based on the inputs that you're getting and then you query that model um and you know kind of like you're computing a model so that's you know it's like that if you think that the learning is the model the learnings is the model that's probably the key difference here right because is otherwise otherwise what is what is the difference right if if learning is distinct from computation what is the difference and so i wanted to take a look at the paper basically so it says that stretched out in your unusual writing muscles to defend some controversial stances on the intersections between quantum computer science and i guess and chemistry and recent invited perspective including so let's see i mean um i know this is a bit different than um we're just typing a little bit aside right it's not i'm not saying you know that's that i don't know if i'm gonna do one video or two videos these it's it's more like i i wanted to kind of and we can take a look at what the war for physics project says about um because this is the war from physics project is all about computation right it's like hey um like here is a computational model of the universe right which kind of if if that's something you can do then it would literally mean that you can also model learning with these but then what what you know what jared seems to imply here is that you can think of learning as different that different from you know computation so with the rapid development of quantum technology um one of the leading applications is the simulation of chemistry interestingly even before full-scale quantum computers are available quantum computer sciences exhibited a remarkable string of results that directly impact what is possible in chemical simulation with any computer some of these results even um impact our understanding of chemistry in the real world and this perspective we take the position that direct chemical simulation is best understood as a digital experiment while on one hand this clarifies the power of quantum computers to extend our reach it also shows us limitations of taking such an approach to directly okay interesting um too darkly like so so maybe that that makes reference to like the kind of like that you you've got to think about the learning component of it and not just kind of model something in a circuit and that's it right leveraging results that quantum computers cannot outpace the so leveraging results that quantum bits cannot outpace the physical world we build the controversial stance that some chemical problems are best viewed as problems for which no algorithm can deliver their solution in general known in computer sciences undecidable problems this has implications for the predictive power of thermodynamic models and topics like ergodic hypothesis the ergotic hypothesis that seems like something worth googling however we argue that this perspective is not um not uh defeatist defeatist how do you pronounce that difference diffidence it's not if this person respects failure yeah i mean i think i i guess i i know what it means but anyway but rather helps shed light on the success of existing chemical models like transition state theory molecular orbital theory and thermodynamics is models that benefit from data maybe that's the key maybe that's because you've got models right which don't necessarily depend on data i mean to some extent they do right because you model something out of results so this is really data right so you build a model out of that and that's it unless it means adaptive models but then it's still it's still computation i mean we contextualized recent results showing that data augmented models okay that's an interesting concept are more powerful um road simulations with road lining some english on the way mechanical okay learning is a memorization technique based on repetition okay data augmented models are more powerful road simulation these results help us appreciate the success of traditional chemical theory and anticipate new models learned from experimental data not only can quantum computers provide but aren't all models learned from experimental data i'd say all models i learned from experimental data right i mean that's how you could go about building a model so you you make some experiments you take the results and then you kind of try to you know abstract away from that and and not only can quantum computers provide data for such models but they can extend the class and power of models that utilize data in fundamental ways these discussions culminate in speculation on new ways for competing chemistry to interact and our perspective on the eventual roles of chronic computers in the future of chemistry what i really like about these is that it touches modeling and it touches modeling in a way that like it it's so what i i guess what this is trying to say is that it's not it's not that they that learning is different that modeling and learning are not compatible you know um but it's rather saying you know you have to think about learning differently and not like a computation although i mean this that it's not what it says here right but it says um some chemical problems some chemical problems are best viewed as problems for which no algorithm can deliver their solution in general so undecidable problems this has implications for the predictive power of thermodynamic models no algorithm okay maybe the the nuance here is the distinction between an algorithm and a model but isn't a is an algorithm like isn't the model really an algorithm at the end of the day sort of right like like isn't it is algorithm a model a specific algorithm is run on data to create a model we also understand that model is comprised of both data okay so the model the model the definition of a model is it's got it it's comprised of data and in a procedure for how to use the data to make a prediction a new data so you can think of the procedure as a prediction algorithm if you like okay so the model can have algorithms but then the model the way that this is defined is the model when you say and talk about a model you're also talking about the data that is in this model and then the prediction algorithm is the stuff that helps you make the prediction but it's still okay but then but then the difference so but then essentially the difference would be at least what jared says in this tweet right let's think about learning assisting from computation uh it's it's maybe that's the distinction that learning includes data right and that's essentially that's essentially different this means this means that you've you've actually got to run you've got to con you've got to run the construction of the model for for this to work and it's not something that you can kind of build an algorithm you code an algorithm that just computes something on an input alone okay so this the distinction is the data and and i kind of that makes that makes sense right because it's like if you think about life and you know i mean it makes sense obviously no one to say that makes sense or not but like that's how we learn is by experiencing the world like you don't you you know you wouldn't be able to speed that up in a sense because that's been always my that's been always my kind of thinking that the current way that machine learning and all this stuff is approach is like you like you can't speed up the like and i don't know a lot of details right but the way that you're training models with data it just almost feels like the way that we naturally do it is just by living you know just by existing and that assuming nature is as efficient as it could be um that there's really no way to speed to speed up the process like you'd almost like to have to kind of create an ai in its infancy and let it kind of grow up right um if you want to create like a human level ai so you you would have to create the you'd have to create the base model and then kind of yeah just let it leaf let it do its thing um let it do its thing i don't know let's let's hop into this because i've i brutally checked in at least how long the paper is see if we would be able to uh at least approach it within the live stream and i think it's pretty approachable at least it's a it's got 30 pages with references so it's actually oh this is actually 10 pages so probably we won't really go and and and down the whole thing in one in one run but so we've read that and then what do we have so a lot of people say go through the abstract go through the figures and then go and then go to the conclusions and uh and then kind of and then kind of read the whole thing actually so let's try that so undecidable horizon classical simulation plus learning model classical memory and then quantum simulation okay so that's actually that's that's pretty much an undecidable horizon okay that's pretty much what i'm saying right so you're you're having the so you're having the simulation per se is the algorithmic part but then you've got an actual learning model so you've actually got a memory so you've got the data that reflects your learning so far a second gotta drink a bit more didn't want to leave you guys um death cartoon of the relative power of direct simulation versus learning models for chemistry where a point on the figure is a question related to a chemical system the ovals on the left depict questions sufficiently excessively a simulation of time dynamics where quantum stimulation is widely believed to be exponentially stronger than classical simulation but still softly bound i like how the i like how the soft barrier is really just a blur um by the uh no fast forwarding to like behind the system in nature um even with a quantum computer learning models which include both traditional theories supported by data like thermodynamics as well as modern machine learning models strictly include all questions answerable [Music] by traditional simulation as they are assumed to have access to simulation but also have their power enhanced by data that comes either from nature or quantum simulations or other quantum simulations okay the availability of quantum states held in memory and full quantum computation extends the questions that may be efficiently answerable beyond that of traditional learning models okay yeah it does it's it's kind of like maybe i expected expected this to be a bit more mystical but it it does it does seem to make sense like that that in a in a way in a way the data right it's like it plays a big role in in in the way you learn right and actually that's the same in real life right if you if you close yourself in a room forever like i guess you wouldn't you wouldn't just really you know magically grow smarter or something like it's just experiencing the world and experiencing you know things in the real world is is what what kind of helps us learn and grow yeah so what other figures are there a sketch of two viewpoints for the problem of chemical synthesis in this scenario one wants to know if a certain target compound can be reached with the feedstock of specified chemicals and the typical conditions the combinatorial view tries to address this question by introducing a close reaction system with a large finite number of reagents and explores potential reaction pathways to determine visibility through some proxy like free energy yeah so basically i guess all the fancy wording here means that in a true in in sort of a more traditional simulation way like a combinatorial view of these you would kind of basically try to define some boundaries and then explore all paths basically the undecidable viewpoint embraces an open system picture and the relationship to dna computing to argue that the most visible approach tries to use data either from nature or related simulations to determine the answer to the question such an approach can be more naturally inclu can more naturally include the effects of common sight reactions or strong kinetic control like this is starting to make a lot of sense to me in terms of it i think i've been maybe a bit too much of a skeptic or not a skeptic but like aside from the whole machine learning world and artificial intelligence just because i i think i couldn't really get through the nuance of of the difference between these and it's like think about neural networks right it's it's difficult to kind of it's easy to make a mistake and and now that i know i see that it's easy to make a mistake and think of these as you know and think of this as pure computation but it's really not just pure computation it's actually data as well and in a sense in a sense what the wolfram model or the wolfram project is trying to do right is the combinatorial approach is like hey i mean no it's a bit of no no actually actually i don't think so i think that they might get it right right because what they do is is actually a combined i mean i don't know what they're doing right but like the the idea of you come out with a framework of you know that's a sort of a a kind of model or a family of models that could work like from a computational perspectives the hyper graphs and all that stuff but now let's explore instead of just exploring all the potential universes that that all this theory can generate let's take a look at the real world let's take a look at data from existing you know models and experimental data and stuff like that and let's let's try to see if with these data we kind of can learn the model of the universe right and i think that that's that's kind of yeah it kind of makes makes makes a bit of sense rather than like you know presenting some set of equations and saying hey that's it that's the formulation um you know maybe it's like you actually need to sort of teach teach a tall universe to become the universe right the most feasible approach tries to use data yeah okay that's exciting actually that's pretty exciting i think i think this is definitely yeah this is really interesting i just it's so much stuff that one could be doing and looking at and it's just got it so difficult to focus on stuff anyway chemical system quantum sensor measurement transduction quantum computer okay so what is this new stuff transduction um comparison of quantum and classical data pipelines the presence of classical data or traditional measurements data from the laser spectroscopy or thermodynamic models already confers an advantage over traditional simulation here it controls the pipeline with one where quantum data is collected from quantum census which can be stored in quantum memory increasing yet again the power of available data um in the classical case the sensor measures and reports classical values back to a classical computer in the quantum case sensor that has its state transferred into a quantum computer a process also known as transduction transduction where it may be computed alongside multiple additional copies of such states to perform tasks that would be exponentially more costly in a classical computer inside setups the quantum transduction route can require exponentially fewer measurements than the classical case to learn some quantities to learn some quantities or perform some tasks in cases where data is hard to come by that classical case to learn some quantities or perform some tasks in cases with data's hardcore bikes and transient short-lived or rare systems this can make an impossible characterization into one that is a routine so you've got a chemical system it's almost like yeah it's almost like you're mapping so you've got quantum sensors whatever they are and these they basically translate the chemical system by just whatever the transact transduction process is and then it gets into a quantum computer so that's actually that that's probably why that's probably why why we've got all these issues currently with you know quantum machine learning where people just encode classical data in the quantum computer and then you know then they go they go for it and uh and obviously as it's been and i haven't read almost anything about this but it seems it seems a lot of people are just saying you know that that's especially the google people it's just like you know quantum like classical data encoded in the quantum computer it's not gonna it's not gonna lead to any advantage um okay cool this is what else is here so we've got um this other figure that says contrasting the state versus stabilizer and rotation viewpoint for quasi degenerate systems the top shows a representation of an electronic state built from rotations applied to a stabilizer state while the bottom depicts a trans at a traditional configuration based view electronic catalysts often exhibit quasi degeneracy making them challenging to trade with single reference methods no idea what that means to stabilize the formalism from quantum error correction combined with efficient single particle rotations may offer a compact way to both simulate and analyze such situations as the use of the degeneracy to protect quantum states is a core principle of quantum error correction um graph state representations of stabilizer states may offer connections to chemical bonding and electron correlation theory all while being computationally efficient to simulate and analyze classically chemical system analog quantum classical feedback analog quantum feedback quantum probe then digital correction algorithm okay digital quantum feedback control inspired by quantum era correction quantum control of chemical reactions is a well-studied field uh and many aspects of it are mirrored in the control of qubit systems is it the well static field what the hell is that well direct measurement of a system through typical analog signals destroys entanglement yeah in a quantum in a quantum system quantum in a quantum system classical the use of a quantum probe or in sila system can allow measurements that preserve or create entanglement in the target system reliably and really quantum quantum the use of okay while this paradigm is already powerful the tools of discrete computer science allow one to use such interactions in combination with algorithms that can be imagined as sophisticated maxwell's demons to pump entropy out of the system at incredible rates for exceeding those of typical thermalization to stabilize exotic quantum states like electronic states for time scales that could in principle extend for years using only local measurements and feedback these tools are developed at length in the field of quantum memory correction and we imagine here how those tools might eventually integrate with chemical systems such construction may pave the wave the wave maybe it's the way for novel hexatonic or energy transport designs that's i really haven't understood half of it but that sounds cool uh outlook so let's take a look at the outlook and then let's let's jump into the paper so as quantum technology advances so does our understanding of what any computational device can accomplish in this perspective we have explored the ways in which results from quantum computer science may impact our view and approach towards computational chemistry on one hand quantum computers are believed to offer an exponential advantage over classical computers in direct simulation um or some quantum chemical theories making certain tasks that previously seemed impossible into ones that should be relatively rooted routine on the other hand we saw that even quantum computers have limits crystallized through the no fast forwarding theory and strong results on undecidability of physical processes we see with quantum computers [Music] in highlighting the way some of these speed limits are broken we were led to a framework where uh learning from natural data is fundamentally different from road computation that's interesting so i mean the road computation this is if i understand is well that is what machine learning is isn't it so road learning is a memorization technique based on repetition the idea is that one will be able to recall the meaning of the material uh the more one repeats it what is wrong computation i know okay okay no no real learning is okay it says caching okay so it's not no that's not what machine learning is doing that's even more that's that's simple that's simpler [Music] maybe the paper gives a bit more details on this but but learning from natural data is essentially fundamentally different from broadcasting so the this viewpoint captures the ability of reduced fear is to offer meaningful predictions ability captures the ability of reduced theories to offer manifold predictions further than the time scales of experiments and also offers a strategy for dealing with some of the hardest problems in chemical theory it has now been decisively shown that classical models empowered by data from quantum computation including both nature and engineer computers are more powerful than traditional computation without data assuming only that quantum computers may perform some tasks faster than classical assuming only the quantum computers may perform sometimes faster than classical computers while data from quantum devices will play an important role in their future interactions with chemistry the ability to fit quantum data directly into the quantum computers off offers more power still but that i mean that was the whole that was my my biggest doubt like it's been the biggest out for like you know since i started actually learning about quantum computing in the qml stuff which is basically okay so how do you feed data into a quantum computer directly right quantum data the interplay of quantum computers with more advanced quantum sensors may offer untold possibilities finally we expect the interplay between quantum information theory and chemical theory to continue where importance of ideas domains like digital quantum error correction may open new avenues of research and looking forward we see a bright future for the ways in which quantum technology may advance the study of chemistry well this is true that the dark simulation abilities of quantum computers will offer amazing value we have argued here that this is just the tip of the iceberg our ability to address some of the hardest problems in chemistry and nature through data and learning will only be bolstered by strong part of technology and that features on its way thank nathan weber for helpful discussions and feedback on the draft that sounds like an interesting paper to go and dive into so we'll do this right now what time is it okay 30 minutes saying that's all good cool so i'm not gonna aim at covering everything but maybe let's go through the introduction and this and then let's just do some thinking um rather than just rushing through the paper say i'm going to take the time to do that in a couple of sessions um because that is in in to an extent it feels like that's kind of helping me connect a lot of the dots that i've internally been struggling with right in terms of what direction you know what what what is the staff that is going to really be the killer app of quantum computing which it was always to me somewhat around simulation but i really never had that so the mental capacity to connect all the dots um and that that paper is really doing that um so the study of quantum computing is the abstract uh in the abstract is an opportunity to ask ourselves what is possible if we could attain an almost unimaginable level of control of the microscopic facets of our universe it was first proposed a solution to problems simulating physical systems with strong strongly quantum characteristics as uh atasta has proven very challenging for traditional computers the idea was that if like the puppet of a marionette puppeteer one could make a precisely controllable quantum system um i lost act enough like a more interesting system the public could answer previously unknown questions about the true system this core concept of quantum simulation eventually merged with modern computer science to form the fields of quantum computer science and quantum computing this merger allowed these concepts to be made more precise and expanded applications beyond physical systems into abstract ones like breaking cryptography so that is short's algorithm but that's that's what i mean right for me the short algorithm is really just an expanded application and in the sense that it's just really that edge case i think uh powerful but still it's kind of like a just like a nice byproduct despite the expansioning to other applications the simulation of quantum systems uh despite the expansion into other applications the simulation of quantum systems and specific and especially strongly correlated chemistry has remained a primary application of interest chemistry represents a sweet spot of quantum effects strong enough to make them challenging for classical computers while still having a well-known application space to motivate development since the original proposal of vespero gujik where there have been a number of developments in quantum algorithms for the direct simulation of chemistry bringing costs down from astronomical numbers to routine calculations for even very challenging systems what is this the vqe stuff i think that's the vq stuff probably uh in parallel to algorithmic developments quantum technology has advanced at a rapid pace recent demonstrations by the google group have experimentally shown that these devices are capable of tasks are incredibly challenging classical computer with a gap that will only grow with the quality of modern quantum computers um that's quantum supremacy i guess in addition a number of prototype chemistry experiments have now been experimentally demonstrated in quantum devices uh present error rates and quantities are too great to make them competitive with the best classic algorithms for chemistry however even without an actual quantum computer running off and the study configuration has insights about limitations and possibilities of chemist chemical simulation and indeed under modest assumptions about the universe and chemistry itself in this work we highlight some of these developments leading up to the perspective on the role of both traditional to build this perspective we begin by framing direct chemical simulation as a digital experiment in this framework we exploit known results that restrict the power of any computer um even a quantum one sorry guys give me a second be back in a second back there um what was i how long are they kind of surprising results about the impossibility of an algorithm no little bit even a quantum exploit no resource to restrict the power of any computer even a quantum quantum one to understand limits of such digital experiments in chemistry along the way we encounter surprising results about the impossibility of an algorithm for determining if a system ever thermalizes um what is the assist okay attain thermal equilibrium with the environment it's nice because that that seems um that that seems quite quite a bit of an analog to like the halting problem right it probably is it's like thermalizing is just does it rich equilibrium so it doesn't kind of like stop right um flying in the face of conventional thermodynamic analysis um however this construction guides us to new ground where we will see that learning from data can be fundamentally more powerful than traditional computing computation this sheds new light on the success of many existing chemical theories and the way in which they exceed road simulation by leveraging the additional power provided by data the relationship between traditional simulation and learning models in chemistry is cartooned in figure 1 where classical models that's the figure we read we consider learning models to be models where some amount of high quality training data so okay so this is a bit more now the definition right so we can see the learning models to be models where some amount of high quality training data for the task is available either from a physical experiment or simulation uh in addition to just the specification of the problem as we will argue this is not just a reference to modern machine learning methods but rather encompasses the foundations of chemical theory such as transition state theory molecular orbital theory and thermodynamically controlled reactions as we will argue this is not just a reference to modern machine learning methods but rather encompasses the foundations of chemical theory such as transition state theory molecular orbital theory let's transition state theory uh in addition we take the opportunity to highlight previously unused technology from quantum information science that may bolster the development of chemistry even before the arrival of fulfilling the links from chemistry to results in quantum computer science all build to our ultimate perspective that the eventual role of chronic periods in chemistry will be to aid in the construction of learning models for chemistry this includes probing data to classical models providing sorry constructing quantum models that can make accurate predictions with far less data uh and eventually interfacing directly with quantum data from chemical systems to close the we wrap this perspective into an outlook for the interplay between these two exciting areas good transition state theory what is this transitions theory explains the reaction rates of elementary chemical reactions the theory assumes a special type of chemical equilibrium quasi-government between reactants and activated transition state complexes tst is used primarily to understand qualitatively how chemical reactions take place tst has been less successful in its original goal of calculating absolute erection rate constants because the calculation of absolute erection risk requires precise knowledge of potential energy surfaces but it's been used success and calculating the standard enthalpy of activation the standard entropy of activation and the standard keeps energy of activation for a particular reaction if its rate constant has been experimentally determined for a particular reaction if it's right so that's kind of because you know you have experimental data then the model can interesting um so let's get let's move to point two i think i thought that maybe introduction would be enough but i'm like a bit hungry for more stuff but it's like let's digest that for a moment so essentially what this is saying is that you need the data component that is essentially different than just pure traditional computation like the model the model has the data right that's i guess what's easy to to me it's like when one thinks about machine learning but here they say um is not just a reference to modern machine learning methods but rather encompasses the foundations of chemical theory such as transition state theory i don't understand why that is going beyond modern machine learning methods but you need that data no i feel like kind of things are clicking a little bit together it's just one of the things that you usually need to slap sleep on it a couple days um because it's just there but like i want to somewhat be able to embrace this and it's like that that you need the data it's not it's not you know you i'm trying to what i'm struggling with right it's the difference between maybe there's no difference right but the difference between saying like this is how we see the universe behaving let me construct a model out of these say i don't know feinstein's like weinstein's uh i don't know how his name is pronounced but like the the geometric unity thing right i i haven't really i have no idea what it is about but it's i'm assuming that he's not just sitting in a room and saying that's for sure how the world works or how the universe works it's rather like that that's how we see experiments and and that's maybe a model that could explain these experiments in a sense you know there is data in there right it's just that the data maybe the difference in here is the kind of the quality component of it right the data is just maybe his perception of the universe his interpretation of these data is you know whereas whereas what what what these is referring to is like i have data from nature or other simulations and what i do is i don't hand craft a model out of these i i i built a way to build the model right um i guess that's the that's kind of what i'm struggling with i'm not fully sure whether that's that's you know the difference right but let's go through digital chemistry experiments with quantum computers that's a bit of a longer one there's a quantification character okay cool the idea to draw a distinction between theory and computation is not new with suggestions of considering computation as the third pillar of science alongside experiment experiment and theory okay that that gets interesting in this framework it can sometimes be more accurate to view simulations closer to experiments than to theory quantum computing and especially quantum simulation of physical systems helps to make this even more clear by constructing simulations of the physical world at the quantum level with efficiently refinable and bonded accuracy okay so what is this by the way reference 20 computational signs ensuring america's competitiveness anyway there should be a way to go back to the reference to be honest that does sometimes speeds me up but anyway here we go so in this framework it can be okay so so let's just digest this for a bit right because that's actually a really interesting perspective the idea to draw a distinction between theory and computation is not new with suggestions of considering computation as the third pillar of science alongside experiment in theory so because because that's that's yeah that's what i'm saying right so you've got experiment and theory and then so that you build a theory and theory of everything or whatnot based on experiment you do experiments and build a theory but then the computation component of it it's it's it's something that kind of sits in between and in this room it's more accurate to view simulations as close experiments in theory um it's kind of like a handcrafted exp it's like a a yeah made up experiment sort of like you know experimenting with nature experimenting with something that is being crafted so to say quantum computing and especially kind of simulation of physical systems helps to make this even more clear by constructing simulations of the physical world at the quantum level with efficiently refundable additional limitations on precision for quantum computers to learn physical properties sometimes place them even closer to experiments than classical digital simulations of the same systems indeed the most natural setting for a quantum simulation and a quantum computer is that of watching the system step forward in time or quantum time dynamics within the field of quantum computing the term quantum simulation is sometimes reserved for time dynamic simulation specifically and when we refer to road simulation it will typically apply to this case what is raw simulation really like i that is one sets an initial state a physical system defined by its interactions and some time to stimulate and the quantum computer performs a computational experiment in mapping the initial state to the final state where any reasonable observable of the system can be probed this time dynamics obviously mirrors the most natural setting of the real world however despite this natural setting one will notice that a large number of quantum algorithms and theories closely follow that of electronic structure performed on classical computers where the focus is on low energy eigenstates of the electronic system rather than exclusively the final state after some fixed evolution let me let's re-read that again however despite this is really well written by the way like however despite this natural setting one will notice that a large number of quantum algorithms and theories closely follow that of electronic structure performed on classical computers where the focus is on low energy eigenstates of the electronic system rather than exclusively the final state after some fixed evolution this important deviation already wraps in wraps in data from the natural world that tells us in many systems thermal states are an app description of a system and at low temperatures low energy states are most commonly observed as we will discuss later i'm i'm really i think i'll have to reread this but as we will discuss later the use of such observational knowledge is strictly the user such observational knowledge is strictly more powerful than time dynamic simulation okay and underpins the great success of many modern chemical theory or simulation methods let's that's a i think that's a bald claim so it says observational knowledge is strictly more powerful than time dynamic simulation what does it mean observational knowledge well despite this natural setting one will notice that a large number of quantum algorithms and theories closely follow that of electronic structure with the focuses on the energy engine states whether your system is five to two five yeah i guess that what what so so i guess what this is saying is that um i guess what he's saying is that most algorithms focus on trying to find a specific state at the end like trying to like trying to craft it like trying to do something it's kind of like you run measure run measure like vqe right you try to you try to get to the minimal state and that's kind of the way you get to you know you're solving your problem um however this financial setting while the election of quantum rhythms and theories closely followed out of electronic structure focusing on law and a giant state of the electronic system rather than exclusively the final state after some fixed evolution rather than saying i evolve stuff and take a look at the state yeah but that's the whole point isn't it like you want to optimize something but i don't know this important deviation already wraps in data from the natural world it tells us in many systems because as many systems thermal states are an apt description of the system and what are thermal states [Music] and at low temperatures low energy states are most commonly observed as we will discuss later the use of such observational knowledge but what is the what is such observational knowledge what are we talking about here that's what's being complicated to understand um it's strictly more powerful than time dynamic simulation i guess the time dynamic simulation is the beat about the focus on low energy dragon states and underpins the great success of many problems transformational methods ideal discussion this plan will follow but for now we'll lamp both static and dynamic experiments into the category of direct simulation okay and i guess by dynamic experiments this is what vq is doing so you'd still still put that in the bucket of um [Music] direct simulation which means no learning right but that simulation would mean a simulation where the system of interest often processes often processes such as often processes such as such as a reaction is known and we seek to use the computational experiment to gain insight into the process that is challenging that is challenging to access through experiment so by direct simulation we mean a simulation where the system of interest suppressed like a reaction is known and we seek to use the computational experi to try to gain insight into the process that is challenging to access through experiment for example details of reaction mechanism transition states or migration of charge through a system they represent the bulk of computation composition experiments both and classic computers and those proposed in quantum computers and we draw a distinction between direct simulation and design often characterized by as inverse problems explanation and design for the task of direct simulation of chemical systems quantum computers have been shown to demonstrate an exponential advantage over the classical counterparts under most assumptions and exponential speedup has the practical implication that some simulations that might have taken longer in the age along the age of the universe could be done in in mere seconds more specifically full quantum dynamics with no approximations beyond discretization error can be performed on a quantum computer in the time that scales only polynomially in t and an m where it uses simulated time and is the number of basis functions and n is the number of electrons interestingly along these speed apps it comes with some of the same limitations possessed by a physical experiment for example in contrast to classical simulation where more precision is in a similar quantity is often relatively easy relatively easily obtained the heisman limit applies to any measurements one might perform the exponent this purchase have to also include exploring anzacs for electronic systems that are in inaccessible to classical computers perhaps surprisingly recent results have shown that quantum computers can even achieve a scaling for exact computations that is sub-linear in the basis set size by taking advantage of the first quantized presentation oh too much to unpack here so far we'll have to reread this um but i'm almost like i'm trying to find so i have quantum computers do not vastly extend their capabilities into the realm of discovery or design which we identify as distinct from direct simulation that is while many of the proposed simulations would be faster and more accurate representations of the same system that would be a chill classically they are much the same type of experiment without reaching into the design space so okay so what is this design space well there's been some notion of how quantum search may assist in design most results problem is at most quadratic speed up in contrast to exponential so we know that direct simulation subroutines used in the potential uh search would still benefit from improved speed up speed or accuracy due to the imminent size of design space this quadratic speed up is not terribly compelling if it's not combined now god give me a second i'll hear myself there you go due to the human size of design spaces quadratic speedup is not terribly compelling if it's not combined with structured strategies that is any improved search must start not from naive global search but a search enriched by knowledge of the design space for example one that starts in the chemical neighborhood of known synthesizable compounds in addition practical issues arising in real quantum computers may prevent quadratic speeds from being advantageous i mean that actually probably refers to the recent findings right that if you start with random answers like for vqe you you kind of end up with in the in the parent plot tool right but if you if you do a bit of um you know pre-processing and you start with this enant size that's a bit smarter then you might avoid these we'll argue later that perhaps it is even more apt than useful to consider an infinite chemical space as opposed to one which is merely completely large um still not everything completely clear though and that said dark simulation of course has great value for design public precision i'll just kind of look at this quickly because i'm i'm going to drop now probably uh it's been about an hour i'll definitely re-read this section some personals use kind of similar changes quantum computers so they prove this type of discovery expanding some systems [Music] this version is actually tightly coupled to a theory already relevant data for example the energy of a transition state might be used to justify reaction rate but in contrast comparatively a little attention has been paid to the potential advantage of improved dynamic simulations in addition it's perhaps surprising that dynamic solutions are quite clear it's not fully relaxed the borderline take advantage of these uh departures i'm trying to space give me the best part of chronic imperialism since being at these types of star stimulation was left wondering how far these values extend quantum computers can't fast forward time either oh sorry sorry that's the end uh limits of even quantum computations in chemistry that's the third third one and then the fourth chapter is learning as an alternative to computation that's going to be the interesting one rather than claim one must give up a hope on problems where the most natural relationship looks undecidable there's indications of response free destruction of combination approaches and leads them to embracing the only known resolutions to problems that exist for halting problems the first and not really powerful solution that has been mentioned is running time dynamics for when hoping for the event of interest to occur the second more actionable viewpoint is to understand that systems with advice can formally resolve such problems okay that is also a bold claim right well advice has a precise definition in theoretical computer science really it was recently shown that data from the real world can act as restricted a restrictive form of advice to solve the holding problem one's advice would need to constitute a form of infinite time pre-computation however much like the argument of finite versus infinite infinite systems the precomputation performed by the physical universe before this point though finite is already unique strong and available to be revealed through experiments okay yeah yeah yeah okay that is definitely interesting awesome that looks that looks good i i i'm liking this paper um i'll probably not reread two i'll just go through i'll go through three quickly i'm interested in chapter four i don't know if you can if you must read them all sequentially but yeah uh but it's it's interesting i mean it you know it's not maybe necessarily such a deviation from learning quantum mechanics that's kind of what i'm currently currently working on with the wall from physics project but it's it actually that they did help me understand a bit more i think what's at the core at the core of the idea of the physics project at least the way that i see this right i'm not saying that's the right way to approach it or not but it's it seems to me based on what i've read about it and heard about it and it's this idea of you kind of have a model and you're trying to you know they're not trying to just say hey this is all the universes you could compute let's see if we can find ours it's more like let's see whether we can inform have this model and then inform what are the properties and what are the things that we need to look at and and how can we then you know computationally reach and and kind of craft that model for the universe and i i think these are not so much incompatible from a thought perspective with what the paper is saying here at least from not my you know play person to the naive perspective or understanding of this anyway that's cool stuff i hope that was anyhow useful and useful um entertaining either but it was nice to read that stuff so um yeah see you as soon as possible i'm trying to kind of do more of these it's becoming difficult because of you know time constraints but we'll get there eventually have a good day what did i move here oh there you go back in place have a good day |
get to the second part here we go generalizing access swapping into observable swapping I'm curious now that I know more about observables maybe [Music] maybe that's going to help there's some fancy animations in here maybe that's gonna help you understand exactly what this is all about but you have to keep in mind that what I'm trying to understand is a bit more the sope operation and how can you intuitively understand it within the within the quantum Fourier transform algorithm because as I said it basically if it basically it's like the it's it's kind of intuitive on on the one side when we take a look at the circuit that starts with the source but it's not those so intuitive on the inverse of the circuit which again maybe I'm just like banging my head against like a useless problem um I was like you just you know you can just approach intuitively as a compute an on compute but still it does have some if you think about the the the inverse circuit where the swaps are at the end it you know there there is indeed some kind of reasoning why would you use want to use that circuit it has sort of a standalone meaning to it which is there you know so that the rotations and all that kind of stuff being clockwise counterclockwise etc so I just wanted to basically try to see if this any in two different standing of this swap in there this was the swap operation in there um and I was just plain curious about whether there's a way you can define swap from an interference perspective that is leading to some kind of interesting insights right because if you remember well when I did the Grover breaking down the core algorithm the second iteration I kind of realize that if you define the face as in like adding I'm still lacking the vocabulary by like adding some more component like if you've got like for example these are your states right and one one so and then I think was something like at the point you were having basically that part was phased out by 180 degrees and the the the way to get there was by taking simply the the original the original one and then kind of conceptually adding I don't know twice that right so you so those things kind of cancel out then you you end up with this element in here if you were doing it this way then you could see how the axis flipping that Craig defines was actually working it was giving a fresh I was giving a fresh perspective to the Grover's algorithm and how the actual amplification effects play into this whole thing because you're basically flipping all that and then turning you're turning the original plans into a minus and so suddenly these two components instead of having a cancellation a destructive effect they have like a constructive effect which is like three X right and so you're amplifying that and if that might be not a correct the correct way to see but it just I don't know for me it it's been more intuitive than talking about the inverse about the average or the infos about the mean and all this kind of stuff which is just maybe a mathematical proof of correctness but I haven't seen it sort of a more intuitive breakdown than that so let's see I'm um maybe the swap there's some kind of you know because at the end they when you have a swap right like you imagine you've got a superposition that is that it's basically 0 0 the same 0 1 1 0 1 1 and and you've got maybe that that little element that one element here phased out and then you're having a the the result of this right is you stay with plus plus zero zero you basically stayin out with plus 1 0 and minus 0 1 and then plus 1 1 so you've kind of you could think of these as this swap as you've moved the you can see it as you've moved the face around so taking a look at the things that change here you could think of you know this being as sort of impede in the middle you're kind of conceptually doing these are you doing these kind of because this cancels out like is it like as the 10th is this would this would cancel out with these but you still need to have another one so you actually now have that twice and then you need to have that twice so you're kind of you can think of it conceptually adding this piece into this per position I don't know if that I don't know if that has any that's for the particular case of office preposition because if you think about like you're not you're just having a a non superpose state where it's just you know what is that maybe it's because if you if you just got like I don't know like these running then you're swapping these two then you're gonna got these but it doesn't have any I mean you could break it down the same way right but it's useful for that particular case because this is what we're going to take a look at so we're gonna take a look at the at the corner Fourier transform there has the the circuit and has the slopes at the end I'm hesitant to call it the inverse the non inverse because I'm I it's just confusing already at that point but that is interesting because you've got phases phases in play and actually that's important because you all what you're doing with the key ft is you're encoding a wave in the face so that's that might have an intuitive interpretation it said my half it might have an intuitive help it might be be itself intuitive help understand why is this what needed so this is what I'm trying to understand so let's go back to the original goal of it other videos go through the rest of the part of the author block article and then and then let's see if that brings any insights into these but it's not so but that would let's deep dive into this in the next in the next video because I think that definitely can can be an interesting way of seeing it yes my point here is that if you have a so you've kind of folded things app with a key of T but then it's so you faulted things up well that's kind of that's kind of your end result so see your end up with the result then you want to kind of add this partner interference to basically swap it I said no I don't know I don't think it's gonna help I don't think it's gonna help cuz that's cuz yeah that's the whole point the whole point here is you start with that okay let me go through this first I'll come back to these in an in the next video um so generalizing there was a bit of attention but generalizing X swapping into observed something what happens if we apply access swapping but don't use the same access for each qubit for example suppose that we use the X and the Z taxes on cubed one but use the seven the y axis on the cubic - that is to say we apply these and these then this is what happens what happens what happens is that to keep its case so but they also get rotated if the first qubit had a state pointing along the z axis then once the state arrives on the second qubit it will be pointing along the z axis correspondingly as that state on the second key will become an egg state on the first qubit instead of swapping X 1 for X 2 where so swapping X 2 for next one for instead to also were swapping Z 1 for Y 2 this suggests a way to define a more general swap operation given two pairs of deserve volts a1 a2 and b1 b2 if each pair anti communes and it's independent of the other pair their commutator satisfies these and so then you can swap the this is an operation that exchanges states along a 1 for states along B ones what the hell does this even mean and States along a 2 for sex along B 2 the amazing thing about this journalist journalize definitions that it works for any observables we can apply two cubed axis but we can also apply to complicated multi cubed properties as long as a1 a2 you wanted me to certify the correct community commutation and documentation relations to say it will work to demonstrate what that means this one example that's what I like for a1 and a2 we will use the zetton x-axis for q1 but for b1 and b2 use observables involving many qubits we will use observables involving many qubits mmm specifically one would be the Zen axis parody z-axis parity of qubits ok so now we're getting it ok so let me just so we're really talking about observables this means things that you want to observe uh-huh so literally kind of because the the party is also an observable right this is something you can measure you measure this observable by preparing at R cubed in the zero state see nothing each other qubits into the target and measuring the target see you so we define as the parity of several keys veto we define as the parity of several qubits but it will be an x-axis parity and it will not use the same set of qubits P 2 will be the x-axis parity of qubits if you know how you should check that the observables a 1 equals Z 1 and a 2 equals x 1 and B 1 equals 4 and B 2 equals have the correct commutation and anti-competition relationships based on that being correct we can implement this swap off ok so let me wrap my head around this so basically you're swapping observables so you're swapping things you can measure it's like you wanna say you I I know I want to solve energy and position I don't know so you're stopping results of operations and measurements right so you're kind of swapping yeah so you're not just swapping QB States but you're swapping more complex operations and cubed states so what this is saying is the observable bus always the example here for a1 and a2 will use an x-axis of cute one so you're saying that that I say that as that access party and beat or defined as part of several cubes bottles with the x-axis party so you're gonna flip the party and the set in the x-axis okay if you know how okay so we can solve with peak observe so we can check that is actually working by moving a cube into the big party observables then retrieve me this should work even if you put all kinds of junk into the cube is use to defined parties there is here's what that looks like when single ad think work so wait a second so what have we got here the swap operation then it's like this so you're not so the thing here is in such as having the the why you're having like wait a second that's confusing [Music] where I might be lost so zetta an x-axis so that's it that's kind of the definition here a1 to a2 b1 it won't be too so this okay because this follows that pattern residue like it's like the XOR pattern that you've got like the control to controlled and uncontrolled so that's kind of the same know but it's not the same really I mean okay it's similar in like that there are three steps and that the third step and the first step are the same that's what you've got here mmm and I guess the one in the middle doesn't really matter what the control is not should matter in this case [Music] so you can so handsome a one and A to Z and x-axis so this is a 1 and this is a 2 that's why it's the x-axis that's why and it's an x axis control so this is an x axis control and that's kind of a tool and these are both z axis controls this is the setting here so this is kind of both a 1 and then here you've got the party observables so he's saying is that what Kirk is saying is that calculate the party okay it's 2 3 & 4 keep it's 2 3 4 & 5 so this is the party it's at this here I'm using on the color these here target giving them to the zero state see nothing each other qubits into the target then measuring the target okay an x-axis party what is the same Bologna same set of qubits but it's the are this I guess it to sorry it's not just not correct this is for these and then these guys in here stays and so and and this is calculating the parity and here the the reason this is built this way it's because it's the same as doing a harem art and then the see not with the with it's like going to you know doing a harem our sandwich because it's the parity so it would be the same but you're doing harm arson which so basically Craig is using his he's access control notation or yeah mmm which is more compact because you needed an armored sandwich to calculate the party on the z-axis because you know you cannot like the control not way to do that is the y the way you do it in the x-axis okay okay I don't know if that particular examples been chosen just because it works in the sensor he says if you know how you should check that the observables have the correct commutation and I don't know how so I'm not gonna check it right now let's see but basically that's how your map everything that's explained in here with these so you here you do a hammer sandwich and then you would do the same you're doing with the other two with other two operations that you can summarize it like that so if you don't know why then check out the access control check out that's the so you you basically have the operations as controls and that's that's a really that you must read that like definitely you read that that's that's really that's a really insightful one is a beautiful so here we've got the QFT actually there's also hammering sound which has made it something to take a look at as well okay so this is this is this and then let me clean it up and then you've got that animation here in check that is actually working by moving to keep it in to the big party observables then retrieving it this should work even if we put all kinds of junk into the qubits used to define the parties he's all looks like my similarity quirk so you're doing the swapping here so you're technically mmm what does this mean so why is it why is this done twice we can check that it's actually working by moving activity into the big party observe walls [Music] I mean again what is what are you kind of swapping here it's a bit abstract in terms of how can you check that and they should work even if we pooled all kinds of chunk into the qubits used to defined the parties here's what that looks like when single editing quark so we've got here the the pair is but what this notice how two blocks here this plane in the bottom right matches a display the top left and it rotates around at this one and this one this one and this one that's because the qubit state from the top is being swapped into the middle and then into the bottom okay so that qubit state is kind of swapped in here and and then in here it's a weirdo can I pause the animation seats that's when even though the middle we passed it through is going kind of nuts yeah actually if you look closely you can see at the end that will left some holes behind in the middle what house actually look closely you can see at the end that we left some holes behind it middle it's pretty we start with a single simple cubed then moved its value into some big complicated der waals amongst a bunch of junk the monastery trees the actual valley the semester is very important less than any pair of antique commuting observables can store acutely that's weird this this fact is key to understanding many error correcting codes interesting which spread a single logical cubed over many physical qubits and we can use these definition of our generalized swap operation to move qubits into between and out of these be complicated I can't I commuting observables well I think with general asks enough for one day let's look at total different pressures to swap in XY z-- that swapping okay that's totally different furniture interesting that's pretty abstract but I think I get what it I get what basically Craig is saying that you can swap like a cubed but then theis me so like so you're literally but that's pretty nuts so you're saying you're literally encoding one cubed into these qubits in here and you're actually including the those parties into one cubed thus this mean this as well so you're encoding those parties into one cubic in a way that you can actually retrieve that back if you know how it's been encoded but that's pretty not how to even calculate like I don't even know so you're encoding parodies into one qubit I don't know that's not gonna be the title of the video it's a swapping can be generalized into the into into an actual super interesting way of encoding things that's uh that's pretty crazy that's sort or alene OTT it is totally not intuitive okay so it's just the swapping is not Ju no it's the it's not just you know flipping the cable see this case this is a pretty nice generalizations well I'm trying to steal my wrap my head around this but it's quiet so you could technically do that and then you've got all that information encoded into one keep it crazy let me clean it up let's move forward XY ain't swapping it so it is a fact that any two cubed operation can be decomposed into local single cubed parts and one non local operation of the form it is a fact that any two qubit operation can be decomposed into local single cubed parts in one non local operation of the form these I don't know what it means equivalently we can split the non local part of the operation into three commuting parts and expertise I chasing an ex parte phasing part and Oly party facing partners that party facing part the size of the commune of the numbers x y&z use the measure of how non-local an operation is for the soap operation the non local parameters are x equals y equals that house interestingly this is the most non local an operation can get if we follow up the swap with another operation the size of the parameters can only get smaller that's because for example once that goes past the halfway mark it starts getting closer to the operation which is local anytime our parameters leave the minus 1/2 and 1/2 range we can make their magnitude smaller by applying plus minus one offset of them what what did I just read if we want to perform a swap based on the non local decomposition we need to know how to implement operations like said once and to say what the person does is leave the 0 0 in the 1 1 States alone but faces the amplitudes of the 0 1 into 1 0 States by by minus 1 to the power set ok when they took here it's a Korean does that value nothing happens when they disagree that part of this proposition gets faced and is the agreement versus discriminative cubits their parity that controls the phasing that is why I call it that party phasing operation what by creating analogous circuits for the xx and YY interactions and chaining all the 3x3 access priority effects together we get a sloping circuit that at least looks qualitatively different from X or swapping Wow what the x y&z parts can be placed in any order as long as the single qubit gates are adjacent to the turkey with gate with a corresponding axis it'll work note that the x y&z construction above is correct after global phase the air RHS of the above diagram has an additional global phase factor of I if you want to apply a control to swap these causes phase key back that has to be corrected within s inverse gate on the control there's a lot going on here what mmm I haven't even fully digest that your observable swapping in that's already going in into an even crazier direction it'll slow down a little bit I think by cleaning and oolagah circuits for the X X and the y location it's correct okay it is I have no idea what is what I'm reading here specialize in the XYZ swap consider that design axes interactions commute what is that apparently product that construction passes through is that part of the x y&z swap this means that the thing that moves the z-axis interaction from one wire to the other must be just the XY part so if we happen to be in a situation where we only have the XY part of an XYZ swap it's still possible to move that access operations across that access interactions we'll move to the other wire and went is that part of an X Y Zed swap is missing how I'm moving an x-axis instruction across the swamp oh it's only it's XY part doesn't work for that for that of work we need a Y part and is that part the X part doesn't matter do it x-axis interactions in other words as far as moving operations is concerned we can specialize the exponents are the specific axis by dropping the part of the XY sent like this crisp on two axes yeah there's another interesting specialization that occurs when we drop even more of this well if we drop one of the axes interactions and then drop all of the single qubit gates we end up with an operation like sent one the interesting thing about this circuit is not an x-axis interaction on one wire after the circuit is coming to is that access interaction on the other wire before the circuit but the same is not true in Reverse but when you go from right a life complicated stuff happens instead this one way okay phenomena analogous to the fact that removing the first scene out of a of a nexus what caused this flow to only work properly in one direction but now I'm in danger of retreating information on X or swapping so I'll leave figuring out how to relate as an exercise for the reader and move on to our information on X or something it sounds ok far so what if the two qubits you wanna swap are next to each other well if there's a path of connected qubits between them then you can slope on towards the earth until there I I just do the important so then return to the starting position break the soap chain down into some notes and you get these yeah that kind of kind of makes sense you're swapping these you wanna so this those two qubits so you're kind of doing all the chains and then you're undoing it the above construction is not very efficient it has that 60 plus a 1 or a T is the distance between two qubits and I thought we can do much better than that we can cut off by a factor of two by meeting in the middle that's interesting and the fact I treat my pipelining the intermediate ixora swaps in a clever way the result is the distance D swap it's pretty interesting what is going on here what is going on here distance peace what with depth t + or 1 so it looks like it looks like you're kind of intertwining the this house kind of brought together and then these two house kind of rot together and then and then you get these kind of mix marks here this ex um but still that's confusing in the sense that so here you've got the actuals and actual swap but then in between here you've got so these three operations belong to one swap right but at the same time you've got another swap kind of here in between so that's that would be one interesting thing to analyze more carefully the fact that you can kind of merge those swaps like that you can really do that wouldn't this be the same as just doing it separately like that they have to criss cross like that that's something to check and okay in that our virginity and so much better although you're still assuming there's a pathogen to give its what if there is not the case so we've got okay it was Chronicle petition original stock unless we have some sort of shared entanglement if you have some mechanism for building up and tangling your to disconnecting components and you can use that entire to sort it to give it to interpretation I mean I guess the idea my I guess what's going on here is your your interpretation but you're adding us a swap tweet so you basically okay so you're ahead of time so I guess what I guess what's going on here is that you're you're twisting the entanglement before the actual trepidation happens yeah and so when you will execute the repetition protocol and then you'll figure out what you need to whether you need to do like a control not or control set based on the measurement results then you'll kind of get the sleep result because at the end so so if you open Quan interpretation right you create entanglement this way before you do the whole thing here so and basically the whole actual teleportation I know okay so that's basically like a twist it's like an entangled teleportation really it's still a partition in both ways okay so so I get it so this is not a nice night and that's not what I mean so this is one thing this the other ones it's a and B right like Alice and Bob and then you're just doing I mean you could as well do it in two steps right but that's kind of doing it all in one step because this is then one of the entanglement pairs and this is the end the author the other one so it's not that you're using the same circuits you're using two separate circuits kind of blended into one here okay so I think that doesn't need to be checked farther this more I want you to break down the swap through any pair Aventa commuting observables consecutive information that is pretty fancy you can use observable swapping to store retrieve that information that is actually really a really good inside when you're moving pieces of swamp some access interactions may still switch wires when moving across the swap that's something still to explore and even keep it isolated if machines can be solved if you can build kind of timely to entity locations yeah there's a lot there's a lot to say so I wanted to check this here quickly as well so if I clear the circuit if I do so if we've got boxes in the process rather than where we're doing the [Music] the thing here and so you're basically that's your that's your swamp okay and so what I wanted to get what I wanted to prove is that so but then you can now do [Music] so you could technically do this right and another box here here so you're kind of the this is kind of chaining through all that and so what Craig is doing here is like you don't have to do them sort of in line like like this is one swap and this is another so but you can actually that you can actually sort of intertwine those operations and that still works which is what you which is basically what you've got here as a pattern for these eggs right but my point is I think that's not something specific here that matters it's just you it's just maybe more elegant but you could as well do it in C like it's in a serial way and then you still don't increase the distance um or the amount of operations you need to do right but it's an interesting way to see you can actually break you can actually connect things down that much so if I can't see the way and then I say remove this here and this here move this here and this here so that still works but that works with any kind of permutation with any kind of combination right no no no no no look at this this doesn't work if you do it like that ah that's interesting why this also doesn't okay this works is urine one it works is here and one but it doesn't work for anything else and if I do it this way there was an one it works for plus and minus but it doesn't know not know it works this works for everything okay interesting hmm that might have to do with what that might have to do with what Craig is talking about here so you can drop one of the one of the operations and and this will still work one way okay so that this is Stan material for another video so I'm gonna deep dive into X so these I think I'm I think I can close that so that's a really interesting in terms of encoding it's definitely helpful for its Kiran say many are correcting codes that's interesting it's it for me it's pretty mind-blowing that you can encode like something like an observable into a qubit because that's really what this is applying right you can encode a qubit into an observable but you're also swapping the observable into the cubed right that's pretty nuts the fact that one single qubit can hold that type of information they can then retrieve it but that's because of the entanglement that's definitely cuz of the entanglement that's pretty pretty crazy um okay but this it is XY is that swapping I stir this is something that I haven't released I haven't really understood and I think it has to do a little bit with why this construction is possible and it's not always possible in all the different configurations so why can you kind of like merge the operations and still it still works this is something that I want to kind of break down a little bit more but let's do another video on uncertainty driving into the into X Y Z and swapping there's definitely something interesting here in terms of the party phasing this party phasing concept yeah this is way bigger like a it's become a way bigger tangent than I expected I don't know if this is gonna help me understand the quantum Fourier transform not this one but the one that has the swaps at the end but that's interesting I'm just just trying to think a little bit about it but it's it's pretty it's pretty craziness I mean if I go to bookmarks and I check in QFT I think this is this is why like if I put these amplitudes in here and now we're swapping so what is the intuitive meaning of this swapping round and here but it's the wrong way of seeing this here I you don't want to have that you want to have like a and an actual wave that's incre like whatever superposition right and so this tells you let's say we're gonna have plus plus minus plus right so this is a preposition you have and says like how can you how can you basically do that it's like what's the seed of that can you get to that superposition how can you get to that's preposition by by means of rotating things so what this is telling you is like that's what you need but but but look at these so basically basically maybe that's what this is doing is just flipping that whole thing like these kind of that's the that's the point that stays and then it rotates this way and that way no no what am i what am i no no no this one goes up this one goes down and this one goes down what is an intuitive definition of these and wise is needed in this case maybe you should try to rephrase what the key with this version of the key of T is trying to do here right which is trying to basically you've got a superposition so it's in and kind of the most generic ways it's given that superposition what what other superposition given that equally distributed superposition because pay attention that stick that's the that's the point here it's an equal the amplitudes are all equal it's just the phases that are changing so how what set off or what kind of stayed what kind of state you need to use or you can use to actually or a wave that's encoded in the faces in here what are they ample that's really what it's not what are the amplitudes no what are the frequencies that make up that right and and this is this is the answer with these not these but then what why you know what's the intuition I'm here it's this because you're my again Mike and my current feeling is these it's really a correcting mechanism but if you're correcting something is because you can't do it otherwise right so but why can't you do it otherwise here why is it that you only have that particular way of wrapping things up so you've got harem art operations you've got like rotation operations and control rotations so maybe this is what I should click into maybe I'll do another video session in these first so to turn a deep dive into these talk about interference in here as I said and then maybe the next videos are gonna go back to that part up to that part here the next why is that swapping I thought I don't know I don't know which one I'll do first maybe I'll do this one first and then the other one I kind of think a little bit through some ideas because this is kind of what I'm missing for the kft and try to understand really sort of intuitively I understand how the algorithm works but I'm missing the piece of like why the swap in here um in that particular um circuit so yeah quote stay tuned for more |
today or we'll do the quantum measurement part but um i'm aware that i'm flying over these just like at the speed of line pun intended no but uh like just flying flying over the staff without really you know sticking to a specific point in digging deep but that's like on purpose right that's kind of at least from my perspective the way that i um that i kind of like to to approach topics like these let me just because i can talk and do things at the same time i just wanted to tweet out that people can join if they want so twitch dot tv slash uncertainties there you go hopefully that's the right link yeah that's like so link perfect so yeah basically basically that's what i will do so uh let me open the chat awesome um so last time with the um and you know and i've and i've i haven't taken a look at all this stuff in here right so i will come back to these it's just the fourth session and and i'm just really you know the goal is to learn the quantum staff and and kind of learn quantum mechanics right and and just to kind of re refresh the goal of this whole project right is not to understand the project in its entirety it's it's you know my primary goal is to kind of learn more about quantum mechanics and i thought a great way to do this is by by kind of exploring this project because i know that their stuff they're doing is quite cutting edge and actually it it's what i like about this is that it's an exercise of um you know a big group of scientists are saying we've got quantum mechanics and we've got this model and kind of try to map it right so this mapping exercise is a great exercise to kind of i believe it's a great exercise for me it was a great chance for me to try to understand sort of what are the parts of quantum mechanics that are relevant and kind of like you know get a bit of a non-traditional view on on all this kind of stuff so and then you know just build up my knowledge base from there and i yeah i i thought i'm not taking notes or anything i'm just really this is just really the way that i that i do stuff so i know that it doesn't work for many of the most of the people but at least i record the sessions and i have the videos so if you ever want to come back to one of these learning sessions and then they are there in the youtube channel as well um uncertain systems and i'll organize that a little bit better because there's a lot of mixed content from from from the past as well but anyway today i wanted to spend some time on the quantum measurement stuff so we did the basics and we did quantum formalism which here in quantum formalism my last time i already learned a lot of stuff that i want to come back to which is basically um and then afterwards kind of after thinking about this be more depth i did realize that there is more to these that i have to definitely dig into right because i come from just pure strictly speaking quantum computing side of things where you have a state and then you have a quantum circuit which basically dictates how stuff evolves and i think the way that i was reading through some of these sections here would be misleading because in in essence you have this this is just a toy example right of a system that evolves and then each node is a is is a configuration of this is basically your state your system state and so this is the multi-way graph this means what this graph is telling you is that you know from this node this one rule you can apply which is the rule that turns it turns this state into the a b state from this point in time there's two rules you can apply so you apply one rule you'll turn the b into an a if you apply another rule you'll turn the a into an a b and then so you kind of have two possible alternatives and so i was having a hard time going through this because i think i was too much hardwired thinking about the actual quantums not like a quantum circuit which is not later on i kind of realized that's not what that's not the point the point here is if you think about this is a quantum mechanical system there's the concept of you know the the the the evolution the time evolution of the system and so that is described described by the hamiltonian and i think that what this is trying to say is that you know and also there's a there's a point in time a point here somewhere where they talk about like um the evolution amplitude or some some sort of like the probabilities of evolving from one state to another and i think that's what the hamiltonian is really encoding in here right it's instead of just being a circuit is it's just telling you how the system could evolve and so that's what the multi-way graph here is telling you so that's why there's a lot of stuff that i wanted to you know um that i definitely have to come back to and and deep dive into afterwards um there's also the whole thing with lagrangian stuff um and that i definitely want to take a look at so we'll we'll do again we'll we'll basically do a that that's the way that i do this right so just go end-to-end and then we'll just kind of go back and try to put pieces together and then deep dive into some of these aspects um but so what i took away from this section last time was basically this duality of you know you've got states and then you've got like the the way they map the formalism into the multi-weight graph and and we haven't talked about all the other hypergraph stuff because that is just everything that comes before these like and i think that it's more related to uh to you know general relativity and whatnot and and the quantum stuff is really happening at the multi-way graph level i guess where you can take a look at the possible evolution paths of your system and um and then there's another so that was the first half in the second half is like exactly talking about like how this evolution how can you reason about this evolution somehow and how how does this then somewhat mapped maps to to um to the standard quantum formalism but i literally did not take out anything else from that whereas like oh yeah that makes sense like it was totally you know at least i grasped i think i grasped the overall structure of the chapter and that's what matters um so let's go through quantum mechanical let's see how they map that and what's because that's that's that's where things get interesting as well right because it's um it's also where you have um some of the biggest questions around quantum like or open challenges around quantum mechanics in general right like the whole the whole measurement problem so let's get to it above we gave a brief summary of how quantum measurement can work in the context of our models uh did they here we give some more detail okay i i don't know i haven't i don't think i have read anything before about quantum measurement but could be in the dance in a sense the key to quantum measurement is reconciling our notion that the definite things happen in the universe with the formalism of quantum mechanics or the branching structure of a multivariate system but if definite things are going to happen what might they be here will be again considered the example of a string supposition system through the core of what we say also applies to the full hypergraph case consider the rule a aab ba we could imagine a simple classical procedure for evolving according to this rule in which we just do all updates we can say based on a left-to-right scan at each step yeah that was that was what was marked in the previous chapters just like the red notes right um the gender was it like something like the generational evolution or something like that um so you apply all the possible rules you can from right or left from left to right and so you get this path but if how we know that there are many other possibilities that can be represented by the multi-way system right so that that tells you that's just a path it's not even a path but that's just a subset of the nodes they don't even have to be consecutive or like happen at the same like consecutive levels um most of the states that appear in the multi-way system are however unfinished in the sense that there are additional that there are additional independent updates that can consistently be done on them for example with the rule a aba there are four separate updates that can be applied to aaa right but none of this depends on depending on the others so they can in effect all be done together giving the result put together would put another way all of these updates involve space like separated parts space like separated parts of this string so that they are all casually independent and cannot consistently be carried out at the same time discussed in 5.1 doing all this across the state together can be thought of as evolving in the generational steps that's what they said as one so you have generational states in in multi-way cases there might be a single sequence in some multi-way cases there may be a single con sequence of generational states so these are the ones marked in red and in other cases there can be several branches of generational states okay really why because if we consider these two rules a a b and b a so a maybe that's just another example but like i'd say yeah okay you can apply all the rules but there are different ways in which you can apply all the rules at the same time the presence of multiple branches is a consequence of having a mixture of space like in branch like separate events that can be applied to single state for example with the rule a b and a a to a b and a to b b um the first and second updates here are space like separated but the first and third are branch like separated okay let's try understand that the first and the second updates here are space like separated but the first and the third are branch-like separated i don't know what they mean by this so a b a b so these are oh the first these are the four possible updates you can have so uh yeah okay i get it so this means these two these two updates here the first two can be applied simultaneously but then these other two cannot a view of because they basically they they affect the same element in the string right um the view of quantum measurement is that that it is an attempt to describe multi-way systems in generational states sometimes there may be a new classical path sometimes there will be several outcomes for measurements of states okay so so the measurement has got to do with the generational states that is not what i expected maybe because i still have an incomplete picture of of the whole evolution concept in here i'm just probably too i'm just probably overthinking it too much but now let's let us consider the actual process of doing an experiment on a multi-way system okay but now let us consider a process right now or a quantum system our basic goal is as much as possible to describe the motorway system in terms of a limited number of generational states without having to track all different branches in the motorway system at some point in the evolution of a string substitution system we might see a large number of different strings but we can view them all as part of a single generational state if they in effect yield only space like separate events in other words this string should be assembled without branch like ambiguity they can be thought of as forming because this is international stages in a little traditional state right that's what they're saying here i guess it's like at any point in time you can see the state aa or abb but it doesn't matter because they all converge to this one if we think about this generational concept right um in the timeframes and quantum mechanics we can think of the state in the multi-wave system as being quantum states that's what they said in the previous chapter the construct we formed by assembling these states can be thought of as a superposition of states okay so [Music] casual invariants causal invariants like such a message basic word causal no causal invariance that implies that through the evolution of the multi-wave system any such superposition will then actually become a single quantum state the construct will form by assembling these states can be thought of as a superposition of the states there's something a bit off with these like it's still maybe i kind of coming back to the whole circuit thing and it's just i think that might be i might be just fooling myself but because when i'm building a quantum circuit i i am in a way designing the way the evolution is going to look like right so if i say apply a hard mark gate like i i know that i want to be getting into a superposition of a zero and a one it's not that i there's nothing missing in the air i don't understand i i can't i i just don't find a way to map the generational evolution concept with the quantum circuit example for example just take a simple one qubit circuit right like you have one cubit and then you apply a harmonic gate and so that takes you into a zero plus one state but i'm not 100 sure if that means because you know because i could think of you know i could think of like like the the hallmark gate as a rule would be put the zero into the zero plus one state put the one into the one into the zero minus one state um but there's just one update it can do so so that is already a generational state so but it's a it's a state that it's super position so that's why i'm not i'm i'm maybe i'm just making the wrong analogy that's or i'm just looking at the wrong example with a quantum circuit but that's still a bit hard so the constructive form of assembling the states can be thought of as a proposition of the state causal invariance that implies that through the evolution of the multi-wave system any superposition will then actually become a single quantum state in some sense the observer did nothing they just notionally identified the collection of states it was the actual evolution of the system that produced a specific combined state in describing a quantum system or a multi-wave system one must in effect define coordinates and in particular one must specify what foliation one is going to use to represent the progress of time and this freedom of freedom to pick a quantum observation frame is critical in being able to maintain a view in which one imagines defining things to happen in the system with a foliation like the following at any given time there is a mixture of different states okay so now these are mixtures are they like is the word mixture here used as in like like an actual um mixture of states are not like a superposition right so with the foliation like the following at any given time there is a mixture of different states and no attempt has been made to find a way to summarize what the system is doing because there's a proposition and a mixture are essentially different right consider i have a foliation like the following so each in this case each and this picture generally generational states have been highlighted and affiliation has been selected that essentially freezes time around a particular generational state in effect the observer is choosing a quantum observation frame in which there is a definite classical outcome for the behavior of the system freezing time around a particular state is something an observer can choose to do in their description of the system but the crucial point is that the actual dynamics of the evolution of the multivoid system cause the choice to have implications in particular in the case shown the original multiple system in which time is frozen progressively expands the choice the observer has made to freeze a particular state is causing more and more states to have to be considered as similarly frozen in the physics of quantum measurement one is just the idea of that for quantum measurement to be considered to have a definite result it must involve more and more quantum degrees of freedom this i didn't know quantum measurement to be considered to have a definite result it must involve one more quantum degrees of freedom what we see here is effectively manifestation it's found at this i i don't know what this means in facing time and sunlight inflation the picture of all we are effectively doing is creating a coordinate singularity and and defining our quantum resolution frame and there is an analogy to this journal to to do a freeze time of my friend once again first time in a relatively sticky reference frame for example as an object approaches the event horizon of a black hole its time is described by a typical coordinate system set up by an observer far from the black hole will become frozen and just like in our quantum case we'll consider this database stay fixed whatever i don't know but there's there is a complicated issue here to what extent is the singularity and the freezing of time a feature of our description and dual extent is something that really happens this depends in a sense in the relationship one has to to the system in traditional thinking about quantum measurement one is most interested in the impressions of observers who are in effect embedded in the system and first and for them the coordinate system they chosen in effect defines a reality but one can also imagine being somehow outside the system for example one might try to set up a quantum experiment or a quantum computer in which the construction of the system somehow makes it natural to maintain a frozen time foliation [Music] the picture below shows a toy example in which the motorway system by its very construction has a terminal state for which time does not advance but now the question arises of what can be achieved in the multi-wave system corresponding to the actual physical universe and where can we expect that and here we can expect that one will not be able to set up truly isolated states and that instead there will be continual inevitable entanglement one might have imagined could be maintained as a separate state will always become entangled with other states the picture below shows a slightly more realistic motorway system with an attempt to construct a foliation that freezes time god i need to understand that those foliation stuff would be better and we see there is in a sense the structured multiple graph limits the extent to which we can freeze time in effect multi-way system forces the coherence or entanglement just by its very structure we should note that it's not the case that there is just a single possible sequence directional stage because point this is a possible classical path here an example where there are four generational states that occur at a particular generational stance and and and that might be then the superposition really and now we can for example construct affiliation that at least for a while for this time for all of these generational states it is worth pointing out that if we try to freeze time for something that is not a proper generational state there will be an immediate issue a proper generational state contains a result of all space like separate events at a particular point in the evolution of a system i feel i feel i have to maybe step a little bit back and and and and really try to map like really try to understand that concept to be better of the generational states with like their like a proper example um if we try to freeze time for a state that did not include all space like separate events there would quickly be a mismatch with the progress of time for the excluded events or in effect the singularity of coin observation frame would spill over into singularity in the casual and the causal graph leading to a singularity in space-time in other words the fact that the states that appear in quantum measurement are generational states is not just a convenience but a necessity or put another way in doing quantum measurement we are effectively setting up a singularity in parental space and only if the states we measure are in effect complete in space time will the singularity be kept only in branches space otherwise it will also become a singularity in physical space-time or big words this is too much in general we'll talk about coin measurement we're talking about how an observer manages to construct a description of a system that in effect allows the observer to make a conclusion conclusion about what has happened in the system and what we have seen is the appropriate time freezing foliations allow us to do this and while there may be some restrictions uh principle possible to construct socializing motor system but in practice as the pictures above begin to suggest after a while the foliations have to we have to construct and get increasingly complicated effect what we're having to do in constrain in constructing deflation is to reverse engineer the actual evolution of the motorway system so that our elaborate description we're still managing to maintain time as frozen for a particular state to out-compute the system itself and so we will be asking the observer to do a more elaborate competition to maintain the description they are using and as soon as the computation required exceeds the capability of the observer the observer will no longer be able to maintain description it is worthwhile to compare the situation with what happens in in thermodynamic processes and in particular with the parent entropy increase in a reversible system it is always in principle possible to recognize say that the initial conditions for the system were simple and low entropy but it practiced the actual configurations of the system usually become complicated enough that this is increasingly difficult to do in traditional statistical mechanics one talks of coarse grain measurements as a way to characterize what an observer can actually analyze about the system in computational terms we talk about the computational capabilities of the observer and how computational irreducibility in the evolution of the system will eventually overwhelm the computational capabilities of the observer okay i i'm this is getting heavier so what do we what do we see here so what what is let's try to let's try to unwrap some of these it's again the generational states i'm missing a good example of these with a quantum circuit kind of like i have maybe no i was gonna say maybe it's got to do with noise and in general you know the mixtures that you know the evolution of the system is somewhat dictated by like a noisy thing but it's also not true because these nodes are basic states not just states they are basic states so so what this is trying to say is that oh god um what is it even trying to say that that the measurement in a measurement you can only see generational states i think that is at least something that i can say out of these and then and then making a measurement is picking a specific way of foliating the multi weight graph that's just your reference frame right like so maybe because i'm i'm inclined i'm a bit inclined to take a look at just the operators part because i because maybe that is going to help me understand or build an analogy with the circuit stuff so there are states and operators now models updating events are yeah okay updating events are corresponds to operators in the standard evolution of a multi-wave system all applicable operators are in effect automatically applied to every state oh okay so that is actually i think that is gonna oh that's short enough i think that's gonna help me build that bridge because that's that's what i was looking for right now so so there are states and they're operators right let's see what is the reference here oh come on um in our models the dating events are will correspond to operators so the operators are the rules right and and that's kind of yeah that's that's what i was saying right you can you can ride you can write rules that like specify the harmonar gate saying zero to the plus state one to the minus state in the standard evolution of the multi-way system all applicable operators are in effect automatically applied to every state to generate the actual evolution of the system that's what i don't understand but to understand the correspondence with standard quantum formalism we can imagine just applying particular operators by doing only particular updating events consider the string substitution system a b a b a so a b to a b a and b a to b a b and the system we are affected to operators so one and o two correspond to these two possible updating rules we can think about building up an operator algebra by considering the relations between different sequences of applications of these operators in particular we can study the commutator in terms of the underlying rules it's going to response to i don't know what a commutator is um uh the first header is also playing golden initial state are different we can then say that it stays related from the branch pair but then at the second step the branch panel resolves and the branches merge the same state and in fact we can represent this by saying that i wanted to commute um okay so that that whether they compute or not um that all branches can result in a single classical state just like in standard quantum formalism the computing operator is associated with seemingly classical behavior but there's a key point here even if even if causal invariance applies to branch pairs and will eventually resolve they might take time to do so and this is and this is delayed resolution that is the core of what leads to what we normally think of as quantum effects um once a branch pair is resolved there are no longer multiple branches and a single state has merged but before the branch pair is resolved there are multiple states and therefore what one might think of as quantum in determinacy in this case where branch pair is not a resolve the corresponding commutator will be non-zero in a sense the value of the commutator measures the branch like distance between the states so branch pair is not a resolve the corresponding commutator will be non-zero i don't think that's going to help anything you know so this is a brush like separations and there are other pictures in tongue one two stays on that if they are part of the same unresolved branch pair and does have a common ancestor the multi-way graph gives the full map of all entanglements but in any particular time corresponding to particular slice of or of foliation defined by a quantum observation frame and the branchial graph gives a snapshot that captures distant instantaneous comparison of the negative ones okay um it doesn't help me but i mean at least it confirms that the updating rules are the operators right or you can think of these as operators um but then this would mean that a cert that uh that a circuit is is picking a specific updating order you know so see what i don't understand is what what will be the analogy of that multi-way system like what is the multi-way system trying to because if i don't understand that then i i also don't know how to make sense of this whole generational stuff so for this i think i have to go back to the quantum formulas and stuff um because for a circuit right i have not only a specific set of rules right like the harmon the harmonic operator the control knob operator but i have a specific i have a specific order or i have a specific path it really is a specific path like a quantum circuit would be of a specific path in the multi-wave system because i know at every point in time what is the specific set of operators that i'm picking and where are they applied within the state right like you know in this case you have or somewhere below here the other stay you had a system with an example with like rules that both apply to so that'll be that that will be where is that there was an example here with the word exactly so you have these these two right so you could think of i could think of these as like let's say the harmon gate you actually have two rules no i mean it doesn't matter like whatever right like actually each operator is really each operator is really a set of rules right or would be i mean i would build it like that right so i'd say and and they're based on your computational basis although that feels somewhat wrong because i i i have the feeling that the computational basis got to do with the at the end of the defoliation ah that's maybe not true either i think the computational basis is at the end of the day that choice is the choice of language you're picking the choice of of notation you're picking if you're to pick zeros and ones then then so be it right um and so the rules are going to be defined like turn a zero into um the plus state or turn a one into the minus state but then there can be another say the x game right it's also going to have it's also going to share things like these so you're going to have a bunch of all different possible yeah evolutions but then what's the point so i think just a quantum circuit so i don't i don't really get maybe and as i said maybe it's because i'm missing that dynamic component of the quantum mechanics right let's say how is it that we describe a system evolving because for me i just you know coming from the circuit world just have that in my head i have a circuit which this model is just a specific path in here because i know exactly what rules i want to apply and where i want to apply them you know even if i could apply a rule in multiple spots in here rerun rule i might i'll choose to apply this one right um but i feel i think i really i think before before i go on i need to deep dive into this a bit more yeah before i even go to wave particle duality and stuff like that what is that even i mean that's also fairly short and quantum mechanics it's funny because that that is already kind of i don't know what when i see such short chapters i'm scared because it's probably just event horizons and singularities and space time and quantum mechanics cosmology expansion and singularities reversibility reversibility motion and special activity space and time structure space so i think i have to come back to this speed and the first part i kind of understand so we that that i'm i'm like i keep getting lost in the same space so each i was wrong so when i said that it's not a specific path but it's a specific sub graph because i might choose to apply a hard mark gate which might split into two is to me to two notes because i have a zero right let's try to do that again with the paint if i can manage to open the application without breaking the computer and the streaming that'll be awesome so so i start off let's say i start off with the state 0 0 right and and my set of operations are the hana mart and the x gate right but i have a specific circuit in mind which is you know apply a harmonic gate to this qubit and then apply an x gate to this qubit like if i would consider all the possible ways this can be done right like which is what these graphs seem to be doing it's like well okay one possibility is apply the hadamard rule to the first qubit but that actually leads into you know into these because this is these are really two rules but it could also just be no way yeah so but these two would merge right but i could also just apply the x-gate which in this case i have two possibilities no i also have the possibility of applying it everywhere and i also have the possibility of applying the hadamard gate to both oh god and the automar gate to so that would just grow right so i mean some of these merch and would not but then if i have a specific circuit in mind then i know i'm picking a specific subgraph in terms of the evolution i'm saying i want to go down this path and then next gate here so kind of like these are the two these are the two should change color but these are the the the two notes that i want to have everything else i don't care i've picked that specific i've picked that specific path that has led me to these having two separate notes i think this is i think i think this is probably what what's happening here probably but then why build that feature right like why why do you need to build a multi-way system for these um that's that's what i'm [Music] and that's kind of maybe the step that i'm missing towards like the quantum mechanical part of it right like to to kind of like um um let's go back to these so let's let's i think we have to unpack some of these things so here we talk about the states being quantum base the nodes being quantum basis states that makes currently sense based on what i on this feature i don't get so much the entanglement stuff because i wouldn't say these things are entangled even though they probably share some ancestry i mean they are correlated but it's not an entanglement correlation so they are like the thing is they are coral like the two things are correlated in a way right so each pair of states generated by a branching and its graph are considered to be entangled i don't care about the geometry geometry right now here we have the count of the paths let's say that we want to track what happens to some part of this branch like hypersurface each state undergoes updating events that are represented by edges in the multi-way craft and in general the path followed in the multi-weight graph can be thought of as geodesics in multi-way space so here they get into better worker down respond to energy the space time caught causal graph however it's just a projection of the full multiplied causal graph now note that every node in the multi-wave causal graph represents some event in the multiple graph but events are well produced branching and turns let's just zoom out turning power parallel energy in energy is identified with a hamiltonian h so what this says is that in our models we can expect transition amplitudes to have the basic form in agreement with the result quantum mechanics okay so let's start with transition amplitudes let's just dig into this so so so is your quantum mechanics transition amplitudes what are transition amplitudes path integrals let's do this extended sassy quantum mechanics transition amplitudes okay so this seems the right no uh so in quantum mechanics the physical system corresponds to a hilbert space states correspond to not in a one-to-one way to points in here with space and the physical postulate is that the transition amplitude a complex number from a state corresponding to v into state corresponding to u is given by where the physical meaning of the transition amplitude is that if you take the squared absolute value of its complex number you get the actual probability of the system going from the state corresponding to v okay so there's these dynamics are defined but i don't understand them so it's it's a postulate right but this is a probability amplitude that's that's that's just the measurement stuff so in quantum mechanics the probability amplitude is a complex number used in describing the behavior of systems the modulus squared of this is a probability density but probability amplitudes provide a relationship between the wave function of a system and the results of observations of the system but i don't want to that that's that's the that's what i don't want to have i don't want to have the the observation stuff i want to have the evolution stuff transition amplitude it keeps it keeps keeps taking me to the path integrals which i don't know what is it the traditional amplitude in the most commonly used operator approach the transition amplitude is expressed as the vacuum expectation value of the product of particle creation and annihilation operators these operators obey certain commutation relations so what is this oh quantum field theory so this is just a portion of these i'm not gonna no how can i even so what is what is the path integrals quantum mechanics what is the path integral the python formulation is a description of quantum mechanics that generalizes the action principle of classical mechanics it replaces the classical notion of a single unique classical trajectory for a system with a sum or functional integral over an infinity of quantum mechanically possible trajectories to compute a quantum amplitude this formulation has proven crucial to the subsequent development of theoretical physics because manifest lawrence covariance is easy to achieve than in operative formalism okay so this is a separate formalism than the operator formalism and i guess the operator formalism is just the staff with operators should probably dive into one of these god i think i've opened uh an unconventional text from our mechanics kind of feel theory starting mechanics i mean just symmetry principle without reference to classical mechanics and mathematical foundation the bridge conservation paper so i i i kind of get it that it's like so i guess what this might be trying to say is that in in in in the formalism itself there's just an obstruction that you to what you usually think classically which is like you have an object and it just has a trajectory and in this case have a quantum system which doesn't have a trajectory but it just has a collection of all the possible trajectories they can go through um and what is this but is this what the hamiltonian is defining or not that's that's my that's the point hamiltonian so what about connecting hamiltonian hamiltonian hamiltonian pathway does it disappear as a suggestion oh that's just a graph okay now hamiltonian hemapungen mechanics no hamilton mechanics hamiltonian mechanics there is a video and there's some lectures i was thinking about introducing or watching some videos as well uh also the iphone again with microsoft information of classical mechanics historically contributed to the formulation of statistical mechanics and quantum mechanics and melatonin mechanics was first formulated by william rowe and hamilton in 1833 starting from lagrangian mechanics the previous revolution of classical mechanics introduced by joseph luis de grange like lagrangian mechanics hamiltonian mechanics is equivalent to newton's laws of motion in the framework of classical mechanics so in hamiltonian mechanics the classical physical system is described by a set of canonical coordinates where each component of the coordinate is indexed to the frame of reference of the system the qi are called generalized coordinates and are chosen so as to eliminate the constraints or to take advantage of the symmetries of the problem and the time evolution of the system is uniquely defined by hamilton's equations where this is a hamiltonian which often corresponds to total energy of the system for a closed system is the sum of the kinetic and potential energy of the system in the training mechanics the time evolution is obtained by computing the total force being exerted on each particle of the system and from newton's second law the time evolution of both position and velocity are computed in contrast hamiltonian mechanics time evolution is obtained by computing the hamiltonian of the system into generalized coordinates and inserting it into hamiltonian equations this approach is equivalent to the one used in lagrangian mechanics the hamiltonian is the legendary transform of the lagrangian when holding q and t seeks blah blah blah no idea what i'm talking about the more degrees of freedom the system has the more complicated its time evolution is and in most cases it becomes chaotic cockle it in the hamilton from a lagrangian okay so this does actually take me down the classical path a little bit and then there's the crunch of mechanics stationary action principle that might be introduction it's funny because that's just from newtonian telegrams and mechanics that is super dense so what about solar cryo mechanics is there some sort of tutorial oh god lesson one basically branching mechanics uh that is quite wikipedia as well maybe i should just do this off of the wikipedia stuff which is pretty hardcore though but okay so so looking at the hamiltonian mechanics and then then there's this um but then isn't isn't it then schrodinger's equation right what defines the equation isn't isn't it what is this what actually defines the movement this is the hamiltonian operator the wave function is a linear partial differential equation that governs the wave function of a quantum mechanical system the series equation gives the evolution over time of a wave function the quantum mechanical characterization of an isolated physical system so that is that is what um preliminaries okay particle in a box example so here there's some examples with the harmonic oscillator quantum harmonic oscillator oscillator okay so here there's some examples of so this is this is maybe what then leads to these to the transition amplitudes right or like what if i google these two things like do they anyhow schrodinger equation [Music] transition amplitudes oh is the transition after this the path integral formulation that's then a different formulation so this relation between schrodinger's equation and the path integral formulation of quantum mechanics um this article relates to shrinkage equation with the pythagorean symbol non-releasing one-dimensional single particle hamiltonian composed of kinetic and potential energy so background schrodinger's equation the bracket notation is like these camber and stat that's the hamiltonian operator whatever i have no idea what i'm reading um the path integral formulation the bottom information states that the transition amplitude is simply the integral of the quantity over all possible paths from the initial state to the final state where s is the cl is the classical action so the reformulation of this transition amplitude originally due to dirac and conceptualized by phaman forms the basis of the path into the formulation part of the product formula says that for non-self-regeneration we have the transition amplitude can then be written as these although the kinetic energy and potential energy will produce do not commute the charter product formula cited both states it's a classical lagrangian god so they are related and then the the transition amplitudes is this is really it's got to do with that and so this is something that you can calculate as well from schroedinger's equation based on what i currently seem to have understand so these would be yeah so these would basically be a system that just evolves kind of i think i have to re-read these and then i'll probably have to do the lagrangian and the hamiltonian mechanics stuff i i feel like this this is going to be inevitable to actually understand why i mean we could we can do this just not starting from the lagrangian mechanic stuff it's just i don't want to dive too deep into these but that's quite complicated my grandchild mechanics i don't want to watch any of the quick videos here like the lagrangian method brilliant.org yeah that's also not intent mechanics doesn't it doesn't look better either anyway i think we'll just go from so an introduction to location mechanics maybe something like that it could be worth exploring oh that's a boat man i'm gonna buy a book yeah i think we'll start from lagrangian mechanics i want to try to get a sense of how to get how do you go from lagrange mechanics to hamiltonian mechanics to to then the schrodinger's equation sort of and then then this whole thing with a path integral formalism um and um but again it's so it's it's in in a way the hamiltonian tells you sort of how how the system is evolving and the system can evolve in multiple different ways right so you've got it can evolve you know in these and that right and that's kind of your yeah well in essence that's probably what the the wave function is telling you right it's like i'm either in this state or this like no not either in this state or in this state i'm saying i'm in a linear combination of states um are those equivalent then to these paths i i don't know too many open questions too much open questions that's complicated i i have to sort of tunnel a bit more because otherwise i'm going to get lost but basically i think at least i understood a little bit better the the function of these and then how the mapping between these and the quantum system and then what the what is then the analogy with a quantum circuit in there which is just pick a type graph of these that you specifically pick because you're telling the system how to evolve essentially you're programming the system you're telling the system what actions to to take what to do right how to evolve the system essentially but i'm not it's not entirely clear how the evolution maps to the rules right i think that's what they're trying to explain here is how these rules are mapping so probably i should read that again because they talk about the angles of this turnings and i think that is basically the rule applications right it's the action and oh look at this so this is the path in the performation of quantum mechanics i think i have to re-read that second part a little bit more next time and then maybe i should maybe i should maybe i should just to consider a path in the multi-way system going through some multi-way space to know how much turning to expect in the path we need an effect to integrate the lagrangian density along the path this will give us some form of but it's exactly what the started patting the formulation of quantum mechanics maybe i should just maybe i should just just go there just path integral formulation and see how that relates to schrodinger's equation yeah yeah yeah yeah probably also there's some some oh so there's some nice link that i can just follow here with references and stuff so we can start here awesome oh god that is actually that is actually a big kind of worms already for the next couple of years so far here this is heavy this is heavy okay but i better start to get a sense of these so there's just a formalism right in terms of how to study the the this evolution and i guess there are multiple formalisms the same that you've got multiform multiple formalisms in classical mechanics anyway have a good night |
If you can catch up to where the Wolfram Physics Project is right now who knows... many discovers await us all )))) |
Thanks for show. I watched some YouTube videos by Stephen Wolfram and it helped me with your video today. There was a foot note in this video you may want to study, [110] called Cellular Automata which he explains. Just a beginner but learning. Thanks. |
the concept of measuring a cubit can be a bit confusing mmm I like to summarize it the following away at an intuitive level a QB has or it's sort of you can imagine a qubit has three dimensions where you can have information and and it's not that they're entirely different types of independent pieces of information but you can take a look at a cubit from three different sites the same way you have a you know a dice that has six sides it's it's a convention to choose the upper looking like the upper the the upper side the upper face when you roll a dice as in that's the NAP the value of the dice you can look at it from different angles and then you will see different types of information and it's not an exact analogy but that's sort of a way to take a look at it so what you can see here and I'll put the links in the description to the videos and all the other sources that I've used to get to that point is this is one of the best visualizations that I've found so far and here you have one cubed and you have another cubed and each of those squares is kind of one of the dimensions and there's sort of a third one I believe so it's not about how to measure and what's the best way to measure just pick one measurement and another you can move information around I think that's the most important key takeaway out of all these |
so breaking down Quantum mechanic exercises in 60 seconds let's see how far we can so the first one I guess I'm not so sure how to build hamiltonian so I'm going to pass on this one behind this in the concept but know how to build them number two um that's a standard one so I just this potentially black this into the stronger equation against so you just need to figure out the other parts and then try to solve that equation I guess number three which makes the following operation of flower person I don't know what makes an operator Linea um but I'm guessing it's something like describing how the solutions of applying those look like in general number four I guess those things are commutators um so it's kind of like just proving those relationships um as in like you know how these things could be um same for five six looks like just a um what's it called a uh |
round three of the controls an experiment so what have I figure out so far so at an intuitive level first point I want to make clear one thing it is not still clear for me what's the intuitive benefit of having different types of measurement right so everywhere all over the place they talk about like measuring on the z-axis and measuring III get the mathematical correctness of it I understand that when you go down the level down one level you see that you know sure dependent depending on how you measure few bits then you're gonna see things differently but on an intuitive level I think what my scent my current intuition tells me you you know you're probably could have peak one measurement and then just get on with it and and and so I think I wanna just stick to the set measurements always and and try to build the intuition from that perspective because maybe that's an easier way to do first and when you know my current marker my current standing is when you so when you have a state that it's like in a superposition let's say that the controller let's say could the cubed zero is always gonna be control so this this is Ana superposition and then you apply it whatever controlled operation you're basically you're basically creating different types of entanglement different types of correlation right so with the control X you're creating a correlation where they always agree right no matter what it's just they agree differently fifty percent of the time but they always agree so that's useful I guess that's useful when you do a controls ad nevertheless you you have the situation where the agree and disagree fifty percent of the time so that might seem useless but they always agree disagree in the same way so maybe that has some utility but from an intuitive perspective that's what it it creates another type of entanglement so to say of correlation and and just it's probably out of scope for these but control Y so control Y it's a funny one why it's now red oh I see that this went to the face oh that's fun territory okay so control Y gives you effectively a also something where they always agree but you've got a bit of extra information here where you have like a negative a negative complex component and that's where all this extra information can be processed that's interesting that's interesting and and you know the the reason why I think because you say yeah okay they agree and disagree when you look at row side they agree and disagree 50 percent of the time it's like well how is that then different from just having like a superposition well it's different in the sense that here they also agree and disagree theoretically or half of the time but you can't control you're not controlling how they agree and how they disagree and there might be relevant for whatever you're trying to solve so and I think this is what's mind-blowing about all this is that it's not just you know it's not just the way that you're gonna measure things at the end but it's like in between when you start solving a problem and and your final measurement you can play with the dimensionality that is just mind-blowing because at the end of the day you have you know you can make the same statement as I said here half of the time to agree how awful time to disagree in theory right but if if we go and we do these yeah half of time the green disagree but in a sort of a different way and that's pretty interesting that's actually pretty interesting so that's that's kind of summarizing that's interesting listen isn't they agree and then and and versus you know versus if you take a look at the density matrix from the perspective you see that it's just way noisier noisier in terms of of what's going on in there so the controls that does this that's cool now what happens so this is when the control bit is in the harbor state now we're gonna let's so it's different our correlation let's see what happens when we have both qubits in a superposition so that's our starting point when you do a control not nothing happens so in this case the control not doesn't have any effect density matrix is the same again just to make sure that we're not just printing some mistakes simulator let's go ahead so on this is here we'll take a look at it in a second if now though I if now though I use a controls and boom Wow let's see again if that's also correct but it seems like he just killed it okay so this just destroyed this just destroyed the whole thing I just destroyed a superposition but let's see let's simulate that so let's take a look at the different the one that we just submitted so and see if that that's that's the way that's why we expect it to be so we said we have a superposition and they apply control not and basically oh you see it's not that nothing happens is that it's always going to be zero zero Wow because if that is zero and that's this year say zero so if if here's a zero and then here's this year and they say zero zero and here's one it's confusing because it can be zero one and then you would still have zero one it's tough to grasp it's not intuitive it's not and anyway so it's difficult so and here so let's see if that really is what we think it is seems like wow really interesting that's definitely interesting so um and and and what envy have a control why look at this that's getting interesting you see that's cool that is awesome really this tool is pretty pretty awesome so it's basically flipping flipping the sign so it's interesting that's interesting it's like really that's that's honestly all honestly that's kind of all I can figure out I mean so far because one of the things that I'm gonna do is I'm gonna go and read the guides the IBM Q experience guide in the next videos and let's see what happens if I gain more understanding but I mean that's awesome you see how this evolves right but you see okay so basically basically the controls ad is so the controls ad in this configuration it's doing that type of entanglement but you can play with of course because you have an X here then you've got something different it's just mind-blowing can I do that doesn't have any effect of course doesn't oh good so in this case they agree in disagree but also you have you know that kind of - in here so they also kind of agree and disagree it's just the space of possibilities is mind blowing this is mind blowing its mind blowing mind blowing and those things are just operations on the y-axis I guess because so basically what this is what's this is what's telling me it's another type of correlation where the agreein disagree half the time but they will always agree in this grade the same way and that is that is an interesting thing I I'm curious I'm curious what would happen and and that's way too otoscope but if we go to three cubits and then we would do something like that it's kind of funny thing cool so huh it's uh it's an interesting thing to play with it's a really interesting thing to play with it's creating different different types of correlations I wonder why I wonder how this is useful and probably if we take a look later on at some concrete algorithm examples so we can understand how those things are being used yeah I don't think that's correct again because there's everything zero it's it's a bit sad that I hope they fix that if it's really a problem because that's such a beautiful tool to gain intuition because if I send that to to run the simulator it should just be zero zero zero zero they should be because yeah because that's basically what I would expect because not none of this is activated cool so for the moment I'm gonna for the one I'm gonna I'm gonna keep my my sorry I messed up with this oh I broke it let me delete it so for the moment we're gonna keep it this way I'm gonna stay I'm gonna stay at that point with that with experiments with a control said it seems it's a different type of correlation yeah obviously zero zero zero as I said okay so yeah so that kind of that kind of thought was interesting let me see let me see you know it's a different are correlation interesting that's pretty cool it can be a bit overwhelming to play with this stuff though yeah whatever to sum it up sum it all up controls that can help control eggs can help it create a different type of coalition where they all always agree I controls that it helps you create at a time correlation where they always were they disagree in equal probabilities they agree or disagree always integral probabilities but you always know in which way they're gonna agree and in which way they're going to disagree which is which this can be definitely helpful and |
alright here we are at it again trying to understand the control Z so we're gonna do the following just as a basics go just stay with two qubits and I had trouble last time visualizing the controls that by using that here so I'm gonna go ahead and assume that go ahead and assume that you know if we do this and this and this is the same as doing a control that this is based on the notion that doing a yeah I think I think I think that's I think that's something that's safe to assume and I'm gonna just I'm gonna just keep that in here let's see if I can edit dot and include that as well so we know that this is these so this is the control set it's just for me to be calm with this and then we'll edit that and include this as well okay and no we're gonna do it like this way so there's a control set and what I want to do now is I wanna I want to do three things so I want to try to understand by using the visualization tools that the qxp IBM cube experience is providing us here is what happens first against all the possible classical States so let's assume zero zero is one one possible stay is your 1 1 1 0 and 1 1 is its forward different possibilities then then we're playing a control set and then you know let's see what happens then I want to see what happens when we have sort of a non classical superposition but it's still without any type of entanglement so when this means when when each qubit is in a superposition and then we're gonna entangle them and see if that brings any more clarity so I have no idea what how is that gonna work out but let's see so we can see already that when so what I'm seeing here is when they're in zero zero and we're having a control set and nothing happens which makes sense because the cubed 0 0 therefore the control is not activated before the set is not applying now if I'm gonna do if I'm doing something like that problem with my mouse so I'm gonna do something like that now we have a 0 1 right I think I want to make sure that map's the so what are those ears the cubed 0 is the one that is farthest to the right on the state farthest to the right ok so so that cubed 0 here is the as the 0 here like the the last sort of the rightmost good so here we see nothing changed if I have to be careful because I know that some representations if I gotta take a list at vector yeah so nothing's nothing changed because so what that tells me is that I'm you know the Zetas that doesn't do anything to keep it that's in a classical zero state because that's a 1 so I'm assuming then you know this is applying now if we do it this way we're also gonna see that nothing happens because of the same reason that we said before so my understanding here is zero means that it's not activated so nothing happens and we do this now what also nothing happens nothing happens with the state nothing happens which basically it kind of makes sense [Music] because the zet gate [Music] so if I imagine if I imagine a block sphere and I'm saying this is it I mean it doesn't matter but it's just rotating the z-axis of the blocks here for one cube in I keep making I keep going back to the blocks here and I think that's dangerous to do especially was to keep its I am I'm gonna try to do that but basically what we just saw is that to a classical to any classical combination of states just you know nothing happens right which which is already a good good outcome to keep in mind so nothing happens now what happens if one of them is in a superposition I'm gonna I'm gonna I'm gonna leave the cubed zero as like you know where the next case so we make sure that the control set is supplied because otherwise doesn't make sense right so we can already just keep those cases where here we have a zero because then nothing's gonna happen so what if this is in a superposition what have we got basically nothing really that's so confusing nothing you know basically basically what because what what this is telling us is you know at the end of the day what can happen if the set doesn't have any influence on either 0 or 1 but it does in a superposition so confusing that is confusing probabilities is all the time zero zero zero zero so what if this is here it was zero nothing happens and then we had an X here also now again I hope this is unless I'm again you know there's something I don't see which is basically maybe in order to see anything I so this is telling me is that this is maybe not affecting any any how the qubits in the base and the computational base said is that so or am i again experiencing some sort of bangy behavior nothing absolutely nothing marvelous now what if we entangle them boom maybe those per years are like that's getting paranoid man that's carrying paranoid let me see it seems maybe there's some just issues with this visual visualization it just doesn't seem like it's awkward so if I save those changes and I run this on a simulator so again see what we get pending results it's kind of kind of weird kind of weird what if I just remove that nah doesn't bring anything it doesn't doesn't make a difference it doesn't make a difference and so we got it ready and then I open that those results and what do we see interesting so let me just go back to square one so we've got that good what happens if we measure on the harmon base so wait a second density matrix and now i'm gonna do this and I'm gonna do this something's not working right something's not working right it's impossible something's not working ride [Music] simulator and we're gonna do this and we're so just try to speed things up I'm gonna I'm gonna do this dot and now see what happens oh oh I'm an idiot well obviously obviously I'm not gonna measure anything if I don't measure anything that is obvious so let's let's let's check what's going on here so what if I do this and I send this to run and it's a simulator run okay so now we're measuring now we're measuring so that's still a pending one so I'm gonna ignore those two results here it's a pity that this doesn't that this is not working it should try with another browser okay so let's take a look at the results so now we've measured on the harbour in the harbour basis and we see that that tells me nothing really let me get rid of those guys guess that's a control Zen right so let's simulate that again see what we get now and just pick things up I'm gonna try with these this and I'm gonna run that also good so here we've got the first results Oh state 1 1 okay well yeah basically has done has done nothing it basically has done nothing and now we've got those which might be more interesting which is we we've got entangled we've gotten tangled seven tackled qubits and and now you're applying that let's see what's going on here and it looks like it does nothing how can that be I'm actually confused I am extremely confused so I'm really extremely confused so what if we what if we say let's just clear clear let's start from scratch good God it's probably my at my end but so let's start from scratch so we have we've got this I mean does this thing change at all yeah okay so not seems to work in ways I mean maybe maybe when I'm doing stuff like replacing things here just has problems recomputing that visualization but basically what I think what I was most interested in was what happens when we have like a superposition so this means you know all possible values are are are possible and now we're gonna do controls at which it's translates to that okay now we're talking why didn't that work before why didn't our before I'm a bit of Fred I'm a bit afraid that it has to do with you know updating these and then these being updated somehow so what's happening here is basically that what's happening here so we we keep it seems like we keep the same so we keep you know a superposition but what we're doing is we're flipping the sign on the one one case so we're flipping where we're we're flipping the the the sign I mean phase I don't know we're we're doing something so that is then okay that's an interesting an interesting case because now because now we're going to go ahead and do something but I don't know if I have to start from scratch again or because every move this what happens so 0 0 0 1 so what happens now basically that is so that is what happens when you're creating creating a we have control Z on a 0 where and and and then the first and control be z'ha'dum are right so so really nothing um if i add a next here yeah that makes so whenever it's zero it stays the way it is and then and it flips the sign so it seems like it's flipping the sign it's interesting even if there's no nothing else it's serious a flipping the sign the 1:1 density matrix so that definitely means those are to pass you to possibilities which without that it's kind of fun because without that it's then this here but with the next as then these two guys down here so if you think about because we know the I know the meaning of a Zed gate another meaning of a not gate the problem was one yard the control thing you're making the qubits talk to each other in the sense that you're creating correlation so I'm trying to understand that doesn't me the extra meaning of the control Zed right what type of correlations were creating so it seems in this case you're trading a type of correlation where where they agree or disagree with the same probability but there's something else to it because it's not always the same type of agreement look at this you could say so what I could say is that the the QB the last cubed always agrees what have I just said I don't know so this is always 1 and then 0 1 yeah of course because it's a Lamar here but it's difficult I don't even I don't even know where to where to where to start reasoning you know because obviously obviously the entanglement obviously the entangled entanglement happens not just when you talk so not just because of the control Z but because the control bead is in a superposition which then basically that creates the correlation right that's not you know it doesn't happen otherwise because you know if I if I just as I said if I just we just do that that's nothing right so that basically it doesn't affect anyhow this also doesn't affect these anyhow removing that just this effect anyhow and then you know the controls that doesn't have any effect on states that that are not so you're not creating a crew you're not creating an entanglement and and then and then in the cases where in the cases where you are creating a superposition so this means that both so this means that both qubits are not entangled but they are in a superposition there is there in that case there is something happening which is that the sine of of the possible outcome 1 1 changes right and I can see that because also here is red right so if you think about bloom would be de because this is not whether they agree or disagree it's just the face is negative because because we can see here right so that this is this is like that so curious that's a curious one now if we just say we entangle we entangle this way right maybe maybe it makes it easy to visualize if I do something like that and I do like that and so what I'm meaning here is so we do this a lot so if we're doing that type of correlation this is what happens right so remember in the when you when you do an entanglement with the control not what you have is they always agree both qubits and here is that they they don't always agree and and if I add an X here then it's I think that's again one of those issues correct because that should definitely that should definitely switch these two columns it's difficult to play with that if it's not working well if I send that for a simulation let's see what happens but that's my understand you would have that type of correlation so basically I don't know how I don't know how you describe that correlation but they they agree and disagree with the same more probability but not all the outcomes are possible it's like it's a it's it's definitely okay let's see what happens yeah so once you're 1:1 as I said those are the two possible States okay at least my intuition here was right so I think there's something wrong with that is there a way to refresh this maybe maybe it's just a matter of switching these and you know it seems like it's just as simple it should be like a simple thing where this is saved so what if I if I reload and still doesn't work I'm gonna have to be running down so let's see okay so but anyway so basically maybe that will make it easier to understand the whole thing as well not here we want it here oh no this exactly so this is the control set this is you know preparing the first state and then this is the this is the measurements good good good good good good so if I so the life the life is recision is definitely a really good help if it works otherwise I have to run the whole thing every time but interesting so it's a different type of correlation what's what's happening and if I it's funny because those are likes are playing with this I guess this is you're creating a Harmer here and because if I do something like that what happens so basic now what I'm saying is act like act do that you see it but you have a heart of mine just curious what happens I want to see you later so this is one thing could what happens with so if we create more complex States just like something weird like instead of a Hatem art we're gonna create a rotation or we're just gonna we're just gonna we're just gonna add some rotations across all the different axes however that really works x y&z off I don't know something like that something like that and something like that um that's kind of like a completely weird nun just I would say it's not a clean it's not a really clean state in terms of like it's an equal superposition um so I'm gonna run that as well against simulator see what happens just I'm playing with this okay III really cuz I'm trying to find even a way I can just try to um in a more organized way figure out what's going on so basically this this has been finished so this is what we were doing here and what's going on zero one huh oh wow so this is between 0 1 and 1 1 so intuitively what this seems to be doing is it's basically creating a correlation between the two qubits where half of time half time they agree half done they disagree but whenever they always agree it's always 1 for example right or you could say the cube is 0 is always 1 in this case yeah so when the cubed 0 is 1 when the cubed 0 is 1 then you're gonna create a correlation that is basically why this is always 1 so I really aside from the fact that it's creating a different type of correlations than like I'm a Bell state where they always agree or there's also the correlation where they're always disagree I have a hard time understanding intuitively what's the benefit aside from just yeah creating correlations and obviously we've seen you know that it Flags if we have a superposition from both qubits it basically flex the 1 1 state so that's a helpful functional I see I see some more like a helpful intuition there because then you could do things where like oh you're flagging things for a certain purpose within an algorithm we're solving a problem and here so we've done a weird rotation cool huh so basically basically it created a it created a final sort of a result where most of the time it agrees that it's 0 0 and sometimes maybe from from a from from from the the standard measurement perspective it seems to me that it's safe to say that this the controls at gate basically it creates a type of entanglement where the two qubits they agree or disagree half the time but if that doesn't again include all types of agreements and disagreements it doesn't convince me but it seems to be this way now I guess I guess where I guess where James I guess where the IBM guys are going when they are is like you know what happens when you measure when you measure that from a hardware perspective no here so you do like a measurement on that base say from like let's say let's say we go for these where we know that what the control set is doing here is flagging is flagging the one one state right so if we run that because now we are gonna measure it from a different perspective so we run that against the simulator and I'm gonna do another thing which is I'm also going to take this measurement which the point so the guide points the guide points to this measurement is being okay now with this measurement we have the complete picture of how to represent a two qubit system so the normal measurement the set measurement the hardware measurement and then the one with the s transpose and I don't like I feel I feel a bit tempted to go down to the mathematical level put some matrices here and there and then see what happens really under the hood but I want to try to understand that from an intuitive perspective because I think that's definitely the you know that's that's what that's that's what's challenging by the way okay so let's see so we've got I think already both results first this one that's from the hardware perspective oh no that's still or sorry I haven't submitted this one what am i doing I haven't submitted this one so I'm gonna submit that this for run to a simulator and while this is running I'm gonna check this one so this is you know in a in a superposition and we measure from the harm our gate and and okay yeah so it's it's funny because basically what this is saying is that from one perspective we are measuring weird you we are kind of flagging one so we're we're flat we're we're switching a sign and the state one one but if we take a look at it from a harem opposite from from another measurement basis then we are basically getting again a unit from a uniform superposition we're just getting a uniform superposition interesting do you think is yeah intuitively this concept of measuring from different perspective is I'm still having trouble with that because I don't I don't see the utility of this may be a sign from understanding I don't see the functional utility of this why I keep going back I have a lot of stuff open but let's take a look at the last one so this is what happens with these bases right boom they always agree so so they always agree so this means this this means that that's obvious you know the way you take a look at things changes the way you're going to see the results but basically it means that it controls that scene from that perspective it's it's an entangled state that they wear they always agree is like the belt stayed but to be honest I don't know what to do with that I don't know what to do with that to me to me it seems like the the so far what I got out of this is that the controls that gate gives you a different type of entanglement because I bet you that if I would generate a belt stayed and I will take a look at it from with this measurement and we're gonna get the same that we would that we are getting you know what I mean so if I go in and say let's clear that thing and I say now now we're gonna do these this and now we're gonna we're gonna create a Bell State so we're gonna say that is just a uniform super position where the that is and inside of my words they've always agree now I apply a control Z I apply controls that I mean going that for the mall because I don't know if this is really correct or not and now I'm doing that the measurement of that helps me just that I think that doesn't make anything but it just helps me visualize where the measurement is so now I'm gonna do this I'm gonna do a harem art and I'm gonna do a Z measurement and I'm gonna do this and I'm gonna take a harem art and I'm gonna take another Z measurement what here and I'm gonna gonna run it against simulation I don't know I don't know if I know what I'm doing honestly that still that gives me the same I don't know what I'm doing |
let's give it another try okay let's give it another try so we have beginner level examples intermediate level examples advanced level examples I would usually go for the intermediate level examples I mean boolean not pulling and maybe that's gonna demonstrations structural imbalance copy clone open source code to run demos for solving known problems in addy way system let's jump into into intermediate level that I might just I might just be I might just be burning my fingers here this because we've covered that in the demo so how to represent an and gate how to represent okay not getting out that like we did the and gate with a the truth the table of truth let's let's just do map coloring I think I'm familiar with the problem I know that's a sort of a traditional computer science problem as well where basically it it gives you set of constraints on how to color a map and if you have to then basically color the map in a way that it satisfies all the constraints so it seems to feed the what what do a if is supposed to be able to solve which is constrain satisfaction problems or CSPs so map coloring this example solves map coloring problem to demonstrate using ocean tools to solve a problem on a dual system constraint satisfaction problems require that all problems variables be assigned values out of a finite domain that result in the satisfying of all constraints the map coloring CSV for example is to assign a color to each region of a map such that any two regions sharing a border and have different colors okay so that's that's already given by by the problem statement so you can't color to matches in countries with the same color example requirements have solution steps so I'm not gonna do that right now because I I'm I don't have I think it's pointless for me to have it all set up as I already have the feeling that's not the kind of quantum computing intuition that I want to sort of focus on in the future but basically solution steps let's let's try to confirm that so following the standard solution process described in Section mmm-hmm we saw that yeah so we need to formulate a problem as a binary quadratic model bqm by using unary encoding to represent the C colors each region is represented by C variables one of each possible color okay so we have a given amount of colors and then basically the way we encode that is we for each region we just have a all the colors set to zero and then whatever color we pick for the region set to one so formulate the problem as a graph with provinces represented as nodes and shared borders as edges using for binary variables one per color create a binary constraint satisfaction problem and add all the needed constraints convert to a binary quadratic model sample and plot a valid solution so that's it I think that's gonna be a good example that's gonna be a good example because we we know there might be a social there might not be a solution but with another solution yet so what I was saying before with the end gate is you know you know what values you want so you know how you have to encode that because you're taking your inputs and outputs as as part of your the way you define the energy function right so in this case Canada using four colors and we've got 13 provinces and the postal codes are here ma ba ba I said constraints incur so two sub constraints and convert the CSP to a BQ M start from the problem as a graph okay so the provinces and then we have the neighbors right so those are the notes and then those are the edges of the graph then we move on to create a binary constraint satisfaction problem good so that's the that's why the interesting part comes in this piece okay so we add a constraint called one color configurations represents a constraint that each node select a single color okay so that's that's yeah that makes sense right so basically each how do you that one color configuration so okay it basically says you can pick one of the four colors this one this one so this one this one this one or this one right so those are the the four possible configurations basically none of these three colors in this color the next constraint is that two nodes with a shared edge they can't have the same color not both one so let's take a look at the code one caller configurations I'm assuming okay so so here we prepared I don't know is that all coming from the variable there the variables and and this okay so this is defined in here so Oh so the constraints are represented as function and a set of functions return not V and you okay so given via new and then it can't be that they have the same cover valid configurations one color configurations colors is equal to length that for then for each province add constraint at each node select the single color okay so you have to actually go through the provinces and variables equals okay for range colors I don't quite get what it's what is it actually doing but I'd constrain one color variables oh okay I get it okay so basically what is it I'm a bit stupid so basically what this is doing is saying it's generating all the possible colors that the that province can choose and then this constraint instead is telling from those from this set just pick one kind of yeah whatever probably not but whatever so and then add a constraint for each pair notes they must not be one okay so basically you go through all the neighbor edges and then you say so those are the variables that you have and add the constraint that they can't have the same color so that's what we defined it here okay that makes sense what else yeah then basically sample that stuff so you tell example 50 times you need matplotlib to show the results and then you basically plot plot the sample okay so it's just a function to plot a sample yeah and here you have the solution so yeah that's I mean I'm happy that was an intermediate level that was definitely not that complicated if you just know the basics I mean yeah it's just it's what i says basically what this is saying is if you're able to if you're able to express your problem in terms of constraints then mister d-wave can solve it in terms of a CSP problem then d-wave can solve it there you just have to know yeah so I think and then and then it's when the documentation makes sense because if you want to know how to for example this is really problem specific how you do that right so in this case um I'm quite sure that there in this case I'm quite sure there's other ways to represent the problem this is probably the most straightforward and also easy to code yeah and then the way this works is the d-wave basically gives you the tool set to transform that into the bqu way more however that is called the binary binary quadratic quadratic thing model and and that is already the that is already then the input for the computer the thing is haven't I missed something I feel I'm just missing something convert the CSP into a binary quadratic model so it can be solved on a duo system BAM done okay okay yeah can you do more interesting stuff with it |
okay so now we're live i didn't realize i didn't realize that the uh i didn't realize that actually youtube you have changed one thing now and so when you connect the streaming software it actually uh starts a live stream right away and it starts a lot that's why you kind of saw a hiccup i think if you connect it if you uh i was just one live for a second and then disconnected and uh it was uh it was a hiccup from uh i hadn't realized usually i connect the software the streaming software and then i still can hit the actual end stream button um on the youtube studio and then it goes live you know just check quality and stuff like that but um it seemed like it went live right away so uh anyway we are going to be discussing today in the discord with other people about the original vqe paper so um i'll share it in the chat let me see uh where can i find these uh we had it in the so we had it in the paper club uh channel uh pinned in there so we read basically this was actually supposed to be for last week already uh but i didn't make it because of a bunch of things i had to do and then we kind of ended up putting it off um and so we're going to read the we write the original viking paper let's see i'll put it in the chat so we are discussing this paper um and uh so we're gonna have to give it some minutes still okay so it's like uh what time is it now it's ten to five since a bit early um let me see if i can open the paper myself yeah it's a variational eigenvalue solver uh on a quantum processor and i think that's that's the paper from the uh allen aspera acoustic uh um group and it's from 2013. i i gotta oh oh oh what happened sorry i just zoom in too much i gotta fix my streaming settings because i'm definitely not like when i'm streaming or i'm recording using obs my my whole i think it just takes too much cpu and then uh i can't scroll through pbs comfortably so that is definitely a big problem um i'm gonna see if there's anyone else joining so i'll go get a coffee actually so stay tuned we'll be back in like probably 10 minutes or five minutes or 10 minutes or so so so i'm back uh but i'm still waiting for for the other guys to join the voice discussion um who's watching by the way did you see a couple people say in the chat if you want just so i know who's watching yeah it's been it's been a while since i since we we did the weekly quantum discord last time uh as i said i uh i was uh i i had to travel for personal reasons and then uh yeah it basically didn't make it to organize these uh but we're gonna keep trying to to keep it um oh i'm in general now i see sorry now amir can hear me probably now i was in the general voice channel ah well i mean that that would have been fine too yeah but actually yeah i mean i just i just say you're right you're uh avatar floating over there like good i don't know do you know do you know if anyone anyone else is going to join or no it may just be us too okay um yeah i mean i don't know i don't know about you you said like you did you refresh the paper because you already had read it for last week right yeah i i um i didn't i didn't read it again but i i had already taken notes so um yeah so it's easy to like jump back in for me um cool like i i i thought so i had never i hadn't read the the paper uh before despite all the stuff that i had done in uh that i've done in in vqe and i thought it was pretty dope that actually the paper like i was really surprised when i started reading and i realized that like they actually built an actual like device yeah like i was expecting like you know hey that's the um you know that's the algorithm and it will work in theory and here's the code and but then i realized that that's from 2013 right like and uh 2013 there was there was definitely no uh ibm q or anything right there's not nothing publicly available uh you know to test these ideas uh one i guess yeah what was uh i'm looking at the picture of this um how many cubits did this have does have uh it just had two qubits i think because yeah because they said they could they said that then they you know with the device they could then um uh study like uh two by two uh hamiltonians or was it four cubits i think it was just two cubits let me see if i can i yeah i'm trying to make sense out of the diagram yeah it's it's just i think it's just it's two cubits like in the figure a in figure two the the the a diagram like it's got the initial state zero zero and into zero yep and then four readouts in cat exactly and then four and then four readouts yeah uh i i found it why for readouts i guess that's the because this is foreign counting what they're using but i'm not i didn't go too deep into the uh you know the extra theory that they attached there as well um so i don't know uh actually why they are for readout is it for the zero and one of each yeah i'm i'm trying to make sense of the why did we do that it could be based on their uh expect like expectation are they doing well no they wouldn't be able to do two no no no the expectation value they what they say they make a reference to a paper from the year 2000 where they basically well it is explained that to calculate the um the expectation value of an observable you just do repeated measurements and average the results but i'm assuming that has to do with the fact that it's it's a photonic system and it it has to do with the way they measure was photon counting i think what they what they're saying and i don't know if this is like i i remember from the course that i t that i took on like the the future learn platform that the way photon counting works is like i think you count the phones that arrive at a different interval of time i think so like the ones that arrive first like that's kind of a one and then if i write if it arises with delay it's a zero or something like this um so i don't know maybe maybe it's uh something along these lines but i didn't really dig too much deep into the uh technical details but i found it i found it funny i find it funny there was like it really seems like the actual algorithm is not like you know the the point of the paper it's more like hey here's a device that like can do this right and and they and they actually you know they put more emphasis into uh the first thing is how to calculate the uh you know how to calculate the actual um uh like the eigenvalue without really using qpe right the phase estimation and and then the original part but i mean there's not even like the the mention of you know there's just one sentence i think somewhere at the bottom of the paper where they say yeah and here's what you do something like you know whatever gradient descent or whatever like optimization you want to use and and that's how you do it like but it's really the emphasis on just the fact that um you can break down a hamiltonian into like a a linear combination of poly operators and then you know just the expectation values of each part and and add them up and that's it um i don't know i i really liked it i enjoyed a lot the fact that the paper felt really low key it was not like you know behold my new algorithm it felt a bit more like yeah it's just you know uh tinker to be with a couple of cables here and there and and it worked out yeah yeah um i was reading below the figure it says coincidence count rates from the detector d one through four are passed to the cpu so yeah i i think uh ah so if if they if there's like a simultaneous hit is probably your whatever like a one and if it's if there's no simultaneous cities a zero or something like this yeah i think so okay um yeah cool yeah the uh what you mentioned um about the yeah the gradient descent in the appendix they said they they couldn't use gradient descent they had to use nelder and elder mead oh really i didn't i didn't read that okay yeah due to the experimental conditions of the their device so um yeah gradient descent failed um and i don't think they went into much more let me see where it searched for gradient descent [Music] um oh that yeah gradient descent is not robust to noise which makes the objective functions smooth under under experimental conditions so yeah maybe because of but it but i mean it's used now i think it's used now it's yes now but because maybe the noise reduction is uh or because yeah basically the the qb quality is higher now than like seven years ago yeah i guess yeah they weren't able to converge to the ground state uh when they did it initially but uh simplex-based i'm not familiar with nelder mead i mean i've i've heard of it for optimization i just don't know how it actually works okay me neither i mean i'm actually not familiar with almost any optimization stuff i i definitely want to dive into these as well uh together with vqe and variational stuff i think but it's quite amazing that from just like um you know this paper like so much actually emerged now that is used in terms of all the variational stuff uh because the and have you have you um did you did you read the part of the paper where they say something about excited states like uh because i i think i've i wanted to come back to that i never had the time to because they you know that they have like they've released uh i don't know when they released a uh another version of vqe or no it's not a version but it's like another how the i forgot how the algorithm is called but like it's inspired by vqe and it's to find any um eigenvalue so not just the the one like the one the the lowest one but like any which is basically um you you do vqe you do a run of eq to find the lowest energy and then you keep iterating and you do new iterations of eqe but your cost function has an additional component which is the overlap between the the eigenvalue that you're gonna find sorry sorry the eigenvector that you're finding uh versus the one you found previously and so and you want to minimize that overlap this means that the the next eigenvalue eigenvector you you find eigenstate you find is uh orthogonal to the previous one and so this means that it's kind of the the next uh eigen state right and so that's cool and then you iteratively kind of build up the whole spectrum and then you can find um higher higher levels and uh it's funny because they really used a really similar figure like the the figure one uh with the quantum modules and all this kind of stuff uh but i it's for me it was nice to see the difference of the the style in the paper right where because if you see the figure one and you kind of see okay there's a box that's that says quantum state preparation and then it splits into different boxes that you know it says quantum module one quantum module two and those are the s the sub components of the hamiltonian i guess um and and and it it really feels like in you know this is kind of so much tied to the fact that they probably that's how they envisioned implementing it like from a physical hardware perspective uh rather than kind of having a more programmatic approach i don't know because if someone would write this paper now it would be more like you know this is the kisky code and and there you go right and i don't know i found it interesting yeah but you said you took some you took some notes like what part did you focus on uh for for the notes um oh well you know i guess with most of my notes they're just uh i try to read through the paper um and just pull out the parts that um that i find specifically um here you know i'll post this to the chat so that okay okay cool either people um yeah it's uh easy enough to do let me go ahead and post that again um i also like usually write some questions that i'm hoping maybe you and i can just discuss as well oh yeah definitely uh yeah because uh that's that's the good point about these you know the paper club is we can discuss things and exactly if i were just reading the paper on my own then i might i'd be at the yeah so there i posted it oh yeah so now cool yeah are you able to see that let me open your own research do you actually have to have an account to see them no it should be um it should just be yeah yeah it's loading okay yeah it's weird it kind of it loads and and almost seems like you would need to log in but then it i think it detects that the page is public so then it ah okay there's this icon with this that looks like a like an engine or like a turbine or something okay yeah okay now i mean yeah okay cool yeah so uh i mean i go through the paper in each section and write notes that pulled out and i think for me these notes are just a way that if if i'm searching through all of my notes and this page comes up with a hit like if i just search for expectation this might come up and then and then i would be able to like go back to the section if i wanted to read more again but you know each person has their own style for notes yeah definitely yeah i really like this paper too just the the style as you're saying it's it's uh it's i like how you said it it's almost modest in how they wrote it yeah but yet yeah it's just like here they introduce this device they introduce a way of splitting i like that they looked at even parallel uh you know having many of these devices going you know and you could potentially just split your hamiltonian into terms and then calculate each of those in parallel yeah exactly i i i i found this really interesting but that was there any specific part because for example from my perspective like it's also a matter of taste i guess i just like didn't i just was it was i guess a matter of time and then uh laziness which is bad but i i didn't put too much attention into the actual examples um did you did you do that or you also just uh skim through it through them like because they have them in figure three and figure four i mean they talk about like uh what's that oh yeah they actually have some examples with like uh with this atomic separation and all that stuff i didn't really follow that uh i just like read through and that's it but i don't think i really because they talk also about like the um this cluster operator and i that that felt like i it felt like it needed just too much digging uh and and i i just like i don't know i didn't dive into this yeah so from the kiskit summer school the final project was on estimating the ground state of the uh lithium hydride molecule and um i think that's just slightly more complex than the one they use in the paper okay um again classically easily you can calculate that easily but um yeah so only because i've done that that final project that these graphs make a little more sense to me okay and we're kind of interesting just because of the results they got and you know compared to the theoretical um you know the i guess figure four though this graph where it's like it dips and then comes back up that's that's a common one okay because like that little the lowest point there is obviously your ground state um and uh yeah and then you know as you wish i had i don't know where my other graph is but um when they were explaining this stuff to us the you know to the right of that is where the bonds dissociate so the separation between the atoms gets so large that then um i guess the molecule won't hold together yeah so um and then when the inner atomic distance is too short so that that huge wall right before the lowest point you know i guess it requires um too much um yeah too much energy to keep those atoms at that distance from each other uh-huh yeah anyway i i'm maybe i'm explaining maybe you already know this i'm new to chemistry so i'm i'm neutral yeah i'm your chemistry from the perspective as well other than like what you just you know do in high school and stuff yeah i didn't do any chemistry after high school so yeah and i one thing uh do you know is the chemistry we did in high school i i sometimes hear the term quantum chemistry and i'm wondering is quantum chemistry any different is that just chemistry or is is that a different like would that be different than what we probably learned because we're probably similar in age so yeah maybe yeah i mean maybe maybe when people talk about quantum chemistry they just refer to you know maybe like the study of like subatomic stuff right where you observe the actual quantum behavior i guess oh yeah so that makes more sense so when we are talking about these yeah i just i forget what because i feel like the chemistry i did was more about like solution yeah totally that's exactly yeah so subatomic makes sense then it would be for quantum chemistry subatomic or or maybe because i guess it's a difference there's difference between quantum chemistry and using quantum computing to solve some chemistry problems right like because i'm assuming you have you do have like chemistry problems uh you know maybe if you go uh even the direction of like you know material design and or whatever else like i don't know at what point the two branches like you know touch but there are problems that just because of their complexity could be solved with quantum computing but they are not quantum chemistry problems right it's just a matter of the i think that the if you quantum chemistry as a discipline if if if it exists at all it's probably subatomic that's that's that'll be my guess here's an interesting uh point about their experiment it took them 158 hours oh really yeah so they ran on yeah this was in the appendix oh i didn't understand yeah so they it took 158 hours with uh they found 79 wait with ground states found for 79 hamiltonian 100 oh so they did 100 measurements per ground state run so per interatomic distance unlike figure four um yeah i guess all their blue dots so they did there are 79 of those and then they did 100 measurements for ground state run so one thing i i didn't do the calculations of was to try and figure out like reverse engineer how what clock cycle this quantum computer ran on i it would be interesting to know how fast this experiment this same experiment could be done on a new yeah done now like and if our if our clock cycles are any different yeah i mean we i i i definitely can try that uh i see i think that's a nice that's a nice idea for like you know one or two videos uh i'll take notes try and reproduce yeah yeah just just try to introduce the experiment and then see uh and i don't know if there's enough in there to be able to replicate this properly but i think so well i mean they told us yeah they they tell what answers they use right uh that's yeah i mean they say they use the uccsd for their onsites or did they do they end up using that let me see i don't know i have i was saying before you came like i'm i have to figure out what what the right setup for obs is because as soon as i get the streaming software uh on like i i can't scroll uh pdfs almost it just goes like it's it's got such a delay and i see the cpu usage of obs is about it's like about 11 right now and i think it's just a matter of like tuning in tuning it a little bit down and then and it makes it super hard for me to search in in the pdf because like i i easily scroll past or yeah scroll past things because i can't control this super easily but you found it i think so it's um let's see uh yeah it's under algorithm two so they bolded that it's uh you know right on the same page that they're talking about the actual qpu then they start to talk about their onsites um yeah it says where so that they set up this state psi e e to the t minus t dagger and then they're saying t is the cluster operator um which they define in the techniques okay yeah the appendix um yeah so you unitary coupled cluster theory this is now i think referred to more commonly as uccsd which is unitary coupled cluster theory for single and double excitations um yeah so like when i yeah when you're in kisskid and you're you know you wanna figure you know create an onsite that's one of the libraries you have available to you okay so i would assume that that's the same thing as what they're saying here but they don't mention the sd part so i don't know if this is more general or not um okay yeah but we could yeah but i mean could give it a try anyway but that would be that'll be an interesting and interesting experiment to try to reproduce the same and see how much it would take now i guess i mean it's not if you're if you're tinkering with a device like that you know by yourself i mean it's yeah and i guess this is a photonic uh setup so maybe it would be the the most fair would be to kind of use xanadu or something like that um oh yeah let's stick with uh yeah because because that's basically the same the same concept and see and see the difference yeah i didn't catch that with the timing with 180 180 hours you said uh 158 sorry okay [Music] you said you had some questions pretty significant you know thinking about money and experiments that long um yeah definitely yeah yeah obviously you could break that you can still break that up because um but yeah i my patients you know i would want to verify that things were working this is my problem with you know any of the machine learning is uh i'm kind of uh i know where you're going what i know you're going i think yeah one of my frustrations with any of uh is i i hate the idea of wasted cycles so the first thing i usually do like it's funny whenever you're using one of these machine learning uh packages by default they kind of they'll they won't they won't have clip uh iterations early so you could just you can keep i always like to look at um uh like how fast things are converging and once the once they slow down i just uh you know i usually want to kill the process so like rather than running like a thousand iterations or epochs of something i like to see as i'm i go with a greedy approach which may not be the best approach but i like to see like you know what's the fastest what are the fastest parameter what are the parameters that give me the fastest convergence in the first like um you know 100 uh iterations you know as opposed to yeah and then once i find one of some of those good parameters then i don't mind letting it run for a while but uh but a lot of the setups like even in the final project it wasn't set up that way you know in their the jupiter notebooks so like when i was watching some of my teammates go they were just letting it run there's just all these wasted cycles yeah during our experiment experimentation phase it's like what if what if something's just wrong or yeah like at some point at what point you decide to stop uh yeah that's actually um you said you had some questions i'm curious which ones yeah um so uh yeah one of these is i mean i guess it was mostly around this onsots which uh i don't know we could try and figure these out on our own um but maybe even it one of them was just the way it was written so um it's mentioned let me see if i can find the location it's mentioned that the coupled cluster onsots that there's no known classical solution and it's kind of weird how they wrote it because um sorry i'm just trying to find where that is um yeah there's currently no known efficient classical algorithm based on these onsite states and it's kind of weird because we know we can solve this the molecule they chose classically so then um what i was trying to understand is that are they saying there's no known classical solution using the onsites or for preparing them um so uh let me just give you the it's on the same pages when the qpu figure two it's on the um second paragraph so it says so yeah they're talking about using the unitary coupled cluster onslaughts normally taken to be the heart treat ground state and it says there is no there's currently no known efficient classical algorithm based on these onsite states yeah i found this there's currently no no government they make a lot of difference okay but isn't the hearty thing like an algorithm as well like isn't it like an actual algorithm to approximate the the ground state i think so yeah and i think that's i i think that's what they're saying is that that algorithm doesn't have an efficient uh oh classical solution i think that's what they mean and what they say is that is that the hearty foreground ground state whatever algorithm is using also the cluster thing as a as a reference state so they also use it as an enzyme and it's the only algorithm that is using it in that it's known but it's also not efficient i think what's that i think that's what they mean okay okay i didn't see i didn't read that initially as uh there's so you're thinking they're they're saying there's no known efficient classical algorithm you based on using the hartree fock ground state exactly okay i think that because the heart tree let me see if i just quickly check the wikipedia entry for this and the heart tree fork method is a method of approximation for the determination of the wave function and the energy of a quantum antibody system in a stationary state let's see if there's something about the cluster i am searching for efficient uh heart tree fog coupled cluster is a numerical technique used for describing many body systems its most common use is as one of several post hartree fog up initial quantum chemistry methods as a post heart tree fog so yeah i think you use them together yeah yeah it seems so it's the couple plus is a numerical technique yeah but i agree it's written in a it's written in a funny way um it's a in a weird way where it's like t is the cluster operator and then it's some reference state normally taken to be the heart of a heart tree for ground state ah okay i guess what it means the heart tree so maybe what this means is that so so that this that that that this state is the heart tree ground state it means it's the state you find with the heart tree method right and then and then that's when you use the the the uh the couple cluster method after that like to that that's that may makes more sense because here in the wikipedia it says it's a numerical technique used for describing the many many body system and it's commonly used as a post heart reflux so it's and now i would assume when they when they talk about the heart tree ground state that that's the outcome of the heart tree fog method you get a ground state or you get an approximation to the ground state um and then you use that uh but i'm i'm and i as far as understand these algorithms are just not like that they're not efficient okay um you mean you probably the the two of them together on on a classical computer yeah exactly okay yeah and then for a quantum computer we're still making use of them um and then i think we're we're encoding it to qubits you know encoding those cube those hamiltonians to qubits and and that's maybe where the benefit comes yeah i i don't know what the relationship is between the cluster so the coupled cluster and the actual the actual anzac's like is because i don't really know anything about the coupled cluster method like it says it's a numerical method but like how can you how can this inspire enhance that's you know what i mean is it just it's just a mathematical mapping like okay yeah because you know you have these metrics like these gates and and you multiply them together and you know you can turn that into a quantum circuit and so that's that's the anzac's maybe that's the maybe that's the way that you map it it's purely um a mathematical equivalence right like between the the method and uh so you're translating the method into a set of operators and then these operators just translate them into an actual circuit yeah i i tend to forget that a lot of this stuff just happens this way i'm always like i'm always thinking that you know we're in a world where like people's like oh yeah that makes total sense we put these pieces together and it's more intuitive but it's sometimes it's just not intuitive at all you just take a method you translate it into uh into some some sort of you know unitary operators and then uh make a circuit out of it yeah oh and that's where um i don't know if that's covered in this paper but that's where the uh yeah the jordan wigner transformation like there are different uh ways to transform into uh cubit hamiltonians uh-huh um yeah let me see if they specify that so they say that's the appendix in the beginning it says it says the map from the from from the fermionic algebra of the second quantized hamiltonian to the distinguishable spin algebra of cubies is given by the jordan and weakness transformation yeah which for our purposes can be concisely written as what's the formulaic algebra do you know that i don't know if you lost them the connection or the microphone i i can't hear you oh i was uh yeah i thought you were you were reading maybe uh oh no sorry yeah i don't know i was asking whether you know what the fermionic algebra is oh well so um from the again very limited understanding but from the uh the final project um i'm just i'm i'm uh i'm reflecting back what you were already saying is like a lot of these steps are just getting the problem into a representation that works so you know we start with this heart tree frock then we use the it sounds like we're using this unitary coupled cluster um approach to turn it into like to get an onsite for that i guess um and the the naive question there well let's just pause there for a moment so the naive question there is if you can calculate the ground like with heart tree fog with the if you can approximate the ground state then then i wonder like what are we actually doing because we're are we just is it is it that you have this ground state and then now you're wanting to see the actual energy associated with that the eigen value associated with that um but what do you mean what do you want to do with the combination of the hartree fog method and the coupled cluster well no i'm just saying even the fact that if heart if heart tree fock is giving us back the approximated ground state uh some part of me was thinking that vqe was about vqe is about finding the eigenvalue and not be because you're you're giving it the ground state you're getting so so you're you're ex so vqe is about it's viki has two parts like and that's how they describe it in the paper the first part is figure out a way to create or to approximate a uh the ground state right and then uh once you have an approximation of the ground state um break it down into different modules that like you know uh basically apply each pali operator that are you know the stepper components of the hamiltonian um and then do the expectation value calculations and then based on these give it to a classical optimizer so they tweak the parameters you've used to approximate the the ground state so you can find a better approximation of the ground state i don't know if that was clear because i i keep well i keep having to go back to this as well myself like what you're giving to the what you're what you're doing with a parametrized circuit is you're preparing the you're preparing a state that you think it's a good approximation of the ground state what a lot of variation algorithms do is they just start somewhere randomly they said select like a random value for all the parameters and they just started somewhere random yeah um i i think i want to get a little more precise with this because when we say like when i pair it back like if someone was asking what what's vqe used for well i've i've said to find the ground state of molecules but i think it's it's specifically the ground state energy yeah yeah because we have the approximate yeah exactly okay so because taking these expectation values is the point of calculating the eigenvalue of the eigens eigenvector exactly exactly and that eigenvalue and that eigenvalue is the energy yeah yeah um so coming back to um yeah hartree fox so we're getting this approximated ground state then we're using uccsd i think to create like a good starting point to then um converge on that ground state and then calculate the uh the estimated energy from that yeah um and so but uh the uccsd it doesn't give you something that's easily computed on a you know using qubits and that's where you need that additional transformation to map it to you know in this case polyspins but there but there are even more approaches than just this jordan wigner transformation there's the uh um was that that was uh i want to say vazarani um but they're uh let me see let me go back to the summer school real quickly because they mentioned this um uh no sorry it's a bravi catev approach okay yeah because jordan wigner that transformation has been around since the 1920s oh okay yeah so then uh in 2000 bravi who works at ibm same same uh researcher um yeah they were just better mappings from the you know fermionic to this qubit mapping yeah and so i mean think about like that's many levels deep so there you could probably get used a bunch of different approaches to getting the fermionic hamiltonian so you already have some like experimentation there then you go from fermionic to um oh then you have many approaches to finding your onsides and then you have you could you have many different approaches to converting to a cubit mapping and then once you're in a cupid mapping then you have many different classical optimization algorithms yeah so yeah so to your point like stringing all these things together is i think some of the work of figuring out how to you know make use of you know that that's like the the tough work is like um figuring out all those things together that you can then get something useful out yeah i mean yes the thing is like i i feel almost like everything else that that you do uh before you get to uh to sort of the cubic the cubic representation um isn't it like something you just do like they they've done this by choice in the paper right because i think the core idea out of this is the the concept of of the variational uh it's like the variational concept right like you can as well you can just start like with the random answers oh sorry with an answer like with a random set of parameters and then you just don't have all this work right you just you just you know you start with a random set of parameters calculate expectation value feed it to the optimizer correct the parameters you know based on the gradient or whatever and and and kind of go ahead i mean i guess that's kind of the core idea that everyone has been then reusing for other things like the the this whole story here with the um you know with the heart heart tree uh fog process and method and then all this kind of stuff like that you could that you do before so you get a already a really good initial approximation of the ground state it's just it's just kind of like i don't know a choice i feel yeah uh although some of the approaches can reduce your actual number of qubits needed so yeah definitely i'm not saying they are not useful i mean not only that i mean you know you you definitely will avoid probably or you will have you know the chances you end up like in the actual um you know global the actual um ground state are are better right because you have already done done some some pre-calculations because if you just randomly start somewhere like then you have all this plateau problem right yeah yeah well since you're talking about actual implementations or like well not actual implementations but something that's related to that was in the paper and it was talking about how um because they relate that another approach to solving this problem is using quantum phase estimation yeah and in the discussion section of this paper um they said that a qpe circuit for a four by four hamilton hamiltonian four by four matrix um would require 12 c naughts and for vq the vqe equivalent is only one c naught so and you know that's the cool thing about vqe is you also are not using any auxiliary auxiliary auxiliary yeah so um yeah it's cool that you you're kind of making use of the full power of your you know your noisy machine with this algorithm yeah yeah exactly using every qubit for a necessary you know purpose yeah so yeah yeah yeah because keep ue it's just uh it's monstrous in comparison right like the if you think about all the control controlled unitaries you have to have and then you still have to run uh the inverse qfd right yep but other than that anything else with your attention a question for you because i know you've done i mean just with all the experimentation i really like that you you're now reading the paper but you've experimented a lot with vqe firsthand with other algorithms like it yeah anything new done on you or as you're reading through this paper either from your own experimentation uh um that yeah i guess was this more just confirming was this paper more confirming your own experimentation with this process or did it um did you actually have any aha moments i i didn't i didn't i i think i didn't have any aha moment or any special moment on this like while reading this particular paper other than that other than like sort of the confirmation of it's just these like it it it feels like you know before i actually read this paper when i was doing uh playing with you know with other variational algorithms they felt like you know they were being a bit over salt and you know there's a lot of you know fanciness around the way they're explained and um and i haven't really played a lot with many of them right like i still have a long list of stuff that i wanna that i wanna do there um but like the more the more i play with this stuff i realize that like the core principle is really simple and and i was really happy that this paper really transmitted that simplicity you know that it's like yeah that's that's it just you know uh find a way to you know programmatically fine-tune the or change the actual um uh phases of uh of of the different uh qubits like i think that's the way they do with whatever i don't remember the names like um how they actually do the fine tuning of the parameters but like just just you know it's just like this it's it's it's a simple concept it's um yeah that that's kind of was the it was not on a hammer but it was more of a confirmation so i was happy um i was happy that this was really uh it really felt like a like a handle paper yeah yeah i i wish more papers were written this way yeah yeah exactly exactly i mean now it's like what i like about this is that it really goes you know like end to end right so it goes from like theory to actual practice and and and so yeah they actually have that physical device in there now because it's you have already bigger machines and you can just um go and run the code on like ibm machines for example um you will always probably lose um some some of that in like some of that like um i don't know enchanting point like or i don't know how i don't know what's the right english word to use this but like it's it's it's it's a bit of this you know i don't know i i find these papers attractive but now it's kind of it's kind of more difficult another paper that i really like that it had it felt quite similar um but it's nothing to do with variational stuff but it was the paper from um uh from the team from rod i forgot his name um his full name i'm so bad at this but it is a paper about a way to implement uh grover's oracle um that can run on like nisk machines right so it's uh like the sub-divided names is that this company called uh beit i think is that no no no it's not a company he's working at the university uh i i i can't remember i can't remember really the uh i mean he's the guy who did the the futurelearn course oh it's called future learn it's a shame because like these people definitely deserve more not uh vandersp is it no no he works at the ko university uh uh rothfun matter i think his full name is rdv i think that his twitter handle is like rdv something anyway he it's it the paper is really also um it kind of has like uh like a nice feeling as well it's really humble in terms of like you know yeah we play with these and you know we go all the way from like theory to practice we play a little bit with these and and we see that you know you can actually uh get some interesting results out of that i i kind of like these papers but it's a personal taste as well like i when it's really dense with just um you know a lot of math and uh and it's not even like sometimes the effort to translate things into circuits or something like this but i can also understand like why some people also don't you know it's not that i don't know i don't think it's probably fair to like to make it mandatory for people to uh go down you know the level of drawing circuits and whatnot like if what whatever you're trying to prove with your paper can be neatly explained mathematically uh should also be fine but it just uh makes it always easier to replicate yeah but i didn't have any going back to your question i didn't have any like special aha moment it was more like yeah i was happy to see the simplicity behind uh behind the whole concept and to be honest in general while exploring variational stuff i i'm really at the very beginning and actually you know uh i i did enjoy discovering like you know in playing a little bit with uh with the whole uh um baron plateau thing like about you know uh how actually initializing your answers with random uh parameters it's just actually you know uh kicking you uh it's killing you it's not like you're gonna get stuck you're not gonna be able to uh uh to really find uh as you increase the it's one of those things where it's funny because people say oh yeah vqe and variational stuff is a great application for um for nisk machines right and at the same time at the same time um it's it it's almost like it's the only type of machine this algorithm can run into like onto like the more the more you grow the number of qubits the faster you uh get stuck into a plateau like um oh and uh and it's uh this is this wasn't a hat like this was like oh wow like uh so they there's a paper i'll probably share it in the channel as well later where they they show that and they take like a a really small circuit and then they show as they increase the amount of cubits and they keep the same uh or you know uh an equivalent answers for for for these which is just like a layer of rotations then a layer of like entanglement gates and another layer of rotations and just something basic as you grow the number of qubits the the actual um uh conversions into something that it's you know you just get stuck uh is faster and there's you know then they developed a cup a couple of you know ideas and techniques to avoid these but it's still an active research area and and it was funny i find it funny because it's like they aren't it's not that they are good for these machines these are the only machines they are good for and actually you know um then it's cool that um in this paper you're talking about is is somewhat recent or yeah yeah it's actually it's actually recent i i haven't even bookmarked somewhere on twitter i have to say yeah the um what's cool is this 2013 paper the one we're talking about um in that paper they talked about how traversing these entangled the they call it the non-separable state space so traversing that entangled state space actually increases the number of paths that allow convergence so what i'm hearing from you is that what we're finding is that yeah it it like if you're gonna if you're gonna hit a barren plateau you're gonna hit it much quicker because like as you increase more as you crease increase qubits and you increase the entanglement you're gonna converge faster yeah so either you're going to get to a good you're going to get to a good answer faster or you can get to uh you know baron plateau faster yeah exactly yeah that's a nice it's nice way to put it now but i mean that's also the power of quantum computing um in that you know in our classical uh we don't deal with entanglement when we are trying to converge um you know classically classical uh classically exactly it's it's uh it's both like uh entanglement is both like powerful but also dangerous in that sense yeah yeah some someone made a comment in uh in one of the uh i mean i'm in a slack like a spanish quantum computing spanish community it's like and there's a guy who actually actually explained that this way he's like yeah you know entanglement is more dangerous than we think because it just like the the size of the space grows so much because of you know because of all these that you just he put it in a really simple voice it's like you just get lost too quickly like you're yeah it there's just no you know sometimes we think that the bigger the space the better and it's not necessarily uh it's not necessarily true depending on the problem you're trying to solve yeah but i think that's basically basically it yeah um kind of a side note uh scott aronson gave a lecture yesterday oh yeah yeah i saw you shared that but i didn't i didn't have the time to take a look at it yet about supremacy right yeah and i'm just calling out one slide that he shared during that he said that all quantum speed ups and this is powerful for me to hear um from someone well respected he said all quantum speed ups come from interference from interference so it's not it's not the superposition it's not the fact that like you know the common way of saying that give me sorry give me a second i have to go pick up uh sorry because someone's knocking at the door go for it yeah i'm back sure so sorry what are you saying uh oh just i'm just uh the interference stuff you're saying yeah yeah so the interference um so yeah it's not even superposition uh yeah it's that he's saying that all quantum speed ups come from this interference and assuming that the speed of the quantum computer uh in having this interference happens is faster than you know obviously classical devices which don't have interferences and he like he just broke it down pretty simply but uh with uh like a two qubit example versus two bits and a probabilistic computer but um yeah why did i bring that up you were talking about entanglement yeah yeah but about i was talking about entanglement in the sense that like the that it's sort of uh it's powerful but it's also dangerous in the sense that like just because it's there doesn't mean that you know that that gives you directly the advantage um it's uh and i think that's kind of why you brought it up uh yeah i mean it's it's definitely interference is i i mentioned that many times and i feel pity that like it's some somewhat not like the focus on uh in in many of the you know quantum computing uh learning materials that are available out there like it's maybe just mentioned in passing but it's not like you when you focus just on the linear algebra you you actually it actually hides the interference some somewhat like it happens within the uh you know the actual matrix multiplication when things cancel out and then you just don't see this right um and uh it's it's for me that was i think since i started with quantum computing that was the biggest eye opener when i was playing with grover and and kind of you know came up with this idea of looking at it from an interference perspective and then i was like oh like now i understand why interference is important that's a good example of interference and um because even the the the geometrical analogy you know with the rotation of the state towards the target state and stuff it's really neat and and everything but it doesn't really you know it doesn't really talk about interference it just uh it's just a geometrical interpretation of the math of the sort of the uh matrix transformations i think you have a whole twitter thread on this right yeah yeah exactly so i almost feel like uh talking about it again is like i i don't want people to get bored of me talking about this well i mean uh you're you're you're in good company you know with scott aronson so he uh it was just good to have that reinforced for me um nice that you know when we're talking about speed ups to look there before other things yeah yeah nice it's it's for me you know i think actually was the future learning course that opened my eyes a little bit where the where rod spends quite an amount of time at the beginning of the course just talking about interference and really from a it's a really um you know it doesn't go really in-depth into this but it gives a lot of examples and you know with sound waves and uh just to really illustrate the concept and then i i when i was going through this i was like why why why would there be such a you know why there's such a sort of an effort to explain this kind of stuff that it's also explained in a basic way uh and then he and i think it was there where he goes away and says you know uh you take a qubit into state zero you apply apply a harmonic gate then you get into the zero plus uh state zero plus one state uh and then when you apply another harmonic to that state is equivalent to applying a hadamard to each of the components uh and that's when you get interference and i was like oh okay and because otherwise it's like it's i don't know and i had never seen that before anywhere else yeah you've mentioned this course a few times i think i'm going to finally check it out because uh that's the only that's actually the only course you've taken right yeah it's the only one and it's not really advanced at all it's really basic it's a it's a really introduction uh the level is really you know based on the comments that i see and the stuff you guys are writing in the chat like when you go through different courses it's like uh that's definitely far away from from the level uh of this course this is a really introductory course um and you go you know it's the basic the basic hey this is the basics you know uh this is uh some primary on like linear algebra and then here you have some algorithms um there's some neat explanation of the qft graphically with rotations and whatnot um and uh these are you know uh industrial applications of quantum computing and that's it it's a it's a simple it's a simple course it's not really technical but surprisingly it really uh at least planted a couple of the you know seeds that uh and i really sort of had i think have helped me to ramp up some of the some of the discussions and like internal questions that i ask uh myself sometimes about quantum computing well uh yeah do you have any closing thoughts no i think i think that's i think that's a nice way to close to be honest i i said like i need to re to kind of repeat again the simplicity of this paper the vqa one i found this probably the best uh reward i think uh you know after reading this paper yeah exactly cool then yeah man thanks for thanks for joining uh i guess we have to decide what we've read next but there were already some interesting recommendations from uh from diego i think on the channel yeah we'll take a look exactly someone can do that and uh i'm thinking i don't know like maybe this um maybe we should either change the schedule or or just like to be more randomly instead of just planning too much for these and keeping it always on fridays uh you know i feel i feel because i feel like diego really wants to join but like he never makes it to i don't know uh and and and then gidi is also the same he always has stuff coming up and then um i think it'll be cool to have more people in discussion yeah and uh yeah we don't need to necessarily try for every week maybe just once everyone can have a chance to read the paper we just decide what we're going to read and then yeah like have a check and i finish reading it and then when everyone's finally finished reading it then maybe we just figure out a time we can all talk yeah exactly maybe maybe let's let's let's do it more organically like this like uh sort of uh no no force it weekly because i also think that the papers we've done so far have been a good fit for like the the weekly time frame but sometimes you're like yeah you know i want to dig into this a little bit more maybe you know maybe you actually want to for example if i like if i had had more time and and you know the idea of playing with this and trying to produce the paper maybe uh you know that also you know gives you good insights and uh sometimes you want to do a bit more than just reading the paper so i think that could give us more space for this as well yeah let's do that i like it cool perfect then have a nice friday yeah until next time bye |
FYI: Original VQE paper - <a href="https://arxiv.org/pdf/1304.3061.pdf">https://arxiv.org/pdf/1304.3061.pdf</a> |
<a href="http://www.youtube.com/results?search_query=%23babyq">#BabyQ</a>, ? |
and i really like the shape it's taking but i think this is going to need some some some heavy testing now i'm missing just i think a um let me see i'm missing i think just a couple things i'm missing two things these two things in here for the splitting and then i'm missing the simplification part in here am i yeah that's a thing to merge the edges that are uh identical okay so that's missing actually but i've done most of the stuff and so and what i have to do what i want to do is i want to um yeah basically change the initialization as well and think about the naming as well hypergraph and hypergraph and stuff like that that's still gonna it's still gonna take a while until we get that in good shape um but first i really went around all these corners and oh i still copy edges missing okay cool um so what do we do what do we do what do we do what do we do so let's finish up the splitting stage thing i'm not just cutting i'm not actually testing anything that's definitely not good practice it's all probably just um not working at all but i i'm happy because i feel i finally kind of have found a bit of the um sort of the actual structure uh that i want the tool to have right so the splitting is the splitting was to just basically say if if a node is not in the in the in the zero or the one state and that's something that'll have to be generalized for like a higher dimensions then we split the these into so we copy the edge and then um we we copy the edge and uh yeah yeah yeah so we basically um put one in the cat zero and one kid one and my guess is that i kind of have to take the that's the tricky part right that's the tricky part it should be all so what do i do with the weight now right i probably need to get i probably probably need to get the coefficient so i probably get the the coefficient of zeros and you get like the coefficient of zero the the coefficient for for one so basically kind of say you know um these i think i think that's the way you do this okay zero and then you know and this is for get one and so i think that this is good enough but what i then need to do is i need to take a look at the um at the edge id right and just say self edges eid wade i never know if it's like these i like these you know kind of uh so because here's what we keep the zero coefficient and here's where we keep the the one coefficient that's just whatever design this is just one position i could just do it another one i just could do it you know the other way around as well so that's not a um that's not an issue and uh what else what else are we doing so i think that's about it because we're just giving the zero the one here so let's do the copy um how is this how is the copy so and i have an inch and i want to copy the edge so i think what i just do is i basically um now the question is do i copy the weight i think so right so i just basically say good um [Music] copy edge is basically a hyper etch with amplitude weight sorry cells edges edge id weight and yeah and basically i think one thing that i'm not doing is hybrid that's just my ideas i think i uh uh edge or something like how do i know how do i i think i think i'm adding sometimes i'm creating edges but i'm not really um adding them to the hypergraph um so you know you know what i mean like but anyway so so i have these and then what i should do is i what is the move yes it's basically the same like move note to edge but without the popping right so i know it's a copy so what i should do is four and in uh self edges edge uid i get that basically the note itself notes n and what i do is i just do a new node it's basically node and i think this is just i just give it the um the qubit so i'll keep it and then i just say new new now a new node state equals uh and stan unknown state so i'm copying the node and then i'm um i definitely need to add self edges copying uiv is the copyright so i add these to the edges and then i say um you know basically basically south edges self edges how am i doing this here and we're going to okay matches um what am i doing so now what i'm saying is i'm doing self add add node to edge and what comes first the node and then the edge so new node uib and um [Music] copy e d so i'm adding the note to the edge right is it that is it all that we need to do so create the hyper hedge the hyper edge add it to the edges and then you trade over each note make a copy of the note and then add the note to yeah i think that is basically it oh and um oh yeah i've done this already here with the right weight okay cool so let's copy edges um i don't have any other two doors open other than this to do to do yeah i think i think check for error it's true check for error it's true if the edge has been touched previously i don't know what it means i'm just going to forget about it okay that's an obvious to do that i'm not gonna have in here i'm gonna delete these for the moment because i'm gonna change the signature of these but okay so we have um we have that stuff good what about the uh what about these simplify isn't it i can only have like yours so the altitudes are composed and now what i what i what i need to check is whether the two the the the these are completely the same i think i can just reuse the code that it was in the decomposition because in the composition i'm checking can they compose and can they compose is basically checking if i think i can use can decompose code i what's more but okay i'll copy that because maybe i will want to change the logic later so i'll i'll basically say you know can can i simplify right and can simplify can simplify edges it just means basically that um and actually simplify qubits should be the same here than decompose so i just uh it's just basically it's just basically this is what i'm doing and but yeah i don't need the recursive part because it's just um i'm just eliminating duplicates so i think it's just a nod if i iterate over humids oh this is definitely missing something here i think it was recursive i needed what's eid space to compose right the id space what is this i need to find the ids that's something that i'm missing that's something that i'm missing here so uh yeah but i had done a i think are composed i think that has some good logic to reuse yeah because basically checks where they're all in the same spot and i should just have one that another method that basically uses the same but it returns these actually or none so um so i would just say basically get um edge ids get edge ids right composed edges i'll call it composed edges so it returns and returns the compost edges yeah essentially so actually that part here is basically as easy as these equals self those edges qubits so but actually it doesn't have to be here it can be after the composition otherwise we don't really care and i was now where was i i was doing this simplification what simplified i know i'm probably just going to fast and if you're not like if you're having me following it's just confusing but i really promise that at some point i'll just do a bit of a deep dive into the actual code and you know kind of do a bit of a hands-on demo it's just um that's kind of the second rewrite and i want to make sure that i get it right so um simplify can i simplify so where was i are they composed simplified so i have to check now whether i yeah yeah what i can simplify so i didn't do it this is the same logic like here right where i say call so i see if they're composed if they're composed right what it means what am i doing what it means is that we can iterate over the so we can iterate over the uh these are basically self um composed edges is like the way i called it finally composed i just keep its composed edges cubits so i'm getting the the edges where they're composed in and then uh entering over all the possible pairs of these edges and and checking can i can i simplify the edges um if so then the simplification is really easy to be honest because it means i can just drop one i add the weight i add the weight of the candidate edge so i only have thing the only thing that i really have to do here is okay so i probably should should delete the edges later i don't know that's gonna be problematic because yeah i think we're gonna have to um i think we're gonna have to use the recursivity because it just makes it easy the the recursive part makes it easy so actually let me can simplify let me just do the following so so what the simplification does is basically a copy is basically these right so components simplify see if i can see if i can simplify the edges what i need to do is i just need to do basically it's actually way simpler than that i can i can just say give me the target right um and update the ways so it's the same weight plus i think in this case it's a plus because we're talking about the same set of qubits and so that was a logic right so i add the weight and it just delete the source edge that's it that's it yeah baby that's it that's what simplify it just does and so what um recursive i just literally the same it's literally the same schema so what the com what the what the simplified recursive will do um i think i i think it's better if i take this because the composition was a bit trickier because i was playing with groups and what not so here is i have i should take this one as an example and not these ones so that they could so decompose and simplify so what the simplified does is say it's okay so if there's only one then then i'm done um then it iterates over the stuff right and it says can i can i look hey boy can i can i simplify a baby yeah please simplify um and so because i've simplified these two what i want to do is i want to remove and again i'm simplifying to the yeah i keep it's a bit confusing so i'll use base and candidate as well and so what i will do is i'll actually i will merged in the base so and i'll delete the candidate um to be honest i should copy the edge and blah blah blah probably it's better right but let's let's keep it like that for now um so it simplify edges based on candidate and so simplify based candidate q beats and i what i do is i only want to remove the candidate because the base one c still should stay in the least as candidate to be merged farther down with other edges because remember i'm just i'm just merging pairs right um cool and so that that calls and then simplify recursive again with the new updated stuff and yeah yeah that's that's all good and then and that's what the actual entry point looks like they all have a they all have the same type of pattern so i kind of it's a bit of a recursive trick with them you know checking whether a pair can be simplified and then an actual simplification task then i update the the ids that are candid and so the the set stays the side keeps you know keeps keeps basically getting smaller to the point that once i do a run and i can't find a candidate then it just returns the list and then we're done um so this is simplify simplify qubits recursive is such a recursivity recursion it's such a powerful concept man are composed again the composed edges and then basically simplify recursive boom it's the same concept it's really the same interface which is nice i mean all these will be hidden kind of right so only the simplified qubits is the one that's going to be public look i think i'm done um boom okay now let's let's think about the initialization now so the rewrite check for error check for error yeah we'll assume we'll assume this is cool yeah i prefer to have less to-do's and then while i'll be testing get a bit more you know okay so let's let's think about the initialization right so we want to have two ways to initialize this one thing is we want to have it so that i can initialize these just by providing the number of but let's maybe already start here by saying look first is going to be the number of cuties so i'm going to keep that out i know it's better practice to keep these things but it's like first let me just um it's just i know it's bad practice to remove these i just want to make sure that i just i make up my mind what i want here because the number of cubitism is a mast of qd's and then i have to give it the um dimensions which by default will be two because we'll be then you know cubits and then state vector state vector state vector will be there as a thing there and then symbolic and and and then record record gates just by the smith it's here so i'll just put it here i know it doesn't matter good then i initialize these initialize the labels and then right state vector yeah okay i see i see what jordan did here because i think jordan was touching that so record gates gate log so this is cute it's now and we're initializing always the node to zero so we are and maybe i should kind of give it a um i have out a better mechanism to keep track of unique ideas but that's that's for later um to do better system for unique ids so if we have a state vector right then we need to initialize this stuff and we're going to assume dimensions dimensions is 2 always because essentially what this would what what we would have to do here is kind of create hyper edges right so i would just basically say and um and it's cool because i i'm gonna assume that the state vector is an expression so i'm gonna actually call it sv expression um so it's actually that if as the expression is not none then what i do is i basically um and here's why dimensionality comes into into play right uh because yeah why not actually actually let's do like that so i know that the computational basis would be 2 to the power of the dimensions minus 1 right in this case so that's the that's the number and then what we're doing is basically oh that's going to be easy so four or while kind of while um you know cb is bigger than zero basically what you do is you do the coefficient is just the expression coefficient of spq cap cb right so now i have the coefficient so now i have the now i have no what am i doing yeah i have the coefficient and so each of these is a node remember we have higher dimensionality the problem will be that if we have two dimensions ah wrong so i need to combine these and that obviously that is just for one system right but here i still need to do um so i have three qubits right so basically what i need to do what i need to do is i need to do q is basically and b and b cued it's minus one right and then i just you know kind of go while c q is b [Music] y c q is basically bigger equal to zero um and this is kind of now we're initializing each system each qubit so if i have yeah so if i have say dimensionality two right but that's i'm getting i'm getting confused so so you have let's take the pain let's take pain let's say pain pain so if i have state vector that it looks like these right so i'm going to assume that the state vector will be in the why isn't that showing here there we go so if i i'm going to assume that if we have you know for example we we've got dimensionality three so this means we have the states zero the states one and the state two um with this it means that each qubit can have uh can be in like eight different states right exactly but now on top of that i say that i have four cubits so now now my my wave function is gonna have basically my wave function is going to basically have 2 to the power of 4 right so 6 is it is it correct because basically i mean uh i'm feeling stupid right now i'm feeling really stupid so what if i so if i have no no that's stupid if i have five if i have say two qubits i i have basically a two to the power of two wave function because i need to define these computational computational basis elements yeah exactly if i have three cubits two is about is two to the power of three right but this is because uh yeah okay so if i dimensionally three it's three and it's three to the power of two so that's that's the idea right yeah right it says we six elements because basically i can i can it's like zero zero zero one zero two right one zero one one one two and then two zero two one two two that's nine sorry what did i say yeah yeah so it's dimensionality to the power of cubits yeah dimensionality to the power of kiwis um dimensionality to the power of qubits so this is the amount of elements that i have to process so what so [Music] so state vector state vector size is basically what did i say dimensionality so these not these dimensionality time to the power of um kids exactly and so how can i process that though uh i guess what i need to do from an expression perspective right um i guess i can tell the expression to be you know something like cat zero times cat one times cat two like that would be one right but i can also just it can also just be using strings right and say you know this this can exactly so yeah well that essentially is a number in base uh d as d4 dimensions yeah so i the only thing that i need to do is um e-trade get the number in that basis and now i and then i know what it what are the qubit states right so i need to basically how can i how can i do that in in there's a lot of python trickery involved in here i guess so i need to essentially so um i equals zero and then while i is smaller than the sv size so i the i basis this would be you know this is like change to base uh to base dimensions then i basically then get the coefficient right so then you get like as the expression [Music] coefficient of i base right so that will give me the coefficient that i want because that's the weight of the of the hyper edge um then uh create notes out of each digi each um each digit in i base and then basically create the edge so the the and then with the edge create the edge and the edge will be basically just uh hyper edge and i give it the weight which is basically the coefficient and then uh well that i probably should do before so i do i create the edge oh god and then what i do is uh yeah so how do i do that so let me open [Music] quickly chrome python so python change base oh there you go i need you to string in any base um oh okay cool i guess we can just copy paste that and i'll try to understand that okay so um it's just that yeah yeah so i'll do it just will be in utils i guess i mean i don't know if this is going to be in utils or it is going to be it's not it's not part of the that's cool because it will allow me to also hexadecimal base like by using the the actual x base that's cool so this should definitely not be part of that but should rather be part of this so there's this import in here to take care of and then there's the this whole um okay so what we're doing is we're now doing the i base and then the base we set is dimensions right dimensions we'll just call it d yeah yeah yeah and then um and then because we know the amount of qubits then we know how long this three keys right so actually the note creation is basically we know we know cued it right so j equals zero and so we can we just say like while j is smaller than um nb and we cute it since and be cuted right uh basically node is just a node right for qb um so this is q plus j right and then we say node state is basically the coefficient it's basically the coefficient times kept and now i base j so that's the digit in the digit in that string that's that specific qubit has that state is that is it that state exactly and now i'll say um self add node to edge and i say n uid and the edge is basically e uid so for each so for each element in the state vector i'm creating an edge and then for each digit in the correct base i'm creating a note and this note q labels i think i should actually append this qubit label and then for each node yeah and then i'm just doing j plus plus and then also here i'm doing i plus one right so that seems about it that will definitely have to be extensively tested but i think that's what it's doing so i think that's that's correct so it kind of reads it it reads each element and then out of the string in each element so the assumption here will be expression is in format like you know exactly that's cool awesome i think i leave it here i mean i'm getting i'm getting there where i can start to you know soon test stuff properly but i'm happy that at least i got to do this one here because now it's also going to be the basis for the the you know the qd thing right the dimensionality and maybe i mean what are yeah i think that's i think that's really is it to do yeah okay cool this little stuff yeah yeah that's it really well i would have to steal yeah i would have to still now basically adapt the parts of the code where i use kit zero which is basically everywhere but that's gonna be the next step right so i'm gonna because this is gonna have to be then generalized um yeah yeah it's gonna have to be generalized uh because when we'll do splitting for example we'll be splitting like across multiple uh so we're actually doing you know split three four five if if you've got like a three dimension system right like a q3 then we might have to create three edges one for each um computational basis so this definitely then becomes okay what's wrong here something's wrong what is the i just uh something with the way so we define that and then if else with one of the four where's the problem here why is this in red like as if this would be somehow i don't know oh maybe i don't know that's that's just that we've removed something maybe that's the same yeah okay but this is this is it so and at least that kind of marks the the beginning of the multi-dimensionality and so i guess i guess what i'm going to do in the next stream is get get get there get to test stuff i mean you know we can actually do just a quick a quick check no a big book i hope it i hope it uh zero feel oh crap that's sign as well i don't want signs i hope it has zero feel um anyway is this working or not there's an error somewhere oh so i like that we can initialize with actual expressions because we can also initialize with symbolic expressions you know oh wow yeah we can actually initialize with symbolic expressions i never thought about these that's pretty cool that's pretty cool let's just delete everything all the different tests that we had here and let's start cleaning or maybe let's start with a clean notebook you know what it's fine we can keep this one what for to keep all stuff what i mean is you know we'll start with just these so first of all cell or edit delete cell edit i can just i can just do this yeah i like that awesome so there we go and you know i'm assuming it's gonna break because like i've done like i haven't tested anything so i'm sure i missed somewhere a you know an indent or something like this and yeah yeah yeah an indented block line three two two three two two that's here that's the promise here that's what tells me three two two ah okay there we go uh what have i done why why do i have another okay cool it's not clear output it's going against law i don't know why still like oh look at this this is a problem this is a big problem and maybe that was the whole thing with the returning here i saw another run it's still complaining though what is what is wrong with these what am i missing this wall indented everything is well indented split cubit state yeah everything is well indented we'll see but i think i'm going to leave it here um it's time to oh okay cool so it did not um it did not fail uh simple like false and so what was the printing stuff just print row so we're just going to do these pre-row system so just testing that's going to be the first things that we're just going to be testing we're going to do this incrementally yeah now i see here there's still a number of qubits left somewhere in here cute which again ah that is not so that actually steel i know that's okay it creates the labels cool i don't know why it's so slow anyway this is not defined it's these there you go and what if i give it a state vector just i'm really curious so sv expression right what if i just say look at the sv expression my friend is for example spq can uh three right or k zero let's just do this before assignment integer that's i not i base obviously obviously obviously okay i keep saying that's the last time i test but i should probably just stop let's see what happens well i should break because that should definitely break yeah okay okay it's like come on okay but i was already here so last time i promised this last time and i'll stop this oh god i i should have known i should have known uh that's so bad now is the last time i promise i just want to know if at least this the most basic use case works at all um but it's just being so slow on the notebook that it just bothers me i feel i'm just like staring at this man come on yeah yeah yeah but basically that'll be the idea so you know come on activate the environment okay add git commit final touches plus dimensionality okay push please please please please please the most basic stuff why is it so slow again yeah whatever yeah yeah i just whatever i'm done um i'll keep testing in the next session which won't be far away from today but that was a good one so basically we kind of completed that stuff this red stuff bothers me a lot right now oh god what there is there's something missing here somewhere it just makes that blinking i don't know what is it i don't know what is it it's just something for no no no okay there you go there's no change right um yeah yeah okay cool perfect whatever goodbye see you next time |
yeah yeah yeah so we won what do we want we want we want we want we want we want can i can i um can i do one thing how can i clear can i clear um autofill search engine google okay whatever uh i thought there was a way that you could just clear the search history although that might be not that i'm looking for inappropriate things but you know uh anyway we'll try that later so what are we doing what are we doing we are going back to the senpai stuff um and uh we are going to replate right blade right play directly not the company but the actual thing here so login and uh let me see why it's not remembering can i just yeah google login so there you go um and i was here and i was basically systems roadmap there you go the actual pdf uh okay yeah so last time i got stuck with this uh i got stuck with the three-dimensional uh what the is this guy i don't wanna buy followers you're gonna you're getting a ban how can i ban you from here no can i ban this user can i ban the user block report report uh i mean i'll just block it cool um can i just delete this stuff the message this twitch i'm using twitch uh the streaming app the streaming yeah whatever i'm just losing time with this so uh what are we doing what are we doing we are working let's go to twitter share some share some why is not come on let me see if i can log as in again except cookies no i don't want to sign up i have an account already what are you doing tweeted.com already have an account sign in no because i think i'm using signing as this guy so okay that worked but it should remember i like the black theme and i know it doesn't remember anyway oh cat pictures man um twitch.tv slash and certain systems uh some uh triple integral off so that's what we that's what we got stuck right with the because i i looked at the solution of this problem and i saw that there's a d3x here ah it bothers me so much that you can't imagine how blocked i am at the moment i just like the learning curve is just it just went like this uh because this is probably this is like a three-dimensional vector probably right uh and so r is just a a a radius right so this is really just x square plus uh it's the distance this is probably just x squared y squared z square uh all added up or something like these and i need to make a derivative a triple derivative with respect to that and then i was stuck in here i i just don't know where to go that's the problem is i'm i'm i'm just totally stuck totally like this is such an epic an epic stack that you can't even imagine this is one thing that i could try solving if that actually is the issue right but for these i need to do a triple uh sort of triple integrals and senpai yeah learn to write man because well that would make any difference right because we're integrating with respect to this whole thing integrate so you have this triple integra yeah yeah so okay so you actually can do things like these interesting uh-huh interesting can we try it so let's just uh let's just comment i just comment on these and say we have uh can i do x y z i think i can do x y is that equals symbols and then i just do x y z i think i can do something like that can i um print x print y for instead can i do something like this uh python x two score one a yeah okay it seems like it works so i can do that and i can i can just do integrate this let's let's do let's do the following so let's try uh what is the d so 3d distance is calculated 3d distance calculation so this is um with squares isn't it okay so that's basic stuff i guess but it's uh yeah okay so the original point is one so this is like why it's minus zero minus or minus zero so it's square plus square plus square and the square root of this square root of um i mean another thing that i learned watching a video of a guy i really recommend that's called uh mr or m mr p solver or something like that in youtube um i think that's how he's called yeah this guy so this guy does like really great pi videos and and in one he's just made a good comment saying um that when you do exponent exponentiation uh which i don't think i'm doing anyway here like these i think yeah i think here instead of using a division you should use a ratio i think rational senpai i go to the beat files exactly that is i think the symbolic expressions so exactly these because then it really takes that like that's an important thing but i didn't know that rational so um but whatever so what we're doing is here so square root of x squared plus y squared plus that squared what does what does these uh why am i why am i even doing that yeah well the the the why am i even doing that let's grab these why am i even doing that um even if we just do even if i just do two dimensions so even if i just do x squared plus y squared oh but i can't plot that now because that's two-dimensional should be three-dimensional now nice google mr google yeah that's not oh that's cool actually [Music] i'm trying to it's probably a super dumb question but i'm trying to think about why am i doing that so let's do this what difference does he make right so we if we define these symbols and then we say well uh and then we say can i just say r equals um square root of x squared plus y squared plus z squared can i just do that and then keep using r what if i just print these see what happens yeah okay uh the conjugate of these and uh can i just let's see if that simplifies the thing if i just say real true positive true okay just i mean they must be real they don't have to be positive okay so let's just give it that at least because the thing at least that with the conjugation makes it easier okay and now and now let's let's try let's try what happened to these um here's when it gets tricky right i want to do x y and z and it's like to be honest not zero but minus infinity to infinity or let's try to i don't think i think that's gonna just blow up oh okay so what do we have here yeah okay so it just takes the ends outside it doesn't do anything okay as a triple in gration uh-huh and one it doesn't solve it right now with respect to r no oh sorry that's just uh that's just a label um what will happen if i do that that's just going to be stupid probably if it solves it at all no solution awesome uh i mean what would each of us have infinite is probably zero oh god am i just being stupid i'm probably being stupid and i'm not realizing um how the heck can this end up looking like this how how is that possible i can't even approach this with senpai and i don't know ah it doesn't solve the triple integral this is because [Music] i don't degrade what is maple that's because of issue whatever is the test simply doesn't know how to integrate these why uh so what if we [Music] what if we do that what if we just integrate on x for example right what did we just integrate on x what happens it doesn't integrate it uh can we just do like this oh it's the wrong why doesn't this integrate it because it's the same thing or what it shouldn't be why doesn't simply integrate these with respects with respect to x come on why what if we just say something stupid like these make it simpler okay then it does integration uh but if i just do oh then it still does integration if i do square root of square root of x i should be the same no sorry this it still does integration well this doesn't do integration i'm stuck people i'm so stuck oh my god i'm so damn stuck it's incredible oh i mean they don't tell us they don't they they don't tell us what their r is defined like that but it's probably something you can assume uh but it's just like oh my god man i mean like really i'm just giving up like how can it just be anything like that jesus god god god god um only on the radius it's just not ending never ending what else can we do um there's just no way that you do that i i don't know i don't know i'm lost i'm like i'm like truly lost how can i even approach these uh show that the probability of this topic okay that's another thing and that's what we're that's what we're working on but i'm just i just thought when because i saw this d3 here i thought that would help with these but it just does not um okay it did something it just took a while but it did something yeah so i don't know um i think i'll leave it here uh i'm just i just have to get unstuck somehow i don't know if that will make a difference right if integrating this is truly painful truly painful this is truly painful and i just probably need to just sit through these because i'm i'm just i'm just doing this kind of half an hour streams because i don't i'm not finding the time these days for these but i definitely have to get unstuck with that that just doesn't know how to integrate it doesn't know how to do it anyway um doesn't even know how to do it i think i i the thing is i if it doesn't know how to do it maybe i just should try this by hand but i also don't know how is that going to help me um get rid of these maybe maybe i just have to make some kind of change of variable or something i know do it with r but then kind of but then kind of say well that is the maybe maybe that's how you get there maybe that's kind of like you um you know you kind of say no look r is r like r is uh r is like symbol r and we know it's real and we know it's uh positive and so we we we do that um with respect to r and what do we have and we have these things here um yeah and if we if we solve that breaks awesome but if we take these things here you know i can i can differentiate with respect to r here is like we have a case where it does not depend on r here it does depend on our wait wait a second am i doing this well are you real positive and we're saying this is these and we conjugate and then we do that and we print these and uh and then we integrate r goes from zero to infinite um so we have this integral in here which we should try to solve r is not available anymore why doesn't it know how to solve it for arc a is more than pi divided by two here's where the actually pi p is in a way maybe maybe just maybe i can just do it like this i just have to become why why why isn't it solving this real true if i say this is which i i don't know i can assume that what if i do that okay looks better why doesn't he know how to integrate that though this is a bit seems to be seems a bit stupid isn't it but it doesn't know how to integrate that if i put like a big number 100 times n squared why is it that i think it's giving me different different results now that i'm used to in the past oh no okay whatever no that solving for this doesn't help but if i don't if i don't give it if i don't give it the bounds then it does find this and if i try to solve for one why is it that i i i think it's just giving me different different results i'm getting this paranoia where i think it's giving me different results than it used to i hope i haven't messed up anywhere okay but i think i'll just leave it here i just don't know i gotta i i gotta well i don't know i just don't know i'm stuck and i've been stuck for the past like five streams i guess |
cool so what are we going to do today we are going to fix these nasty back oh it's basically um killing a note somewhere in here so i was working on the simplify recursive thing here seems like we lose a cubit somewhere okay uh um so what am i doing here so i'm i have a dictionary m and then i basically calculate the result right so what i'm doing is i'm going iterating over each edge um and then each edge e1 and then e2 right so um double loop here an ester loop and if e2 is not processed right because we don't want to repeat like it's the same to take a look at e1 like sort of you know h1 and 2 and h2 and one so we don't really care um there's probably a better way to do that but but i don't care now for the prototype and then uh converge kill merge one e2 so take a look at number of differences and what we do here is okay so this is the thing where i lose that for some reason so i here i need to check i'm checking all the nodes in m e1 and what i'm doing is and this is the qubit index right so i i'm i'm assuming so so print n um and so we normalize the sum of the arrays of the h1 this node and edge to this node and we put it into nodes with this node and if it's if they're not if they're not equal sorry they are not equal uh up to i mean up to phase difference right so i'll have to so this is to do here okay yeah so global global phase factors are important um but maybe i should maybe i can design it in a way that this does not need to be considered because all these global phase factors should be then applied to the to the amplitude of the branch which i it's still a big it's still a big block a big question mark for me how to implement all that um but yeah but i mean that that that's that's that's the critical part right so oh [Laughter] this is the reason this is the reason it's not working oh god okay can can can this just not be that luck lucky please please um i need to take that out of here and i'm sure we're not losing it to keep it anymore and that goes here basically i was just oh she's that's so stupid cool and now yeah oh not a number not a number interesting why why not a number um so i can let's definitely print that so merging and then merging n right and then print these and print that so let's take a look at what we're printing here and then print okay so we're merging these and that and then this is not a number okay so the it looks like the normalization is not working the function is not working as expected result one one it should be this should be normalized right and it's uh doesn't seem to be seems like it's breaking so i had i had implemented that in the past like how was i doing this am i not doing this here somewhere no normalize complex array what is this doing so it's taking a minus the real minimum minus one j or origin offset it i i just wanna so i just wanted that that's not so i just wanna do um i just have to divide each component by the the the the absolute value so the by the norm right which is the square root of each component squared right so i think that's the way i was doing it so i think that i think i should just like say norm np uh array norm i just wonder is it called yeah uh no worm why why is my laptop so small i don't know i i have to i have to really sit down one day and work on this it's not such a bad laptop um array like okay so celineaux.norm linoc.norm of a and then [Music] i can just divide that by the norm isn't that what isn't that what you should actually get yeah okay cool looks like that's cool yeah that's what we want awesome so let's uh that was easy so i can focus on i have two things to okay let's first test let's do a couple of more tests and see if we're happy with this okay so here we have a um [Music] i don't want to print this we can we can weaken the video so i'm doing a hardware gate then i'm doing a control node and another control knob which cancel each other and so at the end i just should have a qubit in the um plus state q0 is in the plastic q1 is in the zero state which is exactly what i get here what are other what other examples we could use to test on [Music] let's see what happens with i don't know i need to make up i need to make one up i mean let me open pain try to make one which is maybe maybe a bit more complicated so cool let me take that with me there you go awesome am i painting or not yeah of course locked like hell so we start with zero zero um [Music] then we can do um yeah hot and hard right so plus jesus plus zero then we do zero oh oh or we can do so we can do the two harder marks plus plus and then we do uh z right and then we have a zero plus and a one minus and then um and then what if we do what if we do um okay so okay so this is hardermart hadamard and then controls that right and then what if we do a control z or a control knob like backwards what should be the expected result it should be that this is 0 0 1 1 0 1 minus one zero so and here there's definitely some merging we're not there's no merging going on here yeah this merging going of course there's merging going on so this branch will merge with this one so we would have a zero and a plus and this branch will merge with this one and now this face kickback here involved so i'm curious to see if that's going to work out at all or because i i i i'm not working with the i haven't really worked with the amplitudes of the edges so i i believe this minus here should bubble up in the it should definitely bubble up in the amplitude of the sort of the whole edge um but because in theory in theory there should be a one minus right we can let me double check with quirk first so the quirk circuit would be so the quark circuit why is this going so slow why why why i hate my laptop um so so this is what we want and now i want to do these right and so what do we end up with so we end up with this um system where if this is a zero let me if i take a look at the zero and put a blocks here here i end up in the plus state if i add up a one eleven the minus state that's exactly what we want here okay cool so how would i how would i do this in here right so we can just uh comment that and say good we do a hundred more so we do a haunted mart on the zero and hadamard on qb1 then we do a czat how do i have the cz implemented yeah i have it okay cool the cz implemented and then i do a cx backwards and then that's it and then i pin it and then i simplify and i paint it i don't have to simplify actually if i don't simplify let's see first if if that gives me this should give me this so what is it going on what's going on here so i have four edges that's good that's actually that that's looking good i have four edges right one is in the zero one another one is in the oh i don't see them because they're really laid out in the worst possible way so this is one zero this is zero one so we have these two here right but i don't see the minus that's the problem because it's at the edge level it's at the amplitude level okay so that's probably going to be my next working example to work with the amplitude because i think but i can't see these here is there isn't there a better way to lay these out um i thought there was a better way to lay this out even from the hnx perspective this this sort of the minus one the minus the phase is here i think at the at the edge level here i i there's two notes but i don't see one and and this is zero zero okay so but it seems like it's cr it seems like this makes sense let's see what happens if i simplify boom okay uh that is definitely wrong yeah and it's wrong because it didn't catch these it's wrong because it didn't it it didn't catch this it thinks it's a plus right and so um because i missed i missed the phase right it's it's at the amplitude level so i'm not considering it um even in the merging in the merging i'm not considering it right which is what i should do um and exactly and so it it missed that and it just thinks it's a plus because it thinks it's a plus then it says oh i can merge that even farther and i can uh i can say that's the same and so this becomes a plus and so you have a plus plus so it's wrong but i think i know why it's wrong which is uh it's a good place to be in i think but that's definitely a a good next example okay so we need to work out how to how to operate with these so there's two these two things to consider right so we're still just at the at the realm of um so i i need to work on i need to work on these amp on this amplitudes at the edge level somehow in two different spots because first is when you have so when when i apply gates when i apply gates right i can unconsciously add of out of a phase like if i let me let me have another example here if i just take these and come to that and if i take a system right and i apply the x-gate to cubic zero and then i apply the z-gate to keep it zero all right and i don't uh simplify so i have so i have this minus in here right now the problem is that if i have so and this is inconsistent with the approach of applying a 2 to gate because when i apply it to gate i programmed it in a way that these phases end up in the edge at the edge level so if i say um qubit zero is in the hot mark okay so keep it zero is in the one state keep it 1 is in the plus state and now i apply a 2 cubic gate i apply a control z in a way that this should not like this will just create a branch what's gonna oh because it's it it hasn't been simplified but uh [Music] why why can't i just not see that oh yeah there you see you see the minus in here right i don't know if you can see this can you see that in the lbs so so the thing is the the two branches have got now a um an amplitude that's attached to them so i can rebuild the wave function right because essentially what i'm saying is that um whatever system whatever subsystem or a system or whatever system i can whatever system this subsystem describes it it's it's got like a 50 chances of being in these or in in this edge right but this one is negative and this is because of yeah and so that's that's that's the part that i'm this is because of the control set that is flipping the um but wait a second something is wrong here so okay but that's actually a that's actually a oh it's not a mistake it's a correct thing it's just that it doesn't simplify because i was thinking that should not create two branches but it's well now now note 3 and note 6 are the same it's q 0 at all both value 1. so if we would simplify i would like to see a minus but i'm going to get a plus if i do that yeah i'm getting a plus and that is because okay so that's that's a simpler example to work with so let's take a look at um let's take a look at these so um so we've got the amplitude in here right and what i need to do when i merge is that i need to take the amplitudes down to the single element that is sort of the the non-equal element i absolutely don't know if this is something that makes sense or not but it seems to be the only way so when i'm simplifying when i'm going through the recursive and i'm saying can i merge stuff right okay so here is the um where's the merging happening created just simplify simplify your recursive that's what i wanted to go exactly so yeah this is the this is the thing like i cannot just uh okay i cannot that's the problem i cannot just add things blindly what i can do is i can do it like this i can say they are if they are not equal i'm gonna i'm gonna take in the actually no i should do this with all of them to be honest no should i i should just pick one because essentially the the amplitude that i have at the edge level right it's something that i want to add to each component of the wave function that that edge is going to generate so i cannot just every time i add two nodes consider them because if i do so i'm i might not end up with the equivalent like i i it's like if i want to have a minus one all right like a phase in there then i can um add it three times so i can add it like an odd amount of times and that will still work but i should just add it one i think as at one time as a as a basic as just the way to do it right i guess i'm not i'm not explaining myself really well i promise i'll do a deep dive on these but what i should do is if they are not equal i'm going to assume that they are uh that i'm gonna assume that this is the you know it might be that it's the only one and so i better i better account for that so i better say i need to get the amplitude how do i get the amplitude because else so else so else just do this but i need to add a multiplying factor and the multiplying factor here is in the edges themselves so what i need to do is i need to do probably something like so the u amplitude right and i'm calling it amplitude but e2 amplitude but it's self edges e1 and now my question is how do we call that amplitude where am i amplitude which is a complex number it's not a it's not an array it's a complex number so but i think i can just say you 81 amp times these right and e2 amplitude times that i think that i think that should actually make it so if they're not equal i take a look at the amplitudes and it just i'll just add them as factors and to be honest if they are the same i don't have to add them why do i do why do i do that i can just i can just pick one right so i can just say just get this one don't even normalize these right as because if they're different different i have to add them it's just going to work i don't know so um did it work not exactly okay so what happened oh wait a second it did actually it did work right what did i do so i do an x-gate i do a haramar gate yeah i did of course it did nice okay cool it did work i'm surprised myself of the fact that this actually works at all so let's try with that example here that was the one so what we want to get is we want to have qb1 to have zero and one and qubit two would have plus and minus oh okay cool first error that's nice so what's the issue here key error oh okay yeah okay now now now we get now it gets interesting right because it's so this is the so it's it's yeah i i and actually i i knew that was gonna happen so i'm happy that it's happening here how do i know so when i do the when i do the actual uh merging yeah uh no um to up here so here no what am i doing we merge this to the recursive step exactly but now we've basically created a new branch right and this branch doesn't have like yeah this thing does not have any amplitude because essentially it's a two-step thing right so let's go let's let's think this through okay let's think this through so the circuit that we have is where we're starting with a zero zero then we're doing a um we're in the plus plus okay then we're splitting these into zero plus one minus cool so we have you know whatever and we have this like these amplitudes in here which are taken from originally these being a plus that's where i'm putting these amplitudes now within each branch okay so now i think i got a first i gotta first work out how the amplitudes get properly set up in in here at all in the in the two qubit operation right so because what here what i'm doing is i get the local to keep it state vector i apply the actual gate and then i just you know i just get like a potential superposition and so i just kind of create an edge for each right yeah and if the amplitude is wrong if an edge exists exactly that's the that's the problem is that now right so this is the so i'm creating a new hyper edge right but if i the thing is i this will this will happen per this will happen per um per edge right uh i don't know how but yeah well if they if they don't have an edge then it's equal right so that also works for know it for the no edges case um but for the edge case right so i do that and then i i kind of yeah i have to create a new hyper edge which basically my intuition tells me that you know what i what i have to do right is that if i now i got to multiply them somehow so if i because now basically i'm now i'm going to apply a control x but but on on on qubit 1 being the control and so this is gonna so this is going to create a new edge so i need to i need to know what the amp what the parent amplitude is yeah and so i probably need and then what i need to do is i need to create the i need to multiply here because that's the amplitude this this here is the amplitude i think is it am i giving it the amplitude or what am i what am i giving it to the hyper edge yeah the amplitude so i need to keep track of the amplitude if if that exists so what i if not is a one and so what i do is i just multiply it i think because then if this is like a a half and i split like that into two more then i'm gonna get like a half of half and half of half so [Music] i think so the parent amplitude is basically i'd say one right by default and so this is just a parent amplitude times this one and if so if if this is if this is an actual number so if if this doesn't equal none right because that's i think what yeah what the initial state is is none it means that they are not so if this if this is different than none then paren then parent amplitude equals self okay so wait a second yeah yeah it's this just one edge to id okay so it doesn't matter which keyboard i'm using here so um [Music] so self edges hid amplitudes that's the amplitude exactly okay cool so i think that has been solved i mean let's see okay so let's see if we can take a look at the amplitudes of the edges without simplifying so if i so if i don't simplify i shouldn't get the i shouldn't get the error i should just get the four things yeah okay that's correct because now i have point five which point five squared is like 0.25 and so it's a quarter so that's correct cool now how do i deal with these when um when simplifying what do i do so i'm simplifying should i divide or i mean it's let's take the simple let's take a simple case right let's say i have the case of a you know 0 0 and then 0 one right which they should should be definitely merged and a half like a point seven and a point seven so to be mathematically correct that should be merged into a zero plus with an amplitude of um of one right because it's the only and and if it's and if it's zero minus if it's like something like this which i know will be possible then i should then i probably should get -1 shouldn't i because it essentially means so this essentially means that we have the following wave function right 0 0 0 1 square root of 2 square root 2 and a minus right which i can take that minus with me to minus into zero with me i can easily take so i can i can easily just say my minus what should it be really i'm not so sure so what should these be it definitely must be one so i think i should just yeah okay but i think that's basically as i said it's a division i think if i'm multiplying so the simplification kind of it kind of feels like it makes sense for this to be division right because it would literally be one divided by the other so and if they're equal and the question is in which order if they're not equal right because that would definitely lead into it no it should always be one why would it hmm or or should be it should be added up and normalized [Music] i mean essentially okay so the thing is you're expressing the same at the end of the day right i i think i think that is not correct i think that is not correct in the sense that in this case because in this case right you're essentially saying well the system here is yeah well of course they go they go here yeah that they go here that's why you get a plus in the first place and if you have just the system edge there's no notion of of this having any any amplitude and so it should just be it should just be a one but if for some reason i have another say one plus i don't know if that would be even possible right then these two merge and so you end up with zero plus so these two merge and this merging makes sense that it happens this way the problem is when there's a third branch or you know there's more branches like uh well then probably you just normalize by over one i to be honest i don't know let's try to stick to this example so we have exactly so now so now we have these and now we we expand each of them right into two branches so you're going to have 0 0 1 1 with a control knob right 0 1 right and then 1 0 but this one is going to have like so these will all be like 0.5 0.5 0.5 and this is going to be minus 0.5 right so we have these and now so and now we do the first now you do the first merging so the question is what do i do in between right so i take these for example these two merge right so and and then these numbers go to the one that is different so i can someday then able to merge that and um and be a zero plus now i still have a one one and a zero one which are 0.5 and then minus 0.5 but i have the feeling because this aggregates two branches it should just have i just should have the sum yeah but the sum okay the sum normalized or what i think so because this is like one right but one income in the sense that it's 0.5 plus 0.5 and so i should still normalize that which makes sense because if i would have if i would ever have say no but that's not that's not because then what happens with these two right like i cannot just say like it cannot be that it's zero right because the 0.5 minus 0.5 if i add them up they'll just be zero and it's not that doesn't make any sense that doesn't make any sense hmm i mean you know it should be back to one over the square root of two and one over the square root of two that's that's it really one square root of two and one over square root of two so [Music] um something tells me that division is sort of the right step forward but because of the sign i'm just not comfortable with these and this theoretically anyway this in between step where these amplitude so the problem is this amplitude is not yet there existing so it's sort of a temporal edge that i'm creating here and the i'm creating this temporal edge right which does not exist so i'm not storing the amplitude anywhere that's why actually breaks right because um because then there's no amplitude so temporal edge and has no amplitude solve this yeah cool i think i'll just leave it here i have to think about these and uh yeah but once i figure this out i think i'll be almost ready because once i figure this out the only only other problem that i have left to do i mean obviously apart from implementing expansion which i don't know if i will not leave it for later um i need to i need to make sure that uh this works for cases where we have bigger so more qubits and so you know what happens if we're targeting two qubits within a an edge they have more qubits and more qubits entangled that is a thing a case that is not covered in here what if more cubic oh but it's um yeah okay what if more cubits and tangled yeah sorry that's the that's like a two that's the the two bigger biggest conceptual to do's i think that i have if i figure this out i think i'm done uh at least with the first iteration with the you know we've got to simplify we've got like the basic operations and um i'm just not happy with the way of rendering that because it makes it complicated to be able to see everything so um i might try the other there's another visualization for these i think in in hnx or maybe find another library but i'm quite happy with the simplification i think that is uh that is a good algorithm and then and so this is where am i taking this from i think that just works my miracle so so i have the edge yeah yeah okay so these should be so this should be self edges e amplitude right but it this might not might not exist always okay okay we'll see cool i'll just leave it here i think so i got to figure out so the next step is for me to figure out how to what do i do with the amplitude as i merge of the temporal amplitudes and how to make sure the create edges then works correctly and and reflects the correct amplitudes at the edge level and then we can go and uh approach the apply to keep it operations and i think and i also got to fix these because if i apply a single qubit gate in an entangled pair then the global phase really should really apply it should really apply at the amplitude level i should really treat which if there's no entanglement it makes no sense because system is not so this is another to do manipulate amplitude if cubit is entangled i think that's the other two the other the other big the other big pain awesome i lived here goodbye |
there is a bunch of interesting things we can do with two qubits and you cannot do with one and you can definitely do of course with three for and and and more and just to begin with the notion of more than one qubit already tells you that intuitively there's more information you can work with than the actual sum of its parts right so it's not that you can just manipulate both qubits separately and then that's it but there's more to meet like you can with two qubits you can already create correlations so entanglements and you can see some of it here I'll also share share links with all the other extended videos about it but you can also do things like just measure one qubit after the tool for example which if they click the Microsoft ID they have a pretty cool example here where they they show you what happens when you when you measure one of the qubits therefore you know the result which in turn affects the possible outcomes of the other cubed you haven't measured yet that is really interesting because you can use that result to then influence and apply other operation so you can control operations on the second qubit based on the result or the first qubit and that's I think that's just the surface if you further take a look at the other videos and things that I have about this topic and stay tuned for more |
so here we are in at level 19 the controls that can also be thought of as a conditional operation well if the blue box are the qubit series off the controls that does nothing if it's on the controls it does is that an acute one since the normals that is not working for this for on this chip and X only works for cubed 0 this feature the controls that you're coming and it's hard to turn off the blue boxes using the allowed gates it's just gonna be oh the whole puzzle visible that makes it that's that's better definitely so I got a I got a do what I got a turn off the blue boxes using the allowed gates turn off the blue boxes so if and it says here that the control said said in the cubed one because the thing is we wanna okay so we so what we probably want to do is we because the set is not working on the cubed one now the X only works in the kids here so it's not working the that is not working on this trip at all okay so one of the controls and on on one based on on 0 before we then turn off back 0 again based on the way this is explained so it makes it complicated because there's different ways to interpret the control Z so every time they try to solve want some of those puzzles based on that then it kind of lose the context of everything else that I knew about controls that but let's see if you know at the end of the day for me to control that is really a different it's it's a way to create it's it's a gate that will help us create a certain type of core of correlation of entanglement and and I think that's kind of the biggest takeaway but let's see so basically we want to turn the cubed 0 up here into one so in to turn it on so we're gonna do what we're gonna do a X on 0 okay even have to put zero because it's already now we're gonna do a control set so we kind of what happens if we do a control Z then so we've moved so we've moved it with moved at from from that dimension somewhere else right so you can see that in the correlation but I'm guessing again there's sort of a third dimension to this and now if I do a harem art on the qb1 I'm basically swapping those two dimensions so now we've got that off and if I do again a control Z harem art on 0 sorry I mean I mean one what if I do it controls it now nothing happens so Harmar on zero back here and I do a harem art on one so we're back because the X doesn't work in zero so oh but if I do controls it I mean so what do we want to turn them off or on target turn off okay yeah okay so but if I do a harem re I'm stupid I already had it so if you do how to Martin one then that's often then I now I do an X on the commutes here and we're done okay I just just use that good let's go ahead next puzzle level twenty this chip is an entangled state is an entangled state it keeps a correlated in a way that only quantum objects can be though outputs coming from both qubits will be completely random and have not yet decided would run what to randomly be they are certainly to always agree what does this mean for the control said if the blue boxes are full of undecided randomness does a set get applied to qubit one or not for the time being you're probably better off with a box swapping interpretation when stuff like this is going on target turn off the blue boxes hmm it's an interesting question to pose that's the Zed does the zet get apply to a cubed one or not because if I do is add on one definitely there is something happening because we've we've so here that the red one here has changed which is again a signal that there's something missing in this visualization right which is already what the actual game the app you can download points as two as well so what's the target again turn off the blue boxes so and I just did a Z on one and if I do a Z on zero you see said on zero so that that guy here gets like on and off and what I will do is that in one possession zero so there's definitely something else going on because the thing is if i do a control hada Mart is not going to do anything because it's just you know they're both undecided they're both like we're gonna we're gonna move information around those two dimensions so it's not going to do really anything and an X either so but if I so that's telling me so this this guy this is telling me they're always so this is telling me that these are always going to agree and instantly that now this the damages are also always going to agree just harder I said if I do an X from zero oh oh wait a second so again so oh so now this is on of course because I've applied the next to an estate that's undecided but by doing that now I made them disagree that's interesting and you're ready One X and one yeah so to some extent this egg that's the same but to the second dimension right so now they're always going to disagree so what if I do ha tomorrow on zero boo [Music] so this stuff happening here right there's stuff happening here inside inside those four boxes like that define the correlation so basically we're messing up with this but basically what I've done now with a harem or what have I just done how to Martin the qubits you and what if I do how to mark on the qubit one harem art on the cubed 0 so cuz now basically I kind of I kind of cry oh so now the end the only so now - of the certainty and to sort of a correlation between the time each dimension of each cubed if I can call those things dimensions right so basically this means that this the blue the blue circle of Cupid one is always going to agree with the red circle of cubic zero and then vice versa with with the other so if now I apply a controls and that should that should definitely change things BAM nice so now now things have changed in the sense that that this is now we have certainly in the dimension in this I mention here so if moved things in and out of the correlation so to say it's awkward and now I can obviously Hatem are zero sorry how to mark zero how to March 1 and then I can do X 0 and X X 1 so basically I'm done now next on to the next cheap okay so see there is sort of one kind of game per interpretation of the controls and now if you use controls that is something to give you the one that was conditioned and cubed 0 sometimes you might want to uh pray that works the other way around it turns out that's that too exact same operation can we interpret it in the opposite way and it's confusing which is which is handy since it is cubed 0 for which accents that aren't working for this cheap turn off the blue boxes doing the allowed gates turn off the blue boxes so now that is not working so but what this is telling me is that controls in its it's an awkward way to define that so if I now do control Z so what happens if I do control that I'm even like I feel pity because the game is trying to box my thinking the way and I'm just trying I mean I feel my mind is ignoring that for the moment because if I do a harem are on the cubed 0 then I got that and if i do a control that now nothing happens why control Sam well yeah sorry here this here's something happenings if I couldn't controls in controls in controls ed I kind of revert yeah so they do a harem art on one and now I do controls and just ok so now I basically have this certainty here so the thing is i i i feel intuitively i'm kind of understanding something but i can't really put it into words so and now basically i mean i know how to proceed cuz i know that now I can I can move that information and and maybe the confusion confusion here is that I'm missing this third I mentioned I'm talking about so how to mark harm art on on cue one kiss me kiss me this and then next oh but I can't do an X on cubed 0 Hanuman I'm keep it 0 and even other controls and yeah so now I kind of flipped out here and now I do a harder more on 0 so that's off already and I the one next on one and that's a great low mmm I think the fact that there are three interpretations is confusing and it is lying that mmm I don't know I don't know how to interpret that there are those who like to reflect upon the mystery of how this works but they aren't tiny and stuck in a fancy but they are a little bit there are those who like to reflect upon the mystery of how these words but they aren't tiny and stuck in a fancy fridge and trying to do a job they can't even remember so you better save your reflections for later on to the next cheap |
so breaking down Quantum mechanic exercises in 60 seconds let's see how far we can so the first one I guess I'm not so sure how to build hamiltonian so I'm going to pass on this one behind this in the concept but know how to build them number two um that's a standard one so I just this potentially black this into the stronger equation against so you just need to figure out the other parts and then try to solve that equation I guess number three which makes the following operation of flower person I don't know what makes an operator Linea um but I'm guessing it's something like describing how the solutions of applying those look like in general number four I guess those things are commutators um so it's kind of like just proving those relationships um as in like you know how these things could be um same for five six looks like just a um what's it called a uh |
let's give it a little try I mean where where do we leave last time so basically I came across some things that I know there are true about the density matrix the one is it's not an alternative representation of the state vector it's it's in the sense of their mutually exclusive it just shows us some some more information that we can't see in the in the state vector the diagonal items the diagonal elements seem to indicate the probability of those particular states 0 0 0 or 0 and 1 etc I don't know yet I don't know yet what the off-diagonal elements mean what else we'll come across is that really all is it all I remember cuz I wanted to play what happens I wanted I wanted to mess with like remember I wrote this like let's play with some stuff like let's just make some random gates and see we can get some messy some messy things in here I don't know what I'm doing so ah that's cool ok let's see what happens because you see now now I have this ok so now we have these things where some of them have like really low probability so how does the density matrix look like I think some I think is a you can barely distinguish these but if you can see some hands are a bit a bit darker bit darker see 2 3 3 vs 0 0 17 okay so there's this this it indeed it's something to do with but like why what is this for example what the hell does this mean I can click that that's nice and if I'd said what okay but it's kind of change the sign on like none of that none of the annals and obviously you will take a look at the state vector so it's done this for everything for all the states start with one right because these are the ones that with zero and and so this seems to be in this case exactly what's happening here so the basically these kind of correspond to the ones that start with one and yeah yeah and this as well but on this side right okay sure and if I move it here then it kind of breaks down because it's cute in the middle so and then some of them have like it's different right - point zero 17 - point two three three so so there is definitely let's just like at all oh good oh wait a second so so basically and and I think and these are they seem to be complementary in the sense that the empty squares in here are full in here now and this is because we've applied the escape which is a rotation yeah but isn't of course so if I apply another ass then it brings those up in here that's a pretty cool visualization after me which is the same effect as as applying twice as applying one time the the said which we are doing now okay what about the tea that's interesting because the s removes the squares from here that's interesting so you see that's something you don't you definitely don't see in the in the state vector the state vector you just see that the ass versus if I apply it t you're gonna get the purplish thing because okay so and this is this is exactly what I'm so because the real animation and the complex components are not like they are both they both have information there none of that is zero right and that's why you get this kind of purplish color and the way this looks like in the density matrix is that these probabilities are still all there but they are less and then there's a bunch of complex ones here but still why is this blue and why is this pink or red because this is negative and this is positive okay but what does this mean I mean in the state vector you see in the state vector there's no negative sign at all it's all positive so that's even more confusing mind blowing so you have to have to have some meaning it's like and what happens if I put a Z and now I swap Ben yeah okay so has the same effect less than having just said on the cubed one okay this doesn't do anything control control why did some yourself man so again complementary right so what's the what's the state vector so it's changed its it's added complex it's a little complex and negative right here here's complex and positive complex negative complex positive and so you can see so let's take a look at so what if we try to read the matrix row by row so here you've God so the difference you know you could have this in into like a weird thing that you pack together where each cell has the real and and the complex of but I but that's clear the one is the real component ulam is the image in your in the complex component 0 0 right 0 in here says both real and imaginary are positive let's check that this guy no sorry sorry positive zero correct so let's not let started release column by column maybe it's zero negative zero negative correct now it's gonna be positive 0 and then 0 positive positive 0 0 positive ok now should be positive 0 and then positive and then not zero negative said pot I said positive 0 yeah it seems to match right so so this is literally it literally so that's how they color code it literally means but it's positive or not positive negative or zero and and then so you've got that but then what so what is the second color the second column for example because this is what I this is what I don't a question that I have is if I do like why why why why is that so if this is and now this is even more counterintuitive because if this is it has a negative complex component why the heck let's sit here so this is even worse than I thought so all what I just said now it makes no sense why all this gets invalidated because of this huh maybe this is not the complex part the reason I started was the complex part is because I thought our e stands for real and I thought that is I am for imaginary imaginary because I know I mean complex numbers are also called imaginary numbers and it kind of makes sense because when I was now readings for that it just made sense but but we just saw that with the Y's it doesn't make sense this is indeed this is indeed frustrating this is indeed frustrating so what off my tree density matrix for dummies googling right now yeah so we learned about pure States and mixed States as well readied physics what's a series of their own armies of into the matrix the general impression I get is that they somehow represent the amana coherence since performing a measurement but forgetting the results kills all non diagonal entries and things like phase errors make them smaller then again the density matrix is basis dependent so maybe it doesn't make sense to refer to the off diagonal elements mathematically decreasing value off of them automatically a decreasing value of off diagonal terms represents a lot of coherence regardless of initial values is it that maybe give me a second maybe does this mean that me you with time this decays so this is an indicator of what if I keep adding stuff in here the same I have a stupid idea right maybe maybe by maybe I just copy-paste on many times is the same I had this theory that maybe maybe those values will decrease with time so this would be an indication that the circuit is already too long or something I don't know because those numbers make absolutely no sense to me right now what if it's off diagonal they seem to have a they seem to have a relationship with the with the the whether the applet is positive or negative because then they switch to to the pinkish but it's like why would that element which is the intersection between 0 0 0 and 0 1 1 what would this mean those are just like you know that's that's what's kind of that's kind of confusing just good job good job with this that's good great of this so they could add a little explanation here the off diagonal elements are I J often its and I provide information provide information about the interference between the amplitudes of states I and J so it's information about the interference but would what is the effect is that this has what does this tell us while building the algorithm that's or why well you know what's practical what what's practical about it for for for someone who is building an actual circuit I don't know statistical mixtures you said anything you like off diagonal this is probably okay looks at the diagonal matrix elements I have a simple physical interpretation it's just a probability to find the system in this state similarly the off diagonal elements are the off diagonal elements are called coherences that it is possible to choose a basis in which this is the Aramis in such a basis the currents are all zero okay so it seems to indicate this is really something to do with the interference or the noise or not maybe it's not the right word but how is that supposed to help me how's it supposed to help me while building or building a circuit maybe maybe you wanna have it's kind of weird because I will make sense that you would see that with time sort of decay and then it would kind of be an indicator to tell you your circle is probably going to lose the quantumness okay but at least we've learned so now we know the diagonal items are definitely the it's a probability of finding that state the off diagonal elements elements are it's like physical interference between those two different states whatever that really means says sort of but what does this tell us you know that that's exactly what I'm what I'm missing that's exactly what I'm using what what does this interference tell us um why is interference between quantum states important maybe that's a better question to ask the role of interference and entanglement let's see interference growers search algorithm interesting so this page 21 why doesn't these and never get the right page along whatever that is okay so quantum mechanics harbors some of the most bizarre in country to the phenomena known in physics one of the first phenomena to be observed was interference this phenomenon was already widely known in the context of waste but it came as a big surprise that matter sometimes also behaves as a wave in addition to this particle behavior and therefore also exhibits interference effects because the matter wave can spread in space it can destructively and constructively interfere at certain positions interference in the quantum mechanical formalism is relatively easy to understand yet it's applications are stunning we know the effect we know the effect of a harm our transformation on the basis states correct this guy's here on zeros this and then one is this now let's suppose now let's suppose you have a qubit in state that and we apply a harm our transformation we just get the state this zero we see that the last step the amplitudes of one have interfered destructively yeah this is this is you know they cancel moreover as the amplitudes were equal in magnitude but opposite in sign the state does not have a component along one anymore on the other hand the amplitudes of zero state have interfered constructively I think I think I'm starting to maybe have a bit of you just clicked it just clicked for a second because I saw the name Grover in the end could it be that this is gonna who could it be this is telling us what really what really kind of cancels out and doesn't cancel out because one of the things that I've that I so if you check out the video on the Grover's algorithm there was one thing I was talking about positive certainty negative uncertainty I'll see if I can link it into the description below because I made I made the point I didn't tuition level saying um that in gross algorithm there's a point where we basically would basically flip like a big amplitude and then we're trying to go where with the harem art applying armors again with we we can go back to this day for some I can't I can't even explain it I but I know what I mean so let me maybe maybe I should just maybe I should just find the video so what my point is when let me see if I can find the video so let me I'll just mute myself I sound awful so here and so what was what was happening here is let me go there is a point where we there's a point where exactly we're here because I gotta try to reconstruct that circuit maybe so we're here now we flip that we flip these to a negative and so what I'm saying is when we do that and then we bring it back to zero zero zero exactly so now it's been now it's flipped right and then exactly and now and here's the point haha and for some reason it's like still you know III kind of like said yeah and then you play hard emerged again and then you know it will just flag the state that we had originally flight which was I think exactly zero zero one right and I was like yeah you know it just kind of remembers that right and made but maybe maybe this is what let's see if I can reveal this so let me see if I can reveal this so this is this and then I had hard hopefully tomorrow No but look at this wait a second look at this I think I get I think I am on a good track so this is the only one that is flying and then all this here is - so this basically what this saying is this saying that they will this then we've got extra hours in the excess so I've got this this it's cool because it seems like it's literally like the negativity negative is concentrated at one point it's pretty cool now we're here I would be cool maybe maybe I just should actually do that in a separate video like Grover's algorithm from a density matrix perspective um now I apply X again fancy stuff and now where am I in the state vector game so now I'm here density matrix yeah those are kind of stronger than those and this is super strong okay everything else is like weak and this is really bolt and now we apply this thing again and this and this okay I D but that doesn't tell me III expected something else because I expected that me maybe this would somehow to help me well I still have to sorry I still have to go back as I have to go xxx so this and this are but then you play harmonica Singh here that's that's exactly the element has been found which is this one but I thought that would give us you know maybe it does maybe maybe I should explore that more maybe I think that's gonna be I'm gonna make the second video focused on these because I think based on what this is based on what I write here here here maybe I should be further I think what this is telling me is that somehow the matrix tells me how are they going to interfere so my point is I have the suspicion that you might have as opposed all you might have two different states know um to the same state might have two separate no it's not possible that the same state has two separate to several representations but I so basically this is supposed to be telling us okay for example this one between that this and these they have like a negative something may I I think I'm on the right track dun dun worry I think on the right track |
cool so we have another bit of a i guess follow up on last video uh refactoring day um so i think i'm gonna just get rid of these i think you're gonna make the whole thing a bit more readable real and imaginary yeah i think i'm going to leave it like that i'm just going to make that more complicated otherwise and uh i removed the key from here because i'm going gonna i want to basically use uh i'm just gonna use the the edges i'm not gonna use the system edge i'm gonna i'm gonna use like i did here cubed edges okay and they're gonna be like you know with q and ah yeah we'll actually take that over later when i'm able to code these a bit more to to actually to to to systematically build up programmatically build that so i need to refactor this so we have a system here new system is just empty i really don't like i don't care um how many qubits we have right so let's me let me just do this so actually from state because i'm using this to keep to start the whole thing so so it's going to be q0 and then we have uh so we have one vector that's going to be more readable one state and then i want to have the state and i don't care about these so that is that is one state and now we want to have so maybe i should just do it like this and now what we want to have is we want to have we want to have a sort of q1 right and have the state okay and here to be honest we shouldn't care what we are giving in here right now so um q0 q1 from state vector cool uh one is going to be existing they should be the same because they are in different edges ah that was the problem that i actually have to encode these anyway because otherwise it thinks it's the same i think it's the same note that's the problem they're still gonna still gonna still gonna well i still gotta do this that's messy because i i probably just want to give like can i just give it a random idea i really don't care at that time so all right now like python uh random unique identifier or i could just like do some some kind of global like i want something small i really don't have to i think i'm gonna go with a dummy global variable that's called just like node number which starts at zero uh which starts at like n0 uh yeah oh what am i doing and then so this is just you know just to work around to make sure uh hypergraph notes are unique and so this is gonna be basically q zero plus you know does this work not sure this works like that in python but um yeah initial state and so and then what i'm doing is actually i do need this thing here so cue it plus and it goes like that right that's what i'm using there okay okay we're back here so let's rewrite these apply gate stuff right so what this does as a new system we've got it edges and we get the components so we print the components uh we've gotten on then we go for all edges so let me just not for all edges get the notes in the edges note state okay so first of all i shouldn't do these like for like that okay so what i should do is not for all edges i don't care about these what i care is about but this was not working right like last time i tried this was not working when i was doing uh when i was doing get uh what's the documentation because i don't have to use this for like or or all edges because i i i'm just applying a gate and i know the edge that i want because i have to cube it so and i know that the edges are named just like that and so uh hype graphs classes package site modules blah blah blah the hyper graph module so get edge etch it just adjust edges again edge etch other edge remove edge to edge must belong to self dot edges okay so if i be part time collapse edges collapse notes components degree property edges dictionary of entity set of hyper edges so if i say edges right if i say in system edges and i uh use cubit like that should give me the the notes in the edge and so i can go and say print node and i can go and i i think that works and so what i just do is okay so this should basically uh i don't care about the edges i declare the new system also i don't want to declare the new system i think i'm just going to modify the system i think that's going to be the smartest thing to do here so for for all the notes in here just print the node and then print whatever and then return just system okay so we're just doing like okay so we're from state vector and then applying to q zero the gate x see what we get invalid syntax oh so i cannot do it like oh i'm missing something i think oh i think i need to cast it to eat i had to string can i cast like that no um oh god just sdr okay cool exactly like that sdr like that invalid syntax okay so i just i guess i guess i guess i just have to say q zero equals uh you know so just like these come on just like that but like without these and then we increment this you know what actually that's stupid i just should do something really easy def get uid and that just just you know like that actually so we have these in here that's zero and then we just do um node and b equals node that's what what do we do what we do so and then it's as simple as this i don't have to deal with that any time every time and then i just do and i just do what i've always wanted to do which is q0 underscore plus and now i just do get uid that's how we are gonna do it and we're gonna call this like that and see if that works seems to work it's take so long encode state is not defined why am i using it encode state why is it not defined i haven't run this looks like i haven't run this can only connect strings not inst strings yeah well because i'm kind of stupid basically oh there you go okay cool so we have it so q0 okay so no so we print the notes actually have accident notes that's awesome now we take this away and say we decode the note we get the note state we don't care about these because we know that we're on the right notes so we print the note before look at the new state and then what we do now is we say so we should flag and that's the problem that we should flag these nodes as we should just replace the node okay so how was this remove from edge i think remove element removes item from entity and reference to empty from item memberships remove elements so maybe i can just say can i just say uh can i just say yo system remote element the the node basically and system not not system but like like these right and so [Music] add element an element it isn't a scientist a membership so add element so i can just say then just just take this whole thing and just say adelman uh on element encode state encode state of basically um essentially this whole thing but i just gotta call these the cubid i don't need to call this cubic just can i just just want to give you the q id i don't really get why i'm so stupid and stubborn in adding this part i'm just getting a unique identifier and that's all i want just getting you need identifier and that's all i want um yeah maybe i just should just return like these okay so so it returns like just something that looks like that's an id okay so um so just get that that's it get these they're always different and what am i doing apply gate and i'm adding the element and then return the system will that work we don't know it's not initial state but new state huh key error so this seems like it happened at least one note okay so add element remove element node and i'm adding the element to the system right so we have these in here so we don't need to print this so this works well and then i remove the element and add the new element um so how do i returns the new entity actually i think that is the problem okay and there that actually returns the element and the remove element what does it it also returns removes it item from entity and reference to entity from item ship okay so what it what it uh i get it so i think what is it possible that we should just do it like this this actually just returns the not so sure but it could be i'm a simon uh no so but that breaks right so it tells me there's no uh at least one node what's this key error so it does something weird with these being the key why there's this hero in here when i'm well i should probably run this first and then run this maybe the problem is okay id0 so if i don't remove the element then what happens oh something's really wrong here why is this gear if length of h then something with it these being the key it just it seems like it doesn't like it like if i don't do anything with it then it's id 0 and it does this oh i mean that is definitely a problem node and b it's not local do i have to do i have to just call this global or something i think it's being done somewhere but i don't know what what the effect really is invalid syntax before simon python all variables for your ids i i don't really at this point care of making something that's you know good but global global variables how do i need to call them inside a function x awesome the global keyword when you create a variable inside a function the variable is local you can only use inside the function to get global insight function you can use global keyword okay so that's not what i want but that means what i had before was just kind of okay right so i have these you know little variables box functions and so i just say this is what it is and so basically read these and yeah what is the problem with that python modify global variable inside function maybe maybe it's just maybe i have to tell it that it's global some that i'm using the global one okay global total okay so that was my suspicion so i need to call these um a new declare and you will just use the global keyboard keyword in here and then punch it to the top yeah okay now i got the two things cool and now let's try to do this right so hopefully it won't break let's break okay but now id4 makes sense maybe it breaks because what oh there's definitely something dangerous in here right because it's i'm adding elements to something i'm already trading on so that is definitely not a good idea i think remove elements from interval of hashables or entities small entity the interval so i can can i just uh can i just say you know garbage new notes and then just basically say basically garbage append node and new notes append the you know i'm so racist i'm just gonna garbage append note and it's basically just a new notes append this whole thing and then out of the loop just going to say system i'm gonna use there are most are some entities elements if they belong to this nothing what is the different oh that returns itself that as well what is the difference though remove arcs remove elements from an arc set interval of casual entities and this is one of more hashable or end it is okay just remove so i just remove garbage new notes does this work at least how do i how do i build like any trouble like what's the point like ah it's not hashable why it's not hashable um i'm so bad at these remove one or more hashables or entities that's maybe where they remove from remove l1 elements from an interval so maybe that's the point of these that i can just pass it over then add an element add elements from from interval like exactly the name is weird though come on same key error crap why so after doing this what if i just do these and we don't draw the thing so just has one thing id13 okay but that's not good well no that's fine i guess that's just fine what's the point what's the wrong system edges why is why is the printing not working that's what i don't get h uid key air that is that that is what creates the error i think that is the problem hey d23 23 i'm just not using the right like this is this is a niche basically right so if i just bring these it it prints q0 that's the edge like if i remove the garbage so what is the size size size one it's got one node if i have removed the element that's got zero nodes well look you can actually do that and it prints stuff correctly if i add the new notes that's when bad things happened it has one oh okay because this element has this element is now uh sort of orphaned probably that's that's why this is happening is it i should just hyper graph module the object parameters add edge add edges from at node to edge oh that's what i should okay oh is there like a remove remove node ah that's probably the reason remove node okay yeah so i should just say system remove node system remove node node so i remove the node from the system then first of all i get the notes one the ones exactly and then i can still now basically say also remove node and then i also can say system add node to edge and they give it the node and the edge yay the node and the edge which is basically this okay that is cool that should work noted notes notes oh yes god finally okay perfect it's a one now that works so i think i think i'm down with apply gate now it's nice clean perfect now how does the control look like and really similar idea right remember these so and i wanted to see if i could today basically try to also uh implement the other edge case but i think i'll just i'll just keep refactoring i think i just have to get it get it to get it to work in in a way that i'm happy with these so that that does the job and now when it applies when apply a [Music] control knot so basically we want to see here the split the split happening right so so we want to all want to do is we want to apply a harmonic gain right so we're actually getting this beast in here should probably cap those numbers uh with precision and stuff uh how is this on python python uh show only three decimals okay uh okay just round so with the encoding and this i can do in the encoding function so i can just say round round these by two by three actually i should say so huh oh there you go okay cool so cool and now we do so here so uh what we're doing here so we get the nodes right of the control control nodes gosh control nodes i need to change the batteries on the keyboard soon so probably we don't need these so we need we need to control control nodes then for each node um we don't need this edge thingy here so for each node maybe that'll be the easiest to do anyway because we need to duplicate it i think it will be the easiest to just refactor it like like i'm replacing the thing again i think that's going to be there because i can there's there like notes at nodes from that edges from a note twitch hmm no no twitch that's just the only thing that you can yeah i think that's the so it looks like i only have i don't know two edge kind of thing at the edges and it's just a hyper graph remove edge i think i think i have to go with these new notes new edge and i just get the control notes and so i'm creating these and this is all you know all good all good all good i get the note nodes you're not one event super position we're splitting these and so we have the target system blah blah blah we just get everything and i think that the only way to refactor that is just saying so you have the new nodes that go to the controls so what i'm just saying is system so i'm saying something different which i'm saying just a system do i have to do this actually i might not have to do that right because uh nodes target now i want to add them to the i want to add them to the cubiet edge so i want to say system new nodes so totally so they could so actually yeah second i just basically should say uh god how do i do this edge order number of edges neighbors i just from i think i should just use this one because this basically you give it like you're literally just a hypograph and add edge add edge single edge to the hypograph castle or entity and this alright surely must be removed so that nodes do not have elements each node element of edge must be instantiated as a node making sure this isn't already present in the self um edge set so odd edge odd edge which must be removed blah blah blah blah blah it's a hatchimal or an entity so it just can be the edge return will be empty don't get it so can it just be system remove edge control system add edge and then i just kind of kind of go like that like but that's bad because that's uh the problem here is that if i have i think that if i have um if i have i'm so stupid because i should just have state to what i had and just have a damn function that converts my notion of hypograph to uh to this library maybe it's just printed nicely but i don't know because if i have so if i have or if i'm destroying the the cubit edge and these notes were sort of connected to other staff like it's almost like what i'm doing is i'm taking this controls blah blah blah and then target zero new nodes i calculate the new node and i'm adding these nodes to the edges that that they need to be added now let's try okay so remove edge control and then add edge and then this was like control not control but like control and then it was just basically new nodes but this now i need to do the encoding okay so so something like that and then and then i need to do this for the target as well so i need to say you know like in this we don't i think this just don't care target target then targets in target one so what are we doing here right so we're target one target zero h one h zero oh yeah well i need to add the new wedges because these are the entanglement edges okay but let's see okay i get it so so i just have to use encode state get uid that's the state right so basically uh target target target target one pinned and then that is what we're doing and here we're doing the same the same the same the same i don't know if this refractory is going to work i should write this that well so i'm creating the i'm encoding the states control nodes encoded node and then i just say node equals decode is it is it called decode state decode state you gotta know that's an important thing to add as well so we're decoding it and then we have the actual node uh the actual node is given in in in the one component so i should actually do this and then we're doing like yeah yeah all this kind of stuff right i don't know so what if i do apply control gate and i apply q0 q1 next system q0 q1 and an x it's gonna blow up memberships edges control notes yeah yeah i am stupid it's not like this it's not like that it's not like that it's um system edges exactly so i'm using system edges control here i'm using system edges target and here using system images target can i cast the right data from d type complex data you're going to save you know so in what do i just say n for now okay so let's just ignore these for a second just want to make sure that it works real okay so here is the encode those are not those are not np arrays numpy arrays when i decode that's an np array yeah it's an empty array so when i give it like the end oh sorry actually i should uh decode state i should do like these that for sure hmm so what if i what if i do this and puree does this work i just want to print these let's say prince especially print something like so if i do this and i print that now what's the problem so that's worked and now what's the problem it's telling me that that happens in edge pen target zero oh that happens here not there i guess this happens in here so this node zero node one are the decoded state okay so i should actually yeah but that's correct i'm encoding it that was target zero sorry target zero i'm stupid where's target zero system edge target huh so what is this target zero oh so all those are all the notes i get it those are all the notes yeah yeah um i think i don't yeah those things are not to be encoded let's just forget about this for a second let's just forget about this for a second okay because this is the edge stuff this is sort of the the new edge that we're creating i just wanted to make sure that the rest works well and i'll just copy today i think a national type dictionary okay that's not how how these works just doubles like that okay add edges from edge set interval add itch castle or an entity how do i add the niche that edge just this right i just add edge so i should create an entity maybe and add these i guess that's what this is telling me new entity entity x so that's the edge and then add add element add elements from i guess that's what we want so something like i should do control h equals entity with the name of the control right and then just control edge all the elements from and then new nodes and then that edge and then we add the edge i think that should be the way this works we remove the edge and then we create a new edge oh yeah there you go cool that worked ah nice okay perfect so now we do the same for um four cubit for the target qubit so that's target and that's complicated to write that's target and add elements from and then we do these right and then okay so it's going to be the target edge and we add this edge so i guess what we can do is just do it like this and call this twice with the other element target one and there you go okay cool so we have and now we've got these superposition that's been split okay now and the target is in one in the one state because we was just uh okay we're not done targets are in target one and that's kind of the stuff that i've been basically skipping in here so because target zero are the um elements that already exist so that's an edge and if we call just the elements just elements these these are the actual elements so this is why i need to go probably to do dot elements or something okay yeah i think so cool one more session uh behind but i'm i'm still not happy with these but okay i managed to yeah i'm not so sure if this is gonna work the way i like it to work in terms of i want i would like the i would like the edges [Music] to so i would like i'm not so sure with this removing an automated in the fight i'm creating new notes completely well this will work out at the end with keeping this stuff if i have a note that is connected somewhere and i'm applying an x-gate effectively when i'm what i'm doing here is i'm literally creating a new i'm literally creating a new element right so i should really what i should do maybe this should be a way to clone these clone the element or something the entity right clone clone with a okay so that's what we should do we should use clone we should definitely use clone so i should not remove the the node i should just say the new state is that and now and now i should say first the clone node is node.clone with these with this uid i should remove it and then i should just add this node i think that's what i should do i'm just gonna run this again to start from scratch with the ids this clone the clone's not working well no dot clone decode denote state yeah decode no no no clone that's that's an entity right turns an entity what is the error now in here object not your clone that is not supposed to be a string though should be elements maybe i think that's not callable oh it's not really a string that's the problem come on i really just want to get the elements why is it children children oh there you go so it should if i start again like this and this is your id one okay but the x's the knock it hasn't happened uh clone node remove node the hardware gate hasn't happened it's not even printing the node decode state i guess i need the id the uid that's what i need probably oh so it's just not not running probably notes is empty it just knows children and they just has properties because this is cool because we have you could use properties the elements we're going to contain itself elements show the elements of its elements i want elements uid okay so probably now that's already okay but it's damn string oh god okay whatever i just get to do a used clone gotta go it's definitely the right thing to do it's sticking me a lot more than i expected but i think that's gonna be at the end it's going to be worth it cool ah what am i doing okay to add come on i don't know what i'm doing whatever i'll push it in a second bye |
and today what i wanted to take a look at is so first a quick introduction to this topic right the to what i'm trying to do today so i'm kind of like trying to go back a bit to um the uh ansis github so so i have this repo that i've been building um that basically so originally it was thought of as as a simulator of sorts or a toolkit of sorts where i would basically take a state and evolve it so represent the state of a system in a hypergraph fashion and then evolve it you know at the local level just by keeping the call the correlations um represented as hyper edges um and so by future doing that kind of obtaining a sort of a unique representation of the entanglement that it's just not like at the state level but at the qubit level so for example um quirk so quick quick quick quick so so what do you have in query here right if i do something like this that's your typical bell state where you kind of don't know what each which qubit is at it's just you know you can treat each cubit as a mixed state um we just know that at the system level we're at the zero zero or one one level and so the way that you would go and represent these uh i think j is paid out so the way that you would go and represent these uh and does this work or not no it doesn't seem to work my pen my pen is not working uh maybe i don't have it well whatever maybe i don't have it while blocked anyway i'll have to fix that so but what i so what i wanted to do is uh eat the thing was it called itty bitty it's a bitsy or ittb something like this there was like a quick sort of thing to take notes just not to open the notepad but i'll just open the notepad or whatever who cares so one way that you you could do these or the way that i envisioned that was you know kind of say our system is in the um so if you have cubit zero and give it one so you would have q zeros in the zero state and then keep us in the one state so so you know each row would be a hyper etch and um and each node is just so it's this is a hyper graph with four nodes and two hybrid edges the hyper edge being each road each row right of course kind of each road would have like a um a weight associated to it right and so that would be um you know one where the square root of two uh kind of thing god so kind of right um and so the way that you would get in the you know in these state is by having something like you know you would implement operations with rewrite rules so you would say you know um we start off with just one hyper edge right that it looks like these because that's our initial state here then we apply a harmon and so what the hardware rule would do is would so after the harder mark you would get that cubit into the zero plus one state and you know of course this is going to have weights inside here as well and then what the next rule would do and and here's where things have kind of evolved a lot in in different ways in the past months because i had different implementations of these and at the end of the day i kind of realized that everything can be done with rewrite rules i had a sort of a low level implementation where kind of like was really doing matrix multiplication at the node or qubit level but then i realized well a control knob operation would take in two qubits as um as input but because one qubit is not in the um computational basis the first thing that the rewri system would do is actually split these into two edges because essentially that's what you would you would kind of do if you think about like the linearity of of these right so one edge would be like that and of course then you you get basically the coefficients in there right um and so you would actually get something like that just as an in-between step right before b so this is this is an in-between step before applying the control x just because it needs to have to be to apply the rules only work when the qubits are say in the computational basis and now you can apply the control x because you know we know that here nothing happens and we know that um that actually end the second hyper edge something really happens and then so you kind of have these right so that's that's what we that's the state that we wanted to reach so that was the that that's the roth idea then i think that i kind of deviated a bit um because i started get getting too much focused on how to map these to a wave function and how could i just you know get a wave function i originally thought look you know each hyper edge actually corresponds to an an element of the wave function if your wave function reads something like you know like that right then i would translate these two to basically something like these right so that would be a that would be b and you know there you are there you go and then you can manipulate this stuff but i i i think that kind of brought me down the wrong path because then i just realized that it's kind of just starting building something that was just helping me manipulate um manipulate wave functions in a way that it really didn't bring a unique representation of this entanglement like i i wanted this to be a tool where you know then you could kind of analyze complex systems and with multiple qubits and then kind of try to understand how the entanglement is there but then i just realized that if i allow this to be just to have this mapping one to one to the hypograph i'm just left with something where which is really not different than um by hand trying to factor things out because how do i know that this is entangled i kind of have to have a bit of a you know then the manipulation set up in here to kind of simplify these and at the end of the day if you take a look at the code base that's really what it's doing and it's this is i think pretty dumb from my perspective so i've got like a bunch of functions in here that say you know hey merge hyper edges if they are the same or simplify hyper edges or decompose hyper edges and i think in retrospect that was the wrong way to go because ideally this breaks down when you have something like that let's say that now i have two more qubits in my system and i do the same to them right independently so now i have now i have these right so i have two systems which you know it's it's funny because each qubit is in a in a way um you know mixed right but your your so the way you would go or with you know the way you would go about this with my original um idea was that you kind of have you know you can have these wave functions right so the four zeros and these abc are just the coefficients right so so you have what is that that is the uh zero one one that is the one one zero zero okay cool so you just kinda have these and then and so you would take that you would really just you know build a hyper edge from each of these and then what like how do i how do i get to the point where i i know and i can tell that there's only entanglement between qubits zero and one and two and three because that's what i wanted to do right i want to kind of find a way to represent these things and it's just i kind of realized that you know solving the problem this way is just doesn't bring any value to existing tooling that's just that's just expression manipulation this means you can just just do you know um just just have regular uh just have regular um whatever you know svd like the matrix whatever you know the compositions or not like just have regular factoring uh manipulation ideas and see if you can do that and i just thought that was that just felt stupid i kind of spent a lot of time or wasted a lot of time implementing things like these where it's like you can just you know give the system two qubits and then it will just basically you know kind of realize that there's a zero zero and as usual here so you can turn that into two hyper edges you know kind of extract that portion out so the way you would kind of do this right and say you know from from so you could actually do something like these right and say hey factor these out right um that's maybe not really accurate the way that i'm representing it here but that would be because this is not you know this these are kits that make reference to um two different qubits but like that would be the idea right because at the end yeah that's kind of you know that's kind of what you're doing and then you kind of would say you know you you would do the same here because these actually refer to the same qubits and you could actually abstract that and say look actually you know this is nothing else than than these right um and so there there you go so so that's not what that's not what i wanted to do like that's not the tool that i wanted to build i didn't want to build something like this and and i think one of the things that i realized now is that my going back to my original um idea of letting this rather letting the circuit evolve instead of just because that that is something that it's it's just known to be it's complicated i don't know what's the complexity of the problem right but it's not just like you you gotta you gotta just try it's like solving express solving for expressions and you won't always get it's not trivial to get to these for any given um you know for any given wave function and actually i think the svd method is the best way to go about it which is basically you turn these things into um so you turn your uh your wave function into the um density matrix representation and then try to decompose the uh to do um how's this called what's the name of this it's uh this is the the composition singular valley the composition and you do these and then that kind of leaves you with two mattresses say a uh this is a times b or something but then there's sort of a another small matrix in between if i recall well which is basically what sort of represents the entanglement right but that's also not optimal because that tells you just kind of i think this kind of tells you the type of entanglement in general across the system and i'm interested into knowing having a more visual representation of what how do the different qubits are correlated um and so i i kind of then realized after going through a lot of the physics stuff here as well that you know that might as well be a way to go um in terms of taking a look at their rewriting system and seeing if i can implement something that is just really um you know a kind of evolution of an evolution based system where um but i really don't you know don't have it clear myself so maybe i was thinking i could use this stream to kind of just think through these a little bit and at the same time take a look at what's the tooling available for from the wall from physics staff um i i think it brings a useful perspective um to a systems description i i think even what is done in the war from physics project so far is really just at the state system state level but not the subsystem correlations so to say maybe that's useless i don't know but i i was thinking along the lines of you know implementing something like with what i've just kind of worked through here right because let's say that um you know let's maybe if i fast forward and just take a look at this example here this moment in time you know we kind of have i'll just leave the weight aside for now but you have q0 q1 q2 k2 can i just q2 q3 right and and here is like a zero and a zero here is a one and a one here is a zero and a zero here's a one and a one so i i think that's uh if you think about it sort of a table way to represent that system that that would be it right so you have two hyper edges that only contain nodes of q0 and q1 and two hyper edges that contain nodes of q2 and q3 now i think the hardest part of all these is how do we evolve the system like how do we evolve the system um if i now go and say boom i'm gonna add a control not gate here so sort of kind of bridging breaching both things right because now we have a bit of a different correlation here we have the 0 we have the 0 yeah 1 1 1 1 0 1 1 1 1 0 0. like the all still from a cubic perspective behave the same but basically i've got these kind of four possibilities so but how do how do i implement this here like what would the rewrite rule system need to do so the the rewrite rule system um it's got some simple rules right so basically i think rule number one or sort of behavior like the requirement i would say a requirement so the requirement number one would be that a rule so a rule takes a cubit map as input and then and then what and then what does it do does it match rule takes a matching um statement or expression a rule takes a replacement expression right so that's the idea i think that's just the ideal signature of how the rule would look like so you kind of have match these replace for that right um [Music] but you would do these in a way that then you kind of map that replacement to specific qubits right so if i would say i don't know um you know uh for example that will be all that it needs so the the rules that you would need for the c naught would just simply be kind of these ones right so basically two rules which is fine you know and the map would be q0 q1 right so that'll be the map so so you would say fine find these kind of things in the hyper graph and replace them by these things ahead of graph now the complex the complexity comes in when you know we've got things because if if we've got these pairs within existing hyper edges that is then trivial you just you know just replace that if if that would be you know if that would be this right the execution of these rules would just turn these into that which would then in turn result in the merging of these two so you're destroying the entanglement here right that's really another thing um so that will be kind of number two non-computational basis um notes right that's kind of what i said i think um you know that you know that like if if you would have a note in this state the first like there should be a pre-processing step where this is then split into two different hyper edges um and number three would be um hyperedge merging or post rule so after the match you need to check whether where the hype edges you know don't need to be merged whatever that means like i think let me just do that so let's see v1 will be um check quickly the timing and what we have here so that is what i i think that is what i have in mind right and but i i need to understand okay so the thing is how how does this matching happen really so that would be two that would be three that'd be four how does this matching because i think the mistake that i made last time was to kind of assume that the matching will happen at the hyper-h level but what happens here how can i consolidate that like how can i evolve this system in a way that is meaningful right so i know that the c this i know my mapping so i know my my rule in this case will just have this mapping so that's the cx that's a control x um controlled not operation um rule yeah okay so give me a second so that is actually um basically interference right i mean that is interference like if i have a something in the zero state and then just a note when i just one hyper agent to know in the in the you know in the zero state then it turns into the plus one state that will be the harmonar rule right then i apply another harmonic rule so that would actually split the whole thing into two edges first uh and then apply zero plus one and dot edge and zero minus one in that other edge and then this and and then i mean here there's kind of what interference is happening and that's also an advantage of this simulation or this system is that you kind of get to see the interference patterns that's that's the that's the idea right um but basically i'll just kind of trash the whole code and and write back from scratch i think maybe not completely from scratch i think there's a good basis but i'm also considering whether i just would not use whatever tools already available in the world from physics project because i think there's quite some powerful rewriting engine here for hyper graphs why not use that right um software tools that's what i i look at these i think i saw these so this is the same replace okay so that's actual waffle models is set as substitution systems okay that's something that i will take a look at probably but there's some oh look at these okay cool well for models yeah i think that's probably worth taking a look at because i probably can't i probably can use that to explain certain hypocrisy substitution systems yeah that that is definitely probably a better um a better place to get started rather than just doing it by from scratch but maybe i could just use it i could just build something by you know from scratch because i think that is cool because it probably yeah it actually has some cool visualizations um in it which is what i'm currently missing in my system um yeah but it still would be nice to it would probably be nice to actually try to do a bit of a scratch from scratch kind of implementation of these first and then take a look at using these tooling um and maybe that is something that i'll kind of as part of learning the quantum mechanics stuff yeah i don't know i kind of think i think i should probably keep both streams open but i might do a little bit a little bit of off stream kind of work on these and then um or kind of just record videos i don't know and then at the same time um go through quantum mechanics stuff uh i think i should be able to keep both both ends open and hopefully stream more often although i've been saying that since like ever anyway um i'm trying to i i'm naturally just trying to avoid the hard part of these which is how do i so how do we evolve this right so we have this system in here and uh sorry so we have this system here that system here let me just how do we evolve that so now now a control knob comes in with the with the map to these two qubits and what do we do like is there any preprocessing that needs to be done because essentially this is the whole system what a control x is telling you is essentially let's try to stick to the rules right the rules tell me find this pattern replace it by this pattern find this pattern replace it by this pattern but i can't like so i have four notes two with key one and two for q2 right so i guess out of these right you can have four combinations so you can have the zero zero or zero one combination and the one zero one one combination um which essentially the two i think there are two ways that that one could go about it right so one could just say um we're gonna create two more hype two new hyper edges no why that's not that's not no no that's not what happens right um although because essentially so these represent you know a correlation between kissy and queen according to q2 and q3 like if i didn't have any of these correlations the way i go about it is just check i think i have to check all possible combinations right because essentially what this system is telling me here is q1 can could take value 0 could value 1 q2 could take value zero could take value one all we know is that these things are correlated so this means that you know if it would take value zero we know that for that specific thing you know like you would also have a 0 and q3 but that's all and kind of we need to carry that with us um [Music] but i'm not sure how should we model these like does this mean that now basically because these two things are gonna be in a way entangled that essentially what happens is you kind of have in your sort of a step two you kind of have a zero here and a zero here a one here and a one here so basically oh god no that's wrong so you kind of would have to have both right so you'd have to have these so so what i've done is i've just kind of multiplied i've just distributed these right so obviously you can do these in different ways you can also just distribute it there but like the result should be equivalent and now kind of i have all the possible combinations of q1 and q2 in here and now the rule tells me that i gotta catch this pattern one zero which is there and turn it into one one and then a catch this pattern which is there and turn to one zero right which essentially leaves me with this system where now what we have here is that we have a correlation across um you know the four elements the four nodes and and still the question the the thing is still the question reminds here whether we whether there's anything that we can do to simplify this but does this match does this match what i saw in quirk that's question so so we've got the all zeros we've got the zero three ones okay i guess that's because it reads this way then we've got the one zero one one which is this one yeah so that matches the one one zero zero okay so i just kind of like because i think that's basically q three q zero to q three or something like this whatever [Music] okay but still like i think still that leaves me with the uncomfortable position that i really don't have a solution to kind of determine like cool so what if i now what if i now do another control x and basically undo what i've just done right i kind of want to be able to go back to my previous system so that's that would be an essential step right so an essential feature of this whole thing because what i want to avoid is that like now i have this really neat representation that tells me what are all the different correlations between different qubits they're four possible different correlations but i don't know if that's entangled like in theory if i take a look at these i would have to do some sort of factorization algorithm on these to make sure that things don't interfere merge or whatnot right um how so i know that it's not because i know that right but what if i now evolve with another cx so i apply another cx and then i see here that the both qubits share edges share high pressures i think that will be probably a you know case one all hyper edges are shared that's kind of the easy case case two um some hyper edges not shared and that's kind of where or you know that that's rather case one and that's right case two right in the sense that's the first case and when i apply the second harder mark that's the case because all the all the hybridges are shared between these two qubits so now i apply the rule and it tells me that one zero should be mapped to one one so i go here let me just copy that and i'm matching one zero two one one so that goes right one one and i'm matching one one two one zero so that goes back here and now but okay one thing that makes these probably easier is that i know that i've only changed these two qubits so i don't really need to check across so i just need to i i need to the advantage here is that i'm not starting from a zero knowledge um like hey that's that's my wave function that tell me what it's entangled i know that i've just touched so if i assume that after each rewrite step i have sort of the already already factorized version of it like if you know i need i i that's my state that's the that's the only way i can factor things and then i go i go here and i say okay i apply this rule right um and i i think this post-processing for the fact for the factoring staff or for the um i guess after the matching would be okay i've touched these two qubits can i separate them the only way that i could separate these two qubits right is if i have something like this this means that i um i just have a uh well i just have a sort of an all combination of those so uh so you know so i can i can basically because they repeat okay so by taking a look at q1 and q2 i know that i have sort of from a combinatorial perspective i have all the combinations so i know that i should be able to just cut through right and kind of go back to these that's the idea probably let's so what if i would do another operation that would disentangle that as well for example if i would say yeah f 0 0 i have 1 1 0 1 1 0 okay but yeah essentially i have here that as well i have all the different combinations so why why why can't i split that that's that's that's the that's the complicated part because i've come from here and i've just and i've just touched i've essentially messed with these but essentially i still have essentially i still have all the all the combinations zero zero zero one one zero and one one right it's just that um it's just that if i take for example the zero zero i've got a zero one zero one and one one got a one zero zero one so this is then everything really entangled right um but i don't know how i would detect that that's the issue without having to so without having to to do any like factorization algorithm right that's what i that's the point i'm trying to see if i can evolve this in a way that on a step by step i can kind of keep them keep the the the you know factorized factorized um correlation said so that i know at all times if there's a entanglement and how the entanglement looks like right but as you can see if i come from step one like this and all i've done is change these two by these two like i don't really know how i would simplify this like the active i guess what i'm trying to say is the execution of one single operation i find it all awful like that just the execution of one single operation just makes that problem right away just complicated instead of just making maybe a version of a simpler thing like maybe i should keep track of these things in a a separate way so that it's easy to to do that so if i because there's no difference as i said like between these like i just have to analyze the whole thing to know that and i don't want to do these now what if instead of saying okay now i have a c naught between q one and q two and what i will just do is i will create new edges that reflect that right so i will say look um there is so for the combinations know because there are multiple combinations but i'll say for the combinations um 1 0 and 1 1 right so i'll say so i will not touch these correlations and i will just add more information to these and say [Music] basically you know kind of add both right because i they don't share edges so now i'm just going to create this i just say one one and one zero right because i i just that's yeah but still that it just doesn't feel the right weight of the things one one one one zero that's also not true that's also not true okay let's do it this way actually no no so look at this so i think maybe i can just keep track on one end i have this here right so i know i know the only correlations that matter are when that's damn hard just them hard because i don't really know what's the best way to keep track of these that that feels the most natural thing to do but then it just it up like because i i don't know if i can split stuff unless unless i would just take a look at the other elements right and say that that's still simply because if i have a more complicated system where i have other kind of subsets or other sets of of um entanglement pockets so to say i don't have to look at them like you know if i would have like four more um then i would have like a huge wave function and so this would still provide a benefit over that because what i can definitely do is i can check here if i can factor this out this means i just have a factory problem that it's smaller and the way that i will be able to factor these out is by just taking a look at um if for this combination of zero zero i have a zero zero and a one one oh god but why but then i also need to check between q1 and q3 don't i because there might be multiple ways to factor these so i need to i need to come up with maybe a sort of a local factorization step in here like i'm not so sure if it would be naive or not to just say i know because i'm just i just run the rewrite rule i know that i've i've just changed q1 and q2 so i know so now i need to check if i can split between these two right because that is sort of a local operation from a cubit level perspective and i know that this couldn't have affected anything else in the system just just these two nodes so my so i need to check can i factor can i factor here can i split q1 and q2 so can i put q1 and q2 in different hyper edges and therefore um yeah okay but then i need to check whether i can separate q2 and q0 together or q1 and q3 together so that's also not trivial right because at that point i don't know but i know where can i split and so i i would just need to check for that so i need to think about an algorithm for these [Music] and again it all has to work symbolically speaking as well right because the whole thing is that i also want to make sure that one can use symbols instead of you know this stuff and then you have the weights involved in there as well but it feels almost like there's no other way to work around this because that is a faithful representation of the entanglement that tells me and that's something that's going to become expensive as the entire one grows because the more the more entangled things are um the more information you've got there to represent but i'm i don't know i still open there's another is there although another way i can represent the the rewrite i can run the rewrite role of a cx here and if not what's a way that to locally factorize something like these that's probably what i should be focusing on so yeah i think i'll leave it here for today it's been a bit of a recap for these as well um and definitely a challenge and i will see if i can take a look at these and see if i could use some of this stuff in here because that is actually pretty cool state as status edge indices all edges throughout evolution events because there's a lot of things that you can do here that i can definitely benefit from later on but again still my goal would be implement maybe first something that is just a local version of these and then move it to the wall from stuff to the to the um set replay stuff which is pretty cool that is actually open source so oh god i gotta log in okay i'll do this later anyway awesome thanks for watching and stay tuned for more soon bye bye |
so i'm currently thinking i'm trying to figure out other ways or ways to talk about entanglement that are a bit more intuitive than um you know the math right and uh it's uh because there's one thing that bothers me about entanglement which is the notion of that you can have like whether it's it's got some sort of strength associated to it right like a lot of people think to talk about like so here you hear people talk about like um the maximum tangle like a bell state and uh sort of all the types of entanglement as well right like not so maybe strong correlations and that's something that's a bit um it's just that like i'm i i think i have trouble thinking about this in and or trying to understand um what this really strength is or what this really means right like uh uh maybe there's a way someone mentioned one of the live streams something about entropy and um maybe a way to think about it is like whether the information of the system is fully on the fully stored you know the system level versus some of it is at the system level some of it is at the um the actual qubits right so but i don't really know so i'm kind of thinking about uh uh trying to approach this from another angle and uh so for example if we think about if i'm thinking about like branching right like i did i did a video the other day where um a video sorry that was a tweet it was a tweet thread actually about um why the three c knots create a swap gate uh and i kind of played with the idea of um how did i call it like relative superpositions or something like that like so sort of the idea that when you have two qubits for example right like one cubit is in in the plus state and the other qubit is in the zero state and you have a control you you you apply control not like controlled uh by the qubit that's on the plus state you can think of these as uh the system branching out like because essentially the control kind of it will have it will create two branches right like one bra one branch where the control is activated um and one branch where the control did not activate and uh this you know these branches don't have to have the same uh same probability it doesn't have to be like uh with a plus state would be the same probability but if it's not in the plastic if it's in in some some sort of like halfway superposition it would have different probabilities but anyway so you have the branches right like in in one branch you'd have the not gate applied to the second qubit in the other branch you will you you will have no no gate applied to the second qubit to the target qubit and basically this is a way to talk about entanglement right because um i mean this is entanglement i get it maybe not all branching creates entanglement but this particular case it does so they're entangled in the sense that uh you're maybe in the sense that like you know that both branches at the end of the day can't really uh can't really um exist or maybe they can exist um i don't really know what's the interpretation of that but you would kind of have these two branches right you can have these two branches and so that would be a way to talk about entanglement because basically kind of like yeah so one thing depends on the other um i don't really know how that differs from like from a classical correlation in the sense it's hard to think about it intuitively like i don't really um i think i don't really grasp this um and so how would you think about non like how do you think about like not non um max like something that's not maximally entangled in this sense is it that you would have branches where i don't know how to think about these like a non-maximum entanglement in terms of branches like it doesn't really make any sense because when you think about a branch it's like you think about a branch right like that's that's that's it maybe it's got to do with okay it's got to do with whether the branches actually happen or not maybe because obviously the second qubit is on the harmony like on the plus state and the first one is in the place state then the control knot like if you apply control knot that's not going to create entanglement because you're going to branch out but the two branches that you create they'll actually interfere and they'll interfere and they live in a state that is the same state like if you didn't apply the control not in the first place and so there's no branches anymore and therefore there's no entanglement so that will be the other extreme now is there anything in between like is there anything in between these case and the other case it's got to do okay so i think it's got to do with interference because in one case we have absolutely no interference and in the case of maximum maximum entanglement and in the case of an entanglement then we have total interference right total as in like it leaves us in the same state now what if we have a little bit of interference so how could these so this little bit of interference would literally mean that part of the information won't just reside in the in the branches okay i don't know if that makes sense um what would be a case right like imagine we have maybe a i don't know like what would be a case like a control knot on uh on a on a gate that's an applause date i don't i can't come up with an example actually i can't i can't easily come up with an example um like in my in my head right like like what would it be a control knot on a state that maybe has got some like some some phases somewhere in there and so when you do a control knot you're moving the face around maybe and and because of these you and dab maybe with a state where it used to be minus but now it's plus or something like that but still i don't understand i i think this still doesn't help me kind of reach the or understand what it means that like not all the information is spread across the system like what it means that's sort of like a non-maximum entanglement that's that's that's passing that's really what's passing me i i i don't know i i don't think i'm gonna i'm not thinking i'm gonna figure it out now it's just it's you know but at least okay so in terms of branching that sort of makes it seems like that should be a thinking path that we could follow so maximum entanglement it's when there's a maximum interference no one time sorry um no interference and maximum and like no entanglements when there's maximum interference that would be probably that's a good way to think about it i think and somewhere in between i have to think about an example where there's a little bit of interference and that will be the case uh when entanglement is not maximum that's a neat way to think about this i think i might be totally wrong i i don't know i really know |
This is great! Your great!, Thank you so much for the kind words! ;) |
could do is just try to explore if we find some examples that we can get inspiration from because i'm i'm tired of just tweaking parameters in here um it just really doesn't feel like it's taking me anywhere i almost get the solution right i get something i get like almost almost the solution um because i'm getting uh python python x2 1a thing here so i think i'm getting the yeah i'm basically getting almost a solution it's like it's it's the form is good it's like the alpha divided by pi but then the powers don't match right uh and so yeah the powers don't match but let's see i mean the free particles so we're talking about free particles there's something else that i'm using here so step back a little bit um a free particle a free particle of free particles so normalization of a free particle we know this is some at least based on on what ones i read in in one of the tweeter and one of the tweets that i made about these someone's talking about decay free particle free particle [Music] decay normalization or something like that like it doesn't normalizing the solution to free particles schweringer equation let's see what we get out of these can you normalize a free particle for all we know free particle uh the alkalis this cannot be normalized a free particle the free particle maybe maybe there's something in here that helps me understand these let's see so we obtain the chamber equation [Music] hamiltonian kinetic energy okay i mean that's fine let's i want to get to the point where we have the solution so um your equation is requested right because the operator is equal to the second derivative uh where i kind of joined this okay okay okay okay look at this that's good that is that is good that's actually finally what we have this is this is i think roughly you know a is the n and then you know we have this stuff in our case we assume i think that it's just k is real right um yeah so the constants a plus a minus result from the constant of integration the minus some physical constraint is imposed upon the solutions that you consume is called boundary condition um the boundary condition is the fashion must be zero and boundaries where the potential energy is infinite the free particle does not have such a boundary condition because the particle is not constrained to any any one place another constraint is normalization this is what we're looking for and their e and here the integration constants serve to satisfy the normalization requirement okay let's let's um let's do this so okay normalizing the wave function of a free particle we use the normalization constraint to evaluate yeah okay fine that is but this is it's like one dimension right so since the integral over is infinite it appears that the wave function cannot be normalized we can circumvent this difficulty if we imagine the particle to be in a region of space ranging from minus l to plus l and consider l to approach infinity the normalization then proceeds in the usual way as shown below uh notice that the normalization constant constants are real even though the wave functions are complex ah that's an interesting thing really so is that a statement notice that the normalization constants are real even though the wave functions are complex um they don't have to be right normalization oh it's real anyway let's not get sidetracked so okay so i mean that is that is fine there's actually what am i doing this is pretty much what i've been doing right so this is these take the constants out um then you know then then do this thing right uh so this is the the two exponentials left yeah but that's kind of one dimension so that's kind of one dimension that doesn't uh doesn't help me and i think the rest here is just uh okay the rest is just useless let's see let's see what they do here so one dimensional free particle three-dimensional free particle normalizing three-dimensional three particles oh off quantum physics workbook for dummies should be probably doing this one [Music] but this is this is 1d so that's what we're doing can be corrected foreign finally size box so the solutions of type so-called fourier components are not normalizable to one though they are widely used in quantum theory they are normalized quite improper expression to they are normalized usually there is a function of k becomes these but don't worry the three components are uh an idealization of the nature we just are with packets blah blah blah i don't know [Music] what the that is even that is even worse i have one-dimensional free particle survey equation they have this general solution we have a free so we have a free particle and that's the state and this is a real parameter maybe indeed i shouldn't be using infinite in here but maybe but maybe yes free particle [Music] hmm something about normalizing free free particles okay look at these that is interesting it turns out quantum physics workbook for dummies can be useful going circular in three dimensions circle coordinates answers to problems in 3d circle coordinates page 175 taking the trim into the spherical coordinates dealing freely with free particles in spherical coordinates maybe so it seems but this is this is just it just making it worse because why why am i all the time thinking about four dimensions as in like the stuff that's being you know something that that's new for four dimensions so they're looking for the page is this book you actually have to buy it oh god maybe can i just is this it seems like it's accessible so i want to go to chapter 7 or is it that this is not available 160 step page 167 because it's going through the hundred sixty seven state vectors page 167 it doesn't look like i have access to the whole thing i'm not trying to use preview that's just a preview but maybe if i um okay spherical coordinates seems to be what is being taught in here so solving problems in three dimensions three particles in free particles and spherical coordinates there you go maybe some more information is going to be found here i'm trying to understand free particles in both cartesian and circular coordinates so for particle going in say x direction so energy e we know the wave function is like this now let's just think out in the spherical coordinates and derive the wave function in circuit equal equations the following form uh now the angular particle the constant momentum blah blah blah blah blah now i know that theta and phi and hence now clearly just by substituting r with x i'm unable to recover my conditioning solution as described above moreover solution blows out which wasn't happening the position solution i don't understand that this dilemma so technically a spherical coordinate system is defined in threes in three space except the origin therefore spherical kernels are poor description of the systems of the origin the free particle itself has no beef with the origin there's an actual physical boundary conditions in the origin the moral is that we shouldn't use the circular system to describe a transition in very a translation in varying systems since it visually distinguishes a point of the system now say that we know that let's choose this regardless so we have to give up the the description r equals zero hence we're effectively starting the free particle on three minus zero instead uh two more so versus is what is regular circle basal functions what the so people go with spherical chord coordinates maybe i'm missing something quantum normalization of a wave function in spherical coordinates okay seems like that might be a candidate so so i have been provided with the following wave function okay cool i like it and try to convert it to circle coordinates and define the normalization constant n great applying this to the wave function flying we don't care about this my issue i'm stuck here to actually position i did take so okay so i have to do that the whole thing y r squared or you see there's something here missing i'm very familiar with integration however this interval has caused me lots of issues simon rings a better method approaching this perhaps separating the integral more and help is appreciated the two methods are the same why are squared though because of the angles being different why r squared though okay if you're obliged to do the integral inspector coordinates then take your expression one remembering to include a factor of sinus theta in the integrand as bill and remark now expand you will obtain many products of trigonometric functions but this can all be solved by using the standard tricks after doing theta and phi integrations you'll be left with integral of if you're doing integral over all space as i suspect that is standard result at the the fourth moment of a gaussian gaussian okay there's some clues in here there's some clues in here so um it's easier than this because we don't have all this crap to translate we don't we don't really need to translate that diaspherical so we're gonna stick with spherical stuff but there's like these these basically still triggers like a big question in me which is this whole thing of like are we really in three dimensions or in four why not in four dimensions you know but i think we can get rid of these so let's take let's stick with spherical i'm i'm confident that we should stick with spherical spherical and i'm confident that we should and i'm confident that why do they so why do they say so why why is it just r squared they don't put like then they are e35 z is r times because i find this the wave function i'm stuck here so number one these or what is this what is this y the angular part i'm not so sure i understand that i'm trying to understand the free particle in both cartesian and spherical coordinates so free particle going in say x direction with some energy e we know the wave function of such particle is like this now let's do the same questions regardless and derive the wave function in circum equation in in circle equations take the following form with the angular part this is something new there's no angular momentum but okay the angular part this is i probably shouldn't go there um ah wave function angular part okay so what is the angular part article dummies.com i like why am i getting why am i getting so many suggestions on like uh dummy stuff i should probably buy this book anyway uh okay that's something else that i've learned that i i okay so the angular part of a wave function when you work on problems that have a central potential with central potential problems you're able to separate the wave function into angular part which is a spherical harmonic and a radial part which depends on the form of the potential so when you have a central potential what can you say about the angular part the angular part must be an eigen function of l squared and the eigen functions are circle harmonics whatever that means oh my god the angular momentum okay there's definitely something there with the angular part so that's not so straightforward but apparently it should be the same one condition becomes psi squared r squared sine is a theta um whatever that is integration how this okay so the method is the same um this is correct way of calculating what is the constant n yes if it cannot be part of r since it's not spherically symmetric is it still possible to calculate the part the probabilities of physical measurements of momentum operators or is it characterized by this wave function oh god the angular momentum is bothering me now so if you're a blessing then take the expression one yeah r squared okay remembering to include a factor of sine theta in the integrand as bill and remarked bill and oh six more comments bill n in your first integral you're missing sin theta factor in the dv equation is r squared and sin theta sinus of theta okay so that's correct sign is off the math way the physics way i don't know let's let's stick to theta let's go to these guys r squared c sine is a theta uh bill and oops i did the same thing in my comment i mastered the circumference i can't sit here on the integration despite the number of attempts and substitution methods this should be trivial which makes me more frustrating makes it more frustrating yes tell me i've been how many hours already on this problem um what am i there now expand psi squared you will obtain many products of trigonometric functions it's going to solve using standard tricks after doing the thin integrations you'll be left with integral of r so it's telling me to the first theta and phi the question is what are the angles for those if you're doing the integral over all space as i suspect then this is a standard result so first we're integrating these okay so let's do first let's do first the integral of phi on theta and phi which would be pi and 2 pi i think that i think those still you know matter although for physics people physics uh spherical coordinates conventions i should probably you i should probably do that as well right quantity part of the circuit coordinates i should probably actually oh no how do i how do i ah ah how do i open the like previously previously ah okay so spherical coordinates in physics so phi theta is this one okay so theta is i don't know if i can do yeah i can i can i can because we know let's try to do just set up being pi and then the other one two pi see what happens first first we do what did i say first theta so first thing is theta we do zero to zero zero to pi then we do phi 0 to 2 pi and then we do r 0 to infinites infinite and then we'll see what happens probably nothing ah we're almost there almost there we're almost there if i do pi halves oh god what happened formatted i didn't want to format anything yeah then we get this crap okay it doesn't work it's all over all space ah man where the mistake is who knows who knows off is real r is real and positive how do i that's the thing right so how do i and that is not me that i'm confident this is where we should do the way we should go um i mean you know the thing is like oh is it the square of uh of uh is it like it's square root of function the function of square roots is it really like this is this true seems like okay so that seems like it's a okay because that would actually bring it close because that would be the same as saying the square root of the square root of a okay so we have this is the solution right maybe this is a typo you know that's the only thing i'll miss this tree here oh my god why is the baby crying now i don't know nobody knows anyway it's like because you know essentially it's like saying paint can i open pain right so if uh just just uh just uh you know just in case you don't know what i'm saying i'm just saying is that if i have square root of a to the power three to the square root of pi so this is the same as the square root of 8 to the power 3 divided by pi which is the same as saying that to the power of one half but then there is missing a three here like so it's not really man but like that is just i think i think it just might be a typo i mean you know this is like it it just can't get simpler than that i i almost i'm almost i think i'll i think i'll just have to leave the honor out of my you know i think maybe i'll ask you know maybe i'll ask twitter maybe i can ask twitter so um maybe at last one on twitter um so this is basically dv okay i can just use that to make it a bit nicer so so db uh okay just db and this is basically the wave uh it's like sine squared right it would be just two to make it a bit better a bit nicer and so uh we integrate first feta then phi and then r the radius maybe that is the maybe that is the problem somehow do yeah maybe i what i will do is i think i'll just open up a i might open up a physics question stack exchange i should use that more i think using these is definitely like you're asking questions to the internet it sounds like i should be you know maybe maybe in tweeter maybe i should use twitter these i don't know someone's like they can ask questions i mean these questions just like yeah yeah yeah yeah so it's like it it it can be it can be it can't be anyhow else it can be any it's just easy you know fairly easy the way it is it's like that attachment right it's not positive so we're integrating the volume the things that i need to like to understand to be better which is like why does the why does this work sort of the product of these kind of works you know the of these within a sphere that's that's the one thing the second thing is why is why is you know is it 2d is it 3d like what is the that's kind of what i'm missing it's like i'm i'm i'm not really understanding maybe in the next session i'll just try to put that in writing and then ask the question in general i think um i i just don't know i don't know why there's a three in here i really don't know i get the same solution but i get like one divided by two so this i i really i really truly don't know um and i don't get it why the 3d works in here because my my my natural inclination would be the thing about it we need four dimensions because well because the wave function it's it's but it's not that it's a function right i think that that's it it's not that it's a function that has values like a fourth dimensional value it's more like that function describes it so that that is already that 3d um it's it's the wave function in a way tells you it's really it's it's relating i i have i this is such a problem because you always tend to have about think about at least from programming perspective like inputs and outputs right and so i think what's the output of this function of the wave function and that will be my fourth dimension assuming the input is a three coordinate point um but it's not the wave function is just a relation between the coordinates and what this relation tells you is this relation is is implicitly telling you where can this particle be um like it's it's telling you you know if you're not in these like if you're in 3d space and it's just let's imagine a flat plane 2d plane everything that is not in this plane are points in 3d space where the particle can be because they are not part of the wave function i think that is the way they interpret that and i th and this was one of the biggest one of the biggest headaches in my uh for these at least initially okay so that's kind of put that aside that's good it's less we imagine you have that kind of cone right and then uh yeah exactly that's the this this uh yeah basically if this is your wave function that's where the particle can be i guess also it's not true you know that is also not true that is that is the main you know it's like that is the the main issue that i have here is i think i was getting that shape wrong and maybe maybe you maybe this is what you have to do no i mean r obviously can just be zero but zero is a non-valid number maybe because of all this circle doesn't work well there but that wouldn't that would make a difference um make a difference i think it's just zero and infinite maybe it's really that end no also forget about this anyway i'll leave it here um but but what i mean is you know i think that what i mean is like for me this was the i think one of the problems is that when i'm when we're writing something like these like we're not really we're not really saying that this is a value we're saying this is the expression this is what you want to applaud uh [Music] so really what you're what you're really plotting is these how would it be in two dimensions let me close with these at least this session this month i don't know i i don't know if i'm ready yet to wrap up um this problem i'm i i definitely will open a question because i just feel there's either a typo or is just maybe i'm just this feels like i i can't be missing anything here maybe i'm making mistakes somewhere here i don't know but so what about the the what am i doing so i wanted to check on the shape of these let's say x of let's say minus minus one okay minus one times square square root of like x squared plus y squared can i plot i want to plot this plot plot x of minus 1 times square root of and now we have x squared plus y squared okay uh i mean i was not okay i was not but that's that's so what's the version of circle all right let's say plot x squared plus y squared equals let's say four okay so that this plotting assumes that's the this plot the the plotting assumes this is the way this works now okay so it's x y and then there's a z function that equals these right that's that yeah so in reality in reality if you want to say square root of these and and kind of like that is then also what am i doing oh god i'm having such a mental problem with these that is definitely 2d 3d for the so the wave function is in a way it's it's something that um when we plot into dimensions we plot a relationship between x and y when we plot in three dimensions we plot a relationship between three uh different three different functions right three different variables i don't know i have to say i i i don't know next time next time but i'm like i don't know i really can't do anything better than this it just this feels the standard way and i the path to get here has been just too much like focusing on stuff that doesn't really matter i think but i mean i at least i've learned a couple of things um let's see i'll try to wrap up in the next video okay promise |
well this was supposed to be part 2 from the Yellow Submarine project review but Miho reached out to me saying man you're crazy etc us in like there's a bunch of time it's really complicated is gonna take a lot of hours here we go I mean really care I I think I think it's worth spending the hours but I'm happy that I just picked that problem totally in totally that the project early randomly and then it turned out this is like certify you open the box to a completely different type of chronic computing which is what sana do I hope I'm pronouncing it correctly it's doing apparently so okay gotta figure it not so what I'm gonna try to do is I'm gonna try to browse a little bit here gonna spend probably 10-15 minutes taking a look at what that paradigm is and then how this house is different from from regular quantum computing just really try to get to the basics and then see if we can just surface around the project maybe not do a super deep dive into the project but at least understand how is that different from regular chronic computing and by regular I mean what we would you see most of the videos in my channel right so the gate model that is permanently implemented by the IBM Q experience guys and so well let's just take a look see whether that's really so what is this it's literally the first time I take a look at this stuff so that's what I do in all my videos I don't really check anything a priori so blah blah the future of integrated photonics quantum photonic processors will solve today Stathis business problems locations my machine learning good are there any learning materials software and Elaine strawberry fields interactive so me how mentioned I should get familiar with strawberry fields if I want to really understand the project well [Music] so the it's listing the first dedicated machine learning platform for quantum computers are so that's an actual machine learning platform okay so this has to be really specific because those seem like gates as well and it's like a circuit thing but there's definitely some weird things like FK VR which ooh white paper Jones joined slack field from machine learning sorry feels interactive documentation let's take a look at the documentation [Music] mr. Barry fields oh wait a second actually I did check one of these pages it was what I was doing I was doing something and I was checking something when during one of my videos from ado but I think I was not aware that this is something totally different so features strawberry fields getting started as usual continuous okay so that's CV quantum computing that's what I didn't I don't know if he mentioned he mentioned it so me I mention didn't one of his comments or messages he sent me but so this is basically continuous variable quantum computing okay introduction that sounds like the good place to start right and the physical systems are interesting to continuous with a light-being example such systems reside in infinite dimensional hilbert space mr. Hilbert is everywhere offering a paradigm for quantum computation which is distinct from the qubit from the cubic model okay interesting the continuous variable model takes its name from the fact that the quantum quantum operators underlying the model have continuous spectra the CV model is a natural fee for simulating personick systems electromagnetic fields harmonic oscillations phonons haven't understood indeed understand any of those words but and for setting where continuous corner but I guess I guess what this is trying to say is that this is sort of truly in nature ten years in terms of the way you manage the information but I mean really is it really different than the cubed model because in the cubic model you can also sort of operate in a continuous sort of I mean probabilities that so the amplitude in the face is not you have zero and we assure you sure most of the stuff you use are certain certain states like zero to one the plus the minus etc but that's probably okay so there's a table here high level comparison so you've got Q modes instead of qubits okay and an information in it is one beaten here's relevant operators quadrature operators more operators have poly operators the x y&z okay common States common States coherent state squeezed States okay so now um so now I know where the squeak with this squeezed things come because I was one of the things that I say here in the and the code right squeeze squeeze guy was like what the hell is that okay number States so you've got different types of states okay come on states and then poly eigenstates and this is where we know 0 1 plus minus and then the complex face thing common gates rotation displacement squeezing beamsplitter cubic phase okay phase shift Haram artsy not tea gay yeah so those are we're familiar with this is the first time I see this exquisite in displacement rotation common measurements hormone time heterodyne foreign counting poly bases measurements yeah so you can measure on the Z base on the X base on the Y base I think that's what it means cubed based competitions can be embedded into the CV picture the most elementary CV system is the persona criminal oscillator it defined with the canonical mode operators this and this dissatisfied the well-known commutation bull okay it is also common to work with the quadrature operators what the self eternal producer is this way to abstract at the moment we can picture a fixed harmonic oscillator mode say with an optical fiber as a single wire in a quantum circuit these cue modes are the fundamental information carrying units a civvy quantum computers by combining multiple cue modes each with corresponding operators and interacting them with a few sequences of suitable quantum gates we can implement a general CV quantum computation so the D comment Academy between cubed and CV systems is perhaps most evident in the basis expansion of quantum states so Q is this and okay so it's sort of a linear combination of those two things while a cue mode is this stuff what I need to grow off whatever for Cuba's we use the discrete set of coefficients for civil systems we can have a Kentucky's with a discrete set of coefficients for civil systems we can have a continuum the states the states X are the eigenstates of the X quadrature of X being a real number these quadrature States are special States for more general family of civvy states the Gaussian States which we now introduce so our starting point is the vacuum state all the states can be that seems like this the same thing with classical a classical ok with regular chronic computing other states I mean regular it's not regular it's just the gate model or the qubit model let's call it all the states can be created by evolving the vacuum state according to this where H is a personick hamiltonian so here we are again with the Hamiltonians and t is the evolution time i mean at the end of the day it's not that it's a different thing essentially it's just it's a different sort of framework right I mean it's pretty cool to see that it feels like that's really the language level at the same time right so it's like when you've got like Python in classic Olimpia Python Java Script and all this kind of stuff and then each of them is a bit of in a different nature I mean at the end of a what they do is they manipulate the same love the same staff down under the hood and then this is just sort of like a different mathematical framework for for expressing the same was like you're messing you're messing with stuff at the quantum level that's what everything everyone's doing but then the d-wave people are doing something different the Sunnah do people are doing something different and then IBM is doing something different small squad right akin to operators for a single cue mode cause Gaussian states are parameterize by two continuous complex variables a displacement parameter and a squeezing parameter okay let's as always that's the theme of the channel is intuition right so I'm not I don't want on this than that I'm not going to understand all that I just want to gain intuition about that and I think that shouldn't be complicated I mean okay so you've got these things and then you've got like a displacement parameters quizzing parameter often expressed as these Gaussian stairs are so named because we can identify each Gaussian state through its displacement and squeezing parameters with the corresponding Gaussian distribution the names displacement is squeezing maybe come from the fact that that's what you're doing to the underlying whatever Thorin's the displacement gives the center of the Gaussian while the squeezing that reminds the variance and rotation of the distribution so many important pure states in the CV model our special States coherent state displacement and squeezing zero squeezed States ok displacement is zero but this but there's some squeezing so this is so this looks like those are ok the sir dimensions and I mean these are the parameters right so you can displace it exquisite and ok displaced squeezed States it's like eigenstates I can stay vacuum stayed number States okay so that this number States Gaussian States we talk to a Gaussian States ok number States complimentary to the continuous Gaussian States are the discrete number states or States these are eigenstates of the number of the number States are discrete countable basis people I'm really not understanding most of the stuff here this each of the Gaussian States considered in the previous section can be expanded in the number of say for example coherent States mixed mixed states mixed states mixed Gaussian states are also important in the CV picture for instance a thermal state this which is parameterize to the mean photon number this and Alex is pure states by applying quadratic order Hamiltonians of thermal States cv Gades unitary operations can always be associated with generating hamiltonians via the recipe this but this is pretty similar I mean really I might be totally wrong but this is pretty similar to the way that you can kind of Express and build any kind of gate in the in the qubit model right at least there was something like that in a paper it's like this like yeah it's it's e to the something for convenience you can classify unit or unit R is in the degree of they're generating Hamiltonians Gaussian gates one mode and two mode gates which are a so this is one qubit and two qubits I guess are quadratic in the motor paraders displacement rotation squeezing and beam splitter gates these are equivalent I find it funny how they keep going back they keep making an analogy with with a cubic model so you kind of understand clifford group of gates from the qubit model always done cliff for gates which ones were these ones which one's worth this ones image will tell us non cliff ranae its cliff cliff or gates XY okay you see with image with image search you will always get what you want XYZ the harm art SS okay it's all you see you see e to the minus I PI whatever um so those are non-gaussian gates are Gaussian gates and non Gaussian gates the Gaussian gates are sort of the equivalent to the Clifford gates non-gaussian gates are single-mode gates which is degree 3 or higher cubic face gates are : to the monthly for gates in the cubic model what a non non Clifford gates tell me tell me what are the non Clifford gates maybe I was too optimistic nan Clifford gates okay I guess it's whatever it's not a plea for polygroup this we know the Clifford group okay any gate from the forum okay it's not a cliff oh okay yeah good so now then you've got different gates displacement rotation squeezing beam splitter cubic phase and this is what they do so what what I assume in here is it seems like this is pretty similar so you basically if God but this is constant states you've got displacement and squeezing as parameters number States I don't know mixed age I don't know okay because basically okay big face seems the those kids just play with those parameters right so displacement probably I'm guessing the spring displacement displacement probably adds displacement it's squeezing at squeezing whatever those effects are right but then okay and then you've got measurements [Music] okay so the gas in longest measurement citizen class consists of two continuous types on line third line measurements while keen on Gaussian measurements is photon counting how modern measurements and measurements foreign counting so this is basically this is basically what you okay so the measurements you can do all but essentially essentially I might be totally wrong but intuitively that seems like nothing not so much different than the cubed model but it's like a slightly different so you've got to be the different different types of states different things you can play with and probably that's because you're playing with photons I I'm not a hard process sure but I think that's the idea behind this right that you're playing with photons and that makes it different okay conventions and formulas boom the nice thing about standards is that you have so many to choose from an intersection we provide definitions of various corporations used by strawberry fields measurements gates okay so here you can actually deep dive into those things States for bases vacuum state coherent state squeezed state thermal state cod state displacement squeezing so squeezing I don't know squeezing I just like the word what my god I have indeed opened up a box that I don't know if I want to open the squeeze gate affects the position and momentum operators the bases the composition of displacement in squeezing operators was our eyes Mike Crowell and the following quantity was calculated the important special cases of the last formula are obtained one this and this on the other hand okay Chinese artists even to deduce that your blackness what-what-what is squeezing strength s Kaede the position and momentum operators what else we've got displacement we obtained the position and momentum operators position and momentum the matrix elements of this place interpreted in the basis someone needs to work on these people so that this is more understandable rotation we write the phase space rotation operator us it rotates the position the momentum quadratic face it cheers the phase space preserving position beam splitter they will soon the operators according to this against a 50-50 beam splitter two modes quizzing it can be the component to opposite local squeezers sandwiched between 50% beam splitters so control to XK the control test gate also known as the addition gain or the sound gate is a control displacement in position so it seems controlled faces resolution the face or addition of the second mode in the position basis so this it seems it's basically touching the momentum and the position it seems like those operators are defined define like that okay but maybe maybe what I should do next is I should take a look at some of the quantum algorithms so maybe maybe maybe what is in order maybe that helps me understand that lost channels thermal lost channels so that's probably the same thing like do coherence and stuff like that the compositions Wilson the composition whatever regular the composition so far I don't care about this but it seems like it's a little bit more complicated in the sense they've got different types of states so you've got different types of states and then you've got different gates up take a look at what I'll do is I'll take a look at some quantum algorithms in my next video okay and maybe that's gonna help me understand a bit more the basics of this because it can't be that complicated really probably if you want to know the details it just can't be that complicated and that different from from what the other one stuff let's see and then we'll go back to the algorithm to the project actually I really want to go back to the project don't want this to be sort of a tangent I I think it's worse definitely exploring the the whole concept behind wanna do and behind this the photonic so that the CV quantum computing my intuition tells me it's just a slightly different model cool Stadium from more I didn't expect that to end up this way |
cool so the next step is to basically make sure that we drag and drop properly and we actually clear that stuff here so I'm gonna I think I'm gonna comment out the clipping for now because that's that's fine it just it doesn't seem to work well because it's clipping all over the place um so I think I'm just gonna comment out this stuff oh no can I is there a shortcut to comment something out uh oh wait no but it's fine I'll figure out later I know I can just do this probably and I'll be fine um and then at least we don't get the clipping uh but still uh still we're trying something nice in here so um what we want to do is uh obviously uh you know this is this is the kind of the issue right so um the idea would be well I guess uh uh can I give so Mr Ghost Rider can I give a position object uh we'll probably do it like this and then does the initial position and then I guess what we um what we need to do probably is uh is essentially say um so so this this will be this would be a last position um and so what we want to do is we want to clear we want to clear last position and then uh these these should be um [Music] I guess exactly I guess that makes sense this is a suggestion so this becomes the last position now and we we gave it here yeah I mean maybe whoops can I how can I do multi-line select uh what have I done what is this doing ah I guess I'll just do position I should learn the shortcuts at some point it makes it easier yes so this is position and then um we clear the position take the position and then uh you know basically this is a new position let's see this is working well no it's not working well um so I'm updating the position and painting the position right um so uh can you help me here you help me understand why uh no not moving um also dragster let's go I have implemented that it's now let's move but that's what I have already done position so I've got this position uh then it then it's like that oh my God oh my God so I found it before uh Ghost Rider um yeah but that's not working either so it's not because I have the new position and I wanted to basically um with and hide um so draw the square so essentially and yeah so I mean that's already implemented but I can't seem to drag the square to the able to run the square um variables you're using make sure that the variables you're using to store the mouse coordinates such as drag start I set the right positions when the mouse is clicked additionally make sure the track Starfire is set to True um that's not true uh oh wait a second what are these okay so check if the mouse is over the square uh yeah that is the no that is fine right because this is just the initial event and I think um and I think if it's just like this is debugging this is true debugging no but it's not clicking actually oh I might wanna I might want to just say position x uh foreign truck start X it's the offset okay yeah yeah I mean it definitely shouldn't be 30 but it's like position X plus uh position wave I guess um I guess that's the point right then here uh it's probably going to be basically y position y trying to start the Y position Y and then hide thing that should be fine yeah now it works cool test um I mean it works the the at least it goes in here so but I still can't drag it right so uh so basically that when you do miles down you calculate these these check that it's inside and then sets these variables to true and then a drag element clear position uh yeah that's actually wrong uh of course that's definitely wrong why why have I why would you why have it done like that thought that okay there we go that's awesome man okay cool um but I still leading the lines um it's definitely building the lines which is not nice uh how can I how can I make sure the lines are not being cleared maybe I just have to repaint the whole scene right clean the canvas uh no that's already there what I mean is uh uh yeah probably what I probably need to do is uh can uh you refactor uh the horizontal line creation into a function so cool so basically there is something that uh yeah basically we'll do it like this and then uh and then I guess I guess after each of these then you kind of repaint basically control horizontal lines so I guess there's no way to avoid that right right yeah nice look that looks really nice perfect so um yeah that's nice now I just need to be able to drop it where it is and and that's it and then we can work on the clip um I know that uh I guess we need a function Mouse app how um the code for the mouse app function let's see if actually understands what is it supposed to do that's funny because I I'm not oh that's pretty neat actually yeah it's actually fairly simple oh man that is actually it does feel like cheating in a way oh yeah but I know what's happening so I need to do the same here for the mouse app Mouse up and then Mouse up uh yes and uh another thing that is happening is that I'm not painting the line I'm not doing an initial line paint which I should um here should probably refactor all that into like something that just Paints the whole um the whole circuit you know uh and there you go there you go nice it's like how long have I been recording now 11 minutes like this is this would have taken me to sort of take me like I'm telling you I'm not kidding like two hours uh to actually get that done like these now I just need a clipping part um because we definitely want this now to just move we need we need we want this to be able to always the movement to be constrained uh within the lines okay um so we want the movement to the constraint with thin the lines so you know what I'm gonna I'm gonna uh I'm gonna delete the uh I don't like that I'm gonna delete the clipping um and I'm gonna ask Ghost Rider uh to help me there so how can I constrain the movement of the square to be uh along with the lines it's pretty cool how much context actually gets from these so you can constrain the movement of the square I don't know about that [Music] um okay let's see okay so let's see what what has it uh I'm curious whether that sort of like typing effect it's um it's a design decision whereas like uh because it definitely like if it will be more like boom that's the answer you know it will feel a bit more like an actual Channel experience I know it's cool that you see that uh happening um but I'm not so sure if that's so useful to see the the things being printed out um by adding some work out so this code should check if the mouse is within the bounds of the canvas then check which line the mouse is the nearest to that's a crazy man um and then move the square to the position so what is what has it done here so um if you compare these so basically clear feel uh repaint the lines through horizontal lines okay so what is it doing um I mean I I to be honest I think that actually that's not correct here and I I think that's something that actually shouldn't be part of the function so it hasn't really understood that but sorry the score is All Is Over The Line check which line [Music] um and then actually it does this no but I mean that's that's no that's fine I think that's uh this is definitely wrong right I should definitely it keeps clearing the original position that's funny um okay so let's just copy this part let's just copy this part and um and paste it in here so this I'm sure I'm sure this needs to be these and I probably can optimize that code somewhere else to make it less so you clear you clear the position and then you just I'm assuming let's see if this competition or calculation has been done correctly oh that's odd okay that's very odd it's painting somehow all the lines uh uh so it seems like the code is hitting uh everything below the mouse position that's not what I meant um offset left what is this 500 okay so the the lines are painted like in these intervals and then there's a 500 here so that's why we'll need to turn these things into constants I guess but so so you can replace the following line with this line uh if it's an actual condition right so check if the square is Over The Line uh now it's uh yeah okay I think this seems to make sense because it's actually considering the y coordinate I I haven't I'm not I'm not going to check the detail but maybe I should because the thing is it that might actually improve the experience okay at least it doesn't paint it but it does not doesn't uh feel and then what does it do it it actually painted it seems like it does it it does it I think yeah I think the the solution is um so but I think what's happening here is what I wanna it's still basically under um uh it's still basically I think I think that doesn't make a difference because uh it seems like it's starting to paint it always okay so it keeps the X but then it forces a specific why is that correct uh but then this this whole thing is here I think that is the problem if I comment this out um I think because that that keeps painting the whole thing where the mouse is I think that's the okay no okay it's gone um uh what I wanted to achieve is it looks better but uh there's a square and a steel pretty much following the mouse and stand it off looking to the closest line that's what I that's what I wanted to do so now it's going to suggest me to adjust that um how so it keeps this stuff and then it's telling me to change that's fine uh so that's what's missing right so kind of clipping these [Music] but you see that's kind of the same the issue that I mentioned like it seems like it is not finishing that but okay I'm assuming that's that's what it what it wants me to do is um it just wants me to add I need to find a better way I think I can maybe I should just put Ghostwriter I'm not so sure where it's better it's a fairly big screen but like it keeps bothering me to the you know the formatting of the code no matter how I do it like if I I'm focusing on the on the on the code or on the Ghost Rider chat um check if the mouse so we'll basically kind of goes here so so let's see still it seems to work seems to work but it seems to work initially because it does clip it like if I'm let's say I'll leave these is close so it's in between if I click here it's clipping into the bottom one if I click here um [Music] some mouse line distance yeah but where is that calculated that's not calculated anywhere have I oh sorry guys this needs to be here obviously um so that's what happens when you don't copy the whole thing yeah but it's still not doing the same but if I'm here and I okay but I think we're going on the right I think we're going the right track so it's just a matter of fine-tuning these I wanna I want these things to clip and then the next step would be to make sure that they also kind of clip or the dislike some certain horizontal positions to you know to achieve this effect here right that there's the same kind of like that is not a continuous thing but you you kind of force in a way to have this layout where things are always like well aligned so see you in the next session |
these last time and uh one of the one of my doubts that i didn't put in twitter got solved by um oh i got an answer basically people were like because i was thinking i was wondering like how come the um the current density is something that's calculated with a wave function and not the probability density function um and the answer kind of makes sense which is that it's because you want to consider um you want to consider the interference effects um i guess i'm not sure if that's like it intuitively makes sense but i'm not so sure how happy i am with that answer but here we are yet there again to try to understand that um and why why there's a and i think a lot of these i think a lot of this is just because of my lack of mathematical intuition with regards to these right so it's more about the fact that like i don't know what the derivative of a wave function times a wave function really actually mean and why there's a minus and why there is you know it's all packed into the sinus this is just like i i look at this like you know like you can still try to it's like you know this was rather easy in comparison right so it's the yeah there's the product and whatnot and um that's the way you can calculate the uh the inner product between two-way functions etc it's just a mathematical identity uh but but which still makes sense right because it's it's trigonometry right so um the cosine is the of the the cosine of the angle and whatnot and stuff like this but this is like oh um and it's it's also done with the radius as function but i've also learned that that's a common observable within just the um what i would say the x observable sort of the the physical dimension right so you can either just do this in in in terms of coordinates like x y z if you're talking about 3d space or an r coordinate if this is a radial wave function whatever something that just depends on the distance uh to a certain origin or something like that uh it's just a technicality but why so i'm i'm i'm i and maybe i'll just have to forget about these and try to understand what does the product of something and its derivative what is sort of the mathematical intuition for these um like i know the the the mathematical intuition of a derivative is the the gradient or sort of the the the the uh i forgot what's the the right english term for that but basically yeah like how i what's the function that describes the gradient of the function right why is that even just packed as part of a number let's see wikipedia uh wikipedia and we're looking for the [Music] current density current density probability current current density current density you've got an angle three currents we've got integrals right that's even more confusing where this flimsman current in practice quantum hall effect um the current density is the amount of charge per unit time that flows through unit area i mean i it doesn't matter if it's not related to quantum computing or quantum mechanics but i think this might actually lead to something so they used use this kind of j thing so whatever um the current density vector is a vector whose magnitudes is the electric current per cross sectional area at a given point in space um assume that a is a small surface centered at a given point m and orthogonal to the motion of the charges at m if i a is the electric current flowing through a the electric current density j at m is given by the limit yes it's basically it's just saying how much of this electric current is going through the surface right and then you just take the limit on when a approaches zero so for a very small chunk of the surface so this is just um no the current density vector j is the vector whose magnitude is the electric current density and whose direction is the same as the motion of the positive charges at a given time t if v is the velocity of the charges at m um [Music] let's try is equal to derivative of a or d a okay but it's d a because maybe this has got to do with the fact that we're talking about a small increment or something right current density current density current density quantum hall effect density of states current density you know probability current probability current because here oh wait a second maybe maybe this is something maybe i'm i'm approaching this from the wrong perspective maybe this is something that is derived out of these out of the contin continuity equation so you're saying this can be seen through the continuous equation in the following alternative i know but it's an alternative way okay so it doesn't matter we've got a surface of omega one and then the interval of that surf the sort of the the small increment as a small portion of that surface times that and then and then why is that replaced the derivative of these our time what the heck that's going to be another hell of a what the heck how to even parse that um density is easily computed to be these probability flux probability flux probability current i just want to find that that function right oh i mean okay okay we got it this is it i think that's the starting point is it no h bar divided by two times m it's almost these right because where the is that sinus oh unless uh unless we're saying starting with the same initial wave function so that's the wave function so that's the wave function okay yeah maybe this is just the result of how this has been elaborated you know what i mean let us see so we start with this wave function this is the wave function we have but that's just the initial wave function right so i need to add like a a term to it this is still from the last time and so the initial wave function is oh so psi of x of 0 equals of psi 1 of x psi 2 of x these being the eigen functions yeah that's the that's the what happened there we go what have i pressed and now and now basically we're saying is probably density [Music] they are real and isotropic take the two partially overlapping regions to be two concentric spheres compute the probability current that flows through omega 1. maybe i guess i guess i guess that is what allows us to do things in terms of r maybe right because they are re they are isotropic so it doesn't matter where you are that's that's yeah so that is actually what i just deleted before this thing with that is what i the i saw i being isotropic and and being everything concentric means it's like the everything can be expressed just as a um in relation to the radius to the center of these two concentric areas i think that is the that is why um although it's not explained in the solution that is why you can do that right so i guess instead of x you can just say r right whatever that means i don't know that just like i don't know why would that make a difference but um and then the probably the current flows through omega one right flows through omega one but then in non-relative quantum mechanics the probability current of a wave function of a particle of one's m in one dimension yeah maybe it's because if we're using r then we can treat this as just a one dimension so we can apply that specific probability function because otherwise we would have to pick another one so maybe that is why you need you need this to be isotropic and you need to be it just makes it easier right um so you know you can use this this is a good starting point um cool but like what bothers me is what bothers me what bothers me what bothers me i mean we have the wave function okay so we have the wave function yeah so we have the wave function which is just these right and so we we we take that that's the wave function so we do we do that i guess that's how r goes out i'm sorry i should maybe think a people might be better out loud right but it's like you're so what we're saying probably is that we can say that uh we can define that in terms of r so it's just one dimension right so we can just literally say uh and i don't know if i don't know if you can just get rid of the time though um um and sorry what am i doing this is this is just this is just 1 over 2 this is just 1 over 2. so this is the let's say this is the wave function then so we have these um can i just do that probably i can just and there you go so so you know so we would go ahead and say wow so this this this whatever thing here right is these h bar 2mi and then times right and so now we would say cool so the the these the wave function complex conjugate is just the same because we know it's um so we know it's the re it's real right so let me try to do that aside so we just have one half and then we have these plus side two r and then we have the derivative of these so we have these times with respects to x with respect to that one dimension here says x but it should be r right um so that takes the r out what no sorry what am i doing what am i doing no no no no no so basically the derivative of this this is just the derivative of of that right i mean like essentially because i don't know what those things are then that's the same like just saying the derivative of these functions right so i mean and then and then we have so then you basically have uh you know let's let's just do that and then we have these things you know like psi one times psi one uh derivative plus psi one times two derivative okay and then we have the side two r times psi one derivative and that's tedious but let's see and and the thing is we're going to have these and minus you know kind of the same thing right so i have no idea because that should be zero right uh that should be zero i mean but no matter how you look at it that should just be zero because hmm kinetic momentum operator i don't get it i don't get why why are we doing it this way if they are real to me it just seems obvious that that should be zero nothing it's not right i mean although here this that's the thing right so here we have this which i just have no idea what the hell is this coming from easily computer man just definitely not easily compute i mean it's easy if you know that but how to get there because here you get all these derivatives terms and what not maybe some of these things just cancel out i i don't know but still where do we even get that thing here from and why does this vanish at r1 since one of the other eigenfunctions vanishes at that point ah man i don't want to just i just it's free spin zero particle you know along my alarm like electromagnetic field connections connection with classical mechanics why why why is that let's assume that the first component is somewhere associated with the mass right it's just uh because in in in the classical sense you have that the mass flux is this is the mass density of the fluid and then the velocity ah so maybe the reason you're doing those derivatives and stuff is because of the that's what you want to do essentially right you're going to calculate what speed things are changing that's why you do the derivative but i don't know why you do the derivative times the wave function right [Music] the mass density whatever i'm going to just assume that that's what this term is equivalent to um this term in here and then probably current um first consider the usual elementary approach based on properties we're given a return away function so the wave function evolves according to the stronger equation and its complex conjugate so they say well the square wave function gives the probability density so the charge density is defined one can get the current by looking at the changes of of the charge density with time which depends on the changes in the wave function squared ah so you're getting these terms from the fact that you're observing ah okay that makes a bit more sense i didn't know that the derivative of course the derivative of these and this is just probably whatever chain rule or something like that the derivative of the derivative of the derivative of um of product of functions or something like that that's just whatever the rule is right yeah i guess yeah there you go that is why you see it's always satisfying when you find these things that actually explains why not the sign you know why the sinus function is there but it explains why the is this because yes because it's the it's the derivative it's the derivative of the probability density and so i'm pissed now because um i'm pissed because tweeter just gave me the wrong answer i think it's like i was like why is that defined on on the wave function and not the probability then so well it is defined on the probability density it's just um but why a minus why a minus not a plus why a minus maybe i'm i don't like to fuss with this stuff man because it should be applies no why should be maybe this is just why the minus oh look at this what is this okay so this is what we're looking almost what we're looking for the hamiltonian has another non-relativistic form of the potential is assumed to be real the e e m potentials a and uh it must be real whatever that means because they describe the real electromagnetic field at some points the calculations maybe they can may be taken as complex but always it is assumed that such expression is having an implied extra complex conjugate term to make the total real using the simultaneous the potentials cancel out and only the kinetic energy terms remain okay so wait a second why and now here's a minus sadly right whatever the pi here is with this vector thing on the top dude i've never seen this foreign well unless what these guys are doing essentially essentially is taking these basically and doing the derivative of these right so these times the derivative of this whole thing because because because because that would explain the sinus it's the only thing that i can come up with you know but that explains these um because the derivative of cosine is just it's minus sine of x man but that's the only thing i can come up with hmm no but that also wouldn't make sense uh i don't know i just don't know i don't know where where is that coming from i don't know that is the rate of change man of the probability density function where is that coming from god um um the current density can be computed to be these like how do i even get there but so let's recap for a second i'm i'm happy that at least i opened up these because these is uh-huh look at this guy right so let's think about this for a second the e but that e that's something else i think that is from the continuous equation to i can get the curve by looking at the changes of the yeah like that if that is let's just intuitively understand that is you want to take a look at how the probability function how the probability density changes right so you want to do the derivative of that okay hmm so you want to do the derivative of that right so this is like if i would just start from that perspective where where where would that take me derivative of these times itself plus derivatives times itself right where where is that where is that taking me so it's this is just what i would think of and i let's let's just maybe take that right if there is overlap the probability will be let's just take this as a starting point so we have we have like uh we have the half um x whatever x is this like r whatever it doesn't matter right squared plus um psi two x squared and then we have so this is one term and then let's let's think about this term right the other um let's think about this term first so what because it seems to be like in a way it's it's vanishing or something but i don't know so what is the derivative of an absolute square function well a derivative of a function squared i mean i could just i could just uh follow what i just learned right so but i mean okay let's just say to give [Music] okay define okay cool that's a new way to do it yeah of course so i can i can just say the so you know so so the the the derivative of this one right is the derivative of the sum of functions is it just the sum of derivatives yeah okay thumb rule one absolute value of a function does there anything here there that i should is anything specific to be aware of because that's a bit messed up right but okay the derivative of these would be basically um you know kind of like so we have you know we have these and so derivative derivative these would be like the twos will go so that if i would do the derivative of x you know uh of that with respect of x sorry um that thing so just basically be the derivative of x right and then here we just get like the derivative so yeah so that's what you'd get right assuming yeah like i don't know i really don't know how the the absolute values will play a role here but uh let's try to approach this block by block um cool and then and then the derivative of these is complicated d because what does that cosine in there mean uh i don't know man but it seems to me that this is gonna be i don't know i don't know because i don't know i don't understand how is that defined we have set psi one two it goes to the absolute value of this times this uh i don't remember how the how the heck did i even get there if i do if i take a step back and i take a look at um how so is basically right so um let's take these let's step back a second so let's take these here so we have this definition right so we have that uh psi of x t equals e to the power minus i energy [Music] times whatever h bar so that's just like the generic way of saying whatever evolution of psi 1 x right now sorry of that so i think that was the premise premise is like in the initial state is these right so you want to get like first of all this expression so that is you know times psi x zero right just to repeat we know it's we know it's this thing here um and and so if we if we want to do the absolute value square the absolute value sorry if we just want to do the uh probability density the probability density is um you know it's basically this times its conjugate okay um two eigenfunctions are real and isotropic well anyway so so we do these times the conjugate so the the the way we would do this is basically saying coso e uh minus i e t divided by h bar times psi x zero times and then the conjugate here would be e to the power of like plus i we're conjugating these right so uh h bar times the conjugate of of these is just the same because they are isotropic and real and whatever right now these two things here i'd have to just say well these plus these is just one so i think this these two coefficients disappear right because they become one and so we end up with just basically having to square the initial function so we just basically have to say um that the probability density function the poly density is basically the square of this thing so we have so we have uh that's why we have 1 divided by 2 and then we have that whole thing here psi 1 of x plus psi 2 of x squared let's let's just let's just leave it here am i missing something here yeah okay no so i mean i can expand that and that's how you get you know to to this guy here right but let's maybe stay here for a second so let's stay here for a second and now now i just say look so that's that's that's that's it right that's our probability function and so maybe it's easier to calculate from here if i just take the if i just take that standard definition where it's just like well we we get the current by looking at the changes of the density function right maybe whatever these term is this we're adding that right i'm trying to intuitively you know reverse engineering that i'm gonna assume this is for some reason i just don't get why the minus is there right but that's the derivative of this whole thing so this is our this is our basically uh our uh you know um the the the density function probability density that's probably density and so what we want to do is we want to do the the derivative of this with respect to time right times then whatever like the mass is or something and and and that kind of mass thing here is just going to be i think that coefficient let's just assume it's something like that the derivative of these is the derivative of this here right so the derivative of that is basically um how do we do this so we i think we need to expand that i think we need to just basically say well it's one half divided by and then that's when we kind of have you know the the function squared plus um these times this plus well that bike two times basically right and um and then we have these things squared and i mean you can just distribute everywhere and so we just have that divided by two and then plus we just have this thing uh plus this thing divided by two right um exactly and so yeah essentially that is how we get i just kind of redid the steps of how do we get here right because that this term is the one that we get from here cool but and and then this is just another way to say sorry this is just another way to say well that is the that is the um that's called the inner product and so because it's the inner product we we can rewrite it like that to see that it's periodic paper periodic now with the derivative of this is the derivative of each of these components right and so didn't i i think i just can't clean that didn't i the cac so um isn't the derivative of a square function just two times its derivative or i mean that's the same as to say that's probably the same as to say well like this is the same like these sorry and so by we apply the same identity that we learned and so the derivative of that it's basically um as basically saying the derivative of this times this plus um you know this times the derivative the derivative of it um all of course divided by two all right so that'll be one component and you have the same here and then here uh i have no idea i have no idea because i don't know how they get to these being inside the sinus it's like no matter how i think about this like it just makes no sense it makes no sense for the reason that like no matter what i end up with if i um if i will oh god if i if i have these things like that no i don't know man i just don't see that like i understand that i can understand i i this is intuitive right but i just don't get so inner product in a product cosine so you have these right maybe another another way to think about this is to say that that's how you would express this whole thing right you would say that is my yeah but it makes no sense right because the the the the angle between the same function is just zero that's just stupid to think about it this way is zero so the cosine is one so you have these i don't know i just i i really don't want to give up i don't like it i just want to understand where the fantasies come from hmm ah man i guess unless you're saying well let's walk it from here again right so we have these things and then and then if we if we work out if we work if we work the you know this is like saying this part here right so psi one x times psi 2x times cosinus of the angle between these right and i guess what they're doing here what are the wt is here right that is just the definition of the angle because it's like this is the angle with respect to whatever i think the horizontal axis is something this is the second angle so you minus one from the other and then you also minus wt whatever the like i don't know what is that why oh sorry i think i made a mistake here in terms of in terms of hw uh yeah no i think that is okay like you can make that definition here so that you then end up with the ease canceling i think that's what's important because the e's are different here right so you end up with just saying like i i i so that those things don't disappear totally that's my mistake so this this actually does appear it's like you end up with like uh e1 minus e2 so the energy difference which here they define as these so that's something that i don't know so this is e times h bar a e to the powers of h bar times w w is the angular momentum i guess so this would be one i don't know why you can make that definition right h bar times w to the part of e so you do that uh so that stays here i think that stays all over the place oh i don't know but i just have to know i just i i this is one of the things where it's like it's the damn details man that that make the difference but it's really hard for me to understand what is w w in here is w um see angular momentum i don't know i guess i'll have to i guess i'll have to work on these i've i i feel like i almost kind of hand waved all this stuff and it's not that obvious right so mm-hmm why can't you define the difference of energies being the angular momentum and how the heck do i get this angular momentum down here and no e at all because i get these times its complex conjugate and so basically the only difference is just the e's are different right so so you have to define this and then and then whatever that is oh god are they just removing these out of that picture just because no also not the eye stays there and then what is these oh i don't know this is complicated and i don't know even how how how to understand that how to get that it's just this is this is something i don't understand this is something i also don't understand um why you can do that angular angular momentum angular momentum energy energy difference but google is always our friend i don't even know how to define angular momentum is how fast the ankle moves i guess angular momentum yay i mean there's going to be a direct relationship right but i don't know why you just can't why you just can't define that like that why can you do that why can you why why can't you just define these we say why can't you just set things like that oh god ah that's gonna be tough one but i want to understand all the details and i just don't know how the to get that sinus in here but i'm guessing it's just intuitively i just should take that that function and do the derivative of it and then multiply by whatever this factor is that's kind of the mass or something and and that kind of makes sense right the the flux is the speed at which the the rate of change of the probability in in not mass that should be an area or something why do i why would i say that's mass the mass density the mass density so the mass per area i guess yeah so that still makes sense the mass and then the density is the that's why you put the radius in here right yeah so that's in a way what defines the mass but i don't know that's also something a bit unknown and then um and then you know that would be the mass densities like the radius times the mass of this thing times and then the just the derivative of of this thing here but i just even if i would take that thing here i i just don't know how to get there why would the sinus go outside i'm pretty confident i'm right with the sort of the intuitive idea but i just don't know how to mathematically elaborate elaborated so it gets there let's look at this man look at these these you see you see these is this right that's just true that's that's um twitter man twitter tweeter you kind of failed me there i was just maybe too fixed on the fact that this was a definition and it's just that's actually the result of simplifying something you start somewhere and then that's just the result of how you simplify it but um intuitively just makes sense it's how the probability density changes over time what i still don't grasp though is uh what does this have to do with this specific like r like omega one and omega two like how do i know the how to compute these for r for the the that specific region vanishes at r1 i get it i get it it's like what it says like when whenever it's r1 it's like one of these functions doesn't exist there so it's it's kind of zero right in the the it's not a zero zero yeah which makes sense right it just it means it vanishes like inside like the inside the the omega 2 um region it's just that expression but then as you go out because they both both have both both eigenfunctions exist but then once once you're going out of that this one of the eigenfunctions doesn't exist namely psi2 right which evaluates to zero and so the whole expression relates to zero so there's no probability flow which is weird to think about it just vanishes okay god uh well yeah sure but still i don't know how they get that sinus there i just don't know how to get that science there if that's the thing and i'm supposed to the derivative of this i just don't know how to get the sinus there how this is even defined so i have to sleep on it anyway it's been a long one cool see you next time |
I'm so we left at the point where is trying to understand the the the way the problem is encoded and so I'm still stuck with understanding the road J fields the column J fields because if you've got a 3x3 lattice right which is basically in the transverse fields you've got that right because each of those a lot of these sites I think they're called if I remember well it's it represents the interaction with the frenetic interaction with with an external field whereas for the j f-- when it comes to the j variable or the the variable but the J component so you've got horizontal and vertical is fine as to the problem one and that's cool that's in this case why you've got a two-dimensional that was like two dimensional lattice right because you you basically have so the idea is that each of those sites each of those elements in tracks with with its neighbors right so you've got then the the interaction we think the rows and within the columns but I can't find where this is written here no yeah justice leaves off for the Rowling's on for the column links here's the code that we can use the generator on Oprah okay so I I just found it it's here it's here in the comments links within a row links with that column so it's confusing me so the the the the column J field seems fine right because you cut three columns and in each column we've got two interactions right so why am i blue blue so you've got this interaction in this interaction right this interaction this interaction this interaction in this attraction so that makes sense that you're represented this way but why would you do the row links links within a row with this representation one it's kind of sort of the same Randleman you've got you've got three rows and within each row there are two but maybe okay so maybe because that's kind of these here right but maybe this is just a matter of representing it as a [Music] maybe just a matter of representing as a tourist like it at 2 / 3 matrix or as a 3 / 2 matrix because 3 by 2 matrix because this is basic basically we've got 1 1 minus 1 1 minus 1 1 right and so effectively you do have I mean you could still I mean yeah you could still think of this as you know this is this is kind of it's awkward to think it this way rows 0 this would be Row 1 0 2 right and then those are the two interactions so I don't I don't really maybe maybe maybe we have to dive into is the actual code here how so how how is the UH that's prepared that's probably how's the answers prepared and then maybe that's gonna help me understand why it is represented this way it's pity it's not explained to you other way around but let's let's see but you you get it right so those are the J fields the green is got j2 and then the blue would be like j1 or something like that and then and then this thing here it's not blue but I got no pink that's too close yellow so this is the basically the little H in the Hamiltonian okay I'll clean that up and let's move on so now it's the interesting part is and I'm still I'm still be confused between the overall vqe and Qi which by the way I've read somewhere that it's you can pronounce like wah wah wah wah this is pretty weird so you know what's what's what which one of them is a family of algorithms which one of them is a special case of the other what's a relationship for them this is maybe something that I could probably make it it's one of the things that I want to end up making a video about before I close this whole thing vqe in qi qua wah and then obviously I've got still ahead of me all the so that the choice of pursuing this continuous variable quantum computing thing or not or just seeing it as a sort of another medium the NSA is the same concept right you've got modes and you modes and you've got gates and then you've got ways to measure it's it's just it's just probably the way you measure is a bit different and so on but at the end of the day should it should be it should be kind of the same but okay I'll stick I'll stick with that so and I probably won't dive in there or because if I dive in the in that direction to much later on I'll just I think I'm just gonna just kinda get lost I really want to stay in track with with that kind of more generic more that kind of more standard discrete quantum computing so let's move ahead Travis will be different from yeah okay so given this definition of the problem is since we can now introduce our incents our answers will consist of one step of a circuit made up off okay so we've got steps and X power gates an X and an X gate it's a rotation so I think this is basically a rotation around the x-axis for the same parameter for all cubits this is Method we've written both then apply a set pal gate for the same parameter for all cubits for the transverse field term age s plus 1 so here we start getting into the circuit basically the answer is basically being mapped to the particular the particular problem a beam being mapped to the answers so if this is a sad pal gate I was I so this is basically is that rotation right nothing I could do is I could try to do that with quark a small-scale baby anyway um so it sounds like maybe this is something about flagging so you're flagging there were there's a positive ferromagnetic interference you know at the end of the day right I mean this circuit is gonna have it's gonna be it's gonna have to have there's gonna have to be someone related to the tour Hamiltonian isn't it because here I see this wait a second so how did they come so how did they do this because here is he is that and and that's basically it's related to the age right so that's a transverse field classical problem to the quantum problem optimizing the expectation value of the observable okay but with this is not clear how did it get there I mean they're basically what would be basically saying here is you've got the parameters and so they're trying different turning this into a set um but maybe this is just an arbitrary choice because this is an actual part of your permutation so you're gonna put here you're gonna optimize the angle you're gonna use here it's it still it still feels a bit by mind-blowing somehow that this is anyhow working so where are we here so you've got the set pocket okay so but it kind of intuitively intuitively something that you know you could think of so you're doing something to the so you're making a different you're kind of fracturing the the ones where the field interaction is no plus one with plus one okay so it's only plus one minus 1 so 0 is not not a possible number in the initial problem presentation so like I say you did i hear half turns and I mean half turns is going to be basically the parameter that you are gonna play with in terms of victimization then a player controls that doesn't apply controlled should be should be three apply that control that rotation for the same parameter between all qubits where the coupling field term J is plus one if the field is minus one apply a controls that parka conjugated by the ex gates on all the qubits so first of all control Z rotation is gonna need two qubits so I'm assuming that those are the two qubits that basically are part of the J cuz remember that the J field the the coupling field J's J is basically between two of those of the sites in the lattice right so I would assume that we have I'm assuming we're mapping one cubed equals to one side and so so if if the relationship between two of them is a plus one then we are doing a control controls that between the tool and in this case does matter which one is a controller one in which one is the the target because as we know that doesn't matter for the controls at and if it's minus one we apply a control Z Powell gay conjugated by X gates and all cubits in the filters minus one we apply conjugated by does this mean exactly that we have so here's examples you've got the X gates afterwards or what let's see so let's take a look at the code here the dust is um yields rotations about 1 1 conditioned on the jr and JC Fields [Music] so but what it does is so it iterates over the rows there's mistake in here because that should be something else like JC column right I mean they're just reusing the I know JC row okay JROTC rotors current so it trades over the the JR and then J row and then basically iterates over each of them and then it says if if this is minus one then then the then basically you apply a as I summon is one case okay so you apply a and X cade to that cubed and a next gate to the other cubed remember we're referring to keys as as as part of the grid and that's why okay that's why it comes in handy interesting okay that's why the representation here comes in handy for the grid qubits because it basically it's the lattice that we have so as we are dealing with the row in the row field the the J Rho so the the j r IJ basically is between says between cubed IJ and the the next qubit in the raw they're all okay and okay so this is the so you applying index gate and then you apply I'm gonna why is this applied twice as you apply it before and after looks like because here's you've got your gate which is control so in the variable gauge you've got a control set and you basically apply it in between okay between the student is qubit then okay so but you were doing it next before and after and then the same here so at the end of the day the way you encode these Z's in here it doesn't really matter really I mean is one of the things I'll try so in the next video we'll just get the hands on the actual code and they'll try to make some modifications see you see what happens but basically there shouldn't be any because it's just you're just iterating over those things right so here the difference I see is that basically for the for the column interactions what you're doing is you're here of course if you're QB if you're if you're J element or the site is the IJ side then the one is interacting with is the I J plus one because it's the one it's the one below sort of is the one and then in the the next within the column but basically it's my maybe I know why so see the way this is you're gonna number it just bothers me a bit just let me spend a bit more time on this so she's basically saying that for each I and junior row and you're in reading JR right but joj are it's like these so you basically have your training twice the outer the first for loop it just gives to each region so you've got basically row 0 and Rho 1 okay but but kind of makes sense because so if you cuz if you've got your lattice you're basically saying no it doesn't make sense because then we say nature we've got three three elements that's confusing am I just being stupid or you have got three elements okay but okay so by the the I plus one is you know this is the only one you're getting plus one right so because this is just for you what I'm trying to figure out is that's so basic then you've got basically it was just a naming that's confusing me so this is the row this is the raw through interactions and you're getting so within a row okay so you're going kind of you're gonna kind of this way right of course so and you're gonna iterate three times that's kind of the second that's the J right the J is gonna have three iterations and but the AI is gonna have to write because you want to basically have the the first one and the second one and then this second and then the second one the third one so that's why you've got the I plus one in here yeah that makes sense whereas in the in the second case in the second case and it's very basic you've got here your lattice and then here you go here you're going here you basically have got three elements so the AI is gonna try it three times yeah cuz you got because you're going this way so you've got three columns so you wanna try it three times and then within each column you just only trade two times like this one and this one and yeah I think that's so basic that your program I think that I'm so of course is here training three columns and then you've got they've got three columns one column two columns three columns and each of them has two interactions and then for the role fields you basically that's what that's what's that's what's confusing me so you're iterating you're eating two times it's reading two times and a second yeah you've got the it's read two times my part is I think we should be just hold it in a simpler way than the column J fields I'm just thinking why would you do it differently so you've got so you're in your first and your first attrition you've got zero zero and then you've got three value okay cuz you're here you have I said I get it cuz you have okay let's see you simply have C this is your first iteration and this is your second iteration okay we'll try to alter rewrite this maybe ah to prove that not stupid but it's one of those things that I guess this is just my off preference um and just to think that this is burning so much of my time and it's not quantum at all anyway it's one of those things like it's a matter of how you write stuff is good so back to the actual problem so you've got basically the where was I exactly say you've got those things and here's basically what this is saying is you've got basically there were there's a positive positive interaction between two sides you just you have a control set and there where there's a negative interaction you have a basically X and X Gaede in both both qubits then you have controls that and they have another X gain so your without what your I think I'm totally doing is you're just saying you know you're it's kind of the opposite right is the probably it's probably a big stretch to call it the opposite but it's basically let me open quick for a second so let's imagine we've got those two qubits right and so we're talking about a control if I apply control Z here right that's what you're that's what you're kind of getting says nothing as long as you have a 1 and a 1 then you're getting a 1 1 with a phase shift right plus in a plus basically what this is doing is phase shifting the 1 1 right so component of whatever so if your state is 0 0 obviously there's no component so this type this is 0 1 there's also no component if you stare this one here is also no one walking on but in this case there is if you're getting into super positions then you obviously also have that component oh wait a second that's interesting oh yeah but basically I think that's exactly okay see here I know in a second you're shifting everything it's I I anyway um yam is my mass pad site I can't really use the okay so but what this is saying now is that what the other one is doing is it's basically doing these so if there's a minus one it's doing this which effectively kind of turns this user into one one in this case right and then it just applies with and then you play another X X so basically is doing a phase shift on the zero zero so it's kind of the the mirror if you would call it this way I think let's see if we can can I do something like these and then apply the density not the amplitudes here and here notice it's gonna be always fixed because it's not in here so you've got that and if you if you've got a 1/1 right you basically have the half the face shifting here is it's not it's zero right so there's no phase shift you've got a plus plus you basically have got a phase shift on the zero zero if you go - so it kind of it kind of shows the mirror effect we just probably which is we just probably which is probably when you want to design this for because those interactions are opposite right one is ferromagnetic and another one is anti ferromagnetic if I remember well when so you're you're kind of mapping exactly that problem into a circuit somehow and then expected by privatizing those things you will find still why'd you choose a Zed and why you don't choose something else an adult I don't quite understand the I don't quite understand the initial the initial X rotation for example I guess this is just for the sake of adding that variability right so you're kind of building a circuit that basically physically almost represents like die from the diagram level right it represents really your your problem so the the the the two sides that are related you're kind of mapping them into mirrored controlled operations so it reflects that that concept then but they are still parameterize so you can you know at that variability and then find exactly what are the parameters that give you the minimal the minimal energy can associate so this is indeed a koala strategy in the sense that I mean I remember at least in the previous videos doing the koala for for the mascot problem that this is really what you're kind of doing to some extent you're also connecting with using controls that you're connecting the the the vertices in a graph that are connected right or that are part of the same group something they're connected something like that the room exactly but still why does this intuitively work I kind of additionally will make sense you're mapping one problem into into a quantum circuit you're turning into a quantum circuit and allowing certain variability within that problem so that you can tweak here and there but still it feels a bit so if it feels weird did that actually works I don't know this is probably gonna be next video I mean I understand how White's map where the mapping works this way but I'm not so sure that I'm not so sure why it works right so I understand the mapping and I believe that this is just for pure variability understand the Zed operations here are because of the external field so you know those those have some extra stuff in there those those cubes have some extra influence but I don't know we'll see so next step is ascending why and maybe to understand why we'll just run a simulation maybe and I think then what we'll do is we'll tweak a bit the coat and then say play with the coat and see if we can kind of understand a bit more you know why this works but maybe we'll read something at the same time as well approaches Indians ants okay we'll see we'll see but basically this is the so we understand now that we understand all the mapping perfect |
so this is Jax this is Jaczko to just copy pasted it give me a second and you just need to open it again I'll just go to where Mike like Trello yeah here you go I can't I because I keep the keep the URLs in here so I remember so I copy paste the code from here and this one so first I want to try see if that works then we're gonna try to kind of go through the code see but I think it's it's a rather simple code so I think should be fairly easy to understand so well we'll probably go ahead and then dive maybe scan the paper as well from from Guillaume so basically let's first I think I got everything that I need so I just think that's and basically I put it in here and I say I can just do that if that runs anyhow okay so there is an array of numbers that's caused by the print here one of those numbers state state is the result of running this circuit and then running the circuit it's basically is this basically going to give you I'm not familiar with Strawberry Fields so but I'm assuming I mean you've got the initial stay here you've got different gates definitely with the notation here but I assume that is indicating the queue mode where this is being applied and then you're measuring X so the the the a the position quadrature and then you're running the circuit and then that's the result you get so I'm assuming those results that we seen here are the sort of the the optimal the optimal X values the the peak X values for the different parameters circuits so according to Jack here did it did it I wonder where he's taking those things from yes he's generated them but cultural plots when I run the algorithm with a equals one house that generates grass by inputting optimized parameters yielded by my program just refills instruct the simulation interface and I'll double check that we can double check that this interface is here so the excretory located around x equals 1 which is expected correct eternal value of our function keep in mind that does not work a lot of the time that's not all valleys of often that actually lead to circus that correctly find the optimal value this valise has to be chosen based on the context of the problem being solved because I see a lot of numbers about how can I sort how can I sort of things in Python array ascending not at least an array but maybe that's the same thing ascending or descending sword okay like that okay so if I just a sword if I just hold it and print it what does this give me so I guess it's not a least or I guess I'm using not the right instruction for that not tuturro do I mean that's pretty basic how do you sort things in path is it Kusum I'm in Python Oh doesn't return new list okay so basically basically just do this and that should work OOP okay cool bye what I wonder why something is actually below one the Optima supposed to be one but at the point where like above one point five one point something anyway but it works it works what's the what's the path and count elements at least simply count right if I add I just want curious so there should be [Music] that doesn't work this way I must just probably size its product something like size or lens come on come on that's so basic Python I mean I've never never use Python really python least LEDs come on lately and ah Oh dump I'm dumb okay no 100 there's a hundred values just wanted to verify this is testing trials 100 here iterations 45 where is it richness used here's it's used okay so let's let's let's quickly go through this um not so sure what's what's this it's from Strawberry Fields I guess ok so here basically is a catalog of it's a list of your possible parameters parabolic mean which basically in the and he in Jack's post I think he says I think you me just he's using one or something like that or two parabolic mean I mean there's three here definitely is our a epithet doesn't matter really and so before this is the optimal value what is math in our infinite okay cool simulations you've got the function to optimize and this is basically so this is that your function then this is the run circuit thing so and and the article explains how he comes how Jack basically comes up with that particular circuit so this is gonna be the topic for the next video because I'm better than dive into into the paper from from Guillaume as well and all the other material he's been sharing in a Twitter around this topic and then alpha parameter better prouder we're all point five why are they initialized us 0.5 possible parameters were is possible parameters used alpha primer better parameter I so basically what this does is it Peaks randomly one of the possible parameters Oh and then but then it runs circuit oh so so each so each are the of these gates because I thought better an alpha would be the same for all the different steps or layers because this is definitely zpr zpr so there's definitely sort of three layers of the same in here right and I don't know if this is the way this was intended because or I mean I assume so just Jack talked about this here I think so he says that we have to consider how implement symmetries and then he basically says okay this is the operations busier than our which then you know you can find it miss miraculously so that the mathematical equivalence to the to the function you're trying to approximate in here I mean to the unitary here and but I guess I guess one thing that is not so where alpha partner are a set of parameters and probably minutes are for the a after this I guess the one thing here is there's one thing in place so there's one thing in here which is not in the article but I I think I because I've seen so basically this is so one of those so those just three gates could be enough right but you can repeat that process over and over again so you can actually have more layers of that then kind of finding how many layers is that you can you you want to have is really up to you as well so what and what Jack is doing is for each layer the actual better and alpha parameter it might be different because it's randomly chosen from this list and I wonder whether that's whether that's something that is done on purpose or I guess one of those things that I mean it's just one of those trial and trial and error things when you design such such circuits right but in theory can I just commend things like that by them as well not much I can just get rid of that because I could just get rid of that and then it might it might I mean it'll definitely give me different amount of different set of results but which we could compare and then anyway they measure X and then run Gaussian I think this is because those gates are only Gaussian gates and so I think I think Strawberry Fields for some reason you got a specifying what more you're running there's something out the space as well I don't remember I remember those words just roughly from from a while back okay but that's basically that's basically what's what's going on here I think I as I said the code the code seems to be fairly simple so you iterate over the amount of iterations which is 45 result Creed for age in range minor shots which is ten shots run the circuit okay so he basically gets the average of the ten shots then makes the calculation function optimized then what is this use for nowhere I guess he I guess this is this tool I guess he might this might be a trade that he used the code because he says he didn't use some of those often but as to basically basically go and get those those things out of the the interactive thing the circus I used to try these three graphs first step of the algorithm second step of the algorithm third step of the algorithm after three steps a pic of the X cursor is located around so these are the three steps but but the reason behind three steps is just purely it's a design choice it's not and I guess he's using that to probably retrieve the parameters used so then he could play with the actually interactive and then says calculation is below the optimal value so that we kind of got a new minimum than simulation so and what is simulation okay okay so he's definitely tracking some more information in here greed so what is the greedy by the way append hello result hello okay simulation optimal value the X measurement and opie okay optimal parameters I you see so he's tracking okay cool so he's actually tracking the optimal parameters so he can then go and play with the Strawberry Fields the attractive thing which we can try and do okay and then go then you just go over again okay search for the optimal value aha so what'd you get wait a second so what you're running here is already the optimal circuit now call okay now I get it and then despite the fact that you're using exactly those set of optimal parameters you can see that every time you get something different right so this outcome is already the case and is testing trials is not used anywhere else okay so basically he's using the so this is this already the results using the optimal optimal parameters okay so if I if I print the optimal parameters what is the how do you comment in okay like that so if you just if I just say print optimal parameters and now I'm gonna go and get those here you have so those are the optimal parameters which if I do that again they might be slightly different yeah actually pretty different I mean here's this beautiful different you know interesting and if I wouldn't trend the the smallest result interesting okay having to pay the result oh this is the around x equals one so if that's your I don't know I'm curious it's just with a equals one okay so a equals one so sorry so let me cuz I wanna be I want to try to reproduce that as closely as possible to what he's so let's put the purple like minimum to be one and let's run this again now because this is how those graphs are based what describes graphs are based on so they're based on basically a being equal one and then which is expected of no value for our function exactly and minus one I'm not getting the numbers close to one that's let's be weird - 1.85 Oh question is is this X or assister result of the that's that's X that's not the result of the of the of the function of demise right I'm not sure I'm not sure this results makes sense to me but so that's supposed to be this that's supposed to be the smallest not Lance but the array actual okay I'll probably do another run on this ah I'm not getting I'm not getting values close to and I'm using a equals one the parabolic minimum basically what I could do so just expect keep it my daughter doesn't work a lot of the time that's not all that often but actually leads to circles are correct to find the optimal value these artists have to be chosen based on the context of the problem yeah but a lot of the time it's really a lot at the time Strawberry Fields interactive simulation so Strawberry Fields see if I could get strawberry fields I want to get in here seeing I had an account interactive no black bird that's it so what basically gates settings I don't know quite emotes what is this value change the route of Asia's infinity X and P / operators how is that said though because okay so that's something that's still that's not clear to me but I don't see this being said here anywhere but so basically squeeze again squeezing factor simulation time fog Gaussian fog that's a flaw kind of dimensions outputs quadratures interesting squeezing factors I think the squeezing factors are basically minus 0.5 and zero my how can I minus 0.5 and zero 0.5 and 0 and they'll be so which is the one mode for now because I'm running out of time as well so can I just get rid of this come on ah minus 0.5 and zero and it's a Gaussian and it's kind of damage of 5 and we want the quadratures and we now basically go zette p zp r zp r z p r and then there's a measurement X and the Z so for the Z parameter here we're gonna use the 0.9 0.5 0.9 I know it's the parabolic minimum times four times a better parameter okay the probable like mini minimum is basically in this case one times four so it's four times the better part of parameter so four times 0.9 it's three point six so this will be three point six for the Z for the P we're gonna use minus 4 times the better parameter so - here was three point six so there's gonna be minus 3.6 and for the R for the are gay is minus 1 times the Alpha parameter and we say the Alpha parameter always zero point nine sorry the Alpha parameter is minus 0.9 for our assuming that's correct thing but then the better parameter is 0.5 in here at 0.5 so I made I that's the wrong calculation this tool okay it's 2 so this is gonna be 2 and this is gonna be - to correct so we've got squeezing parameter was cruising the decade the pga the arcade and the next measurement and we'll say go that's definitely not what I expected okay but babies basically I think basically that's where because I see they're all the same and that's not what Jackie's getting some might be even for the first for the first step of the algorithm that's what we're getting so I might be doing something wrong okay but that's gonna be definitely then on the next video try to kind of get those results back the same like Jackie's getting because otherwise something's something's bit off in here but I might it probably it's proud of me but cool nice |
now it's now it's when it's going to get complicated um quickly let's recap what i what i have in mind so so we we've got the wolfram model right regardless model um and this just um so seems to try to map to path integral um now i don't like sure i know path integral is sort of at the higher level i i don't even know anything about quantum mechanics itself in terms of like i have really haven't really done anything like you know even with the schrodinger's equation or anything like this um and so i want to try to understand better these mapping because or at least the path integral because one thing that i don't have clear about the wolfram model is how entanglement and the warfare model um i just don't understand it right so um and because they're using the path integral steps i thought maybe if i would figure out a way to um you know kind of do an exercise and sort of understand entanglement from a pat with the path integral uh formalism maybe that would help me understand a bit more how um how that maps to wolfram's model because because maybe this is just a different way you know the the reason it's modeled like that is because it's more similar to the path integral right you know remember the the ancestry kind of thing right so the um the fact that they say that you know the the the states are entangled if they share the same ancestors so and in the time evolution and that's what you know i i if i i kind of have my mental model with the you know the the the i'd say it's called the hamiltonian kind of quantum mechanics or the the the non-path integral where you have operators and and so you have your system and you have your states and then the entanglement is between the subsystems right um like you yeah you can you can talk about a state being entangled right but you're not rather talking about two so you're talking about a state being entangled you're talking about like the base states having correlations and then these kind of correlations is what um then somewhat maps to entanglement right like not all or not all the base state correlations are entanglement some are and so that's why but maybe maybe this just maybe it's just the wrong way they name it maybe just call it entanglement but they just mean like correlations right so they just they just mean you know the correlations between the elements kind of stem from the ancestry from a time perspective and and they are not making any statement as in like that's entangled right like i said like that's not separable but i don't know let's see at some point i have to dig into this i want to see if i want to see if that helps me understand a bit more and so you know i kind of thought what can we do i mean you know i i think the the the the whole um quantum harmonic oscillators oscillator seems to be sort of the basic example that everyone goes to or like a textbook example and i thought maybe that would be something worth doing right um to kind of go through so go through maybe first the harmonic oscillator the classical one then go through the quantum one um see how can we do anything with that you know how can we um so with the path integral um and then kind of evolve into more complex systems um then tangled systems there seems to be there seems to be an interesting so this is what i found yesterday there seems to be an interesting uh or there seems to be something actually like uh for example entanglement from path integral perspective and maybe there maybe maybe there's you know there is a um a relationship here because the the path integral formalism is about like all the different paths that the system is following and so maybe the entanglement it is somewhat defined as in like how are these paths branching right um space-time path integrals for entangled states there are there is actually some research but that's my guess is that's probably too complicated for me um to even approach so i want to kind of you know use the chance i said you know this whole pro this whole new project is about learning quantum mechanics so there's no there's no better way to learn than to actually do the stuff rather than just read and then you know um fool yourself that you kind of understand something so we're going to spend the next video this is going to be quite a lot i guess going through these um which i took a brief a scan quickly yesterday then it seems to be the right like the right type of level there's a bit of that you know there's some problems um some conceptual questions and problems which we um maybe can start reading this because i that sometimes helps um with you know then understanding what's um what's actual content about so you know kind of let's my goal will be to go and you know maybe maybe several streams now from now um solve the conceptual questions and the problems you know on stream and then see so i'll read them first and then kind of go i just as you know i have absolutely no idea about any of these right i don't have any formal education on on physics i just you know computer science that's what i studied and then um you know did some basic physics high school and then of course university but it's i haven't really done any of these so let's see what are the exercises so is it possible to measure energy of these for a quantum harmonic oscillator why why not um explain um no oh but is it no is it giving away the answers oh come on i don't want to see the answers that's just spoiling the whole thing because i probably will not remember what i should do is i should kind of maybe write them down and hide the answers right so explain the connection with the appliance hypothesis of energy quanta and the energies of quantum harmonic oscillator that um if a classical harmonic so they can be at rest why can't the quantum harmonic sorta never be at rest does this violet board's correspondence principle whatever that means using some kind of particle in the box or quantum oscillator to explain the physical meaning of boris corresponding principle can we simultaneously measure position and energy of a quantum oscillator why why not um and problems show that the two lowest energy states of the simple harmonic oscillator satisfy figure this figure um if the graph so that's i hate i i hate this why is there they don't want the solutions here come on i might actually do other problems um let's see but let's go through the summary i'm kind of reading this backwards because i i think it's going to help me uh with you know kind of processing the details later the quantum harmonic oscillator is a model built in analogy with a model of a classic harmonic oscillator it models the behavior of many physical systems such as molecular vibrations or wave packets in quantum optics so i guess that's kind of you know that's going to be the the essence of this um section the allowed energies of a quantum oscillator are discrete and evenly spaced the energy spacing is equal to planck's energy quantum the ground state energy is larger than zero this means that unlike a classical oscillator a quantum oscillator is never addressed even at the bottom of the potential well and undergoes quantum fluctuations the stationary states i guess that that i guess what this means is that the sort of the the ground state is never classical in the sense that like you know there's no uncertainty about your position for example right that it's quantums and then just because it's quantum the ground state is still kind of in a way there's still some uncertainties not that you can you know find your position deterministically it's probably where you kind of have the flatter like a flatter wave function i guess um but i don't know the stationary states states of definite energy have non-zero values also in regions beyond classical turning points okay so this seems to indicate that there's going to be a relationship between a turning point which i guess the turning point is sort of the if you think about like i think the typical classical harmonic oscillator is like a thing and a spring and then i guess the turning points are where it kind of stops and then springs back you know with the the the spring being maximum maximally like stretched and then it goes and it's maximum compressed and so i think those are the turning points and so what this is saying is maybe because those are the points of highest i mean highest energy these are the points where one of the if you think about energy the energy of the system um as being sort of the you know the kinetic plus the potential and i guess the potential here will be related to the spring um spring is or a spring constant of it um i guess those are the moments where the kinetic energy is kind of zero right because you're not like for an instance for an instant you're not moving so somewhat these turning points map to the definite energy states less likely position for a classical oscillator so when in a ground state a quantum oscillator is most likely likely to be found around the position of the minimum of potential well [Music] at the ground state which is least likely positioned for a classical oscillator i mean for a classical oscillator where is the spot with the less energy i don't know for high quantum numbers the notion of quantum oscillator becomes more similar to the notion of a classical oscillator in accordance with force correspondence principle for high quantum numbers what are high quantum numbers what are quantum numbers um to complete this to completely describe an electron atom four quantum numbers are needed energy angular momentum magnetic momentum and spin the first quantum number describes i don't know if these are those but like okay so i guess what this is saying is that at a larger scales then this approximates a classical oscillator which is what you would expect probably okay let's get started the quantum harmonic oscillator so by the end of this section you'll be able to describe the model of the quantum harmonic oscillator identify differences between the classical and quantum models of the harmonic oscillator explain physical situations where the classical and the quantum model coincide um and i'm gonna i'm gonna i'm gonna go deep in the sense that like i'm i mean i don't know what's that what's the best way to approach these like whether just kind of scan through and then kind of go back to probably that's what i'll do and i'll come back to the points where i don't know um you know how to unpack and then we kind of will we'll unpack them in the um in the subsequent uh or coming up streams so oscillations are found throughout nature in such things as electromagnetic waves vibrating molecules in general back and forth way of a tree branch in previous chapters we used newtonian mechanics to study microscopic oscillations such as a block on a spring and a simple pendulum in this chapter we begin to study oscillating systems using quantum mechanics we begin with a review of the classic harmonic oscillator that's why i picked this because i i saw that it starts with an overview of the classic one which you know to be honest i think it's worth a refresh um a simple harmonic oscillator is a particle or system that undergoes harmonic motion about an equilibrium position such as such an as an object with mass vibrating on a spring in this section we can see the oscillations in one dimension only suppose the mass moves back and forth along the x-direction about the equilibrium position so the equilibrium okay it's said to be x equals zero in classical mechanics the particle moves it in response to a linear restoring force and i guess this k is the spring constant or the sort of yeah so this is a force that depends on the position and this and and and this constant that is somewhat related to the spring right so this means you know kind of of course that's i guess that's something that's constant but then the farther away you're from the center so the higher your position is um or even the you know in negative terms if if if we assume that you can kind of kind of kind of spring both ways right and this is x0 in negative terms the absolute value of the force will still be like the highest the the farther you you know the farther you are from the from the equilibrium position where x is the displacement of the particle yeah from the composition the motion takes place between two turning points x equal e equals a where a denotes the amplitude of the motion the position of the object varies periodically in time with angular frequency okay i don't know um i i wouldn't know how to calculate that though how to arrive at that uh which depends on the mass m of the oscillator and on the force constant ko or of the net force and can be written as okay so there's a function that is a cosine function so it you know it's kind of going to look like wavy and that basically describes the position um yeah i don't know i don't remember how you how you derive the angular frequency um and why is it even a square root sure it will depend on the mass the heavier the object sort of the slower it will move if you think about angular frequency as in like if we're trying to think about like you know the the the whole thing spinning rather than just moving like these you know the bigger the object the the the slide the slower the movement will be so i assume that you know okay maybe yeah that's something you can drive through speed but let's make we we can we can work that out later so let's just go through everything but that kind of makes sense in a way the total energy of an oscillator is the sum of its kinetic energy and the elastic potential energy of the force u of x which is i guess those are given definitions i uh i really don't know how you how do you derive the kinetic energy even classically right that's one of these things exactly proportional to the mass of the object and to the square of its velocity i don't know something to unpack late as well maybe so you have the energy described like these i would see you here though huh is u velocity at turning points a the speed of the oscillator is zero therefore at this point the energy of the oscillation is so solely in the form of potential energy the plot of the potential energy of the oscillator versus its position is a parabola the potential energy function is a quadratic function of x [Music] measured with respect to the equilibrium position on the same graph we also plot the total energy of the oscillator as a horizontal line that intercepts the parabola at x equals a then the kinetic energy k is represented as the vertical distance between the line of total energy and the potential energy parabola okay that's a lot to unpack here i guess but i i think i'm following so far so eventually well of course monica slater the motion is confined between x equals a i guess there's a minus missing here and x equals plus a the energy the energy of oscillations is i mean that so that sort of makes sense if this is the potential energy right this is a total energy yeah so so so actually you know in the ideal case where there's no other forces no friction no nothing then you you kind of expect the total energy to be um conserved in this case right so um here you have at minus a and plus there you have no speed so you have no no kinetic energy but you have the maximum potential energy and as you go as you move closer to the center um your potential energy is decreasing but then your speed is increasing and so your kinetic energy is increasing and so at this point the equilibrium point um you kind of only have kinetic energy or almost only right i guess it's approach it's approaching zero but i think that's the that's the idea this plot the motion of classical series is confined in the region where the kinetic energy is non-negative which is um what the energy relation um says physically it means that a classical oscillator can never be found beyond its turning points yeah so you you'll never go beyond these a's right okay but i get it that probably in the quantum case if we you were to map these points as in like definite energy points you know like let's say you map minus a a and zero are sort of the definite energy points where you where one of the components of the energy is zero i don't know i'm just making this up right but i guess that would make sense or that could make sense like in the quantum case you'll still have some quantities to it and so you will you know you might be able to just measure the position even beyond these right and it means it can never go beyond the turning point its energy depends only on how far the turning points are from its equilibrium position um the energy of a classical oscillator changes in a continuous way the lowest energy that a classical oscillator may have is zero which responsibility object is at rest and it can only be at rest in the equilibrium position of course because otherwise it's going to have some some k and some force it's going to have like because it's there's a displacement and there's a constant k then it's going to have a force and so if there is a force then it means this movement and so it means there's speed so this kinetic energy so you know the energy is not zero the zero energy state of classical siblings no oscillations and no motion at all a classical particle sitting at the bottom of the potential well um and i guess this this figure when an object oscillates no matter how big or small the energy may be it spends the longest time near the turning points because this is where it slows down and reverses its direction of motion therefore the probability of finding a classical oscillator between the turning points is highest near the turning points and lowest at the equilibrium position okay so note that this is not a statement of preference of the object to go to lower energy it is a statement about how quickly the object moves through the very various regions it makes sense here it slows down and then it sort of go moves back also at the similar speed just inverted right um so that kind of makes sense that it spends more time in these regions than in this region where it just goes live it just goes it passes fast and and both ways he just slows down so time in this case is of course then related to you know the displacement and in in in so the velocity and the displacement and how how far you're how fast you're moving across multiple regions so okay so that's about it for the classical one i think that's fairly okay i mean sure i don't know how to i don't really remember how these things are derived and maybe i can come back to this later but it's it's it's like okay so this model makes sense of course it's ideal but let's get into the quantum quantum stuff so one problem with the classical formulation is that it is not general we cannot use it for example to describe vibrations of diatomic molecules where quantum effects are important a first step forward a first step towards a quantum formulation is to use the classical expression k equals m w two squared which i don't know what this means so is w the angular momentum and m the mass to limit mention of a spring constant between the atoms in this way the potential energy function can be written in a more general form okay what does this mean that we imagine there's a spring between atoms or their springs between atoms what are what are these diatomic molecules i guess they are molecules that have two atoms at the core or something like that i guess this dye d it's usually for two in latin or greek or whatever of only two atoms there you go okay cool yeah okay so that's easy in the sense that it's a simpler model because you can you can define the spring in between the two articles and so we know this vibrate and uh we're quite effective okay so classical expression to limit mention of a spring constant between the atoms but the potential energy no give me a second i'll be back in a second there we are again delivery so um where was i the potential energy stuff right so kinetic energy blah blah blah what is the potential energy so yeah so this is defined as this constant right okay so the only thing that we do here is to to okay uh i think what they're doing but i don't know where this is coming from is saying okay that's how you would define k that's how i don't know what w is though here but that's how you would define k when you're defining a spring between the two particles and the two atoms okay because because it's it's then something probably that that it's you know i'm assuming the mass of the atoms is the same or there's a total mass i don't know um and i know whatever you use though but i guess that's the point of this and then okay so now now that gets uh it gets interesting so combining the expression with the time independent triangle equation so this is okay so this is the biggest this is the first biggest blocking point for me right so how okay so so the time-independent schrodinger equation so this i i this is probably going to be the next step right so hyper physics not time depend i want time independent time independent okay so the time independent it just says these that predicts that the wave function can form standing waves called stationary states these states are particularly important as their individual study later simplifies the task of solving the time-dependent schrodinger equation for any state stationary states can also be described by a simple form of the schrodinger equation the time independent schroedinger equation where e is the energy of the system this is only used when the hamiltonian itself is not dependent on time explicitly however even in this case the total wave function still has a time dependency in the language of linear algebra the equation is an eigenvalue equation therefore the wave function is an eigen function of the hamiltonian operator with corresponding eigenvalues e yeah okay but that's all that's saying is that you have a state and then you multiply this this this energy operator okay so that that's this part here right because remember this i guess that's what we're trying to find is the energies okay so what we're saying is we know or we we kind of know how the hamiltonian looks like or at least we can formulate that because we know these and we know this because of what a its potential what is all this here so so this is the potential energy and this is going to be what the kinetic energy but that's already something that is the derivative blah blah blah so that's already something that's expended from that definition isn't it oh yeah that's so here is that the the planck constant stuff within this 2m and this is the second derivative of x or with of the wave function with respect to x which is what we're trying to measure right so what is the kinetic energy classically is one half times m times u squared and u is the velocity i think we're saying right so the velocity is but the velocity is the first derivative right off position sorry where was i and here we've got i don't know if that's the second derivative or the square of the first derivative and here's one half but then instead of mass is the planck constant or the reduced line constant divided by m i don't know where this is that coming from this with respect to time we're doing it with respect to position okay okay so so what is this so enter it's request of physics or chemistry to introduce an equation in a way that can be appreciated knowing only the concepts limitations of basic calculus particularly derivatives with respect to space and time a special case of an equation that it needs a statement in those terms is the position space for an equation for a single non-relativistic particle in one dimension and i guess that's our case oh look at this here's where we have it so okay so this is this is the part yeah yeah yeah so this this part here is the one that's in here exactly cool so here psi psi is the plan is a a wave function a function that assigns a complex number to each point [Music] x at each time t the parameter m is the mass of the particle and v of x t is the potential why this keeps the people use this stuff whatever so that's the potential that represents the environment in which the particle exists so okay the constant i is the imaginary unit and h bar is the reduced planck constant which has the units of action energy multiplied by time [Music] but what does this represent then what is this thing here because that albeit in the bracket is the energy so that's in a way the kinetic energy isn't it which is a function of the displacement which kind of makes sense yeah okay but that's the energy stuff what could what's confusing me is oh yeah okay so that's the energy stuff yeah yeah yeah cool i don't fully understand that but okay so it's something plus the potential energy and that's kind of what we've reformulated in here and uh okay so but what is it that then solving for to solve these okay this figure that is to find the allowed energies okay so that's all solving for us the energies and the corresponding wave functions we require i feel the thing is i feel i don't really truly appreciate the schrodinger equation i don't really truly um appreciate what it's telling me i don't know the corresponding wave functions we require the wave functions to be symmetric about x the bottom of the potential well and to be normalizable these conditions ensure that the probability density must be finite with when integrated over the entire range of x from plus minus infinity to plus infinity how to solve is the subject of more advanced scores in quantum mechanics here we simply cite the results ah okay but that's that's so so the result the result is this function right where you have this n which are kind of i guess how do you even get there like how do that would be okay so that that's probably going to be the next thing it's like how do we solve these but i still don't fully appreciate what these is it seems to be that this is going to be the kinetic energy in a way because it's a constant that multiplies a derivative of position right which is velocity right which is in the classical case what's happening here this u is a velocity i think but so that's the result you get and so you kind of you plug this in here and you have like the energy levels or you have a function that describes how the uh the wave function that corresponds to the wave functions that correspond to these energies okay so these are valid values in here and then you can have if you plug them into into the schrodinger equation then you can solve for the wave function and so what it will tell you is at each energy level how is the wave function looking like the wave function then remember this is what's kind of supposed to help us then it's what describes the position or it's what describes the state right so you can query that wave function to to get the position to get the momentum to get all this kind of different different properties but it's it's the the wave function is what describes the system it just at different energy levels the system is described differently and that's what you can find to the schronger equation the wave function response is energies are these so yeah the wave functions and so beta is blah blah blah it's a normalization constant and has polynomial of degree n called the herm hermite polynomial the first four hermite polynomials are what the i have my disease that is actually probably complicated to derive a few sample wave functions are given in figure oh there you go sorry each yeah okay ah okay so so at each energy level you have a different wave function and that's sort of an example right where here you have the highest probability is that that it's fine found in x equals zero with n equal one then you kind of have the highest probability a bit ah you know a bit towards the right be towards the left even if it's negative right that's still absolutely it it's still indicating that there's a higher probability because these are complex numbers at the end of the day okay interesting interesting as the value of the principal number increases the solutions alternate between even functions and odd functions about x equals zero the first five wave functions of quantum harmonic oscillator um the classical limits of this layer no motion are indicated by vertical lines okay corresponding classical turning points at x equals a of classical particle with the same energy as the energy of a quantum oscillator uh okay so that's like that's to say if the energy of my classical system would be n2 then this would be a this would be a right but then you can see that in the quantum case it can be found most probably here here and in the middle uh okay so classical region of harmonic oscillators uh find oh sorry i'll delivery be back in a second so um how much time we've got left not much to be honest sucks okay anyway classical region of harmonic oscillations find the amplitude a of oscillations for a classical oscillator energy equal to the energy of consciousness wait a second classical region of harmonic oscillations fine the amplitude a of oscillations for a classical oscillator with energy equal strategy there's something wrong with the formatting here i feel like that's just a title and then it's just the it's kind of an exercise find the amplitude a of oscillations for a classical oscillator with energy equal to the energy of a quantum oscillator in the quantum state n the strategy to determine the amplitude a we set the classical energy equal to en given by yeah you set the energy then you kind of like derive all the other ones so we can we can also do that solution we obtained blah blah blah and so we obtain these and significance significance as the quantum number and increases the energy of the oscillator and therefore the amplitude of oscillations increases for fixed natural angular frequency for large for large and the amplitude is approxim approximately proportional to the square root of the quantum number so large and the amplitude is approximately proportional to the square root of the amplitude number several interesting features appear in this solution unlike a classical oscillator the measured energies of quantum muscle can have only energy values given by the figure where does this even go doesn't even work moreover unlike the case for a quantum unlike the case for a quantum particle in the box the allowable energy levels are evenly spaced when a particle bound to such a system makes a transition from a higher energy state to low energy state the smallest energy quantum carried by the emitted photon is necessarily hf i don't know where that take that from but similarly when the particle makes a transition from a molecular high energy state the smallest energy quantum that can be absorbed by the particle is hf a quantum oscillator can absorb or emit energy only in multiples of this smallest energy quantum this is consistent with planck's hypothesis of the energy exchanges between radiation and cavity walls and the black body radiation problem so there's another problem here vibrational energies of the hydrogen chloride molecule the hcl diatomic molecule consists of one chlorine atom and one hydrogen atom because the chlorine atom is 35 times more massive than the hydrogen atom the vibrations of the hdl molecule can be well approximated by assuming that the the chloride atom is motionless and the um hydrogen atom performs harmonic oscillations due to an elastic molecular force model by hooke's law the infrared vibration spectrum measure what is this spacing between direction okay so we can do that exercise we can do that exercise that's the next thing in the next scissors what is the force constant k of the atomic bond in the hcl molecule how should i how should i go about doing these exercises like do i do i do by hand or do i just use like something like numpy and python to help me with the um yeah probably spacing between the vibrational energies of this molecule but that will involve solving the harm the schrodinger equation wouldn't it wouldn't that involve this um checking the standing what is the force constant of the molecular bond between the hydrogen and the iodine atoms okay so some problems in here first of all instead of a quantum oscillator zero in the classical view the lowest energy is zero the non-existence of a zero energy status come from quantum mechanical systems because of omnipresent fluctuations are a consequence of the heisenberg concern in principle if the quantum particles stop motionless and bottom no it well it would be exact so it would just be it would violate the uncertainty principle with nonzero probability outside of these durables in the classic formulation of the problem the particle will not have any energy in this region the probability of finding a ground state quantum particle in in the classically forbidden region is about 16 okay if i consider the ground low energy state is largest in the middle of the well for the particle to be found with greatest probability at the center of the well the expected particle spends most time there as it oscillates this is the opposite to behave with the classical oscillator and which the particle spends most of time it's in india in the turning point um check your understanding find the expectation value of the position of four particle in the ground state of harmonica solid using symmetry x equals zero okay that's the solution i hate this is there something like quantum harmonic oh there's some stuff in here yeah we could use these oh that's a that's actually a german university consider a one-dimensional quantum mechanics let's grab that hamiltonian i'll say give the hamiltonian already but that's again that's that's that's kinetic plus potential can i call commutation relation i don't know what the hell that means right hamiltonian with respect to dimensionless position q and momentum p operator is defined as follows i have no idea that's way both okay so we should probably stick to these problems first okay so that's i see that's what happens probably when when you you you know increase n and so your distributions start getting a bit more like they actually look like the potential well of the classical case which kind of makes sense because it then seems to indicate that the you know that's kind of like the idea that as as energies grow or as you go you know bigger in scale then then get into the classical regime which is what we see which is kind of that's what we observe right but okay so and then there's a summary i already write and then there's some conceptual questions it's supposed to measure energy of uh for quantum horizons yeah okay um so i mean i'm i'd like to know a bit more about how to solve these i know that it's probably way above my pay grade but i'd love to to see how these solutions are found um the quantum harmonic oscillator so that's the schrodinger equation because you know that's still sort of the the the hamiltonian um way right but i'm like you know i i at the end of the day i'll be interested in um and how the path integral version of it looks like so uh that kind of will be the next step i'd say but let's first try to go through through these so in the next i in the next session and i guess i'm going to leave it here in the next session i'm going to be diving into the um how how is that derived how how you know a bit more the actual schrodinger equation let's put it as well just just maybe take that example and see how can we get um the quantum harmonic oscillation oscillator solutions and how do you know that n must be an integer like that's that's for me that that's what that's what's interesting so how do how do you get to the fact that it this must be an integer and then you know kind of what are the spacings of energies i guess would be the energy between n2 and n1 like that's always going to be like that that's kind of what that's the biggest unknown component of the whole thing it's like how do you go from you know from these and conceptually let's kind of start go back a little bit just recap so you have that so so you have the the the you know in a classical system you have energies these energies are functions of position of velocities of whatever right and so this means that if you know the energy of a system you can pretty much know and derive like you know how it's moving and how fast it's moving and stuff like that um that's kind of like what you can see here in the model right now what the quantum analog of this is saying is that ways that the wasting mo things move are specified in the schrodinger equation right which is you know basically yeah sure fine but like oh this one here right so iced imaginary number is plus cons so so so in classical you have kinetic plus potential that's the energy and so there's a conservation of energy in quantum you have okay so basically uh in quantum the energy is the hamiltonian operator the energy is then described by the hamiltonian operator which is conservation of energy showing the equation so this is momentum or what is that in making the transition to a wave function physical variables take the form of physical variables take the form of operators right so say the position is is an operator it's the position operator um yeah i gotta desect that a little bit more maybe i'll just almost actually wanna yeah but it's essentially the same kinetic energy and potential energy is just you just have these constants in here yeah but that's basically it's the same it's it's so classy it's it's telling you like look that's the the energy is kinetic energy plus potential energy it's just the way you describe kinetic energy and potential energy is is essentially different because now you must define them as operators because why because the way you define a state is not by just a given instantiation of variables but it's by it's it's by a wave function and so and so position is an operator and in in a way that it if you you know it kind of tells you how the position is evolving god so so yeah so that's so that's that's why this is defined this way so essentially the schrodinger equation yeah it's it's these right so you have potential energy and then times the wave function then you have the this stuff in here which is a kinetic energy which it will be interesting to know where it comes from as well because that's that's definitely something that is a function of velocity but then again for these maybe i should also understand how these are classically derived because i think they're inspired they seem to be really similar right at least it's the same constant like a half so this is a half of the mass times velocity squared that's the kinetic energy so that that could be something so where is the kinetic energy coming from um classically and how do we translate that how do we translate that to um to that portion of the stronger equation that's kind of that's that's one thing of course just it bothers me not knowing that but then and then how to solve that it's probably just a technicality right so how do you solve these type of types of equations which is basically you know with derivatives and stuff like that how do you get to that result anyway that's for the next stream um but i get it you got a good overview so let's see let's see bye |
time to take a look at super dance coding I mean I like it I like I like just taking a look at circuits and trying to break them down I think there's always a lot of good lessons to learn from that and yeah so super dense coding I really have no idea what is it about so I probably should go to the Wikipedia first but this is basically the magic here is that in query and you basically have a couple of like example circuits some of them I've been working on already that the QFT grow research sure period finding computation so I thought let's I mean I visited all of them but I think super this coding is a good next next step but first let me just let me just open this up here so this one I found in the Wikipedia in quantum information theory super alien coding is a chronic communication protocol you see the names tend to be sometimes a bit a bit misleading that's some super and squirting sounds super fancy but it's a combination protocol to transmit single bits of information okay so from a sender a list or a co-op by sending only one cubed under the assumption of Alice and Bob pre sharing an entangled State this protocol was first proposed by Bennett and Iceland 1992 an experiment actual actualized in 96 ok so what do we have here the protocol preparation sharing encoding so here's the circuit which basically says prepare prepare and Sharbel pair that seems to be a common thing in whatever communication protocol that you're working on Quantrill petition teleportation being one of them encodes the beats so okay so the way this seems to work is one I don't know if I'm correct but it seems like one bit is encoded in the actual zero or one so in the actual amplitude not amplitude in the actual said axis and another one is encoded in the face so probably if the face is minus one or the faces on it increased I will be a 1 I don't know and if it's a zero zero so then okay but I mean those beats need to be somewhere coming from as a kind of conference somewhere okay say you've got to keep it here which isn't okay which is kind of entangle so it means if we're let's say if we're encoding zero if you're encoding like a 1 and a 1 so let's assume that then we want to keep it to be and one state and have a face of hand agrees when we will be doing that because it's entangled because it's entangled that's gonna also affect that's kind of sort of also going to affect okay the other one and then the concurs about the face because what we do then is we disentangle and we measure but it's actually measured here and the big one is measured here so the face interesting let's see um so the protocol the purpose of the preparation of entangled state sharing is Bob encoding so by applying quantum gate to her commute locally Ollie's come from the entangled state into any other for all students know that this process cannot break the entanglement between the two qubits current mmm depending on which classical to beat message she wants to send the Bob will later see but I performed four cases so if Alice wants to send the classical to beat zero zero then she applies the identity gate toward qubit server hasn't changed then Bob will apply a okay is entangled isn't this entangling it seems likely sorry because it's the opposite sort of sort of the universe um if Ali's gnosis in a classical one zero then she applies a quantum phase flip to her cubed okay okay so the first the the this these classical bit is treated as a sign like this is gonna be yeah so in this in case year one is just the not okay no one one is then so the resultant entangled state becomes like that then she applies a quantum not just the first qubit okay yeah and basically yeah sending whatever decoding so if the result of entangled state was busier then after the application of the both unit representing all state will become 0 zero it's interesting so what's going on here okay I mean does see that's kinda makes it animated I'm gonna get rid of these for a second and let's just assumed that we went to move zero zero so what we got here zero zero let's say that we want to move is one one so those are both on so then we do the control not in the controls and okay at that point what does this look like yeah that doesn't really matter here we're swapping the cubits exactly let me check let me just do a quick thing first I wanna I wanna have hmm I want to take a look at what happens with [Music] what happens with the entanglement thing I'm just just conceptually so basically this is we're generating like I'm generating just simply a that's a bell state right and if I if I apply these a control not right it will kind of basically yeah well kind of basically undo it in and do that yeah and go back to that state so now the trick here is because in between what the control knot is doing is I mean literally the state 1 1 turns into 1 0 which is kind of what you had here so it's kind of you know each other it's yeah exactly so now what I'm curious about is what happens then when we modify things in between it's a 0 0 1 1 but if we now apply and not get here then we're then we have 0 1 1 0 basically and then this is kind of yeah so 0 exactly 0 1 1 0 and then that's kind of going here because now the control not is applying this one and he we do the harem art basically on the second qubit it just becomes 1 0 because the second qubit is it's just 0 1 but note that if we if we now face this if we face this what happens if we face this the control not is still applied certain sin 2 1 1 but now has a different phase right exactly one and now yeah yeah so now this turns into one that's interesting so can you basically by messing with with those two operations you can you can can you can kind of move into I mean that's what that's what was you know what the Wikipedia article said is you can basically move around any of the different Bell States by applying those operations and so and then so let me just back to the super dense coding example or maybe like here to the Wikipedia first yeah and so after predicted when your disentangling you will end up with the operations you're applying kind of so you will end up here with encoding/decoding because now bob has bob has ii cubed there's a bit of a god boss for a second bob is measuring the pop is measuring the two cubits yeah yeah yeah but Alice just modifies one yeah I mean it's it's so basically did you know you know about to find out which classical beats Alice isn't he nice Rosina and a control via start with then Hooper from harem art on de-tangled cubed a no in other words how much cocaine is only apply to a yeah I mean he's just tangling them mmm nothing to them disentangling them there's something that is not clear give me a second for example if the resulting entangled state a depression home is these then the scene on this seems to be a little bit different because you're either gonna make sure once you're 0 1 1 0 0 1 so how would you distinguish between these or these so let's get rid of this for a second and say these so in this case and I'm going to so in this case we've got got these carrots in the middle bother me to see that yeah okay I'm so it's basically since basically okay so it's basically yeah yeah it just has the like just kind of kind of getting dizzy with so many wires I'm just taking a look at these ones in here it would be it will make it clear if I've removed those three in the middle because this is just a thing for illustration purposes that you're kind of sending so you're swapping the qubits or whatever so but I could technically get rid of those cables and say that I want non-zero these to be here this to be here and actually this here this here this here this here things we could read off and then yeah that makes it easier I mean I know it does an illustrated it doesn't all the straight descending but it doesn't matter um just I just makes it easier for me to see can I just get rid of this so I'm not using the I'm using them the trackpad okay no so so we've got a zero zero or zero zero one one with face of 180 degrees because what we've done is so we're just on the face so this means when when we will disentangle welcome back to us your or compactus your one why is that because the control not the control not is affecting only this case which gives which takes us here so when we are playing the harem art that like for that particular subsystem that is obviously going to one whereas if we didn't apply that faithfully we would just be 0 because because that's what we are so that's a that's a smart way to encode the face to encode yeah so you're encoding one classical bit in the face and another classical bit in the in the actual if it's from crack if I say the amplitude in in in the z-axis which is basically if if we are sending here a 1 and I can I can I just use that if we're sending a 1 here well it just what it just does is I find is even easier than than the example in the Wikipedia and so on so if because that's a bit more straightforward in the sense of you know oh we're in coding we're using the face to encode one thing and we're using the the actual then access to encode the other thing that's why we're condensing it yeah so and you would then negate that so basically when you negate that your your your entangle State goes from this one to this one which then makes the which which then kind of kind of makes the it really makes the control not I still have her time mapping out which is the one which is a zero in terms of the wires and the actual cats so this is your one so here's where we apply the and this that becomes 1 1 so then we have 1 0 1 1 1 0 1 1 one zero one one so basically we're gonna measure a 1 in here let's bring this morning that's pretty smart I wonder whether you could I wonder how how would you be able to encode for example to a for classical cubits if that would be possible at all because I know Craig has in one has a pencil time I think I should soon try to solve what's about sending sending for QB is sending for classical kids through a network so how do you how would you encode that and there's like certain limitations in interest how many qubits you can send around but let's pretty yeah so the concept intuitively is just well I mean you're using the face to encode one thing and using the z-axis or the amplitudes to encode another one yeah makes sense makes sense |
where i i think i got a a good high level intuition and probably have to do some reiterations in terms of what the you know the fourier transform is doing and why the integral makes sense um but i was not uh i think i didn't get to the point where and i don't really understand why is it that multiplying by a complex exponential makes sense mathematically speaking because i got stuck with them uh i was trying to do an example with the um sinus function right and then that turned out to be more complicated than expected which i also don't know exactly why because i thought that should rather be the easy case right and so how can we go about these so we we we have basically let's go let's open up the wikipedia uh four year transform integral same thing as usual uh there we go english and so um the integral the integral the integral there you go so this is the one that we're looking at and why does this mathematically make sense right so complex exponential like there is a really nice video from three blue one brown um three blue one brown comp i don't know if that's the way this is this one so let me see if i can uh tune the audio i think it's already low so it does not blow up your ears because he basically he uh think about the function e to the t is to ask what properties does it have probably the most important one and from some points of view the defining property is that it is its own derivative together with the added condition there is a point in time in the video where he explains and i found this super nice because he he explains why like in a complex plane right like in terms of these dynamics why um so what is it that e to the power of x is doing right which is this kind of like circle thing um exactly so essentially you know that's what you have and so times 2 pi that's the full circle right now why would that make sense and so we also have this expansion but why would that make sense as in like the integral of these is kind of it's it's really interesting because the the okay here's the theory i i just it just now it kind of like uh yeah in a way i think i think i think it's getting there i think in my head somehow so because the the this little e with the tail big e with the tail this represents the frequency and i was one of the questions that i had was like okay so why is these here specifically right it's by this one here it's the only place in the equation where this is and so it's got to do something with and it definitely it's got to do because that's the frequencies that we're then looking for right and say it does this function have like frequency one for example and so by by virtue of the fact that this is here this means that these affects the angle because if you plot you know so this is like the the basically what way you're plotting things this is a factor like the factor that multiplies the i and the exponent tells you how far you're rotating so frequency 0 which is b e to the power 0 frequency 1 is e to the power of 2 pi so it's kind of it stays in the real lines right here in this case but then as we so as as your um as you're picking up different frequencies that's gonna get that's gonna start moving in the complex plane right um for example yeah but they're all like what's interesting is they're they because of the fact that there is a minus two pi right it means if we just think about like uh integer not in is the integer the right thing it's or just even just let's say the natural numbers right like just think about like okay these are real numbers but let's just make it simple let's just think about frequencies like um one like two three four five right um these are always going to be multiples of two pi that's what you're doing right so i don't know why does this make a difference because like 2 pi is the full circle is it um like e to the power of two pi now two pi i is 1 right so that is the that is like the full the full circle so in a way what this frequency is saying is like how much how much is this somehow contributing because you're multiplying these you're multiplying these with the um with the function right and so i think the way this works is that if a frequency is not there right maybe let's start to try to decompose that if a frequency is not there then uh then somewhat we're we're looking for cancellation effects so we're looking for um things that go in the complex plane because then you then you can kind of do a bit of the interference thing i'm not so sure if this is the right way to talk about it but how could make about an example just have a simple example um before you transform simple example because for your transform simple example not explanation the fourier transform because here we go some functions yeah okay but you see this is there's a single frequency so actually like if you'd have like a cosine wave you should have a single frequency so that's that's really what we want to have right that's why my example with the sine function was what i thought was good um but maybe i'm just using the wrong frequency or the wrong formula because it seems like here we're talking about w um and so here for example right it's a bit of a different formula w is directly here as a i don't know what this minus j okay it's just w okay so it is no two pi the two pi factor in there um so that's the ordinary frequency maybe and then maybe if we take a look at the angle of frequency maybe this is what we should look at ah look at these because of the angular frequencies defined like that then probably it simplifies that um what it simplifies that uh that thing to like w so let's let's just work out from the it's just w instead of two pi so like the the two pi goes away so literally it's just w it's a factor of of i well and then there is x as well in there right to make it more complicated to make it even more complicated no there's no x yeah there is this t in this case yeah yeah yeah yeah so the fourier transform let's open up again pain so if you if you'd go ahead and do and and do like a cosine wave so let's say f of x is cosine the cos cos of x right so and now we have the fourier transform being the um cosine of x times e to the power of minus i then the frequency and then x dx right so this is and this is kind of the the parameter i'd say right and so now like we know that in theory so if you have the cosine wave like that in theory what we expect the free transform to be is a function that does like these right because it's a single frequency it's a single frequency and this is this is basically i think it should be one isn't it um so fourier transform of cosine of x maybe that's what we should so here but why is that why is it that complicated thing here because i think these things here is again it's it's a funky mathematical way to define chunks i think or to define something that is just not a continuous function i think and i don't know i i really don't know what this is never never been with that before i played with that before okay so they go okay here they go actually with with two pi right and say and so what they what they do is they they solve the integral like these ah okay so blind so this would give you a god what is the what is this thing what is these i saw that i came across this in in in one or two videos ago i think paris i'll even search for like settings i want to copy that so exactly the delta function the unit impulse symbol is a generalized function or distribution over the real numbers whose value is zero everywhere except zero uh-huh okay so it's a function that basically gives you zero for everything but then gives you something different for one every continuous function to its value at zero okay so it's just like that that's that's the that's that's what it is okay okay that's but that's a smart thing too so that's okay so it's an interesting how do you get there that's another uh like i would have never been able to to do that so how so this is derived like these and then at some point they're like it we'll just we'll just use that um so god so this is saying is like either this mind this this subtraction this edition and then you are yeah which the only thing that enviro situation let's think let's try to think about this on our on our own right but i think so you have cosine of x and then you have these double i think it's the same if you have the two pi here and stuff then you use the two pi function with a classical uh frequency but in this case if we just formulate it like that with angular angular frequency that should actually um work well because then we're getting rid of the 2 pi and 2 pi everywhere but again why is that why is that relevant right and i think here what they do is they expand that into they go to the they go with ease right because it's easier to integrate that's ah okay they use the fact yeah okay so they used that thing i also saw that ah yeah yeah yeah yeah yeah i also saw that here in the wikipedia i think the oh god i'm lost here the this one yeah yeah they use the fact that you can express things like these and so they use the fact that you can express the cosine of something as in like the sum of you know these factors with the e with exponentials being negative and positive and so so that makes the integral easier so in this case um because uh okay one half and half of this stuff right so so i'd say basically what we're saying here is that that this cosine component kind of decomposes into like um little thing there right so e [Music] so half e to the power of i wx plus half of e to the minus by five the x and so that that is basically equal to cosine of x times e to the power of minus i w x right and so um you know then you kind of do the distribution right and then you end up with like a half of e to the negative so i times i times i is minus one but there's a minus so it's one so this is like w x right because we're multiplying so we're not we're multiplying so we're adding what am i doing so what we're doing is we're multiplying so we're adding the exponents right um which basically are zero which basically means that it's e to the power of zero is one right so i'll just see about zero and in this case is basically en is like minus 2i wx right uh and so we're like left with integrating this thing i mean this is a constant and then we have these here and so what do they do i mean here there's this frequency stuff so here the terms don't really go away this is where i'm stuck ah okay that's that's kind of that's the work of this person okay and that's that's what's yeah so what's he's doing wrong is he's having this function here i think so extend the notion to include what are called distributions or impulses or direct deltas or as we engineers um i want to do it much to the discussion of mathematicians delta functions and you'll see that cosine does not have a free transform in the usual sense turning to a specific question once you understand that impulses are defined only in terms of how they behave as integrands in an integral that is uh you see to deduce the free transform of by musing on the fact that what the i have no idea i get there then just use a table of free transform pairs what the oh god what useful integrals blah blah blah transform i have no idea what that is i have no idea what that is so why doesn't the cosine function have this is what i done again this thing with the direct delta functions it's a little dirty trick man it's definitely a little dirty trick i like it um here was a good example but here the problem is that they use this kind of funky function and i just wanted to understand why four year transform of cosine function oh there's the video let's take a look at it not going um so let's see how we can calculate the fourier transform x omega we can write cos okay minus j omega naught now i will take fourier transform on both why not why not so here they say it's not an absolute integral signal cosine absolute so for instance okay so maybe this is uh okay maybe this is a this has got something to do with sort of the the requirements for the for for these to work out well and that's why it doesn't have a well-defined fourier transform an integral function ah because it's not negative because it's negative maybe an integral of any non-negative function okay so in mathematics the integral of a non-negative function of a single variable can be regarded in the simplest case as the area between okay no no sorry forget about that um uh history definition so why why doesn't it work well i don't understand that but maybe let's try to step aside as we say i'm trying to understand why the e kind of thing makes sense right in this case also the three hertz so in one second it dies like one two yeah kind of so it's three times more or less yeah all right now was it what it what is the that what is it that makes it the thing is i'm not even sure myself what i'm what i'm trying to understand so i'm trying i'm trying to understand why the the the complex exponential is it's what makes sense in in this case why why is it that that's you know that that why does this function make sense like that this definition because you've got your function and then you're multiplying it by this factor where how could we plot this how can we plot this without how could we plot this without these um without the frequency parameter just to understand uh what is it that's happening here so that's why i was trying to take a simple example of like the cosine function because i could just maybe say look cosine times these and then i understand what's going on right but i don't know why it seems like the cosine this is not the good one and i'm trying to understand a simple get a simple example um but i could still try to take this function uh and and go to this moss and see if i can uh can this must plot that x has power what is it that am i doing cosine minus x okay x squared interesting interesting but okay let's zoom into these so so this is what we have and then if i like what what would be the function that results when i multiply and try to visualize that because i want to see now now i'm multiplying these by this function i'm asking for the integral right so i'm multiplying this by by this complex exponential which is a function then of x as well right so for example uh let's say the value at zero is one right so when x when when when x is zero so now we have this funky function when i say when when so when f of x so sorry so f of 0 is one right so in this case x equals zero um if i now have this other function that is basically f of x times e to the minus uh minus pi x squared right so when x is zero when x is zero um what i'm getting at here is because here we're assuming now that that the uh we're doing that so i'm assuming that that the frequency we know it's three hertz and so i'm assuming the frequency the this like e whatever it's uh in this case that this kind of you know thingy here is is one right so i'm not included here and so that's pi by the way um ah no what am i doing you see that's how you make mistakes it's e to the power of minus 2 pi i x and then you know this thing here right is that correct is that correct yes what is this visually doing to the result so when when this means that when f of zero is one right so this this g of x thingy here is just going to be e to the minus you know it's just gonna be these right what is that what does this mean what does this mean this means you know the integral is is is then the same right so this is really this kind of just this circular thing which which basically means because i'm i'm looking at so this is this is the point where uh where this is zero and so it equals it equals one what am i doing and i want to understand so that's the function that i end up with if you know f at f equals 1 no at f 0 25 for example is equal zero and so basically g of x is in this case zero right um because remember integrating is then is like i'm trying to visualize that and it's so hard like i i it's so like i'm getting lost somewhere along the way i'm getting lost hard somewhere along the way here because what it seems like three tea and t okay so because here the three is just as three t and then as a function of t that's what's also confusing me at the moment here but based on this example what i can ah because actually i have to so i have the plot here to be honest that's actually not bad i have the plot i have the plot here actually so i shouldn't even be doing it i don't have to do it by hand so i have to plot here of of what this means so but it's funny so it's funny that a it's funny that uh for some reason for some reason when you multiply this function by this complex exponential you're getting that thing that is only positive right for example uh whereas this is the real part this is the con this is the complex part so the real part is only positive that's what it's actually saying okay because what they do is they yeah you have to think that a e is you can do a sine plus cosine right so you multiply a function by sine plus cos plus a cosine and so this gives you um so this is my function and i multiply by a cosine of something all right because i should be able to plot those things separately this is my function and then what i'm doing is i'm multiplying it by this these right and then this is a plot of the real part and the complex part minus two pi three t okay so let's try to do this the way it's written here cosine of two pi three x yeah okay but that's okay that's that's kind of okay right that's what we have 2 pi 3 times 2 is 6 6 pi x 6 pi x okay so that's good i mean that's correct and then what if we multiply this by that [Music] these e's so one way to think about this is this guy here is um cosine of uh a a a naught of x of course cosine of minus cosine of 6 pi x plus i sine of six x so that and then we're going to plot these two things separately but is that correct uh because the one is the oil euler's formula it's plus so when it's minus is both minus okay so it's both minus whatever so times minus cosine of six times pi times x interesting yeah and uh and the sinus actually gets that so this is the this is okay so this is i think where i have to um start next time this is where i have to get so okay so so what what this is doing is you've got a function oh my god but that's just because it's a three right so we're doing um two times three right and here it's like two times three but apparently these three changes things if i just say well frequency 7 frequency 7 here we have the same story frequency 1 frequency 1 that does not seem to depend on the frequency you always get the real part um that adds up you know um and that that it integrates to something that that's not zero why does five specifically oh well of course ah that doesn't change that's the function that i have look at these okay so i know i get it so one two three four five six seven ah interesting so only when the frequency is matching you're getting that is why so only when the frequency is matching you're actually getting a result that integrates positively that is really cool and this is essentially i think essentially because if you have cosine of x say cosine of 3x this cosine of 3x right so you've got something positive if i if i change that that is the reason that is the property that we're exploiting in a sense only when the frequencies match nice only when the frequencies match you get that result why is that why is that if we plot things separately cosine and then say cosine of three x um well it's it matches so this means that the negatives cancel out and become positive as i um change that the things don't match and so you're you're not gonna get a you're not gonna get a positive result only like you know you're you're gonna get you know something times you know this is gonna be negative and then two so as as you match okay it makes sense now it makes sense why we want to use an integral and it makes sense why do we gonna use use this e thing because what this e does is it decomposes into the cosine and the sine um i don't know why is it necessary to generalize it too so much that you kind of go to complex numbers i don't know why you need to generalize it so much but i guess in a way that makes sense when the frequency is matching the um okay that but that was a simple case of a cos lack of something that looks like like these right when the frequency is matching but what do you if you have a combination of that's that's what's interesting right i guess i guess if you have a combination of things like yeah that's that's then more complicated but it's probably the same in in a way in a way when you match one of the frequencies these numbers don't cancel out so much and so you get an integral that is positive that is not zero that'll be next let's try to make sort of an example that actually has a more complex thing so it actually has a function that has it's a combination of multiple frequencies i mean what if we cannot you just say cosine of like 5x right so you have these um if you plot them together it's this big thing here and so now when you say three no well now what now we're gonna we're gonna multiply these by cosine three x you see and it's almost if you do five it's also almost but if you do a four hmm yeah then i don't know how that works how would you how how how would that work because then it's when it gets nasty with a direct delta functions okay so that's still something to explore next time thank you tune a bit longer than expected but not bad thank you see you next time my outros are awful man i should just do who am i talking thank you good session |
so this is Jax this is Jaczko to just copy pasted it give me a second and you just need to open it again I'll just go to where Mike like Trello yeah here you go I can't I because I keep the keep the URLs in here so I remember so I copy paste the code from here and this one so first I want to try see if that works then we're gonna try to kind of go through the code see but I think it's it's a rather simple code so I think should be fairly easy to understand so well we'll probably go ahead and then dive maybe scan the paper as well from from Guillaume so basically let's first I think I got everything that I need so I just think that's and basically I put it in here and I say I can just do that if that runs anyhow okay so there is an array of numbers that's caused by the print here one of those numbers state state is the result of running this circuit and then running the circuit it's basically is this basically going to give you I'm not familiar with Strawberry Fields so but I'm assuming I mean you've got the initial stay here you've got different gates definitely with the notation here but I assume that is indicating the queue mode where this is being applied and then you're measuring X so the the the a the position quadrature and then you're running the circuit and then that's the result you get so I'm assuming those results that we seen here are the sort of the the optimal the optimal X values the the peak X values for the different parameters circuits so according to Jack here did it did it I wonder where he's taking those things from yes he's generated them but cultural plots when I run the algorithm with a equals one house that generates grass by inputting optimized parameters yielded by my program just refills instruct the simulation interface and I'll double check that we can double check that this interface is here so the excretory located around x equals 1 which is expected correct eternal value of our function keep in mind that does not work a lot of the time that's not all valleys of often that actually lead to circus that correctly find the optimal value this valise has to be chosen based on the context of the problem being solved because I see a lot of numbers about how can I sort how can I sort of things in Python array ascending not at least an array but maybe that's the same thing ascending or descending sword okay like that okay so if I just a sword if I just hold it and print it what does this give me so I guess it's not a least or I guess I'm using not the right instruction for that not tuturro do I mean that's pretty basic how do you sort things in path is it Kusum I'm in Python Oh doesn't return new list okay so basically basically just do this and that should work OOP okay cool bye what I wonder why something is actually below one the Optima supposed to be one but at the point where like above one point five one point something anyway but it works it works what's the what's the path and count elements at least simply count right if I add I just want curious so there should be [Music] that doesn't work this way I must just probably size its product something like size or lens come on come on that's so basic Python I mean I've never never use Python really python least LEDs come on lately and ah Oh dump I'm dumb okay no 100 there's a hundred values just wanted to verify this is testing trials 100 here iterations 45 where is it richness used here's it's used okay so let's let's let's quickly go through this um not so sure what's what's this it's from Strawberry Fields I guess ok so here basically is a catalog of it's a list of your possible parameters parabolic mean which basically in the and he in Jack's post I think he says I think you me just he's using one or something like that or two parabolic mean I mean there's three here definitely is our a epithet doesn't matter really and so before this is the optimal value what is math in our infinite okay cool simulations you've got the function to optimize and this is basically so this is that your function then this is the run circuit thing so and and the article explains how he comes how Jack basically comes up with that particular circuit so this is gonna be the topic for the next video because I'm better than dive into into the paper from from Guillaume as well and all the other material he's been sharing in a Twitter around this topic and then alpha parameter better prouder we're all point five why are they initialized us 0.5 possible parameters were is possible parameters used alpha primer better parameter I so basically what this does is it Peaks randomly one of the possible parameters Oh and then but then it runs circuit oh so so each so each are the of these gates because I thought better an alpha would be the same for all the different steps or layers because this is definitely zpr zpr so there's definitely sort of three layers of the same in here right and I don't know if this is the way this was intended because or I mean I assume so just Jack talked about this here I think so he says that we have to consider how implement symmetries and then he basically says okay this is the operations busier than our which then you know you can find it miss miraculously so that the mathematical equivalence to the to the function you're trying to approximate in here I mean to the unitary here and but I guess I guess one thing that is not so where alpha partner are a set of parameters and probably minutes are for the a after this I guess the one thing here is there's one thing in place so there's one thing in here which is not in the article but I I think I because I've seen so basically this is so one of those so those just three gates could be enough right but you can repeat that process over and over again so you can actually have more layers of that then kind of finding how many layers is that you can you you want to have is really up to you as well so what and what Jack is doing is for each layer the actual better and alpha parameter it might be different because it's randomly chosen from this list and I wonder whether that's whether that's something that is done on purpose or I guess one of those things that I mean it's just one of those trial and trial and error things when you design such such circuits right but in theory can I just commend things like that by them as well not much I can just get rid of that because I could just get rid of that and then it might it might I mean it'll definitely give me different amount of different set of results but which we could compare and then anyway they measure X and then run Gaussian I think this is because those gates are only Gaussian gates and so I think I think Strawberry Fields for some reason you got a specifying what more you're running there's something out the space as well I don't remember I remember those words just roughly from from a while back okay but that's basically that's basically what's what's going on here I think I as I said the code the code seems to be fairly simple so you iterate over the amount of iterations which is 45 result Creed for age in range minor shots which is ten shots run the circuit okay so he basically gets the average of the ten shots then makes the calculation function optimized then what is this use for nowhere I guess he I guess this is this tool I guess he might this might be a trade that he used the code because he says he didn't use some of those often but as to basically basically go and get those those things out of the the interactive thing the circus I used to try these three graphs first step of the algorithm second step of the algorithm third step of the algorithm after three steps a pic of the X cursor is located around so these are the three steps but but the reason behind three steps is just purely it's a design choice it's not and I guess he's using that to probably retrieve the parameters used so then he could play with the actually interactive and then says calculation is below the optimal value so that we kind of got a new minimum than simulation so and what is simulation okay okay so he's definitely tracking some more information in here greed so what is the greedy by the way append hello result hello okay simulation optimal value the X measurement and opie okay optimal parameters I you see so he's tracking okay cool so he's actually tracking the optimal parameters so he can then go and play with the Strawberry Fields the attractive thing which we can try and do okay and then go then you just go over again okay search for the optimal value aha so what'd you get wait a second so what you're running here is already the optimal circuit now call okay now I get it and then despite the fact that you're using exactly those set of optimal parameters you can see that every time you get something different right so this outcome is already the case and is testing trials is not used anywhere else okay so basically he's using the so this is this already the results using the optimal optimal parameters okay so if I if I print the optimal parameters what is the how do you comment in okay like that so if you just if I just say print optimal parameters and now I'm gonna go and get those here you have so those are the optimal parameters which if I do that again they might be slightly different yeah actually pretty different I mean here's this beautiful different you know interesting and if I wouldn't trend the the smallest result interesting okay having to pay the result oh this is the around x equals one so if that's your I don't know I'm curious it's just with a equals one okay so a equals one so sorry so let me cuz I wanna be I want to try to reproduce that as closely as possible to what he's so let's put the purple like minimum to be one and let's run this again now because this is how those graphs are based what describes graphs are based on so they're based on basically a being equal one and then which is expected of no value for our function exactly and minus one I'm not getting the numbers close to one that's let's be weird - 1.85 Oh question is is this X or assister result of the that's that's X that's not the result of the of the of the function of demise right I'm not sure I'm not sure this results makes sense to me but so that's supposed to be this that's supposed to be the smallest not Lance but the array actual okay I'll probably do another run on this ah I'm not getting I'm not getting values close to and I'm using a equals one the parabolic minimum basically what I could do so just expect keep it my daughter doesn't work a lot of the time that's not all that often but actually leads to circles are correct to find the optimal value these artists have to be chosen based on the context of the problem yeah but a lot of the time it's really a lot at the time Strawberry Fields interactive simulation so Strawberry Fields see if I could get strawberry fields I want to get in here seeing I had an account interactive no black bird that's it so what basically gates settings I don't know quite emotes what is this value change the route of Asia's infinity X and P / operators how is that said though because okay so that's something that's still that's not clear to me but I don't see this being said here anywhere but so basically squeeze again squeezing factor simulation time fog Gaussian fog that's a flaw kind of dimensions outputs quadratures interesting squeezing factors I think the squeezing factors are basically minus 0.5 and zero my how can I minus 0.5 and zero 0.5 and 0 and they'll be so which is the one mode for now because I'm running out of time as well so can I just get rid of this come on ah minus 0.5 and zero and it's a Gaussian and it's kind of damage of 5 and we want the quadratures and we now basically go zette p zp r zp r z p r and then there's a measurement X and the Z so for the Z parameter here we're gonna use the 0.9 0.5 0.9 I know it's the parabolic minimum times four times a better parameter okay the probable like mini minimum is basically in this case one times four so it's four times the better part of parameter so four times 0.9 it's three point six so this will be three point six for the Z for the P we're gonna use minus 4 times the better parameter so - here was three point six so there's gonna be minus 3.6 and for the R for the are gay is minus 1 times the Alpha parameter and we say the Alpha parameter always zero point nine sorry the Alpha parameter is minus 0.9 for our assuming that's correct thing but then the better parameter is 0.5 in here at 0.5 so I made I that's the wrong calculation this tool okay it's 2 so this is gonna be 2 and this is gonna be - to correct so we've got squeezing parameter was cruising the decade the pga the arcade and the next measurement and we'll say go that's definitely not what I expected okay but babies basically I think basically that's where because I see they're all the same and that's not what Jackie's getting some might be even for the first for the first step of the algorithm that's what we're getting so I might be doing something wrong okay but that's gonna be definitely then on the next video try to kind of get those results back the same like Jackie's getting because otherwise something's something's bit off in here but I might it probably it's proud of me but cool nice |
okay so um in today's session i might not be coding at that much i wanna i wanna make sure that i understand how to approach this to do here which i am not really certain off in terms of what what to do there right let me see if i can open again the uh the drawing thing that i had is it this one there you go so so we've got these right now the way this works in theory right is i mean not in theory but right really it is the way that it's supposed to work is it or the way that i implement it is that if you go to um let's let's try to see what happens here so i have two hallmark gates right correct i think that's not correct by the way that is definitely not correct that is definitely not correct what that that was these all the time so just apply harmonic to q0 why did this even work well because i think it actually leads to a similar set of branches it's just they now we'll see now anyway so the point is those get split right but like you have so after this happens you have these four that's the way that that's the way the operation works right now right like you you get up to this point you you do you do the the two cubit operation and then you take the um the the four amplitudes and and turn them into branches and then try to merge the branches that's kind of the generic way to apply this like yeah we have the operation where you we have the implementation of the control gates where we manually split this node here there's no printing or anything wasn't this printing why isn't this printing anything um that's definitely there's definitely something wrong here uh there's definitely something wrong here okay that's fine it's not the point um i i'll fix that later i'm i'm trying to think what to do with the amplitudes right because the idea is if you go to the code so we take these probabilities so we are doing to do the gate so we apply we apply the gate that's this instruction here this line here and then we're creating for each of the for each of the elements of the new state vector we are checking you know if the probability is is greater than zero right um we create the branch zero zero one one zero one because that's like sort of our base right so those are our uh the base states exactly so we create the note we created two notes and then we add them to the proper branches so we have the notes and the branches and we add the pro the i call this amplitude it's just because this really is the amplitude of the like if the edge represents if the edge represents a uh a portion of your overall system wave function that's the amplitude the way that we interpret these edges right are that the system is a sum of all the edges of all the entanglement edges of the systems that all the input each entire nature represents so i think it's correct i think it's okay to call it amplitude um but then as we merge what happens with these right like we have the merging here where we just say are they mergeable uh are they mergeable right and um [Music] if so then merge the edges which basically what we what we do is uh we iterate over each like over all the pairs of notes and if the qubits are the same then we sum the states and we normalize the state and then we have the new state here and then we create a node and we have the element and so we have the new edge right but this new edge doesn't have like i gave it an amplitude of zero now the question is i need a good enough example to figure out what this can be right because in this case that's a bad example because this case is no merging happening right where's the case where there is some merging happening i mean isn't there merging happening here and at least in this implementation if i if i do not merge these what do i get let's take a look so if i don't merge these if i do not merge the branches right um what do i get so i get these which is basically the two cubit edges uh and then the twin tango band edges between the notes uh zero zero and one one that's correct okay so i already get that so that's not that's not useful that's definitely not useful i'm trying to think about a case where i would need a merge where i would need a merge i mean i could also just implement the from state vector function what could be what could be a case where we need these things to merge so if we apply if we apply the hadamard gate because it seems like i i i i thought maybe i made a mistake i thought that um by virtue of the fact that we were applying the the two cubic uh gate mattresses we would actually get sometimes things that need to be compressed right away but it seems like that it seems like i that was my it was a mistake because i had like 200 marks in here and and that might have just been uh a mistake in this case right because well it was a mistake the fact you get four branches that i was getting for branches but nevertheless okay what if i do another control not gate now well the problem is i haven't implemented that i think but if i would assume if i do another control not gate right what this would do is it would take i don't i don't think that's going to work but i'm i would assume you would take this and turn it in turn node 16 into a zero and then it's when merging needs to happen so we can take that as an example but i think i as i'm seeing now i think that i might have to um to adapt the because i don't think this works but we can try so if we now apply another gate exactly the same exactly the same okay what do we get an error notes remove node clean operational nodes okay so what is happening here in the second and second iteration because i think that was i think that is was definitely something implemented in this one like if i if i use this it will probably work well here i'm getting the notes of the twelve of the two cubic edges these nodes yeah those are to the left actually here i think i i think i think that the problem here is that if these two qubits are in entanglement edges i should not so i should kind of apply this operation to the subsystems to the actual to each of the edges separately i think that's what i should do that's the way this works either i have either i give it the system or i give it the oh i give it the edge right you know what i mean the logic of these would be that i apply those are the hardest parts of the whole thing but i i would assume that here i need to go through each entanglement edge and and apply that gate to each of the edges now the question is can i have i think so think of it the two qubits are already in branches like if if the two qubits are already in uh what if they're not what if there's a third qubit oh man that's forgotten that becomes complicated so if if i have something like that the way that this should work is as i go through each entire edge and i treat each of those as a separate system and i apply the key to that system now this might lead into more edges or just a change in the edges right probably more edges how would i how would i do that now this is one case and the the the next case would be what if one of those elements is in an edge and the other one is not for example what if we have a third qubit i think i'm going to leave that case there we have third qubit and then you know we we now have this system we have a third qubit and then we now say hey third qubit um do a c naught with q zero right oh it's complicated i think i'll have to in this case i don't know in this case i really don't know how i should process these but i think that is the the thing is this function works for a particular system right how could i generalize that so so i can give it a subsystem actually not just the system maybe if we just maybe we just give it the notes because what what what does what do we use system for so we used to add the notes but these can be but this is fine i think this usage of system we can keep it i think the trick here is yeah i think the trick here is to give it the notes the operation is supposed to be applied to i think if i so if i basically system cubit zero qubit one what is this used for yes just for this kind of stuff in here it's between these qubits but but we give it just a subset of the notes so we tell the guy to just say q0 notes so i know i kind of don't like it a lot but look we're experimenting so just give it the notes and now this gate is applied down here so i need to give it the notes which basically is so right before the operation we would do these right and say hey you have control notes nodes i think i'll i think i'll do it like these q0 and q1 so i'll call it control nodes control nodes and target notes so q0 and q1 let's be redundant though that i'm using the keys for the edges here right i probably don't have to i probably don't have to if it just yeah i think i don't have to actually i can i can move these things here because i can read that from the notes like i'm assuming they're all from the same i'm assuming they are from the same qubit so i can i can just do like these control nodes and target nodes right and then i and then um what i do is i just uh just get these guys here and i can take these properties from the nodes i'm assuming they are not empty i'm assuming they all share you know uh now i'll otherwise later when i'm saying like the notes not empty and from same q with blah blah blah etc right so cubit 0 is really cupid 0 is really just saying keep your notes say the first then keep it right and for give it one it's this keep it one zero zero cubit i think that i think that should do it um so just pre-select the notes okay i should just give the notes so by doing these i have the freedom just to say i want to apply this to these ones and now i will say uh up oh i have to add another wrapper on top of that right because that's not what you wanna like you shouldn't you shouldn't know about these right you definitely should know about this level you you should say um what you should say is like you know apply to kubernetes so this will all so this will probably should be applied to duplicate two nodes because definitely you don't want to have like that's that's you're only able to say i want to apply this to kubernetes these two between these two qubits so the signature you want to keep it but then you want to be able to say if i have the entire branches thing then i then you know just pre-select a a bunch of notes instead of just doing all of them so this is not there finished yet but i'll just assume uh i'll do that i'll fix that next time um because i'm this is going to be a short video but uh here what we want to do now is we want to say well we want to apply these to each of the edges right so what we want to do is we want to do i mean let's try let's try to do this by hand and say control notes or the notes of get uh oh how i would do this i would do i would have to select the nodes that are that's complicated i would have to say what i would need to do is i need to do um so i need to get the edge that i want i need to get the elements from the edge right so elements from the edge it'll go system uh edges we'll just we'll just i'll just iterate over edges for edge in system i just like system i just system edges dual blah blah blah um yes edge system which is e so now i have the edge now what i want to do is i want to say i want to have the control nodes and target nodes being smt lists and i want to say for this is definitely over that but like for n in edge elements node equals h elements n and i was like if note dot qb equals q zero then then control nodes equals mp append control notes the node else and again i'm just hard coding this now to try what it works okay target notes equals np append target notes note what i'm trying to do is in classifying where the control goes and and all that stuff and so and the target goes right because i have to find them within the edge and once i'm done now i can apply and this kind of happens for each edge right which is okay so um now this is not something i said like you would usually do here like this is some encounters some logic you would encapsulate um in into the bigger like the more generic applied to qb gate so you would check are those two qubits in um in hyperedges yes then we should you know go this way if not then we just give it all the elements i just i should have a better way to query for these elements um which i would if i um if the memberships will work which i think it works i got an email that i think they fixed it so i might i might just want to update um my library and then and then try but uh first of all does this work at all if i just like comment this uh for now and uh like this and so we have first does this work at all gear zero can i just can i just cast it to a list what if i do i've had at least because i really don't care about the it's not just keeping strings object what it's getting there can i just uh i think i can get like python get list of dick values i think i think i can just get a list of the values of the dictionary at that point please d values d values so if i just because that is a oh not an entity list indices must be integers or slices not an entity exactly i just want these what if i print if i print so let's elements so so the print is right this is just this is a dictionary and it's a node and then if i print values it's no address values list object it's already at least it's not okay tangoman can i just change these so uh well it's at least it should be at least append result append edge maybe i should just say result equals np uh oh wait a second these are these are the edges right these are the edges see i'm doing something wrong these are the edges what am i doing so this is one edge and i'm getting the elements sorry and the elements yeah that's not like oh it's complaining about this one here sorry what is these what did i just add these now here i hope i hope i didn't just add this now here but this is what i'm trying to do print these and now i think i just added that accidentally values values exactly [Music] so if i just cast this like that ah that should work so if i just uh i think i think it was just working i think i i think i just put it in the wrong place that's why it's complaining but if i just take these and this is for q1 i do nothing else let's see what happens now listening this must be integers less is not entities oh because now i given it i given it uh yeah that's fine then i don't need that if this is already what i need what was the problem oh the problem is here is that i cannot i'm stupid so python python get first element of dictionary i think just with keys and something like that yeah i can just probably use keys keys and then select and python 3 wait let me start here non-destructively next iterable my dictionary values okay so i can just use that apply to qpsk to give it gates so so this is q0 notes this is q1 notes hopefully that works now yeah that works okay it seems like it's applied that correctly zero zero one one that's good i'm gonna call these apply to cubic gate i don't know what name to call it but like multi-cubic doesn't matter um okay so that works like this with its dictionary what if it's uh not a dictionary because now in here i'm gonna mess up i'm gonna say okay now this works so if i now go here the problem is that it's not gonna okay so instead of appending what i should just say is no no no no no no no then control notes so what i should just say is n equals node and i think that should do that builds a dictionary and then we keep the we don't have to touch the implementation so i trade over the elements um of of uh iterate over the edges and it's right with the nodes of the edges and if the qubit is zero it goes to control if not it goes to target and so once i'm done collecting this for one edge i apply the operation within that edge exactly i don't think that's gonna work out to be honest okay listing the system must be integers unless it's not strings uh it's because i've created that as i should create like this probably cemented dictionary doesn't make a difference okay what's the problem now what's the problem now stop iteration what doesn't even tell me what the problem is so what if we don't apply this but we print print control notes not so sure though so first of all print print the edge print like this and print node so we're we're training with the nodes and then print the control nodes so for q0 there's no 121 and 122 where is the 122 is this thing again having dirty stuff inside yeah probably that's just empty whatever the note 127 and under 30. they're both control now yeah they're both the controls so i should say print it off edge right end of edge end of edge so we have it's the problem we have two nodes as controls it's not 136 139 why when they're both they're definitely not oh q0 of the match and 36 of edge 139 why 39 if k note cubed equals q zero um what if we don't print any of these and we got these so we have q why okay so what the heck i don't want to get the edges hundred forty four i don't wanna have 444. why is it why you're returning me oh sorry okay the tongue of an edges definitely system system there we go there we go okay so now just two edges yeah okay so now it should work so so for 860 871 there is you know just one node which is 172 which is a control node exactly and then 175 is the control node okay makes sense perfect perfect so so this is yeah so now so now if we apply the sys if we apply this what will happen i don't know i'm gonna stop here okay it's still breaking was it breaking target notes why is it breaking target nodes target nodes are empty that's not good that's not good it's not possible edge it's not possible no so for edge 210 to 12 into 11 are 2 9 29 what is this h27 has these two notes h210 it just has okay 29 811 but why end of edge i think i'm doing this in the wrong place oh god it was the cro it was in the correct place before that's what it should do there you go no what's the problem now no 217 what is the problem with node 2017 what is the problem with node 217 here this node doesn't exist what if we just apply these once why don't we just apply this once again tango edges uh can i break in python still doesn't work okay so it's something something's going on here as i applied to cubic gate so i'll have to debug this but it's you get the point right so i'm trying to i'm trying to say okay so given just you know all pre i'm trying to operate within every branch right because that's what you want to do when you have branches you want to operate within each branch separately because if not the whole system is a branch right yeah probably exactly like that's that's the usual okay so you're just giving the elements across the whole system and here you need to go through each edge and then apply all the and apply the control gate within each edge so to say uh each computational branch and then this will lead to a case where we have to actually do some merging i believe and then we'll just think about this merging so okay that's not what i was expecting to do but i mean i think that's definitely an important step forward as well see you next video |
to work today um and again i don't as typically i don't have a lot of time it's complicated these days but let's see because i got all the standard contracts in here right but i mean these things import stuff from from the local file system which obviously i don't have and this one for example um i hear a messed up but here's other examples oh there's an nft example simple nfd but i mean you see these things um kind of import from the open zeppelin contracts uh oh it's actually stacking stuff from open zeppelin that's interesting okay but how do i know so packages opens up like how do i know so i think in the readme there was something about this which is basically um getting started run pre-install packages from open zeppelin contracts to install the solution packages that are distributed on npm make sure you install them using the package installer on the sidebar oh but these are for the npm based ones but there's just something from maybe maybe everything i use is from sampling anyway so that'll make it easier right i mean let's take a look at the i had a token in an nfd one here okay but that's definitely super simple in terms of token and then in terms of nfd so okay extensions because what i have here let's focus on the coin one so there's the um uh this is the standard and metadata and then udls and the question is why so these are things are pre-installed this means if i go to replay actually let me just so my browser history does not interfere with all these replied i mean how does these installing packages so or what's more even like sampling zeppelin packages and contracts how i don't know how that works though is it that is it that basically this is just internal internal stuff so let's for example i need to figure out how that how that works at all like i i want because i know that what what this what this repo does so what this project does is it just runs whatever it's in contract that's all and i want to have these things in separate files so okay i guess this is because of the way this ui is at what point is contract sol be the one that's recompiled it can be it can be this it may be i'm sorry um compile oh there there's the compiling happening contract song there we go okay so can i just for testing purposes can i include these in here so can i just say for example what's happening with the okay so can i just say know like import right so can i just say from here uh just delete everything can i just use that to just say import for example ansys coin soul and and says nft saw like would that will that work if i do that and if i run that it's gonna break probably uh but i mean let's see if it actually breaks by because of because of you know missing the imports here right so let's see what it does doesn't look like reloading page whereas if i just copy paste this guy here and i stop and run and that's gonna probably break connect wallet put the okay and now it breaks it breaks because of these okay cool so let's try to go back to what i had here okay cool so it's breaking just let's let's just top it and start it again let's make sure that um that this is is at least correctly okay yes it seems like this is the this is the re this is the the thing yeah so if i if i have it in the in a in a separate page well it's still like okay so will will this work automatically if i uh if i now say i don't want to see these because i have it here and so uh let me just change i'll just i'm just testing something okay so i'm just doing that and because i'm this is not updating so i'll just rerun it or refresh it not rerun it but refresh it yeah okay oh okay cool so it's catching that um that's nice oh so i don't even have to so i can just say and i can just go here refresh the page and that should work yeah there you go okay so what i am trying to do is basically now try to find okay so i can i can and this is just for testing purposes right i just want to make sure i have something to run and play the contracts and play with the contracts um here and i want i want to get them to run at least today right so i first first things first is i want to see if i can just by copy pasting that i will it will work or not you know so essentially like i have no idea where these things are uh it could be that they are here let's see so yeah call back and call back not support it okay so this is not found so open zeppelin uh opening contracts contracts token let's see if that works yeah that seems to work so i just have to find where this is just the github structure the path structure so i just have to find where where this guy is but it's probably uh search in this repository contracts interfaces and then context of the soul in utils import utils so contracts access uriels or contracts some here and then what utils does is it goes okay it's it's contract slash utils okay so that should work actually okay uh-huh there's something in line okay so now there's just uh something in in here is it or what sorry and yeah that's complaining now about this one so he is cool here i guess just in case what i should do is i should probably copy the same but this is seven to one it's my guess um this is all utils so i'd say it's probably these for all of them do i have multi-line editing no no because it highlights so there must be a way to use multi-line here for sure uh so i do that and then uh what is the where is these and where is this in this repository its contracts interfaces and then uh oh sorry this is this is here and then the receiver the receiver as in token okay so it's it's in in this one it's in the same okay so this is in the same and then input answers coin okay so actually what i can do is only import the nft contract that's all i care about because that imports already the answer is call so okay but now now it's everything seems to be okay now i'll be back in a second so we're back um cool so what is he complaining about and sees little a string private name too much python well is that what is that solidity sorry guys um boom okay what's all that declaration error i undeclared identifier did you mean i erc 721 and line 122 so oh because this is uh-huh okay so same will happen here i guess i call that and see an ansys coin so and i think you know what to be like who cares about the name like i'll just i'll just call it like i'll just call it like that right no it shouldn't be like this man so i actually i i should be able to call it whatever i want but then i need to find where any of these is used anyhow nowhere and then here match case oh select all you see there is is it's being used that's awkward because that should be so if i search for these right there are seven of them this one one two three okay the thing is i guess i guess this is basically to be replaced with this right so i go for these and i uh can i replace no what am i done sorry i press refresh and i'm looking for [Music] i'm looking for erc721 dot something and so can i just can i just replace it for these i am not super familiar with replied so i i i can't use all yet all the sort of shortcuts and power tools so i'm slow but eventually i'll get there because i can i can do a regular expression and probably can do a replace or something like that okay so but now uh there's still seven of them i think that's a bit of a bug um but okay so what about now oh cool i think it worked i think it worked okay so now i have basically okay so now i see these contracts in here and i can deploy them and and these net and i have one ease i'm gonna get another ease can i get more eve i mean you know but how does this work let's say i want to deploy i want to deploy that but i haven't really given it a name right is it that i have to call the constructor probably i have two ethan bridge so i want to deploy the nft contract deploy missing argument in contract constructor um yeah exactly but how do i do that i mean how can i put the contract is it that i have to um constructor memory name memory symbol how do i mean how to deploy deploy contract and call the constructor with an argument to put the contract with arguments and also pass the options uh i guess it's a limitation of i guess it's just a limitation of these specific implementation here of you know uh deploying multiple contracts like if i take a look at the examples i think none of the contracts actually have the constructor oh so wait a second you can actually just do these as in like calling the parent so ansi is coin okay so this just creates so i guess name and symbol hmm but how does these how does this know then anything how do i know like i can't uh uh [Music] i can like i i'm not sure i understand how this works so you can pass in your own ft name and symbol cool sure but this is calling the constructor of the um erc721 contract right and here we're actually implementing it so i can't just do that i need to create can i have a con so so let it solidity construct her well you know what actually what am i doing like why do i even need to do anything like that i don't care about these i just doesn't have any arguments and i'm gonna well i'm gonna harcode the name it's ansis nft and the symbol hmm ansys answers nfd answers do and if this need a near symbol does this need an actual token name popular nfts oh that just takes to the crowd to the webpage there is a standard and there is a ah another name for any for nfts in this contract so i guess ants is nft uh ants is nft and then anses uh i don't know that's not super original but let's see what happens because now i can say deploy this contract and that's telling me it's gonna cost me whatever and it's deploying looks like it's deploying that's cool if we get it to deploy and and do something with it then i'll just leave it here today and move on and then we'll do something else oh cool look at this so it's there um okay now i have basically an interface to test stuff right proof balance office so this is cool because this is all generated out of the contract so this is really really nice um but i have no idea run aw cool owner off token id okay i don't have any balance off approve token uri transfer why there's no mint because it's a private is it what is a proof okay so essentially we've deployed it and we have the coin contract now in here right but we we've just basically that's what i've done so there's just no means what there's no here is this no mean method well there's safe means but these are all a bunch of internal methods right why this why isn't there was there like why isn't mean part of the interface that's actually an interesting question right so this is definitely the mean one so address two and then the token id [Music] okay but it requires for the token id not to exist okay because essentially i mean that that's the mean thing right so that's what we're gonna do the ansys coins reward and stuff like that but there's no um i guess we would need a public method that takes in simply a um an ipfs uri and uh and you know it allow us to mean an nft and so what that's gonna do though is as we said it's gonna mint it but it's gonna it's gonna put it into sort of an approval queue right and so okay so i think we're i think now i think now we're ready to kind of build on top of that um that's just very generic stuff the mean what the mean does and what is it why is there safe mint save as i don't know what safe means hmm i don't know okay but you can burn thing you can you can burn so there's the internal stuff you can transfer proof but then the public methods of these contract are basically proof so safe transfer from safe why there is just two okay one has this data bytes here transfer from so transfer one nft from one address to another address the symbol obviously supports interface face id set approval for all operator approved this whole thing with a purple sound i'm not i think this is the same like with um so what is the approval stuff bounce off one off name symbol token uri baser i approve the so require can i go to to this method so okay you approve the two address to open token id okay cool so you you're allowing um others to they may basically um move the token id as well so we have approvals okay great um yeah i want to make sure i understand everything so it's not really easy to exploit or whatever but it's it's kind of a bit of a standard thing so i'm going to trust definitely that that's built in a nice way i mean ethereum uh themselves are like linking to these so i assume it's it's it's kind of a safe bet to work on these but yeah uh that's cool so basically that is really going to be like there's not going to be um this this is really not going to be a do i have to fancy coin how is that how is that even working didn't that break or anything how does it even know where it is and this coin oh there you go i imported this contract interesting but it's like is it technically that that contract is as well deployed like i don't know how that works but okay you have these um you cannot interact we'll see we'll see we just have to work on that cool i'm gonna leave it here um happy i mean we could try i'm just like i don't have time but i'm tempted uh let's say so so this is a token id i mean let's say that i have a and i'm gonna add my own functions probably like at the end so i make sure that i you know uh custom functions or something so i have no idea whether what i'm doing is correct or not mean and then um you know address two and then this is basically um ipfs or just uri right and so uh what is it gonna do is it going to basically it's going to basically use the the mint token id um yeah i guess we can just use that huh i guess we can just use these as the uri i mean just let's try it it's a dummy thing right well let's um do i have to uh what do i have to do why is it not working address two identify here oh sorry um again missing the semicolon ah noticeably specified did you intend to add public yeah well probably um do i have to add the public modifier for things that are not um function a public virtual okay public virtual public virtual i don't know what virtual means in this case i'll just leave it like that so do i have to redeploy the contract probably um yeah probably deploying and so let's see if that if that works and you know in a way so here i have my wallet address and i'm just going to open up ipfs okay so so i have connect page i have this file here copy cid no share link so i'm going to copy the but that's that's that's a link that's not what i want maybe what i want is a content id right because that's more the unique thing so i wanna now we have mint okay so and i wanna do this and then i wanna basically copy my address and uh run involve big number string okay but that's not an end that's just a string that's why it's not working so can i just call it string and then reload the thing memory don't to be honest i've never used that before so i have no idea why i have to put things like memory it's like using strings for you end string private name yeah they they put memory i don't know what that modifier does but uh we'll have to look for that conversion from string memory to uri i'll just put something um what is uri i mean mint and it's just a token id it's just a mint okay so okay um well just kind of like i'll just put something random okay so um i just want to test that things somehow work i don't know why but it's probably stupid a news function parameter oh god um can we whatever it is can we just like can we cast something no i need to create a token id from that right create so ideally i have this uri and i and i want to turn that into a unique token id so uh which is what we'll put in here so probably solidity i can hash it or something um turn ipfs kind of id into token id can i just a hash or one generate pen i mean okay so content hash okay it there's some kind of content id that's being generated um for now yeah so for now i just wanted to i just want to see what happens so so we'll just make a random thing here um that's not and the thing is i want to know whether okay so i actually have to redeploy the contract you play the contract testing is important you don't want to do that in ethereum in the ethereum network come on so essentially we will need basically here a generate uh to generate a unique token id out of the ipfs but i'm sure there's some i'm some standard way of doing that anyway so here we have and then we've got mint then i'm going to copy my address and then we'll run it and see what happens so it's going to tell me around this thing and there we go and now i have to balance off and i can take a look at my address and it says zero that's not good because that has supposedly transaction hash well maybe it's because it takes a while transaction hash yeah there you go we got a one so we've got one nft mint it mean tip there you go one okay i like it it's uh it's easy it's intuitive um and to be honest it's so easy to get set up with replacing this stuff so now i need to work on here right so i need to basically take that in put it into i'll outline the concept sort of in the next video i need to kind of put that into a queue of nfts to be approved and then what i need to do is i need to basically have a way for people to uh for addresses to kind of register themselves as uh validators and they need to stake uh heath or something yeah and uh exactly and then once they do that these people if they are validators they can get access to the cue of uh pending pending videos to approve they can approve the videos and once they proof the videos they get a uh they get a reward they get a kickback and then the uh owner of the nft gets the actual ansis coins as well and that's it really to be honest the thing is i'm not gonna these these nfts this is just so they are minted as as nfd's right so you kind of cannot upload the same video twice so it's going to be the hash of the content probably in there and stuff like that to generate the token id and and so yeah you can always trick that right you can always kind of have small modifications to the content so they it counts as something else but because it costs money to mean then you expect that you know that kind of brings in the game so people won't just do that massively right because it's just gonna cost them money uh and uh and then essentially once you're once you've done that uh yeah basically you you're you get your reward and that's it but you can't really do anything else with this nft i mean this nft itself then belongs to the contract uh okay not to the contract to be honest no i mean the nfts the nfts are yours you can do whatever you want with them i don't really care actually if people want to then put them in openc or something like it's their thing like uh the nfts that you meant out of that where we're gonna give you we're gonna give you uh currency in exchange just because you've done it but then you still own it uh yeah i think so anyway see you next time |
Hahaha, was following you for quantum stuff. Seeing you work on Solidity i like :D, @asd asd happy to hear my quantum content is relaxing xD<br><br>Sadly its too easy to criticize things like web3 when there aren't any crazy obvious use cases yet and cause of its financial tangents its an easy target for scammed. I see it as a great opportunity to create truly decentralized systems with proper skin in the game mechanics, @Uncertain Systems I don't understand to much of all that quantum stuff besides the basics. When i watch your quantum stuff its mostly to feel myself stupid while relaxing.<br>Crypto has become my live for a year now. Have specialized myself as hard as i could, from algotrading to coding. Seeing you interested in that space gives me tailwind(lots of people don't think its a legitimate cause, that every cryptobro is a gambler etc, you probably know yourself)., Bit of both :) still doing research but now building a smart contract to encourage ppl to upload also raw research vids |
okay cool so I think it's now recording yeah perfect okay so we do we do what we do because I was i I had because I was playing you I'm you know you're saying you were getting stuck at 17 and I was just because I couldn't remember set the level 17 it's fairly straightforward you pass 17 yeah yeah yeah I got 19 so we can we can do we can do add to say with you 20 yeah okay cool so we came to 20 it's gonna force us to get better at recognizing unit Aires as for sure yeah I mean let's see so I can't covering where I got the first thing I usually do is I go and I just go straight into a check is this kind of tells me I I change my approach but yeah so so you know it's not a see we know it's not a see not right because like a controlled gate would have a an identity like if it were controlled on the zero cubed we see a 1 in the first along the diagonal of the matrix yeah so I think I mean and if we look at the the Bloch sphere right I know I learned that trick from you where if it's if the block spheres actually makes sense then you know you're not in tango so yeah yeah so but I mean I figure how do by the way did you I'm the organ which the the vectors are the this is following the key skill order or the still probably kiss kill order and I mention that we should yeah so we need to swap the second and third columns and the second and third rows of the match well it helps if it's a if the matrix is but this is for the matrix with the term but this is for the metric sign so for the state vector is the same as well or the second so that's because if I to a this is the second and third enemies of the state level is good yeah because I dude yeah your state vector no how do I even get there I'm just trying again polluted let's make sure X yeah what if you what if you just do X what let's make sure that we because that would show up in yeah so that so that's if I thought so yeah bit one that goes here so this is your smart had a more don't do it 0 and that's about it I think yeah I think you were trying to figure out where the order yeah yeah the order yeah but I mean how much probably one so if I'm what were you saying II so if I get if I go to so playing harmonica V 0 that is basically fees like could you write on one state that doesn't because that keeps the zeros here here so if I if I applied these and this is this guy 0 0 I mean you guys can yes can keep you guys can can also work on your notebooks right like if you it's if you want to play back tonight so I hammered on 0 and but that's what I tried before and oh yeah ok mmm I thought I thought I had tried it right before anything work on but that gets us because that basically yeah but the issue there is in the yeah we're missing like it's not it's not it doesn't match up on the unit Aires because like if you look in column to the right now we have the real components to shift over to the imaginary right yeah but you can do that with a with a wide gauge right the question is because that's what the white gate like if I if I just start with like a so this is the this is the initial state state vector if I apply a wide gain to zero right like what these does is it takes it takes the and it basically doesn't quick right like we the it moves the amplitude entirely to one and it shifts the face by 90 degrees which basically means that your 1 goes from the real to the imaginary so but how would that work here if I so what what I like to do usually is I of the immunity and I mapped them to the input States so I did what 0 0 is an input would kill on the output and what 0 I just try to figure out what gates would match all for yeah but that's over here now as I was saying that the so we have 2 2 2 2 differences are the two middle columns right but then the last column also has a sine difference oh yeah and so if that if if the and we said the second column is for the state 1 0 all right yes so this thing 1 0 so there might be because of cascade ordering it's not 0 ok it's it's 1 0 so this means Q cubed born in the state so or if we would do I'm just I don't know let me try what if we would do a sort of a control no like if we want to talk target just that just that state right like the same way with the controls that you can target like one specific state the face of one specific state I'm thinking about but that wouldn't work with that with a control why would it so if I have a superposition or if I have a super because then we need another type of control I think we have this proposition like these and I say what Odyssey is doing so for example a control y here flips the face of 0 1 and 1 1 so it flips the face yeah so ok it's not that if it applies why of course and the qubit yeah that makes sense sometimes I have you know it's really hard when you think about controlled operations because you can think of them in a classical way like right like when cubed 0 will be 1 then this K will be applied to keep it 0 to Q whatever um but with the controls that it makes a lot of sense to think about it from a state at the state level at the system level right so if you have a control set it's like um that's gonna that's gonna shift the face for the state 1 1 and so but this changes that's not gonna do I think that's not gonna help because because that will change I mean let me try and see what happens ok so if I oh yeah but how doing from any control why any key skin so it seems to really like cubed one always gets drift between the input and the output this is going by going binding in the 3 matrix so I just wrote down what [Music] that can make I can make the as I'm sharing the screen I can make it oh I did you are and when you wrote that down to gr also flip the you says you flip the second and third column and the second and third row okay yeah yeah that really throws a wrench to the works for me like having a foot that I mean it it's it's it's inconvenient yeah it's inconvenient for sure it looks like the states that have a phase factor of Pi other ones when the qubits are different so you start off with zero one down the other states have of this factor of I 0 0 and 1 1 don't have that [Music] so the states that have the face of I are the states where the the two qubits are different yeah yeah I mean you can see if yeah exactly I mean you can see this here right so it's say the 1 0 0 1 1 you can see this in the yeah exactly see if that works you think this is easier to solve as with both keep it so instead of thinking about what's happening individual that's a bit that that's what I'm trying to think like from Vermont because it's what we have here now is that we it's you know something happens to the states as a skier said where the zeros in the the way the q0 q1 are different let me just verify Geary let's say on the first column so this is where as is going to and it's going to one over a to if I'm flipping the second and the third row Oh like are we starting with B with zero as index so when you say flip the second third column those the two intercom yeah I mean she committed the middle two columns and they really do rose okay okay oh yeah that makes sense yeah that's good zero one the only states that would be affected at zero one one zero plus the ordering is trying to I was trying to prepend or a pen Siva we could see something at the cubic level I mean if we attend if we append it we're obviously matching the state yes because we mm-hmm I think that's where you found like we already passed the first two checks but exactly exactly off by a phase since that's not going to help well so so that I wonder how hard is it to oh yeah that's the thing it's not just uh yeah it's like how can we what I'd love to learn is the intuition about knowing how we want to affect the the phase for this this whole state exactly so and I and so you can so we can do I mean what you can do right like you can have that you can see quick now so if you you can target specific phase specific phases of specific states with the control with control Z Bryant right so if I do like a control s right that's only gonna face by it's gonna it's only only gonna face the by 90 degrees the state 1 1 1 right because this is a the equivalent for 1 1 if I would say if I would sign which all this was not with not with no gates and it does the same for 0 0 if I you know if I instead of that I leave the sandwich only on the cubed 0 it does this 4 4 1 0 so maybe maybe that's something that we could try in here so we're saying but how can I get how can I have how can i implement a control there's no native control ass is there it's just controls then of course I think I think 420 if you scroll up yeah I think yeah so you have a control lights only yeah do you have a control so with the control so what you can do if we have a control X and we also have let me see I think if I remember this well so if if we because a control Z is the same like a control X where the X is sandwiched by harm arts correct yeah yeah so and what what are the gates do we have okay maybe it's just I mean what a control so what if I do that with a control I it's not it's not doing what we want mmm because we we do have the you know the s and the SD and the s dr. and the T dagger um yeah interesting how could we use them how could we use them in combination of control X well first of all what would happen just just to maybe maybe get something moving so if I we do control X on 0 1 okay then we're not matching obviously that anymore but what has happened now well so now zero zero goes to both 0 1 and 1 0 yeah before I was going to was it going to 1 0 on 1 1 0 1 & 1 sorry 0 1 that's the flip okay we're 1 + 1 1 now what one thing that you know even though we know the final outcome isn't entangled it doesn't mean that there aren't 2 CX gates in there I just wonder if there's an operation we would do while we're entangled and then we'd and then there would be another CX gate what do you mean yeah so well I know it was some with some super kids you can entangle and then do operations while you were entangled yeah yeah ok mm-hmm disentangle yeah like with uh well I mean I guess that's what even Grover is doing it some level mm-hmm so you mean the gross sorry Grover doesn't disentangle the cupids but like if you look at like some of the what is the like if the simple sat solving examples they'll entangle just to do a Z rotation and then uncomputable I everything except the final controls it controls it no yeah anyway I don't know if that's I mean that would be it's possible maybe this circuit takes out it you know randomly but let's also see how how deep this circuit is because that will ya because some ideas it steps to oh wow okay so that's the because it should be fairly simple right there should be fairly simple then we just need to get those we could almost brute force it [Laughter] well so I mean here let's look at the pattern so we know the second and third column here a need to shift from wheels to imaginaries and so the ye gate is our friend and that I didn't exactly I mean what if we do these right no that's definitely so okay so now we shift it yeah but now I got the second column right you know we don't we yeah well but we still have an odd phase in there oh wait we got the second con right the third column is now the third the third column is missing exactly okay so what do we do with that I mean it but white white what a second white did this happen Oh with that so why that's a white behave like that because the white that's the same like the why does the same like the X right but it just also it at the same time flips the face by 90 degrees yeah yeah so [Music] so now we have the upper the third column and the fourth column and I those now both need to switch as well hmm [Music] from reals - oh no sorry they already are in imaginary okay oh no sorry the fourth not only the four the fourth column needs to be so that's one one but I think that's the effect of the wine you know because before that it was in the real part exactly so we're swapping those here so the problem yeah because that's obviously the one one state and so the last column is the one one state and so okay but that also changed the it's it's like it that's that's the problem that I'm having is that if we just apply operations to single qubits you're always gonna change two columns at a time yeah so I think this is this is good so let's to build our intuition when we see like if you were ever to just see a unitary this way you spot those things so so what yeah I guess the pattern is we are seeing those the switch let's see we also now lost column zero right yeah that's not good so maybe they're starting with a hanuman is not the right so the homework gets is these what if we start with a why what is it gonna change so if we start with a y and then we are playing a Hanuman where are we now no it's it's not close to all because here in the first column we're imaging it we're still in the complex part and the second column because the first the first operations gotta be a Hanuman right but maybe it's a harm out in the first key beam I'm trying to get us I mean you know maybe to a point where we can what's easier to see and what happens if you put an atom art on both well then I'm not sure that makes sense but no there's a lot of zeroes exactly those in the matrix exactly so they're the Harmar must be just in one of the key beats the first by first one you mean keep it one activity yeah so this is only depth to so yeah then I wonder so what yeah what happens if you put a wide gate either before after that age so if we if we have it before on the queue on Q 0 right is that only that I think that takes us a way because yeah I mean even the state vector is no matching it's like it's the you know like we have in the first column there is there in the real the real part okay where have we got you so we've got only the you know it it's it's what Giro is like it was saying it at the very beginning right so the the complex part is only in the 1 0 & 0 1 state yeah so there's gotta be maybe this is some sort of phase key back in in the sense that there is going to be a control not because the control not mmm yeah you're thinking if you have a on the first qubit you have but no we don't have that many instructions no no yeah if you're talking about a face kickback where you have you have you start the second qubit and you want to get to the negative X state yeah mm-hmm so with the I mean the Hart's got to be somewhere right so this for sure and and so what do we say what doesn't an x CX k to here they just flips the columns right that's my kerning so just takes the last column oh no nothing nothing the last column is real is enough complex and if I cannot liked where we got just with just with these rent but it does but it's but it we might just be a dead end because this is the closest we've gone what if you do I was going to say what if you just do see why like I started a YX on one of the qubits to rotate by you mean so what gave me what I was talking about yeah when I was talking about in the chat earlier I'm a wide gate than one of the qubits yeah why even an X in X and a wide yeah why why and then an X yeah just yeah the problem is that with a wizard with with the why we're kind of doesn't matter what we're pliant we're going because here why it so and our nights so I think there's one way to get the phase shift only on all human the Cubans at this rate and that could be to apply the S shape to both the qubits would to the zero and one oh because the because because then those days because then they would people they aren't allowed for one one but you know they do nothing for one what they cancel out by I so what do we have even before and after that we still have to figure out so if you applying sorry if you apply as on both and then high demand on the first one I mean you gotta start with a heart like no it's an IDs first and then apply the heart Amanda and Villegas he was the S on what but if I start with the S yeah that's what we want so S on zero and one first and then you can move the hardware to the X below the blue its button that's on the zero won't do anything without exactly I think those two first and they won't they won't do anything Oh what yeah but no in this I should be know that it was but it's it solved it right yeah and then why do you think we think they don't do anything but they actually introduced it is introduced of global face right so you can take it is the global face which it should be sort of ignore but we actually need each other if you think about it so it is just through it so it should start off with zero zero yeah so then you start off when you start off with the s gates on both the zero and the one qubits right you on the 0 0 and 1 1 input States you get you don't get the factor of I you just get either the factor of 1 or minus 1 right but on the 0 1 and the 1 0 states you end up with the factor of I and that that's what the global the global traits comes in at 1 and after you have the bubble phase if you apply the heart and the X gets pretty much does it for you so yeah I know I know it okay so I know what you're saying so you I mean it's the thing is it doesn't matter right like from an ax from a practical perspective doesn't really matter but if you try to match the actual the actual unitary matrix they say there's a difference between there's a difference between these unitary matrix and and in these unitary matrix yeah yes exactly yeah so I mean they're pretty much identical and yeah so they look at these two matrices I mean they're pretty much the same except for the global base fact alone on some of the states so yeah so if you this look at this matrix you're the only difference between the current you need to be in the target unitary is I think column two has a phase factor of I and condom for has a phase factor of minus one and column green has a phase factor of i yeah you can confirm that yeah so I mean if you take your current unit 3 and multiply on the first column by one the second column by column minus one you get pretty much the exact same thing as your target yeah so all this is saying is yeah so what you're saying is exactly that the difference is there's just there's just a face mobile phase it's just a global phase difference do something for me just turning just have the two escapes and let's take a look at the matrix with that so look at these it has it has it has those minuses in places where yep so if you look at this you see that no I mean this is what matters because the first condom is just one the second and third columns are ie and the fourth column is a minus one yeah and though and that was exactly the difference between your when you had the harder matter the X those were the factors of it missing from each column yeah yeah because exactly because the 2's is consecutively our app as well actually I mean it that's that's that's kind of what we're saying in the chat before right like the because the one one state has two one's the the 2's faces they pile up to become like an actual - was an actual Z face like a one hundred eight hundred eighty degrees face and so it somehow feels like I I understand it but like it still feels like there's something I should take out of that and I'm not really like did they do for me here would be like how can you see there is a global how can you easily see there's a global phase difference between unitary matrix this is just I mean I I mean I didn't see a way to introduce a phase factor only on the 0 1 and 1 0 states especially but the game said that we had I didn't have any control and it is hard with the game sets that we had the only way to introduce a phase factor was to use the s here or a why gate but that didn't seem to work sort of well I mean here's something that's telling like if we think about the zero you know the first column in where that that vector is going to like it's the identity but like there's still that fourth row which has that negative value and that's gonna be consistent across every vector that's going to every other vector even though they spelled the identity so then you can pull out that global phase of negative one one yeah and and like we know with normally we won't be able to inspect things this way but like we know global phase factors don't matter to the end result yeah something else who I'm a con was when we were looking I was like but those 2's gates aren't gonna do anything yep because I wasn't thinking evidence I was thinking of the initial state but I'm looking at the unit area which is the transformation it sounds like you know it yeah so so this is exactly yeah yeah here's a fundamental question should we be challenging ourselves on something that you know we hear time and time again global phase factor does not matter so so yeah we might this one thing so I think it actually matters I think it actually matters so it matters in the sense that if an operation carries a global face that global face is the one that's kick back on a face kick back so so it's so this is so this is an important I mean I I still haven't really kind of I just said that because I know it's it's true but I haven't really played a lot with these to kind of feel comfortable right but if I if you take a look at at query and take a look at the the the tool tip here for example the horror mark a Crichton has a a global face of 90 degrees right like of I it says at the very bottom global face so if i do if i do a control harm art like that what is this doing or am i or am i am I doing this wrong exactly you got it to these the the thing that I didn't know I don't even know where I found but it's because of one being kind of like an eigenstate of of the harm our operation then this face kickback gets in there right like no I'm saying something wrong I'm not I'm not showing it right but there's something that the global face is then something that you know with that with the face kickback it's got something to do what actually creates its it's the face that you're kind of kicking back but I don't know how you show that to control X you'll get you're gonna get the phase in the first qubit so you swish it yeah oh yeah very typical one I think sorry that's because it's because I'm it's not a harmonica control is the face kickback happens with the control eggs now with a controlled operation so yeah I know I know I so the global phasing here yeah but I think you need the negative on the other one so you need a positive on the zero the first qubit and then negative home with it or all right sorry I know what you mean so you need I don't exactly these yeah yeah exactly that's that one that one does it yeah but it still it's still not known if there's something wrong with what I said in terms of these being 90 degrees because here there's a phase off it's introduced to face off 180 degrees right oh yeah I mean for this circuit that makes sense because now the top qubit is in would be in the negative x face or sorry then yeah negative X faces yeah but I was trying to find a relation between the global phase and the the concept of the global phase of the Harmar being 90 oh I see you're saying because that's inherent that's inherent to the Hadamard exactly that's that's that's the that's the point of that that's why I said it actually matters that whether an operation has a global phase or not like it doesn't matter if your system is in a in a phase that is globally equivalent one to two to another one but if the operation carries a global phase that matters because it can have face it impacts phase kickback results but I was thinking there but I I was because I'm exploring exploring this really early on but I can't probably out there I'll definitely have to do something more there but it's cuz here it says coalface 90 degrees and that's what kind of dozen that's that's what I'm not like so the SK that has 45 degrees so we'll be fine yeah but that's not I I gotta I gotta find a better way to show these somehow or to play with that I see - and the blind of andrewandlaura yeah I mean that's so Disraeli but what I'm trying to understand is like this - right like this - so okay because the - carries a 180 degrees phase and that's the one that's kicked back to the plan stayed but what I'm trying to find isn't trying to find a relationship between these and and and the tooltip telling me that the operation harem art has a 90 degrees phase a go whole face that's what I'm trying to find I'm trying to find a case so if I know what a global phase of an operator is what should I be careful with you know what I mean like or what are these what are the effects that these global phase that is associated to the ought to do to the to the gate can have what global phase does the escape 45 degrees 45 okay it it faces one by 90 degrees but the global fit the global phase of the operation itself is 45 I mean I'm I hope that I'm reading this correctly right it says X X so exponential 45 and I know I I guess complex but that's just the way I exactly search that's just [Music] yeah it's e ^ okay so that's kind of the only thing that that I wouldn't know how to because it's it's when you can I think it's gotta do when you it's when you cut exactly so when you control an operation I think I'm starting to remember if when you control an operation and and the cubit where you apply the operation has is in one of the eigenstates of that operation right yeah I can state of an approver know of an operator being the state that the operator doesn't change right so if for example that's why the eigenstates of the heart operation are zero and one because no wait a second it's not that it doesn't change that it's that it doesn't have it only applies a global face oh I think I'm getting too confused right now but it's it's I promise you all share some links afterwards but there's some this well so if I'm hearing you correctly wouldn't like when you stack operators after one another can you if there's like an inherent global face to them are you able to cancel that out this is what I'm not or does it not work that way I don't think I don't think this works the I I'm not I'm not so sure I'm I'm definitely getting lost right now it's it's got to do so what I what I kind of feel is that it's got to do with what happens when you control the operation for a specific within a specific state or on a specific state [Music] because I remember reading that in in the in the O'Reilly book but I can't I'll probably have to check that up because I control how tomorrow yeah let me check that cuz I don't wanna I don't want to put it up in the screen just in case I share it cuz it's a bad books I don't wanna share something that then then get in trouble or something but if I is that that's bothering me a lot right now because I had a cloud reader here and this is something that in the book it is a chapter about face estimation and they actually explain this way see if I can open up open it up but it's it's funny how just that like little thing made the level really difficult right whatever it's not I'm not it's not logging in correctly I don't know why I'll have to look it up afterwards I'll definitely I'll definitely do something some more extra videos in these but they say so there's there's the notion of that a gate has a gate has some kind of a gate or an operator has eigenstates in that there are a set of states for which this gate the only thing it does is apply a global phase but it doesn't do anything else to them right and if you so if and and if you're applying this gate to one of the eigenstates and you control it on and there's another qubit and the users are control then that global phase gets kicked back to the other key bead that that that inherent global phase of that operation and so that's why I think the coalface really matters when it really matters in that particular situation but it doesn't matter as in the global phase of yours of your current state like that doesn't matter because it's physically irrelevant right that's what it's written all over the planes I think and I think without statement I'm happy yeah do we wanna how much more time the guys have yeah I mean but at least we at least we got it I guess we got the level level 20 self that's so so our voices help you help you solve there our thinking voices yeah it's I think I think what Amir said is correct it's we were too much fixed on or were thinking about the unitary as if like that would be somehow the state of the system and not you know what I mean like that's why we couldn't think of even anything close to these but if you think about it it makes sense if you match the state vectors but the unitary doesn't match right like isn't it can we say that that's the only possibility or is it too strong a statement now I think that's a correct statement so it just means that whatever gates you're gonna sprinkle in they're not gonna have any effect exactly it would just be changing potentially the global face and I think yeah then I guess I guess will will will plan another one at some point I very much like it I think it's it's interesting to have that group discussion I think are I think from this the probably the the levels that come after will now will be easier that's what I think so we get to the next hard one which is we get to entangling gates and probably a qubit yeah so I think we should all just see how far we can get exactly oh let's do that let's let's say that let's give us a week or so yeah let's give us a week or so the one hour one and see where we get stuck and then once we find one of those where's like we can move forward then we do another session yeah yeah cool yeah thank you guys |
It's fun doing these videos :D |
Congratulation on 1k subscribers...., @Uncertain Systems And i can see , why it took three great minds for solving challenge 20 , it was different of what the program was spittin before...Great video its always good to see three of you , although the competition format had much more tension and intensity..lol, Thank you so much 😀 |
so guys I have time for just one more thing and I'm kind of not feeling super excited about the challenge I don't know why is it because the problems are cool to be honest I mean they're not like I don't know it's not that I found the IBM quite a challenge explicitly better but maybe it felt a bit more like a community kind of thing this feels a bit more dry but I'm maybe I it's a bit of my fault as well because I haven't really putting the time to go through this this is much more it's a it's it's it's a way bigger contest Andy than what the I've been kind of challenge was or I could have a lot of exercises and it's yeah I've got mixed feelings I definitely learn a lot of interesting things just by doing the just bite week because I could have full of exercises right and and especially everything around Q sharp it's it's always it was interesting so this was interest in fighting but I anyway I just want to see if I can do another one I haven't gone through all the A's but I feel like it's kind of even more a bit more more of the same just how to figure out how to distinguish the gates and and they're probably tricky ones probably I think I know how would approach a four and a five but now let's take a look at other ones so b1 is the bit string balance and I might come back are those things open after the contest I think they're still open right so I might I might be able to come back to what is the Microsoft code in contests warm up it is still available but I might I might still do these you know later on just from time to time to kind of have like a warm up the problems are here so if I click in here can I steal semitte stuff yeah I can still submit okay so so I'll probably go back to tweet later in the future but this let me just just pick one and try to do something okay I don't know so these this one is seems to be interesting because I think it's a it's a generalization of another one that was in the warm-up which I didn't get to do which is prepare these state and then here I think it's just prepare like that's just an example for N equals two and then this you know the problem is you're given an n qubits and then n qubits answer task is to prepare the equal superposition of all basis states have one or more zeros in them so basically all the possible states with the exception of the one that's all ones and I think that could be a similar idea I know how to solve these and we could try to see if we can if it's easy to generalize that feels like it fits the bill for for the time that I have I haven't done any quantum classification exercises before and but I think they based on what I've seen it they require this bit of a different setup and I'm curious about the what is the use about it's quite some people solved it as well and the root of the quantity transform that's also interesting so an implement new version that's going to be up to the operation kft what if T is going to a transform 50p okay so I had a power I can so implement a power of the key ft but what are the what are the restrictions register of type a little endian around photonic papapapa phone signature oh so this is just about implemented 50 and then doing it many times or like is it is it like is there any restrictions on what case you can use is just implement it and that's it okay but maybe it might be that it's too slow it might be there's like some it says two seconds but it might be that it is some time restrictions of these a person should have adjoined and control for ions to find for it ah okay so you have to somehow yeah China the controlled version of it okay but this seems less of a challenge and more of a but it could be an interesting exercise to go through why not I mean but now it's it's probably that this probably takes too much time to come up and then this is the root of this is the power of 1/2 so you could probably generalize these exercise to include these as well mmm or to solve this one as well interesting I mean I might go and do these at some point in time and then prepare superposition of the base and then there's another participant of the base of states with the same parity so I guess this means you know if parity is zero then you want you want these if parity is one then you want these why the basis states that have an even number of ones expel your own and the business states have an odd number of ones if raise one okay that can be and I just want to swap but I think I'll go with this one because I just I think it's gonna be this is recording right okay so let's of course jump to quick and and do quickly the that example because this this one this one this one is something can do it so it says it can only use x y&z in harm or gates and you can do measurement so I'm assuming the easiest way to do this is to prepare the superposition right and then kind of somehow drop that one way to drop one thing is to have kind of another cubed and so and what I would like for the one one state for example we would do something like these right so what these does is every movie from that from that first quadrant in here so it takes the 1 1 to be part of the you know because this is that the the the latest the the the highest value QT just it's up that amplitude and and then you can just i think paul select so measure it like to be 0 and there you go right so this is definitely the solution to these exercise how do we generalize that so we have n cubed so and so for n cubed stick my question is i think it's just the same right like i think you can just you can just do like these can you yeah so basically take the latest cubed you do like a multi c not okay but you've got to do I guess so but the challenge here is going to be how to implement how to implement these right sorry employment like a multi control not now moppy control X Q sharp am I even allowed to do that so you're not allowed to use any gates except the powder gates the hannahmont gave and the controlled versions of those ok so I guess I got a beetle tab that by simply using ancillary key boots as if I can use a control X you know so I would just basically do something like how I build is so so my target is this one so what I will do is control X here so how can I not gonna go too powerful how can I build a path for the gate decompose what's the composition of the possible gate control knots let's not think I don't know if I can I can't use da mm okay but maybe that means that maybe a control controlled versions of those maybe the controlled versions maybe this is allowed right like a multi control multi control X or or let's do that powerfully getting Q sharp come on doesn't even show up or what so we were shocked the contention cakes trinsic okay so that's a C okay so there's a CC not control not get to three cubits say if I have a CC not I can bottom I can build a multi since you know and I don't know if I'm allowed to do this it's a kind of a control version of the not right it's just a multi control version of the mod so but let's give it a try that would be the easiest thing to do so so what are you giving in here so you're given you're given basically this is this is a signature so again let's do it and what do I need a field actually here do I know that I'm building these so you have to find a version which is taken drive and keep it as an input it has no output the output of this machine is a state in which it left the input cubics your code should have the following signature okay so but how do i how do I test this I mean whatever let's just go and try so I'm gonna take these program and I'm gonna just I'm just gonna do just gonna do these and we'll just all just give it a try here okay so what do I have is I have multiple cubed okay so I have qubits let's say we've got like let's say let's say I've got like five cubits okay so if I've got five or like if I forgot if I got five how many I mean I need more these so I don't need any of these here I I don't need to measure anything so if I have n qubits I need how many ancillary qubits do I need for these [Music] let's say they I have three cubed so for three cubits I need so this would this will be a tougher this is an ancillary given that I'm using these and these and these as a target and that's that's then what we wanna measure exactly well we would need to uncomputable to be to be correct and so this means for three key beats I need one and silver cubed right if I add a fourth cubed then I need then I need these and then I need basically another one so that is that is my target remember and I need one compute these and here we go so for these I need so I have four cubits that I need to I guess it's kind of like what did I say three cubits one four cubits - just like - - yeah and - - or something like this okay so I need n minus two so I'm given like I'm assuming that see that I'm given like so if N equals 5 then I need to have n plus n minus 2 like that's kind of how many I mean right in the first five and the first five are the ones that I need and after the solution I won't need to do that because I'm already given the five so I'll just need to be I'll just need to kind of reserve or allocate the n minus 2 and so now first I guess first what I do is so how do I apply all right why cue sharp random Brissette always sent others were set on operation simulation apply all something like that there's something writings all function operations functions ratio all cubics polymer will just not go altered is the dirty way okay so we'll just basically do a dimer get to keep it the loop in cue chart I had an example basic and just like a shrine for for index pain oh yeah that's what I that's what I'm looking for that's what I'm looking for I'm looking for for index M zero on length of qyx or not like neo-soul and write some things and then buy a harem r to the n qubits so this is the first this is the first part to the n qubits and then so now I need to eat read and apply those control knots until I get to the target right so so I also kind of do these so I also shoot you should also be able to do with use with a for from 0 to n in the excitement so I do CC not from cubics so I guess it's I guess the can see see not so how it's a signature this is he not CC CC not CC so not apply see not chained if not the Cascade of not control okay it's controlled and corresponding beats of two cubic registers acting on the next cubed of one of the registers starting from the cubes I presume zero and bull versus controls acting on the next give it off one of the registers starting from the qubits at position zero in both registers as controls see see not as applied to the qubit at position one of the target register then controlled by the then controlled by the kiwis of position one acting on the cube a that position - I don't know if that's probably probably that thing that kind of works supply to the qubit position one of the target register then controlled by the cutes at position one acting on the career at position two and ink whatever I think it's gonna be easier if I just hard code it this way it's probably not gonna work Don so I'd say qubits index I need to know I what I want what I came here to check is the CC not what city not when this is not okay this is not talk he'll give it is he not up snacks this Nazi not I found it here somewhere how did it even get there hopefully see see mama can I not just the CC not operation here we go why is it so difficult to find its control control target okay so I keep it index then keep it in the X plus +1 and the target with me so after the n its n plus it's n plus 1 right so the target would be n plus 1 I'll make sure I'll control that I'm not getting like an offset or something like that so this is definitely what we're doing okay but that's gonna cause me trouble because that's not gonna allow me to implement so that's the first one and then the last of the other ones are basically because the other one should be controlled on the tar on on this one right [Music] searching only the sir control yourself controls targets capacities of control for controls and targets and maybe these that's the job I just not sure stem utilize the Cascade of 60 not gates control and corresponding beats of two qubit registers are acting on the next qubit of one of the registers starting from I think that's exactly what it's what this is doing because the register the first is just a user controls so this is what we're doing here right um and you'll notice four targets and controls so the season has applied to the key position one of the target register then controlled by the keys at position one acting on the queue at position two and the target register etc ending with an action on the target qubit in position plans keep it on the target resistance position lands and keep its minus one yeah okay so that's that's the way okay so that that is probably gonna be the easiest thing to do but I need to basically it's my kind of cannon so I actually you have rights there cannot already saw so I would need how can i how can i allocate multiple registers q sharp allocate multiple registers using like these okay just allocate so I'll call this register and these targets and so this is gonna be cubits this is n this is like n minus 2 n minus 1 because I need to I need the extra target so there should be M is 1 exactly and so I go to the register so play a homage to all the registers and then applies is not cool and then register targets can I bring this circuiting which your chart to see what I what I'm building is correctly you sharp and circle whereas these I know that's not supposed to be the circuit concept that like their goods something like troll bouquets or something conventions controlled gates so that way to print that where's my face floating there so apply this CC not chained to cookies right and then exactly then I shoot what happens if I'd done on computer I think that should still work if I pass a leg for one know if I'll reset them I'll break them I need to uncomputable so here I was doing twice you know Chinese cascades another operation my sanity and repression implements a cascade often lets get control and Chris Mancuso stood a mmm thank you stressing us have one cute more than the other registers but that's not them doing what I what I think it's saying is it that's not doing what I think it's doing isn't it sweetie could dad deprecated okay the target qubit register must have one giving more than the other registers okay that's just applying a cascading so controls n as target comma q sharp multi-format it's good [Music] that's a different experience control tension operations can I just see an example somewhere because I'm afraid this is just chaining the qubits that dictate the control knots that's not what we want to do that's definitely not what we want to do but I don't even know how to check that because I can't even don't know how to print anything strong sharp there it goes using statement maybe I just should go because there's a I think we should be able to if I if I just do it this way will be easier will be easier to implement okay so if I do it this way but then I got a pass select on 0 the NC lucky audience silicates and and then that's kind of de oh sorry correct am I using the correct what am I but how how is it gonna know so if I'm using extra cubits okay but because it's just gonna be the key beats it's just gonna be the cubits that that matter so it's just gonna take a look at these which is correct okay so I should maybe just arrange it this way so I have yeah so if I have like n qubits right say 1 2 3 4 then I add like n minus n minus 1 okay let's do this it's gonna be it's gonna be easier to do it this way so how I had it before right because then this is a simple chain of like I'm doing these right and kill I get here so it's gonna be easier to so I'm basically gonna be there's going to be iterating over these and so what I'm gonna have I don't need a mix I'll need to mix that up that's not that's not the point I knew basically I have a hard time thinking right now because I'm gonna be given I'm gonna be at my point is I'm gonna given the qubits in already in an array and so I don't want to I'll need T and C like you it's aside so I'll need to be doing but I can also do it this way yeah I can also do it this way right exactly so the target is the last one so I would do okay so this is let's let's do it this way so first we have these and then reply all hearts then we apply a and we're playing a CC not that's like keep it's sort of 0 + + 1 + ye cuz I gotta get I'm gonna I'm that's that's messy I think I'll just should basically work here directly so honest that's what's the point I'm not gonna be even testing that if it doesn't work already there anyway just good so so n is is the length of Q s and then what we need to do is we need these are auxiliary qubits of basically n minus 1 good then it's an M so this is Q I so we'll do a Hanuman all the Q s and then we'll Duke us some assuming n is bigger than - can I assume that I guess so so then I'm gonna be doing so this is gonna be the first see not goes to the first so the first you know it goes to Alex zero right exactly and at the end I'll have to and compute that so there will be the last time competing right um you think and then here here good and then you and then I just simply go for so then I'll just do for index and like n minus 2 n minus 1 right so and now I have to do these CC not swear it's like CC not writing for each of those right the first one is gonna be a target in so the first target is gonna be Q as there's always gonna be index as to because I've already used the first two and the second one is going to be index so this is going to be a tweet - - you're not gonna be index okay and the target is gonna be awks one does this make sense so this is gonna be index so index plus 2 into X and X plus 1 exactly this was 2 index in this plus 1 and that should be it and then we should do it backwards right and so now we should uncomputable e [Music] the clean in the opposite so for zero we want to are here in 2 so 2 n minus 2 so we want to do like and - - OH - whatever I already had in here correct and - - I missed index I don't know if I'm this is probably not gonna work - index so when index is 0 or we have is and right you guys and so finis 5 n is 5 0 1 so f ends yeah for is it wanted for exactly know and - - since index so doing n minus 2 so we have okay we have four and parties there's a lot of these meds so we have four N equals 4 then we have here 3 so this should be n minus 1 minus 1 a minus one exactly so and if N equals 4 then we've got three and so this kind of goes from 0 to 3 so 0 is 3 minus 2 1 right so I don't know how to count backwards let me go get some water and so I feel that stupid okay come on so this is basic this is basic programming really basic programming so um why is why some iterating from 0 to n minus 2 oh okay so I'm doing these immediately because if n is 4 n minus 2 is 2 right so I'm gonna be trading 2 times because I want to do I should get drink one time I really only because this one doesn't need to being computed so I should eat trade betrayed n minus 3 times here to be honest okay so let's just do this from scratch the only thing we should do so and and so basically when I'm at 0 then yes zero is kind of in this case already yet so what I should do is so this is gotta be how do I determined one in qs1 in ox and and then the one in ox as the target right so so the one in Arts as a target should just be and -3 no Venice for the target is 1 so n minus 3 is 3 since I've doing how did I over is I want to trade kind of like I want to start at end so I want to start at n minus 2 really hello n minus 3 I want to start at the N minus 3 because this is and it's 4 and a minus 3 is 1 so I want to start at 1 right exactly so I want to start at the N minus 3 and this is the target so n minus 3 or maybe n minus 3 minus index right because the target is gonna be always 1 app right so if index is 1 and then n minus 3 right would be 0 right that's correct n minus 1 if it can this the second control is is the one before me right says n minus 3 minus 1 and now how are you fine how do i define the 1q s well it's basically it's basically going to be [Music] well if we have n and then the first thing yeah it's gonna be we start with and it's gonna be n minus minus one minus index n minus 1 minus index should be this way n minus 1 minus index I don't know if this is gonna work to be honest if let's let's do a manual iteration so if for index 0 right because n minus 3 it would be for M is 1 so this is just gonna eat trade two times that we done one that night this is gonna be so let's assume n is for rice is gonna be 1 minus 1 0 minus index 0 ronk knowing and so n is 4 so 4 minus 1 is 3 - index is 3 right so 0 1 gonna be 4 minus 2 to 0 on tool then it's gonna be 4 minus 3 years 1 minus 1 0 so it's gonna be 0 and then Faridah is 4 4 minus 3 is 1 minus index is 1 so that's correct and then one is gonna one because this util four minutes three two one so this should be to be honest for and then and this one is gonna be correcting 0 n minus two really 0 to n minus 2 so 0 was also not that's n minus 3 yeah I guess it's not gonna work but it doesn't work yeah and then what we need to do is we need to you just need a measure okay that that's that's good that doesn't work since my eyes we all measured to zero because they were all those eyes so they're not because I haven't computed all of them yeah sudden just need a measure no I just need a measure every cent or M Alex if so then I need basically okay so for each cubed I need to basically measure Alex index and so this should go to N minus 1 right hi - cool exactly - tool and do I need to reset them gradually right so I measure from this once is this resolved I'm measuring these ones and that's it yeah that's definitely gonna work but you get the solution right is this okay if it doesn't work I have to stuck this isn't really over time I'm gonna keep it and then try the solution the solution solution solves let's give it a try it doesn't work I promise our comeback team is and actually really solve it I wouldn't understand how can I print stuff and pretty yeah I mean but I'm I'm so rusty it was classical programming stuff that I'm really amazed by myself my inability to build basic loops submit QAS is that why organ submit on program non program sorry I don't think that's gonna work that's gonna work every words will be every amazing I have I haven't even tried running it here it's actually time running all right America one know what's the right time air it's a runtime error it's probably whatever I have to stop it's a I tried come on tell me okay so I know that's not the problem there's something else code three submit it's the runtime problem some given keywords this is the lens of Q s o n minus one should be sorry probably the reason minus one I could try to resubmit see that Blackie that's program Q s right so a minus one but I'm computing its need a vacancy then then you need to measure those kids just those kids knocks running at this one oh so it's running on test one at least so I think I didn't get to run at this one before oh yeah I did know when Tamara come on it failed static main man oh whatever I'm not gonna figure out cuz I can't I don't even know how to test that so I'm really missing in here but I think the outline of the solution is correct so I mean that definitely that's definitely the way that it should be solve by doing something like that it doesn't know how to code it properly but I'll come back to this and I promise cringe cringe cringe cringe cringe cringe how do I stop these yeah |
That 'Cringe' in the end hits hard , because I was having the same hard time figuring out A section of problems......😢, I now afterwards realized that the provided controlled version of the unitary accepts in q# an array of control qubits XD and so the whole video struggle was pointless 🤣 |
nice work keep going, Thanks! Happy you like the content! |
suppose I have two pivots for evocative purposes suppose you're literally holding them as balls in your hands one in the left hand and wanted the right hand the goal is to swap the cubed so that you your right hand ends up holding keep it storing the state of the key with your left hand and vice versa so how do you do it always the picture from okay okay that's not very hard obviously you can't just you could just physically move the cubes between your hands put my cue down pass the other qubit to the opposite hand then pick out the qubit you put down but what if they were cool to your hands that sounds funny but it's not intended as a joke in practice it's not always possible to physically move qubits for example you kids might be edged into a onto a circuit board hidden away inside a dilution refrigerator you're going to have a bit of trouble moving those around but then the dentist kind of seems to see sue suggests there is nothing really else to eat at just swapping like there's no interference a trick to it or maybe there is a way to do it I don't know even if you can't others know it intuition interference interpretation of of swapping oh maybe there is right the same way you can do the XOR swap because that's another way you know meant that literally physically stop the to give it's it's it's still possible to swap their states as long as you have the right operations available first ability I allow you to apply a harm or apply harm our gates signal calibration that rotates a great degreaser of the diagonal X plus z axis transition of the zero state to the zero plus one stayed at the one state to the zero minus one state and controlled that gate so to compute attraction I think it's the amplitude of the one one state that there is a series of operators you can do to solve the states and the kids will get that specification be the point is that and this path we're talking about swaps will cover a few ways to do swaps how to generalize swabs and how to specialized swaps one of my favorite websites speak twiddling hacks it's a bunch of low-level programming tricks too for computing simple functions in few corporations and it's fantastic for example you need to count a number of one beats in a 32-bit register it's possible to do so in twelve operations and that's how I will show you how interesting one of the big twiddling tasks on the side is swap two variables without using an any extra space for a temporary variable that is to say rewrite the following code so that it operates on operates only on a and B without using a temporary T is so using a language solution is from covered by the beat twiddling hack is called the XOR swapping you just XOR assign the two variables back and forth and back in they ended up swapped to really see why these works are recommending a few examples my hand for our purposes in this post interesting thing about X or something is that it only uses reversible operations which means it will work on qubits the statement a XOR equals B means for each bit position if the bit in a position it b is odd then toggle that bit in a there is a quill a chronica : of these if b then toggle a operation the control not sex the control not we can implement XOR swap or quantum computer all we need to do is chain 3 C knots back and forth so let's go through the four basic states to see how this works so ax oh yeah that's a bunch of stuff in here it's interesting something values with it with X or that's interesting zero-zero desired up is usually the first see not control is not satisfied with statements 8000 the middle signal satisfy this 1000 and final signal does not satisfy us a series you're correct these are appellees 0 1 u 1 1 0 the first signal is not satisfied state 1 0 the middle sinner is satisfied the bottom cubic gets toggled the transition to the state 1 1 the final C now control satisfying the top cubic it's 2 1 0 here correct same happens here and here is the same like the same but it's so they stay unchanged but they change it between right so the first is satisfied so you get to wife 0 the second is not satisfy so get to stay 1 0 m and then the other one is satisfied so you go back to 1 1 okay so all four classical cases work but what about the quantum cases the qubits could could be a superposition entangled with all the qubits and tangle yeah that's the thing is entangled without the Q I know I tackle with each other so all four okay for example this state is unaffected by not gates couldn't initializing the bottom qubit to that state prevent the first C not from achieving this purpose there by running the swap crossing the bottom what will be the bottom cubed II mean the short answer to this worries the rule of the thumb quantum mechanics is linear so if it works in the basis States then it works for every state there are exceptions to this rule but only for circuits involving extra work qubits example the phase keep back used Shor's algorithm our circuit has no X cubed so we're fine I still don't get it what he means by the bottom qubit to that stay criticized in a bottom cubed to stay prevent does he mean because our this is this is one cubed right anyways X or swapping with harmonics and control that we know we now know how to sort to cue it by applying C not gates to them if we don't have seen our gates available as the basic gate said that we can still use this strategy we just need to build the signals out of a variable gate for example the gate set controls f+ Harmar doesn't go to C naught but you can see I can build the equivalence so you do the effect is it not with the Harmon framed cubed past target why does this work has to do with the reason that were not competing we call the not gate X at the face flip gate said the harm our operation is a 180 degree rotation around the X plus z axis of the Bloch sphere if you have stayed along the x axis of the Bloch sphere example X on the heart operation will rotate that state along the z axis to Z on analogously the Harmar will rotate their axis States into the x axis for this reason framing operational arm arts converts any instructions on the z axis it to attractions on the x axis advise versa did not did not gate is the nexus interaction the face flip is it z axis attraction so the harm our operation start one into the other for more discussion on of these not as x interaction stuff see the pasta clique of operations control Z that that was definitely good past post but I'll cover repeat here basically see see that K because was a cake we thought office meaning what we see what we see is Z on negate the amplitude of the zero State fqt at that same language the signal means when the cubed C is Z on negative amplitude of the X on state of the cubed T or by speaking at the level of the whole system we can say to the control that gate means negate the amplitude of the control that means they get the amplitude of the Z on that on state whereas the C not gate means negate the amplitude I I never I never thought of it this way huh negate I never I never thought of it this way that's the way you think about it at the system level and so that's also the way you think about a signal at the system level look at the a platoon of the Z on X on combination interesting so of that particular superposition 1 0 minus 1 1 now you always learned something that's interesting differently so you see that's quite interesting when you see when you try to think about those operations at the system level this is why this that's why framing one career of a see that would harm our services at into a see not now let's think about access b-besides xfz the signal operation negates the amplitude of the state their own axon and leaves perpendicular States alone you know gates the amplitude of the state what a perpendicular States but colliculus States to want to these it's the amplitude of state set on X on I suggest if surely I'm going to write seen our operation as the expressions as the expression C naught 1 2 equals x to the tilde is notation I just made up for this post it means combined in the way that makes one control one control the other I'll be referring to the operation performed by the till the operator as the control product to be mathematically precise I define the control product of two commuting unitary operators a and B what to be - what sign-off physicists yes I've just multiplied the Hamiltonians together and I don't know how kid that these be useful later on let's take a look it's rustically even though we started with an isometric concept one operation controlling another the math ended up symmetric you can think of either operation as being the control of the other correct that does if you think of it at the system level exactly so basically that would mean heard can you think of it this way from a control nut perspective it's not negate the amplitude off okay I'm not entirely sure I can apply this same view to the control not know but this is more of a generalization what he's trying to do here we can suddenly check the control product definition by verifying the control our operations matrix is in fact the control product of face flipping the control and toggling the target so so this is the X matrix and this is the Z matrix control product return these so basically this is the indeed the controller matrix so wait a second say you're just malaya just multiplying to hamiltonians that's what you're saying here just multiply the Hamiltonians together of X and Z I kind of see I can't see what he's doing but I don't see the I don't see where he's going with that so let's let's go that's not really the see of a scene oh yeah yeah now let's write our X or swapping algorithm down but in the language of the control product it's pretty simple the operations that source hoping applies are Z 1 X 2 X 1 Z 2 Z 1 X 2 notice the alternating back and forth palette that's it to be safe we should check that multiplying those operations together return to correct matrix yeah that's this the matrix of the swamp a little bit like I'm buying slow cuz I think I'm not gonna not gonna rush this because this he's definitely trying to go somewhere yeah that's the swamp matrix a natural question to us here is what happens if we use this alternating pattern on other axes off the cubed is X or swapping specific to the X at the z-axis or does it work more generally well clearly it can't be specific to those axes the fact that we can that we call one particular axis the z axis or the computational basis is just an arbitrary convention a coordinate system they are lying math is independent of our naming convention so this alternating technique must work in some sense no matter which axis we use just to be sure we can test it Python if we using the X and the y instead of desert at the X works swap X Y the X of the y wait a second what does it mean just swap the X and the y then it's not your wait a second just to be sure we can't estimate yeah so that's the matrix of the swamp inquiry which has support for x-axis and y-axis controls it that's pretty cool by the way so what's going on here so we so this animation is doing an X rotation ah so you're doing a swap but you're doing it through another set of axes so you're using an X control so if I replace these with with Zed Kade's you should we should see the same effect that's an interesting effect when you have the it's just Oh okay yeah so basically that's those three things equal okay based of this quick test it will be result to conclude that the alternating control product attractions trick will perform a swab regardless of which access pair we peek however there are some exceptions in particular we'll pick two axes that are around perpendicular to each other X for example eggs and they're all X plus a then the slope doesn't work correctly the reason we need to use perpendicular axis comes out to the fact that the observables of those axis anticommute in some fundamental sense that I'm not going to try to explain be hearing the x axis with the z axis works because their axis flip operators have an anti commutator that satisfies what is an anti commutator by using the commit in mathematics the commutator gives an indication of the extent to which asserted binary operation fails to be commutative these are different oppressions okay group theory and brain theory the commutator of two elements G and H of a group G is the element G H and is equal to the group's identity if and only if G and H commute but can be meaning that G times H is the same as H times G so the dear-dear effects are independent of the order so he's saying in the anticommute the anti commutator of two elements a and B of a ring was defined by a B plus B a sometimes the committed hater the article is used less often but can be used to define Clifford algebras during algebras the commutator of two operators acting on a Hilbert space is the central concept in quantum mechanics since it qualifies how well the two observers described by these operators can be measured simultaneously the in certain principle is ultimately a theory of about such committee headers by virtue of of the Roberts or Schrodinger's equation relation if a space equivalent commutator is a function start products are called moya brackets and are completely isomorphic to the hill version so what does it mean that it accommodates at the commutativity inverse mod exactly community is a specific property of some non commutative operations mathematics where symmetry is of central importance these operations are mostly called anti-symmetric operations they are extended and are extended in an associative setting to cover more than two argument swapping definition an and marry operation is antisymmetric is swapping the order of any two arguments negates the result okay so basically what this means is that it anticommute its you can see this in the matrix no yeah the data commute means that x z equals to minus z x so it kind of commutes but but only but negating the result and so on what Craig is saying is that's the reason why the solve works only because those two observables interesting general speaking of the axis flip operators a and B satisfy these then D and okay so the anti commutator is just a mathematical concert that tells you how well something anta commutes or not so if it's zero it means it at the commutes then the operation X is swap a bij is a separation between the committee I and cubic J with generalize from source for pictures with scene arts to a construction the kids so of two cubits by back-and-forth attracting two qubits along any perpendicular pair of axes but we're not that general I think here okay I don't know I shouldn't let that sink in for a while I don't know like that's seeking for a while it's uh this is pretty it's a it's it's a I didn't expect that to go that way so so far I've kind of like that with half the post I would say and this is a really interesting learning you can swap using any any pair of of axes really a pair of perpendicular axes so you know x and y x and z interesting this is really interesting these and seeing the DS and seeing the the senior operation as negating the amplitude of the Z on X on stayed so the state 1 minus which is this interesting I feel like I feel I gotta get it be more in shape with prepositions and interference because especially also after what I discover it from Grover's algorithm it seems that that's the essence of a quantum algorithm it's like manipulating the interference manipulating this prepositions and creating the interference and I think that's the there's no more like would to that you know what I mean like it's weird because it feels low level but it doesn't feel low level you know okay so and solve it here for now I'll let that sink in for a little bit then then I'll do another video with the rest of the article which is generalizing X is hoping into observable swapping that can be interesting some animations XYZ swapping special I are specializing the XYZ swap far swap interesting cool perfect that was definitely more interesting than expected so far |
so Grover's algorithm so I'm gonna take a look at Grover's algorithm from an intuitive perspective now I've read about Graham's algorithm before and I think that there might be some some interesting things we can extract out of it so let's let's take a look at it so I kind of I can't avoid just reading unstructured search down here I think that is actually a really interesting example because that's a really typical computer science problem and so if this is an algorithm that's supposed to solve that in a way that it's better and faster or whatever it's definitely worth taking a look at what is the underlying quantumness that the algorithm is using and and and how can we extract that as I mean sort of an intuition bite hmm and then I'll do a sort of a two minute overview on that later on in another video so you don't hear speed searching databases Grover's algorithm demonstrates this capability so it's about speed okay so walk you through the description of a search problem start assert suppose are given a large list of n items among these items is one item with the unique property that we wish to locate we'll call this one the winner W so that's what we see here pink to find the pink box mark item using classical competition when we'd have to check at least half of the items in the boxes and in the worst case and so all of them but I kind of compare however you can find out roughly in the square root of n steps with grubbers amplitude amplification tricky like how Allah hears the word trick for that okay so quadratic speed-up is indeed a substantial time-saver blah blah blah so additionally the algorithm does not use the least internal structure that is actually really cool which makes it generic hmm okay so Oracle how will the least items be provided to the quantum computer a common way to encode such at least is in terms of a function that returns zero for all unmarked items and one for the winner okay so this is already sort of what we've seen in other algorithms as well the input is given to us in a way that it's already sort of it actually makes it easy to exploit so I see already because I don't know which one was done whether it was Deutsch Rosa or Simon's algorithm where it was a similar thing was like fine fine Dada in a Middle East where there's like where the actual value of the function equals to 1 or something like that so to use a quantum computer for this problem we must provide items in the superposition to these functions so we encode the function into a unitary matrix called an Oracle okay so basically that's also what's happening in other in other in other algorithms is like date ok so they call it an Oracle you encode the function in Oracle and that's kind of your your least so say so first we we choose a binary encoding of the items such that such that X and all you belong to 0 and okay now we can represent it in terms of qubits on a quantum computer so when we define the ok so I've seen that before the annotation right so kind of the FX so the value of the function as an exponential as the exponential see so that the power the minus 1 to the power of the value of the function which basically means whenever that's 0 you know that stays positive and whatever that's 1 which is the item we're finding it's - so basically what this is saying is and let's let's just open open up another tab with the actual circuit so what this is saying is basically let's let's flag that let's flag the item right so let's say I'm gonna I'm gonna do it with like maybe 3 let's keep it simple so so basically I'm guessing I don't know what this is saying is like the input right so the Oracle is something like that where you've got position and then and then we're gonna flag I don't know just randomly we're gonna flag so here we have too many of them flags but I think if you do something like that you're gonna reduce exactly so if you do like maybe maybe so I don't know exactly how lot but maybe I know how to that with three but basically is essentially what you're doing is you wanna you wanna flag just just one item so maybe if you do something like that maybe I don't know I'm just guessing and then this goes to this guy over here know what if this is said now I'm just playing with that I honestly have an I don't know what I'm doing really other than I want to cancel that so maybe I don't know how to console that I will be interesting to find a way to cancel that so but you know what I mean right so in this case we would have two items flag flight so we want to find a way to flag to flag just one item and that's kind of the the way you're giving the input so maybe I'll just anyway so back back to the back to the algorithm so we we are basically giving us giving that the least and and then it's just one item which is flagged using this position right so standard stage we said we see that if X is an unmarked item the Oracle does nothing to the state however when we apply the Oracle to the base state it Maps it 2-1 dramatically the unitary matrix response a reflection about the origin of the mark okay I'm not sure if I if I explained if that's the really what it's supposed to do let's move on so this is the first step so we are flagging so we know that we have the function in such a way that the item we're looking for is flagged in a way that it has a negative sign a negative amplitude negative phase and so then we go and it says amplitude amplification so I'm assuming which this is gonna do it's just gonna amplify that this means it's gonna I don't know how but basically it's going to make the probability of that flag stayed be bigger than any other one so then probably by doing that when you measure it repetitively you know you're gonna get that as a result so it's a pretty it's a pretty nice that's pretty neat how does algorithm work if you're looking at the list of items who have no idea where the marked item is there for any guess of its location is as good as any other yeah so we've got like a uniform superposition good then what else we have here if at the point we measure the standard basis collapse in any other states so it could be expected hence an average we would do like the same n times enter the procedure called amplitude amplification which is how a quantum computer significantly enhances this probability this procedure stretches out the amplitude the mark item which shrinks the other items amplitude so that's measuring the final state because I guess this is sort of the probabilities have to be kept have to conserve that's kind of one of the principles amplifying or increasing a probability of a certain state the other ones decreases so it's not that you have to balance it you have to balance it out by hand it just happens naturally so that's a nice geometrical interpretation which I probably is gonna be confusing and I'm not sure if I want to really stick to it but let's go through this we generate a rotation and a two-dimensional plane it just confuses people or at least it confuses me they're not quite perpendicular because it's amplitude blah so okay but I guess so step 0 the amplitude amplification procedure starts out in the uniform superposition so this is what we this is what we what I showed right so kind of I mean so say so you've got that and then that's kind of flocked this here I don't know the the left graphic response to them okay so that's sort of the the geometrical explanation and the right graphic is a bar graph with the amplitudes okay so we applied the oracle reflection so sorry this is where we've got like the minus one and and and all those are plus right and then there's like an or like sort of a reflection we now apply an additional reflection so it seems like so this is what's happening is now you've got this as like it kind of it's interesting so now let's say it's positive is this what they're saying that we're just like flipped it somehow I guess this is going to be a game of harem art in a way that for example if you have like let's let's say you have likes your 0 you have like 0 1 and 1 0 like just give an example right so I think I think we're gonna play with other modes in a way that like we have we're gonna get some signs so some of those things will get cancelled and then some of those things would get just like dabbled right so so you're gonna have like 2 times minus that like so minus 2 times 10 1 0 so this is gonna give you a higher probability in comparison to the other states I think that's gonna be something like that instead of cancelling out completely that's gonna this going to be something that happens like this so the two reflection fractions always correspond to a rotation reduce the initial stay I mean maybe that geometrical explanation helps to understand the circuit at the end of the day so we'll see if we have to come back to this but it just I like to see it in terms of things cancelling out versus adding up since the average shampoo has been lowered yeah sure afters formed okay so we've got something here after tea steps this table we transformed how many times we need to apply the rotation it turns out that's important okay so the thing is this rotation so this operation of amplifying has to be applied probably many times so that it's big enough because I'm guessing after applying it once it might not be big enough so you still will get a really noisy result as in like a lot of false positives because the probability of the other possible solutions will still not be small enough okay so okay so this is the okay so this is a circuit basically so okay so this is basically I see so we've got a so we've got a hollow Mart so as the first step is haram art and I guess this is the function the oracles I guess this is like encoding flanking the item okay I find it quite interesting that this is inside the box that gets repeated so I'm assuming as I said that if we think of it means it's flagged over and over again and then and then that portion here probably takes care of amplifying that let's see the kiss code implementation but we create a face Oracle that will mark States 0 0 & 1 1 1 as the results why two of them okay but that's you see but that's flagging that's the same mm-hmm and that is the same mechanism so there's another video that I've made on a quantum artificial neuron and I realized that pattern was there as well and I don't I haven't really figured yet would seem intuitive way of building that but this is like so if I build that and those things are control sets and they are both with black dots because the controls that affects both qubits so for some people it's a bit country to it you have to kind of like do this whole thing here with a set because that seems to imply that only only this beat the target beat the target qubit is affected but this is telling you so if I build that and I say so so now we now we're gonna add the sets so let me go back here so we're gonna add three sets and then we're gonna do so now we have we've got four states flag and then now we're gonna do the control sets are specified in here so first we've got this then we've got this and then we've got this but this one here is actually this hmm really seems like but that flex a lot of stuff really ah interesting ok so there it's the other way around so the okay so they're flagging it okay they're flagging everything that is not so it's a 0 0 and 1 1 1 are the ones left in blue so in this case it's like the positive ones okay mm-hmm whatever it doesn't matter it doesn't matter if if you do it this way or the other way I guess so next but so here they are flagging 0 0 0 & 1 1 I don't know why I thought I was about finding 1 1 result but I guess I guess that's that's about it and then the next step of the circuit for inversion about the average will need to define a function that creates a multiple controlled the multiple controlled zette Gaede multiple controls that Gaede okay that is that is what I cannot so that is what I cannot do with the with a composer here's the circuit oh come on here's the circuit so uncontrolled and then ok so that's its I'll have to find because it's something I can obviously I cannot obviously implement it but I maybe if I maybe I can do a smaller version of that maybe I can we can try to do something like you know get rid of this get through this get rid of this and and say like what if I do this and then I say we have only - right - and now we have this ok so let's say here we're flying is used here I mean I'm gonna try to make the example myself let's see what happens let's see what happens I'm gonna try to make it myself and so so then I would say the circuit here would be and this is what the amplification things I'm assuming it comes afterwards so I will just apply how to Mart's what's happening here so we're back in square one I mean what we had before and now it's the ring like so I guess I guess what I probably have to report probably have to replicate is is that portion of the circuit and I'm not really sure that's what's really supposed to happen but so I do basically do X and X and it's like a horror Martin to control not hard so Hanna Mart controlled-not how to Mart and then we have got X eggs and then to harm arts xx and to harm arts oh you see zero zero so that's the that's what we've lacked in the very beginning that's what we flagged in here okay that's cool so my example seems to work so that's what we flagged in here 0 0 and and so this has done the amplification and kind of one iterations been in North it since they're probably because the the example is a small one so but I don't understand these so let's let's see what's going on here okay perfect let's let's take a look let's take a look at this a bit more in detail |
of course i'm installing i'm trying to install my plot leap um no no background removal today if anyone knows any alternative to chromacast or anything that works more reliably with obs and i'll be really happy to do that because uh chromacast is just proved to be useless um just fails to start continuously so what are we doing today so what we're doing is we're basically um you know digging a bit deeper into the vq and the view constraint stuff i mean it's just vqe is like the standard vqe right it's just that one of the things that i came across last time um why is it taking so much to the imports do you import this like this i guess so but i came across these i was kind of asking like okay so how do you um how do you do even gradient descent on a quantum circuit how can you do that right like we i was not totally right when i say you didn't know the function you do know the function because you kind of have your circuit right so it's just a multiplication of gates and those have their matrices and so like if you parametrize the matrices then then you kind of have the equation so you have the stuff you want to derivate right like um i wonder can you derivate a matrix matrix it's a derivative differentiate not their fate sorry that's my my english okay differentiate matrix the derivatives of matrices that can be organized into metrics so the same size interesting i didn't know that um the derivative of a matrix by a scalar and the derivative of a scalar biomatrix okay so it's just a derivative of its components okay looks like anyway but it's still like you kind of have um you kind of have a uh you can have a really big matrix right like you have a lot of qubits so it wouldn't be just practical to do that um but then i came across these thing from xanadule where they talk about the um parameter shift rule which basically um or pennylane yeah which basically says that uh oh that's a comment what is this is that a mirror i guess so into the condition constructing of foreign by evaluating the same circuit with different parameters how is this any different than numerical differentiation though i'll mention here what's good example of computers yeah i think i remember reading these here right where we're no that's not that's not no that's not what i want to that's not where i want to go primary shift rules there there you go so this is what i was reading uh this was reading here the other day and i was like okay so basically what they're saying is that you can so the derivative of of your quantum circuit is just like you can do that express this in in in in this way just by like taking two angles like the two different parameters and then just subtracting and then you get the derivative right and what caught my attention is these right since the fact that you so apparently if you make uh it's similar how did the derivative of the function sinus of x is identical to like a half of sinus uh x plus pi divided by 2 minus a half of sinus x minus pi divided by 2. um and i wanted to kind of i kind of had the idea to first of all try to visualize these with same pi and then second of all try to kind of do the same with the quantum circuit basically start with a very simple one and then try to kind of visualize the the expectation value and see see whether that becomes somewhat intuitive or obvious that it that it's got to be this way i mean you can go through the through the full math but basically it seems like that's where you're getting right so okay so there's an example here and but let's see so if i uh well that's still running i don't understand that though maybe should just kernel restart run all how do i plot stuff in my upload leap examples i just want to plot something like like dots or something like plot a matrix plot of matrix map lobby math shell i don't want to no sorry i don't want to plot a matrix i just want to just plot a just plug like i'm liking the language i just want to plot like the because that's going to plot a matrix like it's going to actually plot a grid and i don't want to plot a grid i want to i want to plot a just just dots maybe this is just categorical variables now just a scatter plot okay maybe it's kind of simple it's got a plunger in the legend simple plot stem plot maybe something like these or something like these so what do we do here so you have so you import these and then you kind of have uh oh so you just ah okay so you just have a function give it a value give it a range and then just plot the thing okay cool let's see if we can just do that we'll just do these and then we'll just uh i guess it's just one dot and i just want the uh we'll just get everything why is this still running though and i what i just don't want to have like i don't care about the axis right now and i don't want to save this just want to run that but why why is this taking so long have i installed my bloodlip wrongly or something why is this taking so long successfully uninstalled maple leap 3.1.1 and installed this one 3.3.2 so i already had it installed okay but it doesn't maybe just shoot maybe maybe i should just do this install my plot leap what does this do let's just install it like i guess globally i don't know let's see where is available oh yeah but everything seems to be there it's just why why does this take so long um kernel and trapped so what happens if i just calling this out something's off with my internet connection maybe that's not because i'm just like so what's what's the issue with this maybe with jupiter it took a while though why oh now i have no idea i will have no idea okay cool but now it worked so but if i just do like the uh so what are we trying to do so we're trying to basically take a look at not these but like take a look at where is the the hole where's this guy so this is here basically so we are having these and uh let's plot let's plot these okay so let's say um the derivative of sinus of x just sinus of x so this is just like sinus of t okay so and we'll just do like lean space and we'll just go from zero to like pi in like yeah kind of does this work this way i think so no and like this lead space appealing space end point no start stop and no it's a number of steps okay so i'll just say you know this is like do that in like 100 steps okay so it does like that um or like i don't know three times pi right so we kind of see these so basically what we're we're saying is like if the derivative derivative at this point with this point here right for example it's it's zero right so um what this is what this is telling me is that derivative is like so x plus pi divided by 2 and x minus 5 by 2 okay so so you take pi divided by 2 so that would be like roughly you know one half so um yeah that'll be like i don't know i mean so if i'm at that point that's roughly like five or like four that something and if i'm doing like pi divided by two so that it's like um it's basically what like one and a half so it's like six something right so but like let's say it's kind of kind of here and kind of here so you're kind of getting these two points right and so you're saying the derivative okay so basically these derivatives are opposite always right so if whatever point you're taking at like so in this case this derivative is going to be positive this is going to be negative um now uh sorry um i'm stupid it's not it's it's not like it should be zero so it's this point [Music] okay no okay the idea it's not no i'm i'm phrasing it wrong it's like the points that are like plus pi halves and minus pi halves will actually be or should actually be the same because in this in this particular case right when you're here because you're in the middle of a cycle which is you know a cycle is like uh it's pi right so exactly so if i'm here that's the zero that's the derivative here is zero so if i'm here and it just go like half the cycle back and how forward it's going to be the same um and so that's going to be zero basically if i am like at this point so if i am like say at this point okay so let's let's imagine i'm at this point then half my cycle will be sort of the opposite as the other one so that will actually turn to one so basically what what makes this possible is it's kind of funny really it's it's the it's the fact it's the symmetry right it's the symmetry of the function that makes these possible it feels like it feels like that's it it's the symmetry of the function that makes that possible and so what i would expect to see in in in something like uh when plotting a the expectation value of a simple circuit is that i would sort of expect to see the same uh or similar a similar thing so why don't we just do that why don't we just like um take for example okay what do we do do we pick do we pick key skip we pick skate maybe um because i have everything installed i think so how to import this thing um and so run this again oh no now it's taking a long time again we're playing five buffer messages restoring connection there's something wrong with jupiter i think okay now it seems to have worked um so what i want to do is i want to create a circuit that said let's just say like has a just an ry or an ry rotation like a like a parametrized rotation so it's going to have like a um wait a second actually i think circ has some cert has some nice expectation value thing but i think power string but i think kisked should also have these expectations it's not shell expectation value what is it doing so often operator okay so actually snapshot what is a snapshot all right so probabilities cubicle set the cubits to snapshot the operator um sir can i just go to search documentation expectation value expectation from state vector from density matrix cost function that can be interesting so here this oh that's the actual okay that's actual tutorial i remember doing that where you get that and then creating the answers okay i might as well just copy most of these code print circuit simulation edge function no that's just too much i don't know to be honest i forgot almost how to work with all of them uh at that point i'll just kind of like probably calculate the expectation value uh manually uh so that will be just running you know just running different just running multiple shots and get sort of the average uh but let's just use circus i want to refresh that a little bit let's just do some basic uh some basic circuit like how can i parametrize so no just let's start with gate circuits simulation nice whatever import circ let's create these there's a gate and i want to have a gateway with parameters and i had these i had these in here so let's just start with these a little easier so we start with importing circ or let's do it like import circ and then we are doing basically uh not these but these so we're doing the rational stuff so we're doing uh just one qubit for now so we're just doing one qubit so we're doing one qubit and then we're doing a pending gate so we're just going to append a a y rotation like like a parametrized rotation i feel that has changed a bit actually exponent half turns how do i parametrize stuff so over all repetitions so this is the objective function sorry the expectation value parameterizing the answers that's what i wanted okay ah okay so actually actually with uh with senpai now i remember so what's senpai and then what are we doing so we're doing you create a circuit okay you just do like that so you create a circuit okay but now i don't know how how this is done here so what is this one step what is this defined okay so that's just defined as a rotation x layer so okay i get it so basically so what i will just do is i will i'll just probably get this function kind of uh work it out here i'll just rotation let's say y i just want to try with y uh and so it takes the y pal gate and it just that's these range lines yield rotation um okay that's what what what is okay ah so that's the gate and then that's the gate applied to the qubit and i got to refresh that stuff a lot so if i do these uh circuit a pen i remember i liked a lot the way you build circuits like that and then i say length basically i know it's one but we'll just you know um and then this is basically alpha and if i print the circuit uh simple is not defined import simpli as sp and then we'll just call this sb okay so that's all we got okay cool if i increase these to like three then we're gonna have oh why so many it's a three by three grid okay makes sense so one by one and now what do we do so what do we do um so what do i want to do now i want to vary these and i want to kind of calculate the expectation values and then just plot that right so if i just say that so inputs is like lean space say uh from like you know zero till uh you know two times pi so we'll just we'll just kind of use the full you know range of angles there and then you know do this like in like in 100 steps right so what i want to do is basically i wanna how do they do this now so how to use these how do they how do they run these we're pending the circuit simulation exactly so run partitions hundred what's that measure okay yeah but how do we try different so this is how you calculate one can negative expectation value over all repetitions expectation value no parameters in the enzymes oh man that was that's just what i did okay resolver i want to sweep oh here there you go so so you have a sweep and then print the results of whatever object functions they got you you actually can okay so you can sweep through these say we just want to do actually that is key alpha is what i have there start at like zero stop i like two times pi uh length like a hundred so that is kind of creating this interesting what is this doing though and then get the simulator which i need to still get run a sweep okay so that basically runs a sweep and then we want to print the result let's see what we get so how do i get the simulator set up and running so the first part is i totally forgot it's just like that okay sorry simulator so i'll just you know basically yeah the circuit here we have the simulator see later equals simulator class not simulator simulator so this is not needed so we have this sweep and then we print the results what do we get it's no measure mr sample circuit house how it was this measurement thing nevermind just measure circuits gates gates oh they've updated that a lot okay cool circ measure okay just just like that ap measure uh i guess i want to measure all the qubits so i don't know if they um not the other measurements in here measure oh just like that just like that append all the qubits okay okay so now you have all the measures all the measurements now the expectation value out of these so we'll just kind of have to so basically we'll just kind of have to calculate that so what do they do here so get the result get the he's the energy histogram i don't notice this but like some of all the items okay just calculates an average reshape measurement to an array that matches grid shape convert true true true false to plus one minus one that's the key right because it's the um the z observable here we're calculating the expectation value off or from uh that returns energy because that kind of calculates the energy that's not what i wanted to do um this stuff lists why does it have to be like these i just want to calculate the average of each of this measurements but it's funny because you can see like even just looking at the measurements you can see there's like a pattern in here with like all zeros and there as you move down like you're getting to all ones and you're back to all zeros back to all ones like so there's a bit of these kind of like you know symmetry that we saw with the sinus function a little bit and i think that's kind of what we want to see as well um so what is what is each result what do we get as a result so what's what's this object uh what's result um oh so i can just i can just do like these probably and it's going to be easier how many zeros how many ones that's going to be the easiest way to do that instagram histogram key a key x i guess that's what we want to do valid syntax why this okay so now we have the counters okay cool so so what we want to have is we want to okay so we want to just basically um okay cool so what we're doing is like this is the this is the result okay and so we're now doing is basically the uh expedition value the eval is like r uh zeroed like this is basically um the amount of so what was that like uh so true is plus one and and zero is minus one so times minus one uh right plus r one times one which is redundant and then so we're just summing them up and then divide divided by like a hundred right and if i print eval hey that's the wrong way to so i'll just call it x expect what you see come on just the oh that's for error as well expectation value oh no that's the eh that's the average what am i doing um that's am i that stupid the expectation value is the sum yeah it's the sum uh by divided by repetitions so i mean if i just like print these what do i get okay i'm just just like it's the wrong oh there you go there you go there you go okay so here we have the expectation values cool and now if we just plot them all so what i'm going to say is i want to have so how does the what is this sweet by the way okay so it's printing alpha alpha alpha blah blah blah okay courses so just basically like that and i just if i just want the um i'd like those exact values but i'm not so sure that's the i don't really know how that's implemented structurally so i'll just like say uh basically the inputs i'll end up using island up just using uh np linspace from zero to what do i say two times np pot and then a hundred and so if i just now basically build a um so which is now basically uh you know data is just like a mp array like an empty array and then i just uh do like theta uh append can i do something like that can i just i need an index or some of some sort for result result in results is i need um i need the input and uh what else that's it no so i just i don't know i don't wanna i'm just going to do the dummy way so basically append so i input inputs i and in the actual expectation value and at the end of that can i do that pan push now push and so theta equals np append and i think that's the way you do it data and then an mp array with these this way do it is it don't know yeah exactly so if i turn that into an array sorry then i'll get like a matrix kind of right because if i just say print data 0 then i'll just get or can i just not print this anymore i know i'm not a pen i just wanna i don't wanna append i just want to add np push array element concatenate insert append dependent element but i want to seems a pen is the right way to go but that's uh so if i do reshape shape like in a 2x2 oh it's just a long array you just want to have like a data can it just like it cannot be that complicated uh okay well give me a second how is this how is this working so f lean space and then you're plotting the function but i don't want to plot a function what i want to plot in here is actually uh that plot leap uh a scatter plot i think it's called right x y okay so in in separate arrays okay that that makes that sense then i can just okay i can i can just use these and then it's easy because then i don't need to combine them that's the point so what the only thing that i need that that i need to do is i need to actually um oh basically e values and then i just kind of say well e values append i'll just append these expectation value and then and then print e values and there you go append it's np okay so that should work uh no np array why is it empty well well well well then i probably was just right at the very beginning okay go so we have these values and we have the length of these is and the the length of inputs it's both 100 that makes sense and now i just do it's kind of blood where is this kind of plot it's kind of blood it's kind of blood so just cutter i guess because so if i just uh if i just do scatter so if i just take the subplots let's kind of plot example so plt scatter and then just show okay that's the way you do this so you do just you do plt scatter and then you say inputs and e values and then you say pv show yeah there you go there you go nice so it actually looks like a sign like yeah it really looks like now question is how can i make a um okay let's let's change that let's change these by an x gate for example sorry just call it rotation layer and then we're going to change this like that and what about like an x one it's the same what about like z one well that just like that okay so that makes no sense but if i um yeah because this is a gate interesting interesting i mean it's like if they have the shape then it kind of yeah makes sense right now the question is how what happens if you you know as you increase the angles right um it's interesting so what if we not increasing what if we increase the qubits so let's try to do two qubits so if i do these it's going to create a four qubit kind of thing and that's not what i want uh what i want to do what i want to do is i want to just have two cubiets so i'm just gonna measure that's bad uh so i'm gonna call length two and then i'm just gonna just gonna have one dimension and so this is gonna be always uh zero and it's going to be always i so okay what else am i using lens though not square but like a line you can keep it as natural line um hit line keep it is this is there is there is there this concept just oh actually it can still be i don't know it can still be um grid cubit that's just one i just want these to be about i just want this to be you know in a um precupid and call okay just like that so what if i just so whatever what about what if i just hardcode that like i was just like qubits is like uh oh it's a great cubit off okay so i can just say crit qubit of like one by two okay how do i do that bill so square okay just a rectangular rows and calls i can just do it like that okay right rows and down okay cool so i'll just call it like a rectangular rows one row two columns there we go cool so we have two things that we're measuring and now i want to kind of have like another symbol and i want to have this called better better and what i'm gonna what i want to do now is i am doing the measurements uh i also want to sweep independently better uh so it's gonna be sweet how how do i do this so how do i sweep can i sweep two variables first let's simplify that okay let's just make make sure that we use just one sweep and then sweep so maybe there's just an example somewhere here kind of how can i sweep across multiple keys sweep oh it's a perm resolver okay so there's the maybe maybe maybe there's just you know maybe there's just a way i can do that key just one key linear space sweep for a given key i want to have multiple keys can i at least sweep how do i how do i sweep over multiple parameters so how how does this make sense maybe i'm maybe i should just okay maybe what if i just use the same symbol for both let's do it this way so okay that's cool um alpha blah blah blah but then like the rotation layer it's all alphas actually it's already like that alpha alpha okay that makes sense um alpha okay so that's fine so so just one sweep for one per hour we're going to keep it the same parameters just i want to get it like 3d and then we'll see if we can kind of like there the parameters as well um you know if we kind of get a similar idea what am i doing now so i have these i have these i'm sweeping and i'm running all this kind of stuff and and i don't wanna i don't wanna show this friend for a second for a second i'm reading these and what am i what am i what i'm now like when i'm now actually if i print r the problem is now i get like zero one and yeah i can get like you know any of the four combinations and so what are the expectation values of those right that's the key but it's a similar pattern you see like it goes from like a hundred like a hundred like you can see these patterns right here that it kind of also has this this sort of symmetry um okay we'll get to these i'm i'm i'm i think that's roughly right what i want to do next with next session is maybe explore that more in a 3d uh kind of style i just wanted to keep this video under the hour um i want to see what uh how can i sweep like you know a multiple uh multiple keys at the same time and then kind of like do a 3d scanner plot of stuff like this but i need to figure out how do i calculate the expectation value of those things here of multi-qubits like is it just like the multiplication um of each separate i don't know i guess so like you know one one would be like a plus one plus one right so what uh i think so and then um and what i want to do afterwards is i want to do what uh i got as a suggestion so uh from bruno right was like hey um he thinks qa is very nice uh so i i will probably do so i will probably do that so i'll try to do the 3d thing and i'll try to get like a qa and a key in a exam q a or a example maybe with two cubes as well and see how this looks like what is anyhow different but but we're getting this symmetry so that kind of basically tells me that that re that's that's just the reason why the the parameter shift rule works and while we can actually do these um in vqe so uh yeah but you can you can see here the pattern already with the counter as you can see that it's it's funny because it's not only that you actually see a pattern in terms of the types of answers you're getting like here it's like more spread out in the middle right zero two one and three this is not just in the it's really across the the whole system that you're getting yeah this this symmetry the symmetry symmetric pattern in here that basically is gonna yeah that's that's what tells you that that's interesting i don't mathematically whether there's any curiosity behind this but i can i'll probably do some reading uh around this cool i thought it was not i i hope it was nice um i i like the this kind of exploration uh videos as well from time to time and i'm refreshing some uh some of the you know my circ skills which are almost non-existent goodbye |
uses in chat it's not even my not even me what's up with these i thought the broadcaster is always appearing there let's see is there real life is that really live empty stream titles are not allowed it's not empty no it seems i'm live okay i'm idol i guess we'll figure it out soon so let's see i can go here my channel yeah it says i'm live awesome still trying to find a way to what was that i think there was i found yesterday an easy way to share um stream manager and then i go to settings no go to edit exactly share a link to channel and now i can just share it on twitter like these yeah cool that's perfect awesome so we're gonna do roughly 40 minutes or something like that that's the time that i have today for these not much but we'll get there um we'll get there with the rule stuff right so that's what we're going to implement doesn't need to be that big now am i is this this is well set up i forgot i guess so that's that's the correct python interpreter that's in the notebook as well and if i just rerun these doesn't work okay because i need to change but now that doesn't appear here select interpreter python how's that python so new terminology oh god i'm so conscious shift p python select interpreter there you go but then why does not appear here dude that was working that was actually working oh there oh oh it was there for a second but but it's gone now why it was there for a second but it's gone i don't get it man i really don't get it [Music] um oh because it's not started so yeah okay i gotta activate it first probably that's that's what what have i done it activated it okay it activated it now i close these and i open it and it's it should be there because the the environment needs to be active probably for um this to be picked up no it's not why oh god restart kernel come on again i didn't want to use i yeah anyway probably i might just not not want to test i i gotta figure this out like it last last time i got it to work but now for some reason current okay but the current one is select the kernel so the current one why does this one show up here it's not fair because it's definitely not gonna work because it's not the one that is here selected and i can't just change that for some reason select a kernel so [Music] python that's not what i wanted so ctrl shift p come on stupid stuff and stupid stuff so like select interpreter enter the path i mean it's this one here right so let me just enter the path just let me just browse to it right so i'll go to the workspace and the prototype and i'll say look that's that's it right scripts python that's it right that's the one that i have but it does not allow me to select it here as a kernel for some reason it's it's pretty annoying to be honest this is not started so it it picks it up correctly but then it's just connects to yeah that obviously doesn't work it anyway we'll we'll probably have to do without testing today or we'll just test with an actual notebook started from these environment um yeah we'll do that so we were we were thinking about the implementation of rules and stuff like this right so we're thinking about um how are we going to implement like a flexible enough system of rules where we can do things like this and we're saying okay cool so we're in half gates that so we're gonna have rules the rules is really always just gonna be something like these right so a you've got an input and then you've got an output so the input of the rule or or it should be rather match not input so it should have match and then match can be you know this can be a no this can be it's not a no i mean this should be this should be more than just a note it should be like um it should be like a uh hi by the way i see some people are joining uh cool i don't know i'm not super used to the obs stuff so i don't really see much when someone's joining but hi um so okay so where i was going so it's it's the thing is i'm having a bit of a hard time trying to figure out how i can what's the most flexible way to implement the match right so are we going to go node by node right like so we're going to match nodes because we need to map it to cubits right because we're going to have a system that has multiple queries and we always say we have a gate and then you know this gate is a one qubit gate for example um and you always map it to a qubit somehow so sedan mapping kind of i don't know where this happens right because we're going to have a rewrite function that takes a set of rules and just applies the rules but then we'll have to pass the mapping i guess and that's what to be from from an interface perspective from like the programmer's perspective that's going to be a bit complicated um i think to to handle work i don't know instead of in a user-friendly way right because i can i can like this means i need to expose something like yeah unless i need to expose at least what qubits how many qubits these rules are referring to for this to make sense unless i'm i'm kind of forcing the user to know about the the internals of the rules but i guess so why not right so a a rule is going to have the rule is going to have uh a certain amount of cubies that it operates on right um i'm feeling a bit not comfortable with the fact that then we have the control um controlled operations which which kind of i want to have them flexible enough so that you don't have to specify you know how many like you don't have to re-implement the rules for like an arbitrary number of controls but to be honest it doesn't it doesn't really doesn't really matter it shouldn't really matter like i i you know i i want to apply a rule so i have a match i have i have a match that's that's the pattern that's the pattern that i would imagine the hypograph and so forget this for now and that's the um is it is it replace i guess that's the right language right it's not output but it's replaced so that's what i want to replace the pattern four right so let's say match a note with a zero or match like you know match your specific hyper edge um the easiest is just kind of will be to match nodes that's for single cubic gates how how would we specify two cubic gates and you would have to it's always nodes to be honest it's always nodes i think the match is always notes it's just that you're gonna have to evaluate these per hyper edge if there are there are multiple hyper edges the same that we do do it currently where we just run the gate multiplication per hyper edge and then we take a look at the system level so it is something that is not in hyper edge true so this is always going to be nodes um nodes yeah cubits right i mean nodes cubits it says like you know you want to match things like you know zero zero right you wanna match things like zero one or you're gonna say i wanna match things like you know actually what are the types of things that you wanna match like for example does it make sense to say i want to be able to match you know whatever one that's the same like just specifying that you want to match these right but you want to be able to say i want to match yeah i think we're not i think i'm not gonna allow these or the any kind of thing because it's just it adds too much complexity into how this is implemented like i think the match has to always be implemented like strictly you know like you you've got to specify what you want to match like you want to match this you want to match these you're going to match these you're going to match these it's always in the same basis right that's for sure so it's always a z basis match and um yeah and you do have to have a will do have to have a matching but it can be implicit right so it can be it can be implicit in the sense that the match can be um it's at least right it can be something like these um and it's and then we'll just have to do a the rewrite rules so so the input map is going to always be it's gonna it's gonna have to be here where i guess an input map would be something like um literally right so i can actually say it can it can actually be something like these right so we're mapping you know hell it could it could even just be like that but that's probably a bit illegal but we could do it like these and then um you know we deal with the fact that maybe the map is just not complete and so then we spit out an error for a rule so the rule cannot be executed um so the rules are always defined like these um now how do we define a yeah but then yeah but and then it's kind of like we can define arbitrarily like we we can definitely oh wait a second yeah of course and how would we implement like a say so what will be will be the will be the match for like a ccx rules it will be basically you know you would just actually do one one zero so that that you know this would be one match and then um and then you have another rule with with these match so you'd have two rules so the ccx would be two rules with two different matching patterns right so you would match these and then um you know these would basically be turned into um like these and these will be maybe that's a shorter way to define maybe that's a shorter way to define the rules and to be honest no because okay yeah or maybe the thing is this will have these these two here will have to actually be um a an array of complex numbers because it's it's a single cubic state that you're matching right and and it's going to be complicated it's going to be tricky to think about like do we need a match after a global phase or not right that's going to be another question that we'll have to ask ourselves i guess when we when we work on these um so and how do we how do we represent the replace yeah well yeah just like these it's just we'll need the fraction it's a state yeah that's that's that doesn't work because it's really just for the one cubic case you know if we specify these then we have to i'm curious if you will i'm curious let's let's let's work through an example right because i'm curious if it's correct to do it like this let's say the the control x right would be basically you would have two rules so one rule that does like turn the one turn the one zero into into a one one oh god and another rule would be the one one turned into the one zero so this will be the the the two rules right and so now let's work out how these so if you're if our hypograph is in the plus plot state right before before we apply these rules we need to do a z-axis expansion so so these will basically um create four hyperedges which will just be the zero zero the zero one the one zero and the one one and so what what and then we apply the rules and so when we apply the rules these rules will just basically catch these one one oh no sorry was the one so we're doing is the one the one minus is the example that i want to have and i want to have it for the um and when i have it for uh because of the the face kickback that's what i wanted to check but this would would catch the effect well because it's essentially zero plus one and then zero minus one so this is your zero and then um zero minus one one zero one minus one is that correct is that correct correct correct correct if i open if i open quirk will be quicker to test that so we'll just open these and check so if we have the plus and the minus right we have oh this is another okay yeah because that in this case the the the left mouse is the bottom qubit we should stick to this convention so it's going to be easier to test stuff so this is this is basically like that exactly so if we now and that's probably going to be the way we're going to execute things is that that's that now now it's a question right like um you know in reality this will be here in reality this will be here but i'm not sure if that's the yeah that's that's that's probably the right thing to do um but like i'm not so sure if this is gonna if this is really going to show it's going to illustrate what i you know the face kickback but probably yes i mean it's going to be like these so it's like i don't really care because the sign is outside and so then you know then basically basically this is replaced by according to this rule by 1 0 and now um hmm am i doing this correct am i am i not mixing up stuff right now so and now and if now we would want to [Music] this that is oh no sorry in the one zero it's one one yeah there you go that's what i was missing so we'll actually catch two of these elements and change things like these and if now we will want to do the factoring then we will actually end up with the minus plus state yeah because this these two will merge yeah so that should pretty much work i mean that's it's correct to the i think it's it's still correct to define the control x like these it will even work in these cases which is exactly which is really what i what i want to happen right um okay so we'll have rules that um so we'll have match and replace rules like these it's to be honest it's just really going to be but it has to be like that i have to give it a fraction because i'm going to need that to implement things like the hardware right the rule for the harmonic would be for like the one cubit had a mark right it would be would be like these and so we would say first first match what am i doing first the first rule will be match you know match zero replays and that that actually has to be that has to be at least a state which is then you know what i want to replace this with which is you know a zero and then what's the fraction right and that will be you know um 0.7 plus 0.7 i right and so that is the way and so this is basically the hallmark gate so this is this is the hallmark game it's these um no not an array it's just object it's just a rule so that's the rule the rule it's it's got a match and it's got to replay and it's going to replace and the replace is basically a list of things that we want to replace is for a list of edges now is that a list of edges um how am i going to know is it that if it's just one because you know i'm if i design it like these i'm implicitly telling the system that these are edges because i'm giving it a fraction i guess so i guess if there's fractions because if i'm if i wanna just just the x gate right yeah i just give it a fraction of one that's fine it can all be edge hyper edges actually it it it's better this way it always it's always going to be hyper edges but no it's not because let's say if i have already hyper edges and i want to just transform the nodes i don't want to create hyperedges i just want to replace nodes and so hmm but that's also not correct it's it's not it's not branches like i that's not the harmonar gate that's definitely not the hallmark gate the harmargate is not that's not what it's saying not at all it's replaced with a plastic right and replaced with the uh yeah it's replaced with the style yeah i'm stupid i'm stupid it's two rules the harmon gate is two rules one for the zero one for the one so major one and turn it into a minus right that's the that is the harder part there you go so i'm not like the replace doesn't have a fraction or it's got a fraction of maybe that's the rule if i give it a if i give it a fraction or just just give that yeah yeah just call it like hyper edge or something um if i give it a fraction then it is going to create a hyper edge right so and and that fractions could actually be a complex number it's going to your complex number and and then then this is going to create an edge basically um i think so i think that could work i think to be honest that that could work so um when would i have to do that though what operation would do that i just kind of realized that for a control x what did i say so for control x you would match only one zero and basically basically basically replace that we don't need i think we don't need to specify that we don't need to specify hyperedges yeah we don't it's way simpler than that because if the precondition is that we are going to do an expansion of um of the system on the z basis first which is totally inefficient but like it's not the purpose you know we're not trying to build an efficient simulator we're trying to build a simulator that is verbose and not so that it's easy to understand what the algorithm is doing so so if if the precondition is we have an expansion then we already have all the high priorities that we need we don't have to create more so that's actually way simpler it's just it's just a replace the thing is do i want to replace do i want to replace something for multiple you know because i'm just going to say so you know that that's just replace replaced by these right and that's yeah pretty simple actually you know then i have two rules so then i just have a rule that does these and replaces these for that and so if i want to implement a you know c c c c c l control control like a toefl gate then i just i just it's still two rules the rule size of the match part increases right if i want to keep it generic but because i'm expanding everything before then i really don't care you know we we won't go beyond probably five cubits or something like this so but because then the system is just going to explode right we're gonna have suddenly like 32 different hyperedges but then we can think about smarter ways to expand the system maybe because if we know that the match of a rule is rather simple so this is just one match it's always just one match and then we can think of if we didn't want to go the efficiency route we can just if we have a system that's in the plastic state we can think about a way of carving sort of these branches out somehow but that's that's for another day that's definitely not for now um then why don't we just go for these um so so it seems like it's just that simple an operation is a set of rules a set of match and replace rules like i'm i'm going to assume you know it's it's the it's the it's the designers of the program's responsibility to make sure that those operations are actually unitary and all that kind of stuff so i'm not really going to care about these so you'll be able to essentially do non-quantum stuff here probably but that's not an issue i guess i'll i'll shape that with a pre-defined set of rules so you don't have to reinvent the wheel but then you can just run your own so i think that should that should definitely work now how would i implement that right so because this is the metric stuff so i just the only thing that i need to do is i need to actually implement something that you know takes in a bunch of rules and checks for a match and then replaces that now checking for a match will happen across the hyper edges you know with a map that we have here so this is what we have to build the rewrite thing so we kind of have to do a that's a big thing that's a big beast you can keep it here and just say you know call rewrite and then we have an input map right um which can be you know of any size whatever right so we've got we've got the rules and we've got the input map um cool so what we'll probably do is yeah we just go rule by rule right so we say for rule in in rules we just um now we have the rules and now the first thing we have to do is um find matches right and then there can be more than one match so um what i probably want to do first is check the hyper edges um right so i will just say for um for e in like self edges and and now it's like um it's a match right so so i just basically say if self is match and then we have a so we have a match right which is basically the rule rule match and the and the hyperedge then self replace edge right or replace match and you're you're giving this match basically an edge and you're replacing it with a replace right that's all what you do yeah now i'm starting to think but i'm a bit afraid of touching this because i wouldn't like to touch this whole concept of like the hyper edge like nodes that are not in the hyper edge just have the average thing not so it's kind of like um because i find matches in edges right five magazine system will be sort of the next thing to do which is basically didn't i have didn't have something like um now i can probably just use these um get notes get note get now like these get qubit node id and edge keep it not at the edge um definitely not rewrite the saw re-ride i'm missing the the input map here though i think that actually it's probably given to the east match and it's probably given to the replacement as well um and so i want to have yeah what i actually have to do is kind of repeat that but instead of e you just just give it none because this is the these are the knot like the nose are not in an edge and i think that's it so that's what the rewrite is doing i need to implement the match and the replace match but um it goes through the rules and then it first goes through all the edges and is say is is this edge a match you know if so then replace and it's like is you know and then it's like is this rule a match for the for the qubits for the notes in the yeah yeah and and so they are not in hyperedge so now i i need to implement ease match and replace match so his match and actually that actually has itself in here so his match and his match has got a the match basically it's got the i'm not running match correctly i hope so it's got the mh and it's got the map yeah baby and the replace match so the replace match is good the replacement has got the edge the replace and the map cool so the eastmatch should be easy to implement right because what i have to do is i do so use match false we'll assume it's false and then we basically return this match right and so we do is we kind of say good so we have an edge um and we want to know uh notes self get no get so four match keep it note in edge what i want to know is probably for the for the element in the match right so for for i or four so how do i get the m in a match right so i get um and now i have the match i have to i and now i know first what qubit i need to do so the qubit is basically map i which you know check for error so that that's definitely to do and then uh because you know if it's not there then we should throw an exception and and if it's there what we should do now is basically get the qubit node and check for the state i have the qubit now i i need to basically get the node which is basically self get cubic node in edge right and so this is basically get the qubit node in the edge and that works also for edges which are what they're not and it's keep it an edge uid okay so all right so it's it's cupid and and edge right um is is hd h id edu id so and now i say you know if um oh we assume it's true so if uh to be honest it's not like returned true so if we go through these so if not if self is equal right um state equal so the states are equal between the the node state and uh and basically m right m is actually a state it's a state as a match state so there if not equal return false basically right because what i'm saying is you know for example for example like like you know like a match would be the match will be like a 1 1 0 right um edge you know will just be like an edge which has like uad or whatever and then the map will be something like q0 q1 q2 um and so sort of like qubit ids and so basically what this is doing is it's telling me get the get the state of qubit zero in this edge and then check if it's a one and if it's not a one it's obviously false if we go through all these and it's a nice and it's true so that should be correct of course there can be an error here if the map is not matching there's nothing it's not complete cool now the replacement is a bit more i'm surprised quite how easy that is actually uh you know in terms of the actual implementation i guess what's a bit more complicated is the um it's going to be to make sure that we have the expansion which i think i've i've i think i implemented it expand didn't expand qubits look at these so what is this doing oh it's cheating it's applying a an identity okay i'll implement a better version of these next time but um so what the replay should do is to be honest uh it should just replace that's actually extremely easy like like it should actually it's the same thing right but i'm not comparing anything what i'm just saying is i'm hit the cubit node cubit node id in edge that's not what i want oh yeah self nodes so that is the and actually because this method returns the id because what i want to do is i want to make sure that that i really that's good it's good design i think it's a good design for my from from from my side because now i can actually just say look get these stuff and change the state and the state is just m like this just it's not this is replaced so you know so you're replacing each of these that's it like how do i test that i left i'd like to test that give me a second so but that is not working like i don't know how to get like i have the right i have the right environment here i have the right environment activated but when i open it notebook like it's it's picking the wrong thing it seems to pick the right one here but it says not started and then it switches back to oh wait maybe now it's gonna work no it's just connecting it connects to the other ship man maybe do we just need to start that trippy distributor jupiter version jupiter blah blah blah blah jupiter notebook i need to start the kernel and then it's going to pick it up like that's going to open like that should open my browser what jupiter why should be the notebook why it's not i did install jupiter didn't i how do i install jupiter oh god no jupiter lap peep install notebook i thought i did install that it seems like i didn't oh maybe that's why it's failing but then why did it work last time no idea it's actually does it really say terminator in spanish dude call let's see if that works and if this would work how would i test that so what i would do is i would open the notebook and i would just say um let's do something simple right let's start with an x and so that just does these and it turns a 1 into a 0 and it turns a 0 into a one right so that's the simplest rule ever that's x that's the rules for x rules for life dude i didn't have jupiter installed in this environment that's why it probably didn't work does this really take so long come on so i would just say you know i would kind of like i would start a system saying system equals type graph just you know just one node and then say system rewrite and how did that look like so i close this notebook and and then this would be like rules in the input map and so the rules would just be this right so the rules would just be x and the amount would just be what q0 this is still writing come on yeah to be honest i'm running out of time so i think i might just have to oh come on come on come on you're done yeah perfect no what why i don't want to do this twice what's going on here what's going on so so this this now works doesn't it this should fire up my browser why it's not doing anything okay but it's not complaining so that's good so but this is what i should test what the okay so it actually does work perfect if i now open this notebook this should just work and so if i literally copy that but it's not not not a one so what i should be doing here is uh that's what it should be that's the that's what it should be doing so this is the state one and what did it do and this is the state zero so that's that's what it should be matching for it's just an array of two complex elements and so if i just look at this this is work it seems like it's working it's not working um why it's not working okay whatever i'll just play with it in so if i just do if i just click here that should actually open it notebooks testing vs code come on running out of time baby so we'll not import gates we'll just import these stuff here oh but that's gonna break i think if i don't import the brakes the gates no i don't have to import the gates that should just work it's fine yeah that's worked okay cool and now i just do these and what is that i don't know so this is x and then what i just do is system draw and hopefully this won't break and it will just show me a yeah well import numpy what about what about that what about that baby three were given so what did i do wrong here vs code is match self and self there we go and so i just now have to restart the kernel and do this whole thing again let's see what happens uiki so why isn't these working well so this is the edge replace match i'm replacing oh it's none yeah okay cool so it's none and then it's like eve um yeah yeah yeah so this is basically that's a bit stupid so because edge can be so eoid is not and then it's like if edge is not non uid is like these so that's what i should do because it can be non which means that it's not it's no hyper edge and the same goes here so that actually it's you know but this can happen outside of a loop this can happen outside of the loop doesn't have to happen every time ride the same here doesn't have to happen every time is that correct yeah i don't use that anymore anywhere else not none it's not none which is restarting clear output and we'll try once more hopefully that works there you go yeah that worked at least it printed stuff but i don't think it replaced the thing so didn't break that's good did a break but i to be honest i didn't didn't actually do what i wanted to do so it didn't match it should have matched these and replaced it with these but it didn't so rewrite if it's a match replace the match then i give you the rule e and that works that should be the one that's being executed and so self know itself you can each getting the qubit in the uuid which is none and changing the state by m so it's running with the replacement it seems like what that is not then a match if it's not being replaced so this means that is match so this is none and i'm going through these i'm just saying that if it's if node.stayed and m are not equal return false so um i guess that's what's happening right i'll probably be back this later because just literally run out of time so this is probably it's not a match it doesn't find this to be a match and so but okay there's a break so we're almost there um that that would be surprisingly easy to be honest this means i only have to have a clean way to expand the system it's not printing but maybe because it's just yeah i really do have to go sorry so this i'm not sure if it's actually picking it up picking up the change actually but that'll be don't mean that the replace is not working so it's not it's not printing then it's a replacement not working so for each replays you get the what am i doing so i'm doing oh uh i have the map so i'm getting the cubit in the map i'm getting the cube in this edge and replacing the qubit by the cubit state by m print m just one last test okay one last test kernel restart restart let's see look at these it doesn't have a replacement it actually works and then it just the other rule replaces it back what i should do what i should do is that it yeah i get it so if uh replace match so uh a rule is matched in once a replacement is done so the rewrite it says is the match it's not that easy because i do want to have multiple replacements got to think a little bit more about this but time's gone so thanks a lot for everyone who's watching um stay tuned for more good to go now uh but it works i'm happy bye |
Hi Daniel, <br>when is the next live session?, @Uncertain Systems check your mailbox! Thank you :), Shoot me an email at daniel@<a href="http://uncertain.systems/">uncertain.systems</a> and I send u an invite to a private discord server that im hosting which I think you'll find useful in ur journey! ;), @Uncertain Systems super. I'm glad I found you and your streams. It's nice to know that I'm not the only one trying to understand quantum computing :)<br><br>P.S. Frohe Ostern und viele Grüße aus München!, Hi Viktoria, prob Monday or Tuesday. My goal is to stream 3 to 5 times a week but my schedule is a bit unstable these days due to covid lockdowns in Germany and other family responsibilities. It'll get eventually better though and can hopefully set up something of a stable schedule :) |
so this is my third video on Grover's algorithm and I think that I figured out a intuitive breakdown of the algorithm so the the this this part here's what what was keeping me frustrated or sort of because because the explanation right is like yeah you know I understand the first part where we just created an equal superposition and we flag one or two or like the items that need to be found that's sort of the Oracle but then that the way this is built here is just dropped in like yeah you know that's the that's the way you build the you know the the amplitude amplification part and and and so the two the two explanations given here are understandable at the mathematical level but it's it still feels like too much of a stretch for someone to understand and the intuition level what's happening here and then to add to the confusion the the the more you visit other pages and other articles talking about Gerber's algorithm it's like everyone does it their own way so I kind of like the underlying the underlying mathematical analogies were the same but they'd like they and you know they just people just implement it in different ways if they use like an ancillary qubit for example they do have a state preparation and then the Oracle is so so I said that to understand maybe um because I realized when I was playing with that that if you take a look at this really what this really does is it it takes an equal superposition and it likes the state 1 1 1 in this case right so if you extend that to multiple qubits it's it's the same concept or two more cube it's the same concept so it Flags the state that has like an end it's like this data has all once it leaves the rest and I thought maybe it will be easier for me to understand if I use that as a building block right and so because once I'm here I can basically now FLAC whatever else I I can move that - whatever else I want right I mean it's just a simple ass and I'm adding this identities here just just to keep the symmetry of the of the gates keep the not the century sorry but the sort of a clean visualization because now I can basically add like an X whatever I won right and and so and now I'm gonna flag the 1:01 or I'm gonna fly the zero one one or you can kind of like the zero one zero or so you see what I'm doing right so basically just um this this part of of the circuit is basically flying you the one one one and then you apply as many like whatever combination of XK to one to flank to fight the things and then that that was that was actually pretty eye-opening because then I realized that it's something kind of clicked in my mind so then I said um everything good so so this is this is where I am right now and I just try to play and make an example with and I really wanted to make an example with three cubits because the example was two cubits um literally leads to a one like an outcome of the grove of Grover's algorithm that's like a hundred percent so it was a bit it's a hundred percent the item you're looking for so it was it felt harder to understand what was going on so I thought good so that's a starting point so we have this here right and and so at the end of the day what I realized that that that this explanation does here is it says well basically that's pretty similar to that writes is pretty similar to because you know you have the only thing that I'm missing here are this X's cuz I when I was when I was building that I realized you know this don't really make any any change in here so so what what's what's really happening like why why it's it looks pretty similar right so I I started the case so this is my starting point always try to reproduce let's hard to reproduce step by step what yeah what the next would the next part of the algorithm is because really that is truly I think the first time that I it's like an actual algorithm because everything else it's textbook based and the dodge user algorithm etc they are more just you know particular ways of encoding a function and that's it and and here you really have some algorithmic thought as in like first step is you flag whatever whatever you want you can do this with another construct if you want you then have to use though this one but it just helps me it just really helped me sort of understand what was going on at its intuitive level because now um and I took some notes I'll I'll see if I can show them later so basically let me go back so basically what's going on here is so now the next step is you are the outer parts and this is where it I it clicked me because I realized that as Johanna Mars and you end up with this which I was like it kind of makes sense right because if you apply a horror more and then you apply another harm art then you're gonna go back to your to your initial State that's that's by definition all the gates and and the quantum circles are they must be undoable so why why so in here really we have this pattern right so you have you have to Mars here then something's going in the middle and then you have another like hello Marcy so why aren't in you know those are if you think of those as in harem arts that are undoing and doing those here and why is it not that they come back to zero completely well because in the middle we've add some negativity so we've had some we flip some other faces so this means that when we are applying the hormones again it's not going to go back to zero but it's almost going to come back to zero because we flagged one item so I'm guessing and this is really an intuition thought I'm suddenly at the intuition level if we would be flagging more items right then the then then the the the these probabilities will be will be would be higher so these guys here these probabilities here with just which is be a higher that is why um when you want to generalize Grover's algorithm to find more than one flanked element you have to do a bit more iterations to kind of lower those down but let's this is not the scope of this video so so this is good so this is the first step understood and and this is kind of what I what I brought in here so an equal position with all positive amplitudes goes always back to zero right and an equal superposition with one amplitude negative will never go back to the original stage but almost so now in our in and and and so that if this is this is now brover streak without the math so I'm gonna try to explain that without the months because that's exactly what I wanted I wanted to build an explanation of the algorithm that didn't require you to understand any of the months behind it or have any weird abstract um geometrical explanation so what's happened what now the idea here is how can we go back so pay attention that we have here we have some now we have some negative states because one of the one of the important things from from one of the important concepts of quantum mechanics is that as we manipulate the the qubits the the information we the states were going through they are not just they are remembered all right so the the the certain information is preserved so these this particular configuration here is what will allow us to say if now I would if now I would apply the harm art again right it would just go back to whatever I had before so that stayed flagged good so so this makes sense right so that's that's in and so this when when we are playing harm arts you know the negative amplitude that we had before it just doesn't disappear it gets spread across the uncertainty exactly that's maybe a better way to put it so and I'm taking I'm taking slow I'll make a two-minute video to summarize that but the idea is you know you have that here so you cannot lose this right I'm so while while you're at now the harem arts then basically this is split and spread so you have that good so now when you're going to when you want to do is your goal is to kind of um you want to create um so you want to end up with these these probability being in in the zero one zero because it's the state that we origin deflect right but in order to do so you must create some kind of an must unbalance you must introduce more negativity or switch puzzle let me put it you have to switch positive and positive amplitudes for negative amplitudes because um you wanna otherwise whenever you will be coming back and undoing your steps you will always end up with the same state that you had here where you had an equal superposition so and and here's where you gotta stretch your mind a bit because you know that's like how you come up with that it's a bit you know I don't know right but that's the explanation in the inside so to say without me having come up with the algorithm but so if you now basically we have so we have a construct here that Flags us one one one right so if you apply this right we're flying one one one so literally would like if you think about it this is actually doing what we want it's switching one portion of positive amplitude to a negative amplitude because before because before the applying before applying these right we just have like an equal superposition so how can we how can we use this to our advantage and this is where the trick comes in so basically if I move this one here if I manage to move this amplitude to be here right so I apply xxx I want to move to zero zero zero two the one one one right so I apply xxx so now now this is what this is so now everything else is the same because what you know the exes are doing is they're just flipping the beats in because we have a separate position aware you know all the all the answers are still possible I'm at the end of the day that doesn't that doesn't change it doesn't change anything so we've done this here and now and now we can apply now we can flag that we know how to flag that right so we say we apply a harem art here we apply it awfully gate here and we apply another harem art here and voila so look pay attention that the the rest of the information stay the same we just did this which is flipped so we just flip the face we flip the amplitude of the state 1 1 1 so we have basically exchange positive amplitude by 4 negative amplitude so and now it's about and and now we we are ready to undo so the hope and the hope of the trick is that as we undo we're gonna go back so we're gonna kind of back to that state where we were here but so now let me undo so now I'm undoing I'm going back to and I'm gonna add again identities here just to keep the circuit a bit more readable because I like to understand kind of each column as a you know one operation at the same time through different qubits alright so and then now when we have this here exactly so now we've undone this and then we we kind of put back that amplitude to 0 0 or we had it but it's now negative because we flipped it and so the next step the next undoing step would be to apply the horror Mars which originally it would have again balanced out everything and progress up to the equal superposition but because we have basically now added negative amplitude this is not it's it's not going to happen so never nevertheless this is going to go it's it's still going to undo in the sense that it's going to go to the state where where the 1 or the 0 1 0 was flagged exactly and Pam and so you have now but pay attention that it's now everything negative right so the the thing here is because we've added this extra we flip this um when we when we undo the steps we we basically come back to where we where but in in if if we hadn't if we didn't do this part in the middle sorry if like the wrong things if we didn't do these which is the flagging the one right so if we didn't do this basically the so let's see if I can use another color maybe the blue will actually be good one so all these all these bars would be filled up blue so to say right but with we've flipped that into into into the into - so it they they all went and they all stayed with within this one because because in the in the original configuration we had that flagged as - I might not be you know this might not be represent accurate and I might be missing probably some of the nuances but it it it seems to be an intuitive another explanation of what's going on |
If you need to know what it’s going to output in order to program the oracle function, what’s the point?, Textbooks give you just an example to make the learning of the general concept easier. The key in grover's algorithm is that the oracle is going to be different for each problem you are attempting to solve. It's not that you need to knw the answer but at least you need to know a bit about the structure of good answers to your problem so you can "flag" them so to say.<br><br>This video was done at the very beginning of my learning journey with the alg. I recommend you watch the rest of my grover related vids (30+) to improve the picture ;) I defintly encourage you to exploer further! |
You should use Barriers (up right) instead of IDs to keep the gate layout clearer.., By then it was somehow messing alot with the real time statevectors displays for some reason seemed buggy. I'd recommend you check out the some of the newer grover videos as my intuition has grown muuuuuuch stronger with time :) but I'm really happy too see this video is still watched :) |
it seems what you did was create a kind of interfearance to make it more clear, could that be true?" Interfearance”?, @Uncertain Systems i guess the first part the parts that "are remebered” they dont disaepear! but rather create interfearance?, In theory interference can happen every time you modify phases or amplitudes. It really depends on your state and the operations applied. What concrete part are you referring to? |
This is still the coolest thing! Grovers seems useless at first but when ilistarted this way gives in meaning! Your the best!!, I'm working on a refreshed video on this as well soon :) Stay tuned! |
Im looking forward to some more videos on this! you said you would make a 2 min video about postive and negative uncertainties! that will ne cool!, coming really soon! :) also complex uncertainty is a concept I have in mind |
Did you see this one? You can do the same on the ibm q experiance. shows you how to change the value you are looking for with a series of x gates. <a href="https://youtu.be/hK6BBluTGhU">https://youtu.be/hK6BBluTGhU</a>, Yep, I've learned that a while after the video ;) This was shot quite some time ago. The video you linked is good but I don't really buy the parallel universes explanation ;) |
Thats pretty Dope that you put a state change before the first step! i guess ultimately it dosnt matter what the initial value is becuase your shootiong for 111 anyways! hmm not sure..., Not sure I understand what you mean? |
so it's time to start with the introduction of virtual vertex basically just quickly recap with this last time where this is another implementation to check whether there is a cad between two between two nodes in a way that minimizes the amount of control x gates that you need right is that true so yeah I think so exactly because basically you you would need so you would you you just need this to control access and then and then a control side rotation and then there is you can do this K okay the composition which we have to take a look at into later and and that just composes into the need of to controlling our gates exactly so this is here again I believe you could also do it if this also works when you've got like why do I have so why do I have these things as an example here I believe this also works if I remember well why isn't this work what did I undo I am did this but I'm missing basically I'm missing to do the opposite here the opposite check that should be exactly so that's it basically maximizes those two solutions but also the also the the zeros division 101 that was two years ago I think so yeah and and so like this should also this could also work right I mean wasn't this supposed to release wouldn't this work as well and then you then you have less of a hassle with decomposing this time you still have to control odds but then you don't have to do all that right because you have is a rotation which and then and then you don't need these stuff in here isn't that isn't that enough like I I thought that would be one way of doing it so you're getting I'm also getting the same things in here like it doesn't get rid of the problem of this the the zero zero zero and the one one one solution because that's that's caused by the fact that you're using like a dick post like you're using a phase encoding technique but then that should that should kind of work as well and it's I mean you don't need to do that you don't need to the composite this way I don't know maybe maybe maybe I'm missing some some detail in here but let's go back to let's stick to the way the paper implements it because then they introduced the notion of the virtual vertex vertex which is the one that I want to take a look at right now so okay so this now we got it to work as just checking you know in this case you need you need basically my tractors are not working why why in a second I'll have to figure out for some reason my drawing tools do not seem to work anyway so the the the these two these two blocks here basically check that there's an whether that's like an a cat between those two qubits so but he so here now let's take a look at the the verdicts virtual vertex technique because the idea here is that your think the the outputs of the way they put is the output of the approach in section 3 has redundancy due to the symmetry of the problem in order to eliminate this and that all the solution space in a given number of qubits we introduce a virtual vertex to state is fixed at zero sub V the Oracle for the edge connected to these virtual vertex can be replaced by a single qubit operation on the other verdicts in order to reduce number of control X gates in the Oracle part it is effective to visualize the highest degree vertex for example when when the given graph is k14 we can from the Oracle circuit without using control x gate shouldn't figure-eight okay so Kim let's let's let's let's let's try and understand this a bit more so all right that's it really in touch the dots the section of the virtual vertex isn't that all the social space Nguema case which is a virtual vertex who stayed is fixed the Oracle for the edge connected to this vertex can be replaced by a single cure operation on the other vertex so but still so or Oracle SAP Oracle to VN able to be NB V and C V and D but okay so I see I mean it still what's the what's the point of having the X the X case in here where you can just initialize that to one or what's the what's the point here so okay so let's try to understand how this works oh so this is your and so here you've got the axis represent the actual notes and then you've got like a the vertex zero of E and so how is this supposed to check the cat between a and B whether there's a capital A and B because this essentially what it does is it puts it into one it does it controls it controls that rotation but that's not the point if we are checking if we're checking the cat between a and B si right try to figure figure understand how this because here on one side I just bothers me that the drawing tools don't work so here on once I will try to figure out we're trying to say okay so if so so the way this has the symmetry is because we're trying to okay so we're operating at the ID at this position level okay let me see maybe with an example it's gonna make it clearer but I'll just copy that so I'll just copy that so I don't lose this and and then stri room so the idea is we've got a another another virtual vertex which I'm gonna put at the very top whoa so which I'm gonna put at the very top and so now we don't have these things in here so let's get rid of these I'll keep one of those decades and so what this does is this and then basically and then basically like this again yeah but that gives me that gives me a different solution right in here or what's the am I just not I don't want am I just not seeing the because this is this is a different example so this is the the Oracle for the edge connected to this virtual vertex can be replaced by a single cured operation on the other verdicts in order to reduce the number of control based on in the Oracle part that is effective to visualize the highest degree vertex for example when the given graph is k14 we can perform the Oracle circle the music CSC x gate was the key I I forgot what was the k1 for I said the this is the star graph k14 okay still I got it oh wait a second it's sad isn't that what I was uh no no that's so this how is this supposed to work on the other four legs so how how is how is the virtual vertex supposed to help in here and what is this virtual verdict supposed to do that's what's not clear to me the virtual state is fixed at the Oracle for the edge connected connected to this virtual Burbank's replaced by a single cured operation on the other vertex yeah not to reduce number of control X guides on the Oracle part this effective tool virtualize ah okay now I I was really visualized is virtualized okay uh-huh okay so saying in order to reduce number of control X case in the Oracle part it is effective to virtualize the highest degree vertex okay so the vertex that has the the highest amount of off connections is the one that you're you're going to virtualize so you're basically we were basically gonna remove it and then you're just okay and then so for example if we if we've got the if we've got managers bothers me with the drawing tools I can't give me a second I gotta fix this I give up I can't really fix that so I'll try to have the figure this out somehow else so if you've got like the yeah I get it okay so if you've this that's why this works this is example if you take the highest degree let's assume in this case k14 right I mean it means that this one vertex is connected to all of them it's a star graph so the highest degree is the one that's connected all of them and then that effectively becomes your like you can virtualize it so this means you don't have to do these two waiting because you know it's always gonna be you know so it's gonna be zero I mean you know you you you you don't need to do that because you just need to check whether I mean it's connected to all of them so you just need to check whether the whether the other cubed is in this case and one so you're basically initializing it always to zero okay so initializing it always to zero and then and then you're like let me see if I can explain that with this example so so let's assume we're using that just because I can't draw it right now let's assume we're using these this exact here right so 0 1 2 and so the the highest connector one is the node number number 1 because it's connected to 2 those two right so we're going to virtualize this one if no number 1 is the node in the middle let it be so let me get rid of this for a second let's put this back how how this how was this was this was this was this was this like this so this was like that so but we're gonna virtualize now I'm just gonna put these things here for a second that's good just ah let's get rid of everything so we're gonna virtualize basically and I'm gonna get get rid of absolutely absolutely I would let you know what you know I'll just clear all so we're gonna we're gonna virtualize so usually you would have that right so and and this is cubic number one so we're gonna virtualize this one so this one is gonna basically not be in super position anymore and so it's gonna be always initialize to zero and the idea here is that you don't have to check it you then recheck it to check to check it two ways because you know that between these and these let me see how can I reason that I feel like I'm so maybe I'm trying to think I try to find a clear nice way to explain it so because I don't even know what I'm not even sure that I I think I think I just I just have it have it there so you're only doing the there you're only doing that the check on one in one direction so you're only doing this and a pop-up and you're only doing it this way ride does this make sense doesn't make my sense now what I'm looking at I want to take a look at the these things in here so but it's still I'm missing if I visualize it I'm actually missing on that superposition right because now I've got now I've got this solution that has one cat sixty degrees this solution has one cat 60 degrees and this solution which has two cats like 130 degrees that's that's correct but this solution has also one cab and got nothing in there because because we haven't brought this into superposition but maybe okay maybe what this means is you actually just gotta have that extra serve as a virtualization and then and then simply have like that right so and basically now we want to measure just this okay yeah I think that's and of course if there's any other connections you still got to do you're still gonna do give me a second so let me just check that's correct so this has got one cat 60 degrees this is God that's right there's got two cats so face-first are all sub workers can be replaced with RZ by assigning the highest degree verdicts to the virtual cubed I don't quite fully get the I don't quite forget the the way this is supposed to work I get the I I get there is a rough idea and it's such a small subsection and I'm like struggling with that I get but how I would implement that so for for my for the example of the paper not the not the star graph here so I mean even for the Starcraft that doesn't because if you if he's still God you still got to do literally that solution that solution that solution but you're still missing sorry what am i doing this is this so I wanted to bring this in here since it's clear so I'm visualizing this one because it's connected to all of them it's the highest degree one and so now and so those are those are correct but then of obviously missing here this solution this one has to cut right and this one has one cat and this one has one cat this one has zero cats so how is that how is that they're gonna work that's confusing the in gravity scale we can perform the orchestra without using control gets gay control X Kade's Cu the Oracle for the edge connected to this virtual vertex can be replaced by a single qubit operation on the other verdicts ok so there's something else again so the the fact that the said I still should add a for the for the for the edges so whereas I'm for the edges connected to the virtual verdict on the other verdicts in order to reduce the graph so all the social space and with trigger choice was choose the virtual vertex who stayed is the Oracle other the edge connected okay so in order to reduce the number of controls against an Oracle partner its affected to virtualize the highest degree verdicts for example when the given graph is K before we can press on door closer without using [Music] so I have a bit loss right now so if addition of the auricles circuit using subdivided phases for the star graph K 1 for all sub Oracle's can be replaced with their rotations by assigning the highest degree vertex to the virtual cubed let's try this then for a second so we've got 4 in here and 4 and 5 so so this would be the highest degree is 0 so I'm gonna move up here and then we're gonna have like four more ok and so we're just gonna I guess do that which basically means basically means adding a bunch more of of these gates and then copying these here and copying it here so and now I mean you be you you've kind of got the same problem don't you I mean you're basically saying okay that solution has one cat sixty degrees right same you've got two cats [Music] [Music] you've got two cats but what if we paint that verdicts from another I don't get it I'm just might be looking at it from the wrong perspective so you're basically not and I feel so simple but I just just stuck with it because then it's already we're getting into the in traditional diffusion battle I'd love to understand that so how how does this how does this work so we've got now we've got the star graph that's the one up here this one so let's try let's try to now let's try maybe Papa Papa it's thinking to try to implement it the other way but I mean that is a star graph as well right let's see the one here so it's just that the the the vertex one is one your virtualizing and here your virtualizing the vertex zero but it still in this case what this is saying it doesn't matter how you color zero that's how you that's why you can virtualize it so you're kind of fixing that so to say it's like you don't care how your virtualize if your I mean it has the thing is that the thing is the thing is that you're like what about all the other solutions that have that vertex color one you don't have them in here so you're missing you're missing solutions aren't you I mean sure this has to cut so we're so we're checking wait a second but it doesn't matter in this case because if it's a one so if your quality Papa Papa Papa Papa if you color it with a few market one what is the difference right if it's connected to all of them anyway you might as well just fix the fix the color and then play with all the other combinations but it feels like it's a waste of year of the superposition here but you're reducing the I mean you literally have no control XK so you're reducing the D I guess you've got no errors in here so so but this is is that correct I mean let's say we're virtualizing I just I just feel like it's that's four completely good about it this solution has two cats this solution has two cards this which has three cards effectively I mean this is correct because effectively if he is like you might as well just fix the color of the of one verdicts that seems to be the that seems to be the the the point of it fix the color of one vertex and then and then just check whether the color in that case is different and then if this is this connections like if this would not be life there would still be if there would still be some some edge between our now this cubed and this key will you still need to do the double that you still need to do the the thing here where you kind of check whether it's like zero one one zero right because you both possibility still count but effectively if you if you if if you pick the one that has the highest the highest connectivity and then you virtualized and you're reducing the amount of controls that control X gates you need because you're fixing the color for that and it doesn't I'm not sure whether what I it's so straightforward that it the this well it's too sir for that you can't just do that and then and that this really really works out no I think I'll should I'll stop the I'll stop I'll stop right here because at that point I'm just me asking the same question over and over again but it's still it's a it's a it's an interesting idea but still like if I if I still if I go back to to the example I was trying to do right but this one so so if I compare that with so now I've virtualized that stayed here so if I compare so this one has your cats this one has one cat this one has one cat this one has two cats that's correct but because we're fixing so we're fixing the color to be zero right if the color would be one I mean that's that solution it's kind of the same like this one isn't it because you're you're painting this to color so that socialism like this one effectively that solution is the same like this one because you've got one cat he would also have one cat yeah okay so you're saying in these I mean in that particular case where you have a star graph like you can't just UK you can just virtualize one and then it completely because you don't need the other half okay yeah that kind of makes sense it's a beat for some reason was been an intuitive to grasp at the very beginning and and maybe I should just switch to the k1 for example because it seems to be the one that's used across the the rest of the paper as well we'll see okay but this is this is it I mean if I would have another ver another edge which is here and two here right between zero and two like I would still have to do a cross-check between this keyword in this cube it in both ways so I would have to still do the thing here with the basically these and these and I also have to do the hat because then it means that for example in this case there are two cats in this case there are also two cats and in this case there are two cats but couldn't I just then I think that that doesn't that then I saw that particular sample I could approach it differently but like okay so I get it so this is basically you can fix the color in the verdicts of has connectivity so you you kind of reduce the need for for implementing salt X operations but still but still that's a bit awkward because because here there's also no control X operations they are because you're approximating them because you're approximating the circuit and then you are adding the control X the Oracle the edge applied to this virtual single operation on the other vertex single qubit operation okay but that's if it's a single qubit operation then in the example then there's something here that is not that something here that doesn't seem right so I'll probably have to link into this in the next video before moving forward because it doesn't so figure-eight has control it does it's not a single qubit it's a controlled K it's a control gate and figure out but here but here you know to reduce the number of control X gates in the Oracle part it's effective to virtualize highest with without using control like spades there's a signal pricing single qubit the Oracle for the edge connected to this virtual vertex can be replaced by a single qubit operation I said on the other vertex I mean yeah it kind of makes sense because you're fixing the call or so if you fixing the call to zero you don't need to do that that's my that's the that was the whole thing here is like white why we wouldn't do that like we don't even do X why do you even do that you don't have to if this is fixed to zero you don't need to turn it into want to do control then you just rotate then you just do these like so you do this actually that would be let's let me get rid of this so effectively if you ritualized activity fixed to zero shouldn't that just be enough yeah that's enough but then I think that figure is not it's it's confusing so uh because that seed right I mean you've got here one cat one card and two cats because you're virtualizing that so effectively you're fixing the color for that okay I'll I'll reach out with this I think that's a that's a that's confusing that's definitely confusing and it's a really short compact section too and it's a bit because of the the example seems to be this seems to be wrong so let's see but I get it yeah that makes sense now it makes sense now it's way more like that's way cheaper to do something like that right because you don't need to control the to cuba gates you don't need anything here just rotations because you're fixing the color here and that gives you that yeah unless I'm getting it totally wrong I don't know I'll see I'll send out a feedback to run and and see what CC we sense perfect thank you very much for sticking with this and looking forward to the next video |
so over i decided i i decided i'm gonna i'm gonna jump into uh i'm gonna put that aside the dewy stuff for a second uh i'm gonna learn about the tensor networks quantum inspired optimizer that they talk about in here as well i don't know i don't know why i just it's the other one that performs the best if you take a look at the results i think it was page seven so no that was an outlook no here tables and so you have the tensor networks and the d-wave hybrid those are the one the ones that perform the best now it says the profits computed by the different methods those are the parameters uh so the d wave is a clear wiener i think already if you make the jump between the xl solution and the xxl one um it's quite impressive to be honest the vqe and vk constraint didn't make it past the air we can certainly make it past the m um yes i'm curious they seem to perform the same or really close even for science m is better right like it's it's computing more profits for size l as well that is actually a big difference like there's like a you know 20 points here um but then for this size yeah it's interesting i'm curious curious you know interesting to figure out why um and what are these the run times yeah well that is actually in seconds 171 seconds and like a hundred thousand seconds what is that like 100 100 000 seconds seconds two hours that's like 27 hours wow okay cool um but for smaller problems it's not that bad right like 120 seconds and here it's like 26 000 seconds versus 52 seconds but the solution is it's quite better because it's uh more profits so i want to i want to understand maybe kind of you know what is it the uh that they do and then i'll i'm assuming i'm gonna have to dig into uh into the concept uh what am i doing zoom out reset oh that actually zooms out the page i thought it was another kind of zoom anyway uh where where do i find this though next steps this is the so where do i find up to 40 who is five what is this i talk about the cube all the time uh gonna find that a native application of eqe was very rather limited for this problem our tn's code is able to handle its tn tensor networks cubic variables using a macro pro without problems even though the performance can be improved in a number of ways we believe that a highly optimized code in c plus plus fully parallelized on an hpc cluster should be able to handle really large problems very efficiently [Music] but do they explain here what are they doing let me see next steps more constraints what i'm looking for is i'm looking for a description oh tensor networks there you are so let's first kind of go off of the paper and and then we'll dig into the theory that's needed or if any theory is needed for these what is here okay perfect so tns are representations of complex quantum states based on their local entanglement structure okay uh i like that does this mean because i've been playing recently with this idea of um representing like a quantum state as in just a collection of the individual qubit states and a set of maybe edges or connections between the qubits that basically specify how the entanglement is defined or how the entanglement is sent you know to give you to give you an example what i what i what i mean is i'll open pain pain so what i mean by this is oh wait a second that's not it tells me it's not connected crap oh whatever okay sorry what i what i mean is i'm gonna be able to paint today awesome uh yeah whatever so if yeah if if i have like for example if i do like let's picture try to picture the bell state okay so you have two qubits um and they're both separate they're both like in the zero state now the first key the top qubit um you apply a harmar gate so it gets into the zero plus one state plus state and then you apply a control not gain what this would do is it would basically um this your state representation would now be a zero plus one and a zero right but then the zero plus one basically um gets split into two branches one has the zero of of of the zero component of the state as a root and then it connects to the second qubit that has also a value of zero this means if the first qubit is zero the second is also going to be zero and the second part of this of the state of of your top qubit was used to be one so now this one is connected to uh to the qubit one so to this to the next qubit but that now has the value one so you're saying basically you've got two branches one it's a zero and a zero and another one is one one and those are the two values that you can have and i don't know if this is what uh so we're in page six if i what are these references uh again was 18 and 19 18 and 19. oh that is uh annals of physics 349 and nature reviews physics one where is this going to take me i don't know tensor networks for complex quantum systems okay except for cookies but that's under that's behind the pay wall uh they are quantum representation of many body states based on their entanglement structure symmetric tensor network states enable more efficient simulation methods and description of pharmac systems lattice gotch theories topological order because my point is that will be really efficient to simulate a system like that as long as you don't need uh to know the state the full state vector at any point in time right because basically what this means is you only need to keep track of the qubit so that doesn't have that exponential component to it and then and then the entanglement which is also going to be something that is a function of your you know control gates that you have somehow like you're not going to have really complex entanglement structure but you don't have like you're not having a full state representation in there right if you have a normal matrix in your linear algebra the standard linear algebra model you're constantly keeping a you know the full state of the full quantum state which basically gets bigger and bigger exponentially and so um let's go ahead and click file to take for instance the system of n qubits any wave function of the system can be described inefficiently just by giving its two to the power of n coefficients in the computational basis as such these coefficients can be understood okay so as such these coefficients can be understood as a tensor with n indices where each index takes two possible values say zero and one okay so so this is a tensor it's a nine dimensional tensor or no no ah okay sorry no no it's a it's a it's a tensor with n indices it's a vector okay it's a vector basically right yeah we could then think of replacing this huge nasty tensor by i like the word nasty in the paper here by a network of interconnected tenses with less coefficients see figure 1 for an example the coefficient of the quantum state of n qubits is a tensor with exponentially many coefficients in the system size the inner structure of the tensor is that of a tensor network which is a network of tenses connected by ancillary indices that take into account the structure and amount of entanglement in the quantum state we represent these here using diagrams where shapes correspond to tenses lines to indices and lines connecting shapes to contracted summed common indices the tensor network on the right hand side is an example of matrix product state so these okay not so sure understand this but uh this construction defines a dn and it depends on uh like its polynomial complexity uh parameters only assuming that the rank of the interconnecting indices is upper bounded by a parameter d which is called bond dimension similarly interconnecting indices in the network are also called bond indices and provide the structure of the many body entanglement in the quantum state any d bigger than one provides an entangled quantum state okay i don't know exactly if this is what i'm what i was talking about though as is well known in physics tns are a natural tool to solve optimization problems people have been using them as a nonsense to approximate low energy eigen states of hamiltonians and many algorithms have been invented to this aim the idea here is that by mapping optimization problems to a hamiltonian eigenvalue to hamilton and eigenvalue problems as done in quantum annealing we can then use the huge machinery of tm techniques and algorithms to solve the position problem at hand okay so it's good so that's cool what it means is yeah basically the same hamiltonian you calculate for the cubo would kind of be the starting point for a tn algorithm our case we implemented an optimization strategy over the so-called matrix product states nps the assembly of states has been tested already in a variety of algorithms for many physical examples moreover in order to improve the performance we also tailored our optimization to the specifics of our problem um as a first step so data preparations the first step we benchmarked our different algorithms for the optimization problem using random data starting real uh oh sorry that is actually already uh that's not part of the tense of tensor network so what this is already um section four right uh where it's like data preparation so this is what they talk about like the reduction of the dimensionality and all that stuff and then results okay but they don't go into the into the details of of what if you use for the tensor networks but we can see if we can try to figure this out they used okay they used what they call the matrix product states whatever that is let's try to see [Music] matrix product states product states we'll also google for uh introduction to tensor networks that's in our products a practical introduction uh you know you're screwed when your introduction and tutorials are actually published in archive in in r in the archive like in the r key for however this is pronounced and it's not like a it's not like a regular blog post oh is this from roman as well it's really nice it's all over the place uh is it long 51 pages cool um this is a partly non-technical introduction to selected topics on tensor network methods based on several lectures and introductory seminars given on the subject it should be a good place for newcomers to get familiarized with some of the key ideas in the field especially regarding the numerics after very general introduction we motivate the concept of tensor network and provide several examples we then move on to explain some basics about matrix product states and projected entangled pair states selected details and some of the associated number and numerical methods for 1d and 2d quantum memory systems are also discussed so this looks like a good place to start to be honest [Music] a bit of background white tensor network sensor theory mps okay so it gets there fairly quick but this is this is a concept that seems to be really just tailored to quantum computing or quantum quantum mechanics at least right i thought it was a more more of a generic uh generic idea so a matrix product state is a pure quantum state of many particles within the following form it's the sum of traces of amount of what complex square mattresses in this is as i go over states in the computational basis for qubits in the si01 for queueings in the tier level system is zero one d minus one the computational basis yeah but that's the that is really takes the whole computational basis so that actually the size of these is really exponential right one method to obtain an mps representation of quantum state is to use the schmidt decomposition n minus one times alternatively the quantum circuit which present antibody state is known one could first try to obtain a matrix product operator representation of the circuit the local tenses on the matrix product operator will be four index tenses uh the local nps sensor is obtained by contracting one physical index oh so the elements are actually kit w state the superposition of all the computational basis states of hamming weight one i don't know what is this aklt model um matrix product state okay uh i don't know for states that are translationally symmetric we can choose okay i think i better just i think i should just uh go through these let's zoom in a little bit more introduction during the last years the field of tensor networks has left an explosion of results in several directions this is especially true in the study of quantum antibody systems both theoretically and numerically but also in directions which could not be envisaged some time ago um such as its relation to the holographic principle and the ada cft correspondence in quantum gravity nowadays tensor networks is rapidly evolving as a field and is embracing an interdisciplinary and motivated community of researchers this weapon tends to be an introduction to selected topics on the ever-expanding field mostly focusing on some practical applications of the matrix product states and projected entangled pair states it is mainly based on several introductory seminars and lectures that the author has given on the topic and the aim is that the inexperienced reader can so that's me can start getting familiarized with some of the usual concepts in the field let us clarify now though that we do not plan to cover all the results and techniques in the market um but rather go uh but rather to present some insightful information in a more or less comprehensible way sometimes also trying to be intuitive then it fits the channel together with further references for the interested reader in this sense the paper is not intended to be a complete review of the topic but rather a useful manual for the beginner cool uh several sections a bit of background on the topic motivation introduction to basic tensor network theory such as contractions and diagrammatic notation and its relation to quantum many body wave functions then some generality generalities about the matrix product states and blah blah blah a several strategies to compute expectation values and effective environments for mps and p p e peps can i call it peps both for finite systems as well as systems in the thermodynamic limit generalities and okay let's go through the background understanding quantum many body systems is probably the most challenging problem in condensed matter physics for instance the mechanic the mechanisms behind high dc super conductivity are still a mystery to a great extent despite many efforts all the important condensed matter phenomena beyond london's paradigm of phase transitions have also proven very difficult to understand i don't really understand any of these examples these are topologically orbit phases quantum spin liquids phases of matter that do not break any symmetry okay i don't know the standard approach to understand these systems is based on proposing simplified models that are believed to reproduce the relevant interactions responsible for the observed physics hybrid tj models once a model is proposed and with the exception of some lucky cases where these models are exactly solvable one needs to rely on faithful numerical methods to determine the properties as far as numerical simulations algorithms concern tensor networks methods have become increasingly popular in recent years to simulate strongly correlated systems okay that's interesting so it uh strongly correlated systems in these methods the wave function of the system is described by a network of interconnected tensors intuitively this is like a decomposition in terms of lego pieces um and where entanglement plays the role of the glue amongst the pieces yeah but that's exactly that's what i'm that's what i was playing okay so that's what i was let me see if i can get let me see if i can get the pen to work give me a second okay i'll pause the recording for a second i can't see the video i'm sorry um also i i promise the quality of the video will get better at least the lagging and it is going to be better i figured out what the problem is but i forgot to set it up before i start this video so you will have to stick with these uh with these a bit more um nevertheless more precisely tn techniques offer efficient descriptions of quantum many body states that are based on the entanglement content of the wave function mathematically the amount of structure of entanglement is a consequence of the chosen network pattern and the number of parameters in the tensors so dna okay i like the i like the analogy so you put a bunch of dna strings together sequences together you have a person you put a bunch of tenses together and then you have quantum state so it seems that tensor is the fundamental building block of the quantum state okay um the most famous example of a tn method is probably the density matrix renormalization group the mrg introduced by steve white in 1992 one could say that this method has been the technique for of reference for the last 20 years to simulate one the quantum line lattice systems however many important breakthroughs coming from quantum information science have underpinned the emergence of many other algorithms based on the ends it is actually quite easy to get lost in the super names of all these methods t ebd folding algorithms peps tensor randomization groups tens entanglement normalization groups oh my god yeah that's a bunch of them a nice property of tn methods is their flexibility for instance one can study a variety of systems in different dimensions of finite or or infinite uh sizes with different boundary conditions symmetries as well as systems of bosons fermi fermions and frustrated frustrated spins different types of phase transitions have also been started in this context moreover these methods are also now finding important applications in the context of quantum chemistry blah blah blah possibly developing algorithms for infinite size systems is quite relevant because it allows to estimate the properties of the system directly in the thermodynamic limit and without the burden of finite size scaling effects um okay why tensor networks considering the wide variety of numerical methods for strongly correlated systems that are available on many wonder one may wonder about the necessity of tn methods at all this is a good question for which there is no unique answer and what follows will give some of the reasons why these methods are important and necessary let me i don't know if i can thinking about stopping these and then gluing it all together i'm gonna stick for these for this video without with the quality i'm sorry um i don't wanna i don't wanna have to quote things together and and then pause process the video gonna take too much um good all the existing numerical techniques have their own limitations to name a few the exact diagonalization of the quantum hamiltonian is restricted to systems of small size thus far away from the thermodynamic limit where quantum phase transitions appear serious expansion techniques rely on perturbation theory calculations mean field theory fails to incorporate faithfully the effect of quantum correlations in the system quantum monte carlo algorithms suffer from science from the same problem which restricts their application to um fermionic and frustrated quantum spin systems the depth of these staff made it so crazy like how can someone just write about all these stuff tn methods are not free from limitations either but as we shall see there their main limitation is very different the amount and structure of the entanglement in quantum many body states this is this new limitation is in a computational method extends the range of models that can be simulated with a classical computer in new and unprecedented directions um new language for condensed matter physics so tn methods represent quantum states in terms of network networks of interconnected tensors which can i not maybe can i skip to can i skip to to to the actual introduction of these and then go back to that to to to the background it's going so slow that's another theory yeah but maybe it's maybe it's worth going through these i i i don't wanna i feel like i don't wanna skip anything essential uh where was i it just crawled so slowly um this way of describing quantum states so dn methods represent quantum states in terms of network of interconnected tenses which in turn capture the relevant entanglement properties properties of a system this way of describing quantum states is radically different from the usual approach where one just gives the coefficients of a wave function in some given basis when dealing with t and state we will see that instead of thinking about complicated equations we'll be drawing things in our diagrams um financial languages describe quantum states of matter including those beyond the traditional endo pictures and just a quantum speed okay so what is all these about this is a new language for condensed matter physics matrix product state and projected entangled pair state pips for three by three ladies with open boundary conditions entanglement induces geometry imagine that you're given a quantum antibody system this is an interesting title what does this mean that entanglement adds definitely some sort of structure in the state specifying its coefficients in a given local basis does not okay so imagine a quantum antibodies wave function specifying its coefficients in a given local basis does not give any intuition about the structure of the entanglement between its constituents yes i totally agree with this it is unexpected that the structure is different it is expected that this structure is different depending on the dimensionality of the system this should be different for 1d systems 2d systems and so on but it should also depend on more subtle issues like the criticality of the state and its correlation length i have no idea what these things mean yet naive representations of quantum states do not pos possess any explicit information about these properties it is desirable thus to find a way to represent a represented quantum state where this information is explicit and easily accessible as we shall see a tien has uh this information directly available in its description in terms of a network of quantum correlations in a way we can think of tn states as quantum states uh given in some entanglement representation different representations are better suited for different types of states one d2d critical and the network of correlations makes explicit the effective lattice geometry in which the states actually leaves the state actually leaves we will be more precise with these in section 4.2 and this level this is just a nice property but in fact by pushing this idea to the limit and turning it around a number of works having proposed that geometry and curvature and hence gravity could emerge naturally from the pattern of entanglement present in quantum states that's interesting so that entanglement would actually the geometry that the entanglement is creating would eventually then give place to to gravity here we will not discuss further this fascinating idea but let us simply mention that it becomes apparent in the language of tn uh is precisely the correct one to pursue this kind of connection hillbid space is far too large the main is the main reason why tns are a key description of quantum metabolic states for a system of ends means the dimension is 2 to the power of n which is exponentially large therefore representing quantum state of a metabolic system just by giving the coefficients of the wave function and some local bases in an efficient representation the hillywood space of quantum mechanical systems is a really big place with an incredibly large number of quantum states um in order to give a quantitative idea let us put some numbers if n is close to the if n is roughly 10 to the power of 23 the order of the avogadro number then the number of bases states is 10 to the power of 10 to the power of 23 which is exponentially larger than the number of atoms in the observable universe okay luckily enough for us not a quantum state in the hillywood space of a mini body system are equal some are more relevant than others to be specific many important hamiltonians in nature are such that the interactions between different particles tend to be local nearest to the next to nearest neighbors and locality of interactions turns out to have important consequences in particular one can prove that low energy eigenstates of gapped hamiltonians with local interactions obey the so-called aerial law for the entanglement entropy no idea what this means c figure 3 does make it easier this means that the entanglement entropy of a region of a space tends to scale for large and north regions as the size of the boundary of the region and not as the volume and this is a very remarkable property because does this mean that this that in in smaller spots you have higher entanglement like that entanglement is more local and this is a very remarkable property because the quantum state peaked at random from a mini body hilbert space will most likely have an entanglement entropy between subregions that will scale like the volume and not like the area in other words low energy states of realistic hamiltonians are not just any state in the hilbert space they are heavily constrained by locality so that they must obey the entanglement area law should go back to this at some point by turning around the above consideration one finds a dramatic consequence it means that not any quantum state in the hillwood space can be a low energy state of a gapped local hamiltonian only those satisfying the area law think so the the many fault containing these states is just a tiny corner of the gigantic kilogram space um so this is the corner of relevant states so here's where the good news come it is the family of the tensor network states the one that targets this most relevant corner of states okay moreover recall that renormalization group methods for many body systems and to precisely identify and keep track of the relevant degrees of freedom to describe the systems as it looks just natural to devise rg methods that deal with this relevant corner of quantum states in fact the consequence of consequences of having such an immense silhouette space are more or even more dramatic for instance one can also prove that by evolving quantum anybody system a quantum antibody state a time with a local hamiltonian the manifold of states that can be reached in this time is also exponentially small the manifold of states that can be reached and this time is exponentially small so the vast majority of the hillbid space is reachable only after a time evolution that would take an exponential amount of time this means that given some initial quantum state i like the graphic um most of the hilbert space is enrichable in practice to have a better idea of what this means let's put again some numbers 10 to the power of 23 particles by evolving some quantum state with a local hamiltonian reaching most of the states in the hillywood space would take 10 to the power of 10 to the power of 23 seconds which is and the age of the universe is 10 to the power of 17 seconds this means that we should wait around the exponential of 1 million times the edge of the universe to reach most of the states available in the hillwood space okay maybe that was not that relevant to go through all this but it was nice um this is why the hillary space of a quantum antibody system is sometimes referred to as a convenient illusion it is convenient from a mathematical perspective but it is an illusion because no one will ever see most of it tensor network theory let us now introduce some mathematical concepts in what follows we will define what a tensor network state is and how this can be described in terms of tn diagrams we'll also introduce the tn representation of quantum states and explain the examples of matrix product states for 1d systems tensors tensor networks and tensor neural diagrams a tensor is a multi-dimensional array of complex numbers good the rank of a tensor is the number of indices this rank zero tensor is a scalar rank one tenses is a vector and the rank two tends as a matrix an index contraction is the sum over an index contraction is the sum over all the possible values of the repeated indices of a set of tensors for instance the matrix product uh let's process this so a i guess alpha better and and i guess those are the [Music] indices is the contraction of index beta which amounts to the sum over its d possible values one can also have more complicated contractions such as this one i'm not sure i understand this so you have vector alpha matrix alpha beta alpha better meaning being the two dimensions the matrix product so you're multiplying two matrices and you're doing a summation in there as part of the matrix no is the contraction of index better which amounts to the sum over its d possible values maybe i need to see an example for this to make sense where for simplicity we assume the contracted indices and can take different values as seen in these examples the contraction of indices produces new tensors in the same way that the product of two matrices produces a new matrix uh so contraction is just a word for product in here indices are not instances that are not contracted are called the open indices a tensor network is a set of tensors where some or all of its indices are contracted according to some pattern i guess what this is go where this is going is that that the relationship between the tensors will so this contraction kind of gives you the pattern to then really built up the the full state i think in the more classic sense uh contracting the indices of a tn is called for simplicity contracting with the n the above two equations are examples of tn in equation one the tn is equivalent to a matrix product and produces a new matrix with two indices in equation two the tn corresponds to contracting indices uh intenses a b c and e to produce a new rank for tensor f with open indices blah blah blah blah in general the contraction of at the end with some open indices keys there is as a result another tensor and in the case of not having any opening this is the result its color this is the case of the scalar product of two vectors so this is just means feels like a fancy generalization for the product and and kind of calling the product the product being a tensor network so you've got tenses and they are related to to each other and this relationship is the product that's what it that's what i seem to understand it's kind of like a bit more abstract than it's like a an abstract general an abstract an abstraction of the product and so you have a vector product that that that you know leads to a scalar so what what i see is a complex number ranks here tensor a more intrinsic example could be this one here yeah okay where only this is our contracted and the can and the result is again a complex number f um okay so once this point is reached it is convenient to introduce a diagrammatic notation for tenses and tns in terms of tens on our diagrams in these diagrams tensors are represented by shapes and indices and the tenses are represented by lines emerging from the shapes ah okay a tn is represented by a set of shapes interconnected by lines okay so these lines will basically then you will connect them so you're knowing what indices you're contracting and what indices are free the lines connecting tenses between each other correspond to contracted indices yeah whereas lines that do not go from one tensor to another correspond to opening this is in the tensor network tensor network diagrams so scholar scala a vector a matrix a rank three tensor tensor using tn diagrams it is much easier to handle calculations with the n for instance the contractions in equations one two three four can be represented by the diagrams in figure six also tricky calculations like the trace of the product of six matrices can be represented by diagrams as in figure seven the trace of the product of six mattresses from the tn diagram the cyclic property of the trace becomes evident this is a simple example of why tns tn diagrams are really useful unlike plane equations so you have a is a matrix product b is construction of two tensors contraction of no uh contraction of four tensors with four open indices yeah so the open indices are going to tell you how many dimensions you're going to have left in your uh in your tensor so here you're going to have two dimensions left it's a matrix product here and a half non-left it's a vector product and the contraction of four tenses without opening this is a trace of the product of six mattresses what is the trace of the product of mattresses traces the is the the the trace is as defined to be the sum of elements in the main diagonal and it's invariant tn diagram is allowed to handle with complicated expressions in individual way in this manner many properties become apparent such as the cyclic property or the trace of a matrix product in fact you could compare the language of tn diagrams to that of fema diagrams in quantum field theory surely it is much more intuitive and visual to think in terms of drawings instead of long equations hence from now on we should only use diagrams to represent tensors in the ends there is an an important property of the ends uh of a t of the end that we would like to stress now namely that the total number of operations that must be done in order to obtain the final result of a tn contraction depends heavily on the order in which indices in the tns are contracted see for instance figure 8 both cases correspond to the same overall tn contraction but in one case the number of operations is d4 in another one is d5 this is quite a quite relevant since tm methods seen since in tn methods one has to deal with many contractions and the aim is to make these as efficiently as possible so figure eight what with figure eight ah interesting so if you contract those first if you contract those first and you can then you're left with these but how is that five uh one because this has like one two three four five i get it because this tensor here is got only two dimensions and those tensors have three dimensions three yeah so if you do this first you're only you have like one two three no how is this counted one two three four only involved and in here you have one two three four five six i'm not so sure i guess if you sum the overall is like six minus one is five and you have one two one two three four five and one is four i think it's gotta do with these to minimize the computational cost of a tn construction so osi that's quite relevant for this finding the optimal order of indices to be contracted will turn out to be a crucial step especially when it comes to programming computer codes to implement the methods to minimize the computational cost of a tn construction one must optimize with different possible orderings of pairwise contractions and find the optimal case mathematically this is a very difficult problem though in practical cases this can be done usually by simple inspection cool okay let's break the wave function into small pieces that's where i want to go um see if this is matching okay so let us now explain the tn representation of quantum antibody and of quantum many body states for these we can see the quantum antibody system of n particles the degrees of freedom of each one of these particles can be described by p different states hence we're considering systems of np-level particles for instance for a quantum antibody system such as the spin half heisenberg model we have p equals two so that each particle is a two level system or qubit for a given system of this kind the wave function that describes its physical properties can be written as the sum of blah blah blah blah yeah yeah so it's that it's it's a tensor product of yeah of course of all the different qubits right and qubits yeah yeah once an individual basis for the states of each particle has been chosen in the above equation are ah so those are different bases uh c i 1 i 2 to i n are p to the power of n complex numbers independent up to a normalization condition yeah tensor product of individual quantum states for each one of the particles in the many body system tensor product of individual quantum states yeah it's a tensor product of the individual qubit states that's the point right so if you have a two qubit system it's the tensor product of the qb two qubits that gives you the four dimensions uh of the state uh now notice now that the p to the power of n numbers that describe the wave function can be understood as the coefficients of a tensor c with n indices tensor c with n indices so you've got a tensor okay and then this is at the qubit so you've got a tensor that has as many dimensions as qubits where each of the indices can take up to p different values exactly 0 1 in the case in this case p is like the equals 2. so this is a tensor of rank n with p to the power of n coefficients tensor of rank and um this really readily implies that the number of parameters that describe the wave function is exponentially large in the system size uh let me try to see if i understand as well so with ending this is where each of the indices can take out to be different values okay it because it's a bit more abstract i'm not too sure what this is telling me is this the density matrix what is this sort of trying to represent or is it the or is it that because this n indices and n is the number of cubiets and each qubit can have different values like zero one right meaning not each cubit but like each okay i don't know uh tensor with rank n so with two qubits you have a four with two qubits you have a four elements matrix two by two to represent the state yeah okay and the parameters that describe the wave function uh specifying the values of each of one of the coefficients of a tendency is therefore a computationally inefficient description of the quantum state of the many body system one of the aims of tn states is to reduce the complexity in the representation of states by providing an accurate description of the expected entanglement properties of the state this is achieved by replacing the peak tensor by a tn of smaller tensors by tnf tenses with smaller rank for some examples in the diagrammatic representation check figure 9 this approach amounts to the composing the peak density and hence the state phi into fundamental dna blocks namely a tn made of tenses of some smaller rank which is much easier to handle i want to see an example the final representation of phi of psi in terms of tm typically depends on a polynomial number of parameters thus being a computationally efficient description of the quantum state of the many body system to be precise the total number of parameters and taught in the tensor network tension over the composition of tensors c in terms of a and nps with periodic boundary conditions b a paps with open boundary conditions and c and arbitrary tensor network where mt is the number of parameters for intensity in the tn and hence the number of tensors for atn to be practical and tension must be sub-exponential i want to get to an example to give a simple example okay to give a simple example consider the tn in figure 9.8 it's an example of a matrix product state uh we'll be discussing this next section okay now that's not what i want to do i want an example of a state and it's the end i want to see the tn of like a two qubit system for example part of the magic of the tn description is that it shows that these p p to the power of n coefficients are not independent but rather they are obtained from the contraction of a given t n and therefore have a structure nevertheless this efficient representation of a quantum antibody state does not come for free the replacement of attends to c by a t by a t and involves the appearance of extra degrees of freedom in the system which are responsible for gluing the different dna blocks together these new degrees of freedom are represented by the connecting indices amongst the tensors in the tn the connecting indices turn out to have an important physical meaning they represent the structure of a made body entanglement in the quantum state and the number of different values that each one of these indices can take is a quantitative is it the connecting in the system and the number of different values that each one of these indices can take is a quantitative measure of the amount of quantum correlations in the wave function they're called bond or ancillary indices and their number of possible values are referred to as bond dimensions the maximum of these values which is called both d is the one dimension of the tensor network to understand better how entanglement relates to the bond indices let us give an example imagine that you're given a tn state with one dimension d for all the indices inside just one figure 10. uh this is an example of at the end called projected entangled pair state which also will also be further analyzing the forthcoming sections calculate the entanglement entropy of a block of linear length l i don't want to do this i want to i want to see an example generalities mps and ppeps generalities can i see a tensor tension network an example quantum state in a nutshell it's probably not in a natural images i'm quite curious because it really feels like that's the same idea i kind of stumbled upon and i just wanted to understand what this is it like what this is what i meant there's some fancy images in here quite a competition for god's sake can i just uh in a nutshell it's literally the nutshell quantum legos peps nps dtn from tensors to networks in in the tensor diagram notation the tense is labeled shape such as a box or a triangle with zero or more open output legs and arms pointing up and zero or more open input legs didn't didn't crack only once like made a crack i think he once made like a post about this or they already tweeted about these what are tensor networks and which is the relationship they have with quantum computing yes generalization of matrix multiplication graph where the nodes are tensors and quantum circuits are kind of tensor networks the gates are mattresses specific kind of tensor and the qubits are series of constructions lines connecting the tensors in some cases even the vertical lines in this circuit diagram the c notes control two circuits correspond to some sort of contraction though circumnotation has stayed straight far enough in tensor network notation that is not always the case yeah but that's not the answer can you okay i just want an example that's not relevant doesn't say anything with tensor networks in here no i remember him drawing some stuff like that but anyway i'm looking for an example of a quantum state and it stands a network representation let's set the determinant given the to cubit pure quantum state its concurrence is the absolute value of the following tensor network expression oh wait a second quantum circuit okay so a simple quantum circuit that can generate entangled belt states it consists of two tensors a hallmark gate and a control knob gate denoted by the symbol inside the dashed region the signal in the hammer gates are defined as these where the additional or the addition in the c naught is module two the really should verify that acting on the quantum state the zero circuit yields to the bell state blah blah and acting on one one yields to this state oh so this is a type of this is a tensor network that's what this is saying that the circuit is actually a tensor network copy and xor tensor as one came with the synogate itself as a contraction of two order three tensors interesting bending and crossing wires okay so that goes like transpose partial trace okay so this is already more advanced notation okay so so it's not what i thought it's not exactly what i thought it's basically i mean it is just a way to say you've got a bunch of tensors which are like can be your gates but i'd love to see a great example quantum circuits for epsilon states and cups plastic this is the tensor okay that's way too much i think matrix product states some properties i wanted to i'm probably skipping too much ahead uh so i shouldn't really towards data science quantum circuits with tensor networks okay networks quantum circuits we'll discuss the open source software quimbe for simulating quantum circuits one of the things that makes queens interesting is the ability to perform computations with tensor networks if you're not familiar with teson networks we'll talk a little bit about them you can also check out one of my other articles on black hole machine learning history of tension optics and physics into using machine learning in ai and if you're curious and enjoy digging into into a little code you can also check out my okay queen tutorial so what is crimp quantum circuits are diagrams that closely resemble the staff notation musicians use indicate measurement quantum composer tensor networks suppose you have a quantum circuit that can be simulated in a classical computer efficiently um when we are simulating some quantum circuits efficiently using tensor networks that's now is a graphical representation of tensor which can be thought of as multi-dimensional arrays of numbers around the utensils just a scalar blah blah blah yeah also actually google has a tensor network library interesting google has recently released a library that runs with its well-known tensorflow as back-end while having a library built onto potential flow is a huge plus due to the popularity of the wide spread of tensorflow it says not the most user friendly at present i use different alternative queen opens the software of performing quantum circuit simulation and constructing tensor networks okay excellent implementation what makes queen even better is it uses network x a python package for the creation of manipulation of structure and dynamics the function of complex networks so i might have to install that to maybe try it out for the project as well and machine learning they can be using machine learning as layers in deep neural networks these bridges are computing classical machine learning and new field of quantum machine learning which is quantificational circuits oh come on that's a shitty article that doesn't tell me anything network x is a python package for the creation of manipulation and study of the structure dynamics and functions of complex networks i assume complex networks is the networks of complex numbers but that be they can be quite that can be something interesting actually because because i actually might use these for uh for the stuff that i have in mind in terms of simulating uh or the building a simulator let's quit doing normalized that's not singularity research what is this can someone just give me an example please network x uh black hole machine learning okay so those are different tenses tencent network library tencent networks crimp because there's some fancy stuff looking like here um tensor network with tensorflow or pytorch speed up that's a network that's a network tensor network so so this is entanglement in a tensor network how is entanglement represented with a within a tensor network any family of tensor network states specific entanglement structure given by a graph of maximum entangled states along the edges that identify the indices of the tensors to be contracted so tencent august provide description of a strongly correlated quantum systems based on an underlying entirely structure given by a graph of entangled states along the edges that identified the indices of the local tenses to be contracted considering a more general setting where entangled states and edges are replaced by multi-part apartheid entangled states on faces it allows us to employ the geometric properties of multipartite entanglement to obtain representations in terms of its prepositions of tensor network states with smaller effective dimensions leading to computational savings matrix product states maybe maybe i maybe i really have to go a bit deeper into the mps part of things and i'll maybe understand it's a generalization of of matrix product so i don't know how so is this basically saying you can just you know translate the circuit into a tensile network into a tensor network and then you can find there's some numerical techniques to find ways to calculate to actually calculate the contractions in a way that is computationally efficient but i don't understand how like how is the entanglement there like if i would see an example of the bell state but i think i had it there almost what is an nps let's see what is an nps it's the most famous example of tn states this is because it is behind some very powerful methods to simulate 1d quantum one-dimensional quantum body systems most prominently the density matrix randomization group but it is also behind the or the well-known methods of just time evolving block destination mps are tn states that correspond to a one-dimensional array of tensors such as the one one-dimensional array of tensors such as the ones in figure 11 in an mpa in an mps in a mps there's one ten separate side in the many body system the connecting bond indices that glue the tenses together can take up to d values and the opening this is correspond to the physical degrees of freedom of the local hillbid spaces which could take up to b values ah wait a second so two examples of mps the first one corresponds to nps with open boundary conditions and the second one within place with periodic boundary conditions as example i don't know if this is basically what i mean tends to network bell stayed deep quantum ai so um tensor networks initiative and let's show um all tenses are fine mps could be different yeah i don't know some properties of mps that's not that's doesn't seem to leak to anything that i can currently understand and i'm starting to have too many open open tabs [Music] tensor network stance networks it seems to be a b pin so it's generalization of the product but but what is he that i can like how does it show the entanglement for example like i'd like to see this and now then i would just you know probably finish the episode finish the video let me close all these so tensor network um isn't isn't this isn't this the same that isn't this like similar to what i saw from like uh what is what is it the the ah well it wasn't twitter was it it wasn't twitter uh oh sorry i even have it i have it in the discord give me a second i have it somewhere that discord uh because i shared the article from i forgot her name and her twitter handle you have to change the encoding stuff this is socially what's new so math i think it was here yeah yeah this is what i mean did she mention tensor networks in here oh yeah an actual mathematical picture is found in the tensor tensor network diagram representing representation of icpd okay just like these okay but then this is not so this is not exactly uh mattresses is tensor network diagrams so this is a matrix node okay so maybe is it is it the long post no oh i saw this image okay i saw this in the in the results so that's the okay so that would that probably have been a better introduction uh which is a matrix yeah no but i think actually i think i get the concept right so it's just a graphical way to play with mattresses or with tensors and then how you're multiplying them and how you're gluing their pitches together some matrix multiplication is a contraction drawing isometric embeddings as triangles an isometric embedding is a linear map from a space v into a space average of larger dimension that preserves the length of vectors such as such a map satisfies blah blah blah uh but you certainly can't squish all of w in onto little v then expect to undo the damage after completing v back in w okay so this might be something to explore as well symmetric not symmetric the transposable matrix can be represented by by reflecting its picture matrix its transpose so the symmetry of a symmetric matrix is preserved in diagram uh-huh interesting okay smallest base launcher space smaller space matrix factorization has nice features unitary mattresses and hence isometries enhance triangles the matrix d is a diagonal which i like to represent by a diamond ensured matrix factorization is the composition of a single node and i guess that's where entanglement but so the way that i understand these is uh so this is just a so it's a generalization of the matrix of tensor multiplication and but i still don't really understand how does these represent or show you the entanglement more than like what you could see in a circuit where you basically see the control not gates and you know that the chances that there are chances there's entanglement between these two right but yeah i get it it's not what they're saying the point is if you see a state written in in a way that it's like uh it's just this just the the the wave function you don't see the entanglement whereas in a circuit you're going to see the entanglement more because you can see where the control knob gates are but i i want to go even even farther than that and say um that doesn't tell you doesn't really tell you a lot about an agent about the nature of the entanglement in particular right like without knowing really what are the states like if you have maybe i'll just open the note the note pad and it's going to make it easier i got to fix the pen i got to fix the anyway so if we have qubit zero in the state zero plus one let me just zoom this in a bit more and we have qby in the state zero plus one right so in the first step you have cubic zeros in the state zero cubit one is in the state as the state one and now you have these after applying uh after applying like um you know automarts right like uh to watermarks or how about a layer applied and now comes like uh a control knob from from zero to one uh and so with these sorry no no no no this is still zero so it's a haunted mark for cubic zero and so now you have a con a control not like that's applied like these and so what you have is that q so basically what you have now is you kind of have two branches you have one branch that is like these right and one branch that looks like these so and and here we're gonna have q0 and q1 like they're not independent anymore uh and so that tells you a bit more about the entanglement that's in here right if i apply another uh another control so i apply another control not gate the same way right um well what it basically what it does is it takes that and it turns this into a zero because it doesn't touch this branch but now the both ends of the branches are the same so you literally glue them and so what you just have is you have one branch left which basically means there's no branch and so you end up with your zero plus one state and the zero state in you know in q1 and so it is q zero there's no branch anymore i don't know um that's kind of what i had in mind in terms of you're simulating so you're simulating a circuit by uh by keeping track of the states of each qubit so you would have a state of each qubit right so you would have a um it's it's a it's basically the cost of these is n right so you have n qubits and then that's n is like you're keeping it's maybe not an n okay but like one qubit can't really get more complex it's literally one qubit can be just maximum two complex numbers um so you're still at the realm of n and then you and then you still have entanglement but let me let me see what would be the cost of representing that because you would have basically the amount of entanglement would depend the amount of branches would be something that depends directly on the amount of controlled operations you have in your circuit um and i don't really know what is the how much this can grow i have a sense i have something that tells me it's not exponential the amount of entanglement you can have um it's it's it's it rather grows uh linearly with n um because the more qubits i mean you have to keep it's how much how much you can entangle them you can just entanglement like you can have two branches right if you have three qubits then [Music] yeah okay so this also grows with the number of qubits you have two three key bits then you can basically entangle and tangle them so you can have for each of the well you can entanglement entangle them in three like possible ways right because they can tangle qb1 with cubic zero with one and one with two and zero with two it's basically there are three possible um correlations you can build all the although one can argue your like what would happen if you have a uh let's say i have three cubits right and then you apply like a harmon to the qubit zero and uh how to mark to keep it one so you kind of have zero plus one z plus one and then you apply a c naught between the controls are zero and one and the target is two so that would leave you with uh basically what is the what are the branches you'd have here right you'd have how would you say how to how would you interpret that you would have well if cubit zero is zero like you well you definitely have a branch that says if qb1 like is one then uh how can you represent that this cubit one is one like can you represent that with branches as well or not cubic zero is one keep it one like it can be so that is definitely a branch right and now you have that is cubitty's affected here is zero um well i think is this really creating for this is really creating four branches actually because it's essentially telling you that now wait a second so that would be zero that would be zero and we're having like so we're having q0 q1 and q2 okay and then one zero b zero so those are all like those are all share right they're shared so you would basically have in here as well so you'd have actually these two can be summarized into one branch where you'd have if it's in the plus state i'm not so sure if you can do that then that's in the zero state you could probably summarize that this way it doesn't zero state that's in so zero so you've turned these two rules into one rule and now you can say and now you can say how can you do here so you could also sort of unify these ones and say could you like zero plus one one one what's the point in doing so though this this makes no sense this makes no sense because it almost feels like i'd have to define the entanglement as a combination of it's the it's it's you know both must be one it i i almost feel like i really almost feel like for more than two qubits this whole thing i recently discovered the quantum quantum bias networks works is really the right representation so where basically you've got nodes right and then these nodes have uh basically probability tables or truth tables that are might depend on other nodes so in this case you would have a network so in this case you'd have a network uh that's april 2020 that's refresh but i'll keep that for later i think that is stochastic systems then genetic description bayesian invasion i don't know how it's pronounced knows that maybe you have two more states multiple qubits the marginal probabilities associated with the root notes notation gates knowledge about a certain domain a bayesian name works represent as a directed acyclic graph with nodes and ages the probabilistic dependence between nodes so you would kind of have so what you would have is you would have a uh a table that basically tells you i should do this so you would have a network you have a graph that is like you know uh q0 q1 right and so the the probabilities for those will be completely independent or not really they'll be actually dependent on q2 as well right because there is entanglement but like the table for q2 would be something like like these right and so you would say the prop like the probability that it's 0 is like 100 right whereas one is like zero percent kind of and so you kind of copy these and here it will be maybe the other way around uh whereas the table for say you know and this is basically q zero q1 and the the the version for for q0 for example and that being q1 and q2 it would mean that uh what would that be so we know that this is going to be 1 100 if they're both like that but it's funny because this case should not be possible at all so this should be both zero percent and here we know and here actually well we know it's going to be 100 percent zero because otherwise this would be one if we know q1 is one but here in this case you would have 50 and 50 to be honest right so that dictates the probabilities now that's not a okay but that's not really uh more efficient at all because it requires that you keep that that amount of data per node and so which basically means that like if you it's it's two to the power of n minus one that's that's the cost of these representations so that that is not more efficient that is definitely not more efficient graphically it's maybe nicer but it's not but that's it's impedance related that's something that i've got in mind for the building a simulator kind of thing with the branches the thing is i don't know how how will those branches look like i have to think about this be more how can i how can these branches look like with two with more than two qubits but that's another that's that i should i should let's put that in the draw for for a second and let's let's finish this so tensor products is just a way of saying no no we're not going to represent states like that we're going to do is we're going to basically i mean the quantum circuit is denser network right uh to some extent it just tells you those are the matrices and that's how you want to multiply them and so tensor network methods kind of might give you a more efficient way to compute those multiplications i i if i understand well uh what is methods tell you and so but i don't know what techniques and how how do you decompose the hamiltonian you give it a hamiltonian it's mission problems i'm not doing i can valid problems is done so in our case we implemented an optimization strategy over the so-called matrix product states the assembly states has been tested already so they've used matrix product states but i need to understand maybe what is matrix product states then like it's written in this form complex square matrices you need to focus maybe then on these and play with google tensa network and what can you do with these a tensor no romper for tensorflow uh jax python numpy okay so mattresses tensor network diagrams crash course intensive networks video that is there's a video okay in a nutshell practical introduction yeah so cancer night so what i'm trying okay it's an hour 44 minutes nice mini crash course there's no works but we could watch these we could watch these definitely i mean i think i get i get the essence but i'm not so sure install tensor network so you create the nodes and then optimize contractions i guess that's that's the point it flatten parallel edges over contracting them in order to avoid trace edges we have contract between contract parallel split node node edges names named axis okay so that will be the next there'll be something that we can do i mean i really want to do that as well i i really want i really want to go deep with these i'm learning a lot of new cool stuff so i'm happy awesome cool |
well this was supposed to be part 2 from the Yellow Submarine project review but Miho reached out to me saying man you're crazy etc us in like there's a bunch of time it's really complicated is gonna take a lot of hours here we go I mean really care I I think I think it's worth spending the hours but I'm happy that I just picked that problem totally in totally that the project early randomly and then it turned out this is like certify you open the box to a completely different type of chronic computing which is what sana do I hope I'm pronouncing it correctly it's doing apparently so okay gotta figure it not so what I'm gonna try to do is I'm gonna try to browse a little bit here gonna spend probably 10-15 minutes taking a look at what that paradigm is and then how this house is different from from regular quantum computing just really try to get to the basics and then see if we can just surface around the project maybe not do a super deep dive into the project but at least understand how is that different from regular chronic computing and by regular I mean what we would you see most of the videos in my channel right so the gate model that is permanently implemented by the IBM Q experience guys and so well let's just take a look see whether that's really so what is this it's literally the first time I take a look at this stuff so that's what I do in all my videos I don't really check anything a priori so blah blah the future of integrated photonics quantum photonic processors will solve today Stathis business problems locations my machine learning good are there any learning materials software and Elaine strawberry fields interactive so me how mentioned I should get familiar with strawberry fields if I want to really understand the project well [Music] so the it's listing the first dedicated machine learning platform for quantum computers are so that's an actual machine learning platform okay so this has to be really specific because those seem like gates as well and it's like a circuit thing but there's definitely some weird things like FK VR which ooh white paper Jones joined slack field from machine learning sorry feels interactive documentation let's take a look at the documentation [Music] mr. Barry fields oh wait a second actually I did check one of these pages it was what I was doing I was doing something and I was checking something when during one of my videos from ado but I think I was not aware that this is something totally different so features strawberry fields getting started as usual continuous okay so that's CV quantum computing that's what I didn't I don't know if he mentioned he mentioned it so me I mention didn't one of his comments or messages he sent me but so this is basically continuous variable quantum computing okay introduction that sounds like the good place to start right and the physical systems are interesting to continuous with a light-being example such systems reside in infinite dimensional hilbert space mr. Hilbert is everywhere offering a paradigm for quantum computation which is distinct from the qubit from the cubic model okay interesting the continuous variable model takes its name from the fact that the quantum quantum operators underlying the model have continuous spectra the CV model is a natural fee for simulating personick systems electromagnetic fields harmonic oscillations phonons haven't understood indeed understand any of those words but and for setting where continuous corner but I guess I guess what this is trying to say is that this is sort of truly in nature ten years in terms of the way you manage the information but I mean really is it really different than the cubed model because in the cubic model you can also sort of operate in a continuous sort of I mean probabilities that so the amplitude in the face is not you have zero and we assure you sure most of the stuff you use are certain certain states like zero to one the plus the minus etc but that's probably okay so there's a table here high level comparison so you've got Q modes instead of qubits okay and an information in it is one beaten here's relevant operators quadrature operators more operators have poly operators the x y&z okay common States common States coherent state squeezed States okay so now um so now I know where the squeak with this squeezed things come because I was one of the things that I say here in the and the code right squeeze squeeze guy was like what the hell is that okay number States so you've got different types of states okay come on states and then poly eigenstates and this is where we know 0 1 plus minus and then the complex face thing common gates rotation displacement squeezing beamsplitter cubic phase okay phase shift Haram artsy not tea gay yeah so those are we're familiar with this is the first time I see this exquisite in displacement rotation common measurements hormone time heterodyne foreign counting poly bases measurements yeah so you can measure on the Z base on the X base on the Y base I think that's what it means cubed based competitions can be embedded into the CV picture the most elementary CV system is the persona criminal oscillator it defined with the canonical mode operators this and this dissatisfied the well-known commutation bull okay it is also common to work with the quadrature operators what the self eternal producer is this way to abstract at the moment we can picture a fixed harmonic oscillator mode say with an optical fiber as a single wire in a quantum circuit these cue modes are the fundamental information carrying units a civvy quantum computers by combining multiple cue modes each with corresponding operators and interacting them with a few sequences of suitable quantum gates we can implement a general CV quantum computation so the D comment Academy between cubed and CV systems is perhaps most evident in the basis expansion of quantum states so Q is this and okay so it's sort of a linear combination of those two things while a cue mode is this stuff what I need to grow off whatever for Cuba's we use the discrete set of coefficients for civil systems we can have a Kentucky's with a discrete set of coefficients for civil systems we can have a continuum the states the states X are the eigenstates of the X quadrature of X being a real number these quadrature States are special States for more general family of civvy states the Gaussian States which we now introduce so our starting point is the vacuum state all the states can be that seems like this the same thing with classical a classical ok with regular chronic computing other states I mean regular it's not regular it's just the gate model or the qubit model let's call it all the states can be created by evolving the vacuum state according to this where H is a personick hamiltonian so here we are again with the Hamiltonians and t is the evolution time i mean at the end of the day it's not that it's a different thing essentially it's just it's a different sort of framework right I mean it's pretty cool to see that it feels like that's really the language level at the same time right so it's like when you've got like Python in classic Olimpia Python Java Script and all this kind of stuff and then each of them is a bit of in a different nature I mean at the end of a what they do is they manipulate the same love the same staff down under the hood and then this is just sort of like a different mathematical framework for for expressing the same was like you're messing you're messing with stuff at the quantum level that's what everything everyone's doing but then the d-wave people are doing something different the Sunnah do people are doing something different and then IBM is doing something different small squad right akin to operators for a single cue mode cause Gaussian states are parameterize by two continuous complex variables a displacement parameter and a squeezing parameter okay let's as always that's the theme of the channel is intuition right so I'm not I don't want on this than that I'm not going to understand all that I just want to gain intuition about that and I think that shouldn't be complicated I mean okay so you've got these things and then you've got like a displacement parameters quizzing parameter often expressed as these Gaussian stairs are so named because we can identify each Gaussian state through its displacement and squeezing parameters with the corresponding Gaussian distribution the names displacement is squeezing maybe come from the fact that that's what you're doing to the underlying whatever Thorin's the displacement gives the center of the Gaussian while the squeezing that reminds the variance and rotation of the distribution so many important pure states in the CV model our special States coherent state displacement and squeezing zero squeezed States ok displacement is zero but this but there's some squeezing so this is so this looks like those are ok the sir dimensions and I mean these are the parameters right so you can displace it exquisite and ok displaced squeezed States it's like eigenstates I can stay vacuum stayed number States okay so that this number States Gaussian States we talk to a Gaussian States ok number States complimentary to the continuous Gaussian States are the discrete number states or States these are eigenstates of the number of the number States are discrete countable basis people I'm really not understanding most of the stuff here this each of the Gaussian States considered in the previous section can be expanded in the number of say for example coherent States mixed mixed states mixed states mixed Gaussian states are also important in the CV picture for instance a thermal state this which is parameterize to the mean photon number this and Alex is pure states by applying quadratic order Hamiltonians of thermal States cv Gades unitary operations can always be associated with generating hamiltonians via the recipe this but this is pretty similar I mean really I might be totally wrong but this is pretty similar to the way that you can kind of Express and build any kind of gate in the in the qubit model right at least there was something like that in a paper it's like this like yeah it's it's e to the something for convenience you can classify unit or unit R is in the degree of they're generating Hamiltonians Gaussian gates one mode and two mode gates which are a so this is one qubit and two qubits I guess are quadratic in the motor paraders displacement rotation squeezing and beam splitter gates these are equivalent I find it funny how they keep going back they keep making an analogy with with a cubic model so you kind of understand clifford group of gates from the qubit model always done cliff for gates which ones were these ones which one's worth this ones image will tell us non cliff ranae its cliff cliff or gates XY okay you see with image with image search you will always get what you want XYZ the harm art SS okay it's all you see you see e to the minus I PI whatever um so those are non-gaussian gates are Gaussian gates and non Gaussian gates the Gaussian gates are sort of the equivalent to the Clifford gates non-gaussian gates are single-mode gates which is degree 3 or higher cubic face gates are : to the monthly for gates in the cubic model what a non non Clifford gates tell me tell me what are the non Clifford gates maybe I was too optimistic nan Clifford gates okay I guess it's whatever it's not a plea for polygroup this we know the Clifford group okay any gate from the forum okay it's not a cliff oh okay yeah good so now then you've got different gates displacement rotation squeezing beam splitter cubic phase and this is what they do so what what I assume in here is it seems like this is pretty similar so you basically if God but this is constant states you've got displacement and squeezing as parameters number States I don't know mixed age I don't know okay because basically okay big face seems the those kids just play with those parameters right so displacement probably I'm guessing the spring displacement displacement probably adds displacement it's squeezing at squeezing whatever those effects are right but then okay and then you've got measurements [Music] okay so the gas in longest measurement citizen class consists of two continuous types on line third line measurements while keen on Gaussian measurements is photon counting how modern measurements and measurements foreign counting so this is basically this is basically what you okay so the measurements you can do all but essentially essentially I might be totally wrong but intuitively that seems like nothing not so much different than the cubed model but it's like a slightly different so you've got to be the different different types of states different things you can play with and probably that's because you're playing with photons I I'm not a hard process sure but I think that's the idea behind this right that you're playing with photons and that makes it different okay conventions and formulas boom the nice thing about standards is that you have so many to choose from an intersection we provide definitions of various corporations used by strawberry fields measurements gates okay so here you can actually deep dive into those things States for bases vacuum state coherent state squeezed state thermal state cod state displacement squeezing so squeezing I don't know squeezing I just like the word what my god I have indeed opened up a box that I don't know if I want to open the squeeze gate affects the position and momentum operators the bases the composition of displacement in squeezing operators was our eyes Mike Crowell and the following quantity was calculated the important special cases of the last formula are obtained one this and this on the other hand okay Chinese artists even to deduce that your blackness what-what-what is squeezing strength s Kaede the position and momentum operators what else we've got displacement we obtained the position and momentum operators position and momentum the matrix elements of this place interpreted in the basis someone needs to work on these people so that this is more understandable rotation we write the phase space rotation operator us it rotates the position the momentum quadratic face it cheers the phase space preserving position beam splitter they will soon the operators according to this against a 50-50 beam splitter two modes quizzing it can be the component to opposite local squeezers sandwiched between 50% beam splitters so control to XK the control test gate also known as the addition gain or the sound gate is a control displacement in position so it seems controlled faces resolution the face or addition of the second mode in the position basis so this it seems it's basically touching the momentum and the position it seems like those operators are defined define like that okay but maybe maybe what I should do next is I should take a look at some of the quantum algorithms so maybe maybe maybe what is in order maybe that helps me understand that lost channels thermal lost channels so that's probably the same thing like do coherence and stuff like that the compositions Wilson the composition whatever regular the composition so far I don't care about this but it seems like it's a little bit more complicated in the sense they've got different types of states so you've got different types of states and then you've got different gates up take a look at what I'll do is I'll take a look at some quantum algorithms in my next video okay and maybe that's gonna help me understand a bit more the basics of this because it can't be that complicated really probably if you want to know the details it just can't be that complicated and that different from from what the other one stuff let's see and then we'll go back to the algorithm to the project actually I really want to go back to the project don't want this to be sort of a tangent I I think it's worse definitely exploring the the whole concept behind wanna do and behind this the photonic so that the CV quantum computing my intuition tells me it's just a slightly different model cool Stadium from more I didn't expect that to end up this way |
if I combine the explanation here on how to prepare the quantum state for like how to encode of frequencies know how I coulda samples sorry and to prepare for the QFT if I combine this with the quantum programming book from O'Reilly it just I mean first of all and again this is just I'm not gonna mi going to go through through those pages because I think it's not fair to show this content you should really buy the book if you really want to read through this and it's actually I think one of the best QFT explanations it still doesn't go down to the level that I would like to but at least the encoding of the signal that's what that's what kind of way is to explain that's how it takes me right and and I have to accept this may be the first time where I see a downside on on the way this is represented here but it's because the way the way this is the way this is encoded is basically by encoding your encoding your samples and encoding the signal in in the face right in a way that if you see here in a way that so here we've got the face pointing at like the top and then here we got it again pointing at the top right so basically it means it's it's it's done a full brown so that's like that would be the equivalent of like sort of one one full I don't know if it's like yeah I guess I guess I guess that's so one full cycle that that would be now be the idea so um [Music] exactly so I think I think this is the way this is this is the way it is encoded so this is the way it is encoded there's another example here exactly so here basically they say the output is true because and this is the frequency right and this is exactly what what is explained in dahveed's block as well try to make a whole it sort of like a concept out of all these taking a look at different different guides so all all this is doing if I understand as well is finding you as the outcome as the pattern right is telling you the pattern which is I guess what's what makes this useful for other algorithms so it's less about here really the signals I will not but it's about finding that finding a pattern in your face and I think I think that's that's what makes that's what makes it useful for Shor's algorithm give me a second excuse me so I think that's what's make that's what makes it useful for Shor's algorithm but I'm not so sure if that's really the case or not but it's really about finding finding the pattern in the face now I'm not I'm not really I think one don't think that I still don't understand is how how is that pattern being constructed out of this right so this is the example this is the example that we that we were given in the IBM Q experience where they say the the result of this is should be should be one says you see one but I'd like to play with I like to play with with another pattern I don't know if makes sense if I do something like this then I do something like this and if I apply the now the gates as they where as they're written there's basically pi divided by two here we've gotta do something like this for and then another one and pi divided by two and then another what I should do is I should have another maybe I can use this one here okay I should use that so I can just play with the input separately because if I go back to this input that it tells me it's one right but I mean doesn't have to be always perfect right that's also what they say in the book here is I mean if you that'sthat's the idea right if your wife is not pure then then you're gonna have that you're gonna have like the the composition of the different frequencies so if that assuming that is correct if I if I just mess up with these numbers and I do these as I was doing before right so this would literally mean that that this way if he's composed my input is composed of of so the pattern is like it's money but not almost 90% its 82% so it's like 82 percent of of why a frequency 1 then of a wave of frequency 3 or 35 and a frequency 7 right so all all of them like added up with these weights exactly that's that's basically what the pattern is telling us what the would the key of T is telling us but I'm not I I one thing that I would like to do is I like we just now say done we get it I would like to understand a bit more that you know the the the way these functions internally maybe without really diving into the math necessarily trying to think of trying to think of a better a better example maybe there's the other thing is you probably cannot include your samples directly so if you were if you have to do a little bit of magic before I think because if this is what you're getting these are the samples you're getting if these are the samples you're getting right if you can encode them directly maybe you can include them directly they'll be interesting they'll be they'll be interesting to to play with it's it's a pretty big example in this case because just like a samples but what if we take what if we take four samples so and I basically add one more cubit to the mix give it four and we and we have another you one and now I take four samples directly from here so 0 21 0 83 no thanks 0:21 I'm gonna take every socia 78 0 78 0 70 is your 78 then I'm gonna take 0 21 again 0 21 again and then I'm gonna take minus 121 right - 121 minus 121 so so this is the this is my employed let's just start from scratch this is my input okay and I see that's pretty nice because here I do see actually I do see graphically sort of a pattern nice which actually I have to take back probably what I said about this representation not being good enough I mean I I see differently like we definitely see visually a pattern here of colors right so so what is the by the way do we have the answer of this here so we can check DFT do we have the answer or not equations equation six just Iike fishin's as follows come on because they can also look for another example may be small DFT example examples i'm een i don't know let's let's let's give it a try with this first let's see what happens let's follow the let's follow the algorithm as described there so and and I cannot see what happens because what I see here is when you went when we are adding the haram arts right we're adding the haram arts the so work we're kind of we're kind of losing some of those uncertainties here then i'll apply that and I'm assuming it's always the following pattern so it's pi divided by 2 then the next the next one is PI divided by 4 but like this the next one is PI divided by eight but this exactly so when I'm adding this the issues when I'm adding these things here I don't necessarily see a change in here which kind of bothers me a little bit but I guess it's because you're changing just a face does anything change pi divided by a oh yeah actually something changes okay yeah I mean okay the things are moved around so pi divided by eight and is here and now we kind of repeat by doing like that and [Music] having having just copy the if I can copy the the controls so I'm gonna copy [Music] here but and now we're gonna do a hotter Mart here and now we're gonna copy now you're just gonna have this and and now we're gonna have another hotter Mart here yeah so this is basically this is basically the result if I go to the to the measurement probabilities this is the result so it's mostly composed of does it mean frequency zero mean but I don't know that's the correct result or not I have to find I have to find a I have to find a an example that it that helps me understand a bit more what's going on but if I'm using what I'm for some reason there I don't know why maybe I should change the signs here let's just change the result at all because in the arc region and in the you experience guide they're using like they are doing a - let's put it back to what it was um I should probably it's probably way easier okay so I I'm looking for another example but I think I think I got the encoding right so the encoding is basically and let me let me let me remove all these so the encoding basically is doing that on the face here I mean I guess there are other ways you can do that in the book they also say you can encode it in the amplitude but it's probably way more complicated to do and then the result you get is a little bit different to read so what I could also try is these so this is basically I would say sort of a square signal right it's just because I think it makes easier for me to see here and to prepare but the idea is you see right so it's like four four elements it's always positive and then negative positive negative like plus one minus one so literally this is something like like this like this like this like this like that like that like that like that so you want to know how is it composed like what is that composed off and and so too if I do this here and I add Z here so this is the result off yeah so foreign and what is just an is like 12 or something yeah 12 so 4 and 12 ok so this means that this is what this is made of this signal okay 50% for 50% one off so I'm not in I guess the way you would encode the trick is how you really encode citric is how you really encode that but the intuitively you do that in the faces and that's what's important right so but but I I you you understand the concept right so this is this is the because you can encode whatever you want by just having those rotations that we talked about here and then you get basically you get basically what would that be what if I do - I mean I I guess I could play with this for ages okay so now that we are completely I think I can say I know how twink and I know how this how to encode the inputs I mean I guess it depends on the on the concrete and on the concrete problem I guess I don't know if you can always put directly the samples or not but let's let's let's say that it's it's basically you encoded in the interfaces but it's still the so the magic here is what I'm gonna do now we're gonna tackle in the last in the last video is try to understand this magic to me it seems like and maybe if we go back to if we go back to this case of the square like that is no here here so if you go step by step and we go step by step obviously if I remove stuff and here so can I come and look at this let me add that here something I'm gonna I didn't know I could just commend just makes it makes things so much easier so what is the harder part is the harder part so that's that's that's the harder more that we can cannot it just be here give me a second so if the probably put it here is the same right now so I wanna commend all this stuff so I can so this is the state we're preparing good so now we add the harem art and basically what's what's happening here is because he is easy to see because this is a plus okay so it's probably easier to see here because it's it's really the extremes rights it's like plus one minus one so when when you add the harem art you're basically so you're getting rid of half of those I don't know if it makes sense take a look at each of the rotations probably say at the first rotation right here can know easily what happened because I cannot look at this that visualization makes it difficult that makes it difficult I have intuitively the impression it's kind of like it's kind of collecting all the stuff it's like rotating it's like folding I don't know why I call it folding it just I have this is this impression right that it's it's just doing because in this case in this particular case once we've done the harem art here we go back to zero for that particular cubed so activities really zero so here really nothing happens but the fit but here in this case here we're still in super position just in that qubit so when we do the controls add on pi divided by two so 90 degrees we're moving the face of what off of these of this of this of this they're kind of moving the face because because without done without that without that we've got like su-35 see 35 - 35 - 35 and if I okay but in this case nothing happens of course because it's it's it's a zero stupid okay but now here yes and actually in this first case nothing happens completely for that particular example right in the first situation there's nothing literally because because that's zero okay so we just got rid of like half of those and then when I apply another how to Mart here then we're getting rid of even more of them so they are like 50 this is your fantasy of 0.5 minus 0.5 etc etc etc now cubed - [Music] it's also zero all the time q2 q1 sorry in this particular cases so this literally means that this is also not gonna do anything now maybe here it's where it's interesting because this is where we've encode like yeah cuz here we've got like we've changed the face and now we're gonna add a harem art now we're gonna go to one so we're not gonna go so this cubed goes to one that doesn't go it doesn't go to zero in this case see if God's zero is 0.7 0.7 and when you add that last rotation would you've done interesting interesting so what you've okay so what is what I think it's happening but I'm gonna make another video on that with an example where I can see something else happening because this is example is too simple I thought it was interesting because actually it was simple but it it might be a little bit too simple because for the first two iterations of the of the QFT we don't see really any effect until we get at that point where it actually catches the negativity it actually catches the the the negative face and it's just it just rotates it 90 degrees and while and and when you when you do that you're so when you do that you're getting into this like it's a point five real point five in complex 0.5 0.5 complex [Music] what happens if you what happens when you just give me a second salt clear I'll clear that clear that for a second turn it into just one cubed and I just want to try so if we were if we're like that and then we're like that and we're up then we are obviously now when we add another harem art as I said we're like so we're back to one if I now rotate a said rotation now I'm like but here's all it one all here whereas here it's like okay cuz here we've got in this appropriate we're in a superposition I guess if I apply hotter martyred on it spreads it over interesting and spreads it over in the sense that it's that unequal superposition I was just trying to because not basically now when we apply the last harem art uh huh it kind of doesn't really matter in this case because we are already so we've already got some gotten the solution that example is too simple didn't work out so stay tuned for next time I'll try to find a better example but III sense a combination of okay it's a combination of eliminating the superposition by applying the harem arts right so the idea is you want to read out the the pattern that's encoded in superposition so it seems like what this is really doing inside I guess basically by because it applies a harem Arden to each of the qubits so essentially right essentially if you would do that without the rotations you would go back to your original state oh I like that I like that I was at the end of the video so essentially if you would apply just harm arts and it just would come back to the original to your original state but by applying control rotations in between you're basically tweaking this you're tricking this face you're tricking this information you're packing it all up so it gives you what's the gives you the pattern and curious why of you know there must be reason why those particular angles are chosen it's 90 degrees right 45 degrees like 22 and a half degrees so each each of those angles is kind of like half the previous one so that also might might have a that also has there's a reason for that intuitively okay cool stay tuned for more |
good so what are we gonna do today we're moving on with the d-wave uh quantum portfolio optimization stuff is everything here plugged yeah i think is everything black um what we wanna do is i want to go in anaconda powershell prompt and we should open the jupyter notebook uh so this is in basically cd workspace and what do we have here so we have the portfolio stuff jupiter notebook that should fire it up and uh let's go get the paper again cool how many times i've downloaded it that's the problem so i can't remember what i have these things or not here we go so we have the the the notebook is now here maybe i should do a screen split equal or uh yeah i'm not sure that's going to be useful okay but maybe zoom these out a little bit okay that makes sense that's that looks better and here we are at the uh so i always i was at uh i think at the last i did think points one three and now what we wanted to do is we wanted to uh go ahead and actually compute the cqr i think that was the next step that's not correct is that correct uh exactly here the summary value the sharpie range and the chicago net score for an all asset portfolio um okay yeah so for that's for one portfolio so what do we have here so uh so have i didn't finish the yeah the covariance so we have we import this stuff let me just go through this again then we have like these asset data that we downloaded from yahoo yahoo finance and so this is loading the data then we kind of have the asymmetrics here market summary is that so i was getting the whole thing into a matrix then i was calculating the market summary the market summary and i think that was basically it's just a big array so it's uh it's the mean of all the assets again i don't know if i don't know if these are the right things to do and the right way to calculate them but we'll i just want to get some numbers okay and then we'll figure out whether we need to change these so we can change it easily the covariance so for the covariance we're trading over the asset keys and we're doing a covariance between the asset and the market okay and then we're doing calculating the beta which is the covariance divided by the variance of the market summary okay and then the acid covariance so the coherence between each acid each pair of acid of assets okay so you have like between aa and aapl and this is a it's a matrix actually so that's why i think there's a bit of redundancy here because aapl underscore a a should be the same let's check this out so what if i print house is called acid cuff so print acid covariance of like of these and print acid covariance of these it's kind of the same but it's transposed isn't it uh or is inverted or whatever these terms are the same and those are yeah yeah yeah okay yeah exactly so but whatever um i don't know if there's a better way to store these though should probably store this in the matrix actually well actually i should be storing these i should probably just do one pass that's probably a better way to do it like a a with the rest and then uh i should probably just do a pass not like you know not not just like a double for loop but okay we can correct i don't know how it's gonna how do we have to then later use these we'll see we'll we'll adapt this okay so what we're gonna do now is we're gonna calculate the uh summary values for an an all asked portfolio the sharpie range and the chicago net score how do we do these how do we do this sharpie ratio what is the sharpie ratio so it's here so um um so it's uh there's also the matrix form i don't know what it is that we want um do we want the so this is whatever the apple w is the work is structured as follows um i i keep like not knowing what this is but maybe i should just search for these somewhere else definition accept accept this thing come on now return of the portfolio minus the risk-free rate and the standard deviation of the portfolio's excess return the risk free rate could be a u.s treasury rate or yield such as the one year or two-year treasury yield divide the result by the standard deviation of the portfolio success return the start negation helps the xiaomi supports return deviates from the expected return uh okay so this what so we have the bet is the ratio of covariance of a portfolio with the market over the variance of the entire market so we've calculated better we have it right i've asked data so ra is the return of the collection of assets return of the like the thing is i'm not so sure so what the i'm not so sure if if return is the price like i'm so far i've been using the price i think i've been calculating these uh on based on the price if i open if i open these file if i open one of these files like if i go here open explorer oh sorry it opens in a secondary screen that's all fine uh workspace and i go to portfolio optimization and data and i check like one of the csv files because that's probably the wrong thing to do so no i think i took the price on close one two three four five five i'm using four i don't know which i'm using uh but like what i want to make sure that i'm i want to make sure that i'm calculating this with the right thing so with the right then i calculated the right thing like the variances and the covariances because i i'm using the price i think it's in what i should use to return i mean it's just as clearance of each asset so how do i how do i calculate the return is the return of collection of assets calculate return off of acids dividing your business return assets is not like off investment stock market how do you target a return investment for stocks subtracting the initial value of the investment from the final value of the investment which equals the net return then dividing this new number the no return by the cost of the investment finally multiplying it by a hundred makes sense but like how much money it's the return of the collection of assets um [Music] for what like for the for the one year period i guess so it's the return of the collection of assets is the risk-free return rb is a risk-free return and w is a vector of weights for assets in our portfolio okay so in this case which of course of portfolio with the market over the uh but i don't know what the e is that is uh be confusing and why you're adding the risk-free return again and the denominator is the standard deviation of the collection of assets matrix form as these from here we develop the chicago quantum ratio okay so i need to clock it this time i need to calculate the standard deviation for sure of the of the portfolio of like picking everything right like um so i guess i guess what the portfolio would look like is probably it's probably something like these right where i say well so i'll call this all asset portfolio and this is basically like you know just just saying like we're gonna pick all of them okay i don't know so that's for sure um and and okay so and what we want to do is uh or maybe i should just uh it should just be an array and i i think we should consider these being like the order whatever but how do i calculate and the started deviation of what oh man i'm so lost what is this e man it's a double usd this is w right um we'll just call it wr for now so this is w then we have better call w all assets we have assets better um so i guess i should just then uh you know uh yeah that's just multiplying these and these e i don't know and then the return is on the return on the collection of assets how do i return so so do i just take like the last value or the last price of each asset and kind of minus the uh and and minus it with the first one and then i just take that like you know as my return it's a really naive uh returns as a return i'll just i'll just do it this way you know um then we can um yeah i i don't know so i'll just i'll just do it like this for now because i don't know like you should have to you know put in there how much you want to invest i guess and uh like okay so the asset return is like these and then uh and then what we want to do is we want to uh kind of uh so four as a key in as a return right do the following so we want to have the last so is it acid data or what do we call it asset data exactly i want to get acid data first and last so we're going to do something like uh as a return for us key equals basically uh ask data as a key and sort of the the last one like how do i get the last element of an array i guess it's something i can index it with minus one python get last almond off array yeah minus one minus one and we minus uh with a zero element it's a really naive way to do this but like yeah that's kind of my return right like is the price gonna be higher or lower just let's just like do it like this that's that's all fine and now we'll print this guy print as a return okay cool so we have here um a perfect some negative values we see some positive values now uh this is this is uh this is the asset return so we have the asset return now how do we calculate the um and i guess the and i guess the the portfolio return is you know taking each of these it's like if it's one then add it up if not like yeah cool so and the rb is the risk-free return um [Music] investopedia risk free return this is something to do with like something that's like a theoretical return attributed to an investment that provides a guaranteed return with zero raise the risk of rate of return represents the interest on an investor's money that would be expected from an absolute risk free investment over a speeding period of time the yield on treasury is considered a good example of risk-free return u.s treasuries are considered to have minimal risk since the government cannot default on its debt if cash flow is low department okay get it how do i calculate that the capital asset pricing model one of the foundational models in finance is used to calculate the expected return on investable asset by equating the return on the security to the sum of the risk risk-free return and risk premium which is based on the better on the better office security in the cabin formulation yeah but i wanna how do i calculate these risk-free raid the better of the security the return on the security so is the risk-free raid the bed of an acid times rm we know what rm is um right overturned i don't know how to calculate that the yield on the u.s treasury securities that's what's used and thus investors commonly use the interest rate on a three months us treasury bill as a proxy for the short term base free reign um just give me an example um i don't know i'll i can't just i'll i can probably just move on with zero let me let's rewrite so 10 year treasure constant maturity this is the price of massachusetts this is copper monsters because i can say risk free since i'm back by the s garments um whatever we'll just pick like i know 2.63 um i i guess that's i guess that's what we'll do um so the risk-free return so so we'll call it like yeah v3 return 2.63 whatever [Music] good uh so we've got that and uh okay and now uh the standard deviation so with the collection of assets standard deviation uh numpy standard deviation pi standard deviation std what do we give it specified axis so but it's the standard deviation of a collection of assets i guess each acid has a standard deviation right so is it just the yes a bit but yeah i guess that's yeah i guess that's what we it's maybe the average standard deviation and of the collection of acids because i guess each one has so i would just you know kind of copy that and and go ahead and do like std and then i said std std uh what no no no exactly off of us data as a key that's probably what you want to do print asset std so we want to start deviation as a keen asset better sorry oh sorry i just probably killed acid better that's what happens when you copy base code you know there you go so we've got the standard deviations [Music] and then standard deviation and standard deviation of a set of assets instead of stocks like i suggest the i guess i could just do the std of these right it's in a measure of amount of variation of portfolio by squaring the weight of the first acid and multiplying it by the variance at the square of the weight of the second acid multiplied by the variance of the second acid how much the investment returns deviate from the mean okay so actually it's not just um so it's gotta do then with the uh okay it's the square root off and then you're squaring the the the weights of each of each acid in time stereo standard deviation okay cool but so i need to collect sort of a collection of assets so it's this is the vector with the weights this is the beta of each yeah also vector of the weights of the of the betas and then we are like i don't get i didn't get like is it a number or what is these or is it like sharpie ratio you know what i mean like w is the is a vector of weight standard deviation of the collection of acids then we develop okay i i i i don't get i don't get i i'm i'm i feel so stuck it's half an hour ago it's gone like through just like these man um it's a it's a weight it's a vector with weights and then it's time these and then these are just like they're returning the collection of assets so these are just single values right like and it's the overall return what this says is return of the portfolio it should be a number minus risk three divided by standard deviation so i'll just i'll just do it i'll just do this so the sharpie ratio sharp ratio in this case it's basically the so i need to calculate the uh so i have the risk for return i i have the acid returning here but what i need to do is i need to add all the things up so total return i guess what i would have to do is i would have to uh i'm gonna just add them all right like but i would need them for for and i wouldn't actually have probably built a function where you know given uh yeah given an actual um vector of weights then i can uh it can calculate what the return of the portfolio is because then it's proportional to the weights in there right uh [Music] all acid return [Music] and then basically i don't know there's a faster way to do it but like i'll just go ahead and then and do it just like these as a return because we know it's all with equal weights uh that's the key so we also have this here okay to portfolio return yeah i don't know if i'm doing this correctly oh but this is the raid actually the risk-free raid yeah that is probably not and so the standard deviation and the standard d is the the uh the standard deviation of the whole thing was the basically risky return i'm lost all asset return all asset std so std and non and then i'll just kind of copy paste these and these basically say you know um so what we're gonna do is that uh so i'm just gonna add everything right uh and at the end we'll just query uh because it's like equal weights is you know uh one like uh so this basically is just one so what i would just do is i would add add all these things up uh because i shouldn't care about the square ones and so i uh [Music] as a key so we'll just add things up and then at the end say that this is basically square root of like this is this is the way that you run it i think so we'll print these sorry should start with this zero okay so now we basically have that the sharpie ratio all assets is basically the uh the all uh the all assets return minus the risk free return divided by all assets std and so if i want to go ahead and print that okay that's all we have um now again i'll probably plug in a couple of functions in here to calculate these for a given portfolio but we'll do this later um i don't know i really don't know what the minus are b here is the plus rb here is i don't know what the e here is but i know what what this is here is this risk free rate whatever that is uh i'll just i just use 2.77 um yeah but we understand what the ratio means right so this means uh it's it's the return that you would make just purely because of the risk you're having and then you divided by the standard deviation so you're um you're accounting for how much uh volatility there's there's there i mean there's just a big storm going on outside right now but it's cool okay what's the chicago quantum ratio then [Music] is there covariance where cove covariance im is the covariance of the eighth asset against the entire market so it's not using the risk-free stuff it's it's what a nominal what are nominal assets i think i search for these already but like bond or share statements and not realize it's your confusion um i guess that's i guess that's what it means yeah okay risk free investments have a near zero covariance with the entire market uh okay but again like i guess what they mean is that you take the covariance of each acid the stand division of each acid and you're multiplying these four so you get a cqr for each asset in matrix form we explore these formulations by a variety of classical methods which one we'll find in uh three both formulations are rages and thus neither is properly suitable for a quantum quantum annealing solution rectify this by exploring the natural logarithm okay okay let's though let's let's get the cqr though it's the covariance of each where do we have the covariances as a covariance but it's of each asset with the market so didn't i have these though wasn't this better no those market co variants okay we got it sits here uh oh but it's an array yeah but i think i can take the value like uh yeah yeah yeah i think i could actually just take one of these values actually [Music] i think i could just do these and then do the zero one i think it was equals these i think that's it so we just get numbers exactly uh [Music] and so um but like again what do i take do i just take like the uh do i just take the average cqr uh like i i don't i don't know what i i it's not clear what they're using here right it's not clear what they're using uh to then calculate that over the actual portfolio uh this is not improvement over the sharpie rich in terms of computation as we need not consider amino acids okay we understand this but now so now we're exploring the natural logarithm of the sharpie ratio it's like how can i know these like how can i know what this is maybe maybe maybe i should just take a screenshot and ask the chicago guys uh how do i do this yeah oh sorry here we go so i'll just screenshot these this twitter tweeter tweeted tweeta what is this e i just need to know these events uh is this why is it going so slow twitter tweeter so no what is this she can't go why is it so slow so uh capital in the attached equation is it is it the average or what is it like math notation capital e mr ray's number that comes where it means to raise the number that comes after it to a power of 10. no that's not listed mathematical symbols that's not what i meant like uh now we're not gonna get anywhere here it's like there should be now i'm not going to search for capital e because it's going to be everywhere but that's just going to be impossible to to find i guess okay um whatever but so the natural logarithm of um of the risk-free return minus the natural logarithm of the standard deviation yeah why why is that better in formulating a consistent quadratic form finally we settle on the chicago net score which is given by rw arizona is the weighted portfolio is a weighted portfolio and alpha is a real number in most experiments we choose an equal weighting where n is the number of assets included and we choose often neo1 these are not requirements but they do make the computations in the way slightly easier there is a wide open question as to finding optimal weighting and optimal alpha we explain how to formulate the quadratic form to for use on the d-wave in in the appendix number four so here's this e again [Music] okay so it feels like that was a bit useless and everything but like number four so how do i get there independence i guess or is it no it's here it's not it's chopped four so okay so how do we do this so how do we cube this thing the main thrust of this internet front of the cube which then presented to the wave previously results the classical sharpie range consider following the sharpie range is defined above as these the numerator can be expressed as a simple dot product uh where i'm moving wr the expected return and the relative weight of the ice acid respectively okay so the sum of expected return yeah i mean i feel i've been losing i've been i feel i've been wasting the last hour so um so the sum of the expected return times you know uh each uh each each relative weight the denominator can be expressed as the square root of a quadratic of a quadratic form so okay so the standard deviation is what they express as the square root of these so what's the formula of the standard deviation by the way formula okay so it's the square root of um each value of the population minus the the mean squared divided by the size of the population okay [Music] and here they're saying that this can be expressed as so uh we've got like the the square root right and and then a quadratic form where they where basically what they do is they is the sum of the sum of the so what is the variance so the rise of each acid and qi is basically it's cubic right so qubit one represents acid one and so we've got the variance i know it's it where qi it's a binary classifying whether the acid is in the portfolio or not okay and one will immediately recognize the system vision as in the initial formula one will also recognize that the sharpie rich is not proper quadratic form and does not suitable for the wave so two times the co-variance between each acid oh it's like why all this stuff we find the shkaya quantum square solves this problem and can be presented as a quadratic form okay but like if you don't give the actual solution here in terms of this is just a sharpie ratio but the the ckness is for ryan said like how how is that like ah okay so maybe this so this is the variance i get it so this is kind of the first part of of the quadratic form and then i don't know what is it is this e the expected return i don't know what is it developing the cubo to a number of assets in a portfolio a universe you consider universal u of n assets when dealing with a single asset portfolio we only consider linear terms in particular when we have a lower triangular matrix or a zero diagonal matrix products of the formula blah blah blah what is these those pick off only linear terms in this case we concisely model the inverse sharpie range on qubits and use a penalty on the couplers toa finds one as the portfolios with the highest ratios okay so you just add penalties to the couplers so they are not picked up and we pick off only the linear terms within the variance based on this formula what we created unique cuba for each size portfolio by applying the weights directly to the matrix do you want to find moving to two masses we have substantially more work to do so looking at a single asset there are no covariance terms to deal with and we can embed the inverse sharpie ratio darkly the inverse sharpie retro directly onto the qubits we create a unique like it's so confusing because they keep switching from sharpie ratio to to the cq and s and i like i have absolutely no damn idea what what they're doing what they're explaining they want to do the inverse of these i guess so then you have the quadratic part like as a multiplying factor and then all these other stuffs just as a constant that you can [Music] we can embed the inverse sharpie wretched document qubits will create a unique cube for each size portfolio evaluated by applying the weights directly to the matrix so qi and qj can remain binary we divide the linear terms by n and apply the linear affine transformation we divide the variance terms diagonal entries by n squared times n minus 1 to avoid duplication i guess i guess they're talking about a cubo matrix right the cuboid matrix and reverse the sign on the linear terms finally we apply a scale factor to the cube and write it into our n times n times n matrix for processing by d wave like an example would help actually you have some reach to choose what you find the shift factor to do a for each desired science portfolio we add a penalty for exploit portfolios different sizes while maintaining accurate values for desired portfolio size so it seems the way that you you're gonna your your fooling the d-wave to peak like other sizes are by adding the penalties um but still one thing that it's not really clear to me is the the matrix form they talk about uh for the cubo so uh d wave q matrix i guess that's uh i don't know if i checked that last time with my check last yeah i checked that last time yeah yeah okay those are the single terms right and then the upper terms are like for the couplers 0 1 0 2 and 1 1. by y like a n times n times n matrix so i'm getting i'm i'm if i'm getting it correctly what they do is they just develop a cue ball that is it's just the variance with the market maybe let's give it i i want to try this okay i just want to do something just like the video so um maybe i'll just take that make a matrix out of these okay so uh or uh let's launch the wave the d-wave thingy here i wanted to the id workspaces yeah so let's work with this email it should work with this email and yeah i think i had a workspace on supportion programs deal with examples oh wait a second i have like a id did i create a repository actually did i do this let me just log in so you just in case um just want to watch i just want to log in and uh find oh come on two factor authentication it's good actually stay safe so oh why could i oh i don't have these here right now oh crap whatever i can't actually open this up right now because i have the wrong phone with me so we'll just uh you know what we'll just use some of these examples and and i just wanted to get the uh so the sum of the covariances divided by these no but that's the that's not that's not the point the point is to have uh what is the point actually so still loading what i want to have is i have the market covariances so i have this here so if i now uh market covariances okay so if i now do these right and i just um what i do is i sum these things up no i'm not going to sum these things up i'm just going to make a matrix out of these right numpy create diagonal matrix i think you can i think there's a shortcut for these right is this the way it's supposed to work diag and then the array np then the actual market cove oh sorry it's a um python turn ticked into array can i just query the values items some obviously stick values okay so just there we go yeah there we go okay so here we have the diagonal matrix um so this would be this would be basically this is basically the cubo right uh test cubo uh but then oh you wanted to add a penalty actually uh so how do i do that then uh is there is there a quick way to do this or we'll just do it the funky way so uh test kubo and basically we'll just uh you know uh print test keyboard so i'm going to print this now and then basically what we should do actually is uh oh come on what is the cpu five six percent all elements of matrix can i just modify like modify matrix elements that fulfill the condition can i do this if commission is mad yeah i can do these oh that's nice okay so i can say testcube or how um sql bigger than zero uh or equal dense euro then um say i don't know uh like a hundred okay yeah that worked out nice and but we should probably negate the should we negate the actual diagonal map because i think they do these right when they divide the linear terms what do they do so pick the linear terms in this case we consistently model the inverse sharp here right here in cubits and use the penalty and accomplish that's asset portfolio we only consider the new terms in the cube moving to two or more assets with newer look we create a unique cuba for each size portfolio by applying the weights directly to the matrix so q i q j can remain binary i don't understand that with the divide the linear terms by n and apply the linea fine transformation do i have to divide the linear terms by 10 so uh by sorry uh how many portfolios we have one two three four five six so i would say if cubo is different than zero then or we can just as well like do that okay equals 0 100 so that divides oh i cannot like how can i i cannot do that i guess can i just divide the whole thing i think i can probably divide the whole thing yeah i can divide the whole thing okay because if the rest are zeros i don't care um and i should probably multiply it by minus one maybe just just to make sure that those are negative and so they are they are lower values i have no idea uh yeah and so i should probably then take these metrics and and drop it in here so bqm conversion offset your program begin basic programs cuba so here or just give it like i just like why not why not just like you know uh f6 come on like i have i have six acids i guess i can oh yeah but then we'd have to add all the quadratic terms blah blah blah python is not installed but that's like whatever um how how do i how do i do this uh so how how do i do this now i've basically literally the matrix in here and i just want to uh what i want to do is i wanna i wanna embed it i guess so uh d wave embedded a cubo matrix um um i guess i guess i guess it might be easier to just um install the sdk isn't it like can i just uh resources how can i just download that like oh come on max is calling my email you're kidding me uh let me check i ain't got any email i think i ain't got any email [Music] um reset the code there you go uh so the code is 153. so i want to download the thing i just want to download whatever sdk motion software documentation tools here i don't want to view any damper motion sdk okay so here we go so we have these how do i okay i should just basically just use that probably okay so i'll open non terminals so basically uh anaconda come on come on peep what what happened i hate when this starts lacking so much come on i won't peep installed uh functions okay how do i okay so peep install wave motion sdk hopefully this will be compatible and how do i then use that right software separation cell from stack learn more blankets over okay is million condition of res interfaces to communicate with d-wave sampler cloud client so you get a solver like these okay um it's installing i don't know how long it's going to take we can try this quick this quick example but like from configures client like how does this thing know my how does this thing know my actual um api setup uh install blah blah blah problem inspector configuration file oh this is where you have probably the ip api endpoint authentication token all that stuff i don't know if i'm gonna make it now it's just too complicated oh not complicated but like yeah that's not easy to find so i'm downloading these and so that's the installer what's these um model classical then sizing dragon consuming models introduction time mode examples okay so this is about like this is how you're just likely to create the models um getting started that's probably where i should go initial setup installing options to motion tools configuring access to d-wave solvers uh this is where i should probably open up both did this get installed okay that's what circ though okay um windows install virtual environment blah blah blah ocean software alternatively then set up the environment install contributions to motion tools this is before you start writing code you complete the setup with environment with two last steps adds non-open source tools suggest inspector configure access to diy solvers [Music] okay to do it it includes an interactive client that sets you through the setup that steps you through the setup the interactive setup and commands set up tools if you did not install could you put a package with the inside command okay okay so basically just got to go through the install just like that yeah i guess i guess we're not doing it today uh i'll just drop it here it's been like an hour and a half almost now um but i basically what i want to do next step is just uh i just want to send these and see what see what we get out of it but this whole thing it's just i don't know um i think i think i got a reply on the tweet uh hey cj cool uh this helps i think it's expected value of a random variable so basically the average right no cleave in space definitely not the expected the expected value of a random variable or a field in a tower of fields is from wikipedia it's probably expected value as i said okay so this means uh this means that uh where's the paper stuff yeah i expect expectation value that's because of a single ratio but then like if we work with actual uh mattresses then that doesn't then that doesn't matter it disappears so we probably should work with the matrix version of it off of the ratios which is then just the actual uh ratio per you know associated to each acid like these right like so there's no e anywhere it's just a covariance okay this transposed expected value of the variance x and the expected value of the ready portfolio what wow i don't know i don't know it's really obscure to me right now uh what these really the foreign's like i don't know they don't explain that either um it's you know at the end of the day just seems like what they do is they they just put the friends um in the linear terms and the cover and the covariance in the uh non-linear in the in the couplers um what's more like two times the ryan's it's it's really i don't know they could just start it like they could just have started this way i guess it's a lot of it's a lot of stuff just for something that seems to be then it's it's i i don't know i don't know i don't know i don't know i have mixed feelings i have a big big mixture of fillings right now so this is done and go through the setup in the next video we could also use qcware though but i i let's let's run this locally because i have the data locally so uh what we'll have to do next time is just around the uh where was that just easy wave setup because now i don't know it's gonna take a while to install all the stuff i guess and then yeah and and i i think what i'm going to try to do is i'm going to try to get the one asset portfolio example done i'm going to try to do a two asset before the example done and i'm just going to call it today i'm just going to call it a project i guess it's uh yeah awesome i don't know i didn't feel like really productive today |
This is my post on LinkedIn copied here: <br><br>You have got to love the drive and determination of Quantum Intuition trying to work through our paper on portfolio optimization of 40 asset using quantum computing. This is video 2. co-authors Jeffrey Cohen Clark Alexander
<br>Even I learned (or remembered) a few things from watchiing him start from scratch. At one point I was wanting to say "look at equation 2" and other times I was thinking "you are doing great keep going"., Thanks for the nice words and the inspiration ;) I am really enjoying the exercise of trying to replicate ur work! |
cool so this is my second attempt to record this video I basically had to trash the other one because I realized that I was in pause and I was just talking and it's a PD I mean I haven't really I think you probably didn't lose a lot so I was doing basically good things I was going through so I talked a little bit about these answers in here and what I want to do with it so I want to basically try to kind of hack into Italy try to you know play with it see what happens because what I kind of came to realize is that you know really what this is doing right these anzats so let's let's recall this a little bit that was what I was talking about the video that I just trashed so if you have an a matrix of your coefficients of your linear system of equations it's this one and then you have the cat X which is the vector that encodes your or the hulls your variables in the in the system of equations and then you have the KP that kind of has the right hand the right hand side of your system of equations all what this is doing is trying to approximate these right it's not approximately trying to come up with it cut generates one of these right and and so what you're doing with a hardware test and theory is extracting a certain property certain property that allows you to basically calculate I don't know if it allows you to calculate directly that or it allows you to kind of work towards this equality in here because the idea is if you think of these two terms being vectors and you know the should lose on my camera but this is B right this is P and and if you know if we call this this whole thing you know this fine thing or is it bad about what it's this later but so whatever the easies right what you want to this the quality or the similarity between these and B is could can be determined by the projection you know by the like if you project those sectors how closely they are because if they're the same vector then the projection is like basically maximum if they are perpendicular completely then the projection is minimal right so you and your cut you want your cross function to be designed this way but we're gonna put this aside for now and I want to play with the East I want to play with this and see um see how so what interference patterns those controls that generate in conjunction with these wire rotations and what I did in the video before is I went through these tutorial quickly and this basically the circuit is a bit different but I think essentially is the same I don't understand I don't really understand what if these those a sub else are just the composition of a right because a can be any kind of metrics and you want something that you can simply stuff into or plug into a quantum circuit and so you know all these numbers they all you know it has actually has to make sense as to me it has to be constructible somehow that's my point and so that the whole the whole tutorial here goes on saying hey let's assume that you know U is just a we stand here so let's assume that let's assume that you know do an example this is how we can decompose a so this is really our a and this is really our use it's just a bunch of Hana Mart's and here they use a simpler answer it's just a one layer of rotations but they there's no real really intuitive explanation of why Hana more tests tells you or gives you what what you need right if we take a look at Wikipedia [Music] that's basically the same kind of demonstration about being the expectation value and stuff so I want to play with these a little bit how much time do I have [Music] anyway um let's open quark that's it let's clean that up first so I can see things better I'm gonna move that into my secondary screen if I can yeah so I can basically now go in here and say so we've got like Y rotations okay so I'm gonna what I'm gonna do is I'm gonna just can I not so I just want to do instead of making these a hermit right so I will sorry it parameterize by as a function of time I will just call I'll just preferences with by okay and I think I should be able to do like this basically and now okay no I don't want the minus i1 Dave okay so I'm just gonna copy the layers three times and I'm gonna use I'm gonna use the same plan because in theory each of them could have a different parameter right but the control states are no privatised so on so they're just like these controls and and the other one is like okay cool seeing there we go cancel I want to move the whole yeah how can I call so the whole column goes in here so that is interesting so that actually turns the whole thing into one one one it's basically it's that's interesting so these basically does nothing to it oh no this actually okay yeah that's PI of course I wanted to do I wanted to do PI / - that's what I wanted to do like me me update that quickly so pi divided by 2 n divided by 2 to PI over 2 PI over 2 PI / / tool - ok interesting so this is giving us a particular superposition where am I so this is basically telling us so this is 1 1 0 okay interesting so these kind of creates the equal superposition so that's like all hot Awards is that of course changes the phase of two particular elements right they many amenities in this element and so here's what interference happens right because now yeah so now this doesn't go back to zero zero but it kind of goes kind of goes here interesting now these dyes also affect affect or also change the it's two layers okay but it's I'm kind of I'm kind of like it's probably a run I don't know is it the random decision what controls and gates you're using in here this is QB 0 1 1 0 1 and then 2 0 and this is 1 2 2 0 again because in this case that's affecting only one face yeah but that's kind of create the interference right it's a bit of a so those interference patterns are though those controls that in conjunction with with these so here's what the interference is triggered okay I wonder how these changes if I just go here and say that's pi-thirds right ok so those things are just a little bit less rotated but in fact is kind of the same so here you've got a bit of a different final state so if I turn those into if I change these by like a time-dependent one just these what you can see is that I'm exploring different so those are different different states in the air interesting well this is always empty if I do it here it's kind of the same so this layer okay so and now I know it's like that if we make if I make them all dynamic that's the way this looks like she's still ignoring some patterns in here I want a lot of variability in here because that's what you wanted musing wanna explore as much as Paul as many possible states and I also wanna have moments where I have entangled States because those are I guess what makes it unique in terms of it being quantum if I and fitting how do you select it works like these were why doesn't this work with them yeah you know if I put this layer here and I put these like here so the ones I'm wearing is only the one in the middle then I'm getting other stuff interesting you're all varying at the same pace right if I vary this one I saw a store since so I don't want - bye I just just control what I have to apply okay fine so I go back to kind of a tool time little bit drool all fine I mean oh my god I don't know if I don't think there's anything really crazy interesting its first of here are exploring this what I'm what I'm interested or see is what can I find with a harm our test but just doing the harm our test the way that is explained in here sorry it's my secondary screen which is basically I'll just just copy paste the URL so you also keep it there I know it's autumn a test here we go the reason why we're applying two different gate types is because this president Spencer gets shown in the expanded form so can you tell us have to compute starting with okay so the hardware test a nifty little coin a subroutine called hammer test allows us to use eventually if we if you have some unitary you and some state fine we want to find the expectation value of u with respect to the state now after applying you then we can evaluate the following circuit then the probability of measuring the first get to be zero is equal to these and the problem measuring 1 is equal to DS so subtracting the two probabilities gives us the real part of your likely the matricis we will be dealing with when we test this algorithm are completely real for this position addition here ok here's how our test works by the circuit grammar we have so by the circuit diagram we have as our general state vector please yeah yeah playing a controlled unit re so the idea is kind of basically you know you only apply unitary in the portion of your of your state vector where the control is one that makes sense and then by applying the harm or gate to the first key bead these - these so this turns into these thing we take the measurement on the first qubit around that in order to find the probability of measuring zero we must take the inner product the state vector with zero by its complex conjugate okay yeah so then they just calculate like this and they say again here you go this is so that's just a math I just is there any to defray to understand these that's that's what I'm trying to figure out why is it like the problem you know the problem I have with these is that they just go ahead and they say BAM here you have the explanation of the quantum of the harm our test and by the way yeah you just do it with the control set so why is that and why why qe3 that's what pisses me off that's what pisses me off applying to different game types might even gay times there's another implementation episode said I get say anything hmm there's a sophisticated way of solving these for something you know solving these for these are using a newly proposed subroutine called a harmonic overlap test so this indefinitely wanted us to get us one Harmon overlap test but for this tutorial we'll be using a standard hammer test where we control each matrix for mattresses are we treats controlled answers for calculating so you're controlling every single gate [Music] it's just confusing that's confusing you're creating a control fixed answers but why what the hell is these are my tests so so you're actually having two circuits so one is used to calculate control fixing so one is used to calculate whatever seeing else you were trying to calculate and you're calculating it by controlling the anzats and that's basically what that's basically what the paling people are doing here they didn't even control the answers come on that's the Anne tax is not controlled only a is controlled Dathan even explained was the what's these people come on so what do you get let's let's let's try to understand these okay so you're I think I'm gonna I'm gonna end up doing another features just doesn't this just taking the time it's a bit like over here so let me clean this up for a second and then let's see the hardware test and I'm gonna walk this whole thing here and so we met measuring this cute is gonna supposed to be telling us something so we have pie house everywhere it's in their way that can prima trance that rotation anyhow else in work maybe I can do those rotate started by input maybe I can if I use these yeah I could use that I say I can use those gates let me let me play with something so no keep the key to hardwire trash this trash these so I want to use these and I want to have I know an a here and B here okay and so you input a doesn't it have to put any or what you're complaining about what are you complaining about now I think they need a or they need a like these okay because I think like that I can I can basically do now I can basically do that's a pretty cool feature I need to input a so I can actually do it like these okay so it's gonna make the circuit here peak but at the end of the day I just care about that keep it in here so we're gonna put a block sphere that's the first thing and we're gonna put a chance display here I mean you can't do that with any other visual tool I'm sorry but it's yeah [Music] many so we can kind of create you're justifying for values like if I if I defined like this this is one right so this is a see if I do one zero that's basically a pie so this allows me to define this allows me to define that's really cool this by using 2 cube it allows me to define 4 values so this means that like 0 means 0 0 1 means PI halves once your means PI 1 1 means PI 4/3 times my exactly so that's good oh and now if I'm smart and I don't want to keep typing this in here I think I can even use I can even use those things in here sorry since I change that to a being like tool that doesn't change anything work doesn't work either okay I don't know how to use that doesn't matter it's just use default values I guess but if I said so if I said for example those to be like all too right so that's what we had that that's when we had these as you should definitely save these put Marty's workspace that's the answers p ql s test one so in here reading 50% okay should write this down maybe somewhere fifty percent fifty percent so so why I'm doing it said like how does things like that's a and why did them keep it I mean that's nice just you don't them understand that [Music] not that dad so it's to be honest be daunting because I don't know where to start like if I do these now adding a different rotation I keep keep seeing that it's 50 doesn't change anything okay now it changed what happened 62% and it to be honest it seems like okay so it seems like the only thing this is doing is copying that key we didn't the probability of that cubed like if you do a harm our test with a single ZJ that's that's what you're doing is you're our just aren't you just cloning and not cloning but like your cup yeah kind of cloning de because basically what you're saying is so whatever state you're in right let's assume you're in the plastid kind of go you're applying try thing conventionally to be honest and so for the part that's your nothing happens and you still stay in the plan state for the part that it's one in these that's kind of because of a Harmattan here didn't go to - right and then and so and so what so when you apply Hamid again here and then kind of like what is the so what is this gonna make and I'm gonna be the measure right so if I keep back to these being like zero that's what are we wearing right so cuz now it's like okay but I don't know if it's in the plastic cuz it's totally entangled but let's assume that's the case and when I measure this guy over here how many times on my resume I was a visual one it's basically similar to well measure here right is it it's so funny because you're so you're actually what you're doing with these particular construction is you're so you're you're basically saying for the part that is one just apply a phase shift so you're actually differentiating you're actually differentiating differentiating these I something tells me just something tells me it's literally cloning like so if I have like I don't know let's do this right so I have these things this date I'm gonna add just just for the sake of separating things it's just a dummy dummy cable so and and and the actual test is here so and I'm gonna actually add more times in here and if I have a blast here well that's entangled it's copying the probability I play as that gate or if I apply like a so let's apply a since cupping the one applies in time of - entangled eyes entangled all this kind of stuff is entangled if but if I for example apply it a Y rising Gaede this is literally copying this is just copying the probability okay no matter what I do if I do a next rise again it's copying that's just a neat it's a useful trick okay so you're copying the probability that should be something to remember that's definitely something to remember so you're copying the probabilities I'd like to break this down but I probably should is another in another this is the harm or ten is I guess it's an application of harm our test yeah you're copying the probabilities really if I why is that when you're copying the probabilities so if I do an X quarter for the next quarter right so what's happening here you have a next quarter and so for the for the part that is for the part that they were zero and the part that we want right so this kind of stays stays as is right for the part that's zero okay so if we OH maybe we can take a look at what if I pause select on zero and I take a look at the blocks here down here what does this box here doing is it pointing up but it's a bit entangled what is done that's totally zero okay no no but it's not it's like it's there's a bit of entanglement why if I pas selecting one so the point is for the part that is zero for the part that is zero right it stays like that for the part that is I guess it creates the part that is one it creates the mirror stayed because it applies a Z it creates a mirror state and so it creates in your estate and how do I get her mining Tweety flee the probabilities of measuring zero or one in here is I've entangled these two things and so basically these two states are literally orthogonal as well so am i right to say whatever probabilities written this generates is kind of gonna be copied up here you feel that you're splitting this thing right you're creating that's nice you're creating well code we'll try to go back to why this is there but you're creating how do how to say this your your because it split kind of your according to the proposition and now only only in one branch you're actually applying controls and like the probabilities of measuring zero is gonna be the same probabilities and you've got down here of measuring of kind of like measuring these state right versus which is like 14% I don't know I think I get it but effectively it's copying the probabilities okay so what it's doing it's basically like by utilizing a superposition no I feel there's something else in here that could be useful but I have to come back to it later I guess I'm only know how much time have I been now recording so far for eight minutes I wanna make this it is too long either for you guys but like so okay so what this is doing is literally copying these probability in here and the question is why would these be representative or why is this something that is useful here okay it's calculating a that was directly to project know what that's to calculate these is it yeah that's that's these electronic calculators these starting these what is these let's try to go back to what is nice simple I mean that is the okay so that is the okay so that's these that's that part and why are we trying to calculate that because it's part of our cost function why because we're projecting how much of these lies London is now we subtracted from digit number small norm that the consumption will still be low if it does not agree with this we replace these okay so this is our cost function and the idea is okay said that's what you need to calculate in here so prepared our stay with the answers that we have two dollars quickly and not to put the cost functions what is the intuition behind that's what I like is that's what I have to try to find now I figured that since try to okay why is the latest QB that's kind of the question that I have to answer why is it only applying to the latest cubed that's what I don't get so this is somehow try to get the that component of the hole why don't ask give it that's what I don't care what is he in here there is so representative of that state so this is the zero one one zero about 50% if I if we do these so if I do this rotation with two and three here then I get 67% 62% 89% these rotations what is this 89% kind of represent like how does this represent anyhow that because remember that these here is the X right but for some reason we're trying to extract something from the last qubit and I don't know why I don't know why this is just anchored in the last cubed or in the in the cubed Q q3e that would be right because that would be Q sorry I keep to because I would use your key you want it to make you see if we count this excuse Europe I remember I'm gonna count this excuse here so we're doing rotations we're doing this kind of stuff in here what if we move these here okay does that definitely different right why is it God why is it that I'm interested in the last one okay and that's probably a question for an exercise in for next video yeah that's not gonna be they're gonna get too much out of this today but at least I feel the basis to explore so I've built a basis to explore here the way the anzats works yes maybe I should simply find that what if I had like a simpler version of these where it's like just one layer so let's take the let's take the example of just one layer right and let's have to separate why would that why why that still doesn't make sense why did I keep it that's what that's something that I can't maybe it's a mistake is it our tensed could hammer test so here it says sorry I should be looking at this agency into the camera and here it says autumn art and silly index apply the fixed on that for I in range so you're honest gate type if K type equals one then two or control that okay okay okay okay so there's something off in here what are the gate types you kidding me so k-type what is using zero cubed 0 1 I know what a second gate type it's the whole thing ok type is DS okay okay I get it I get it this is just a generation a generator blog so these beasts in here is it where's he's used oh come on okay okay just go cuz I was like why that cutie why is that anyhow representative that is the way you that is just create the control that is just a mechanism to create the controlled and that is it how my tense Providence we're doing a hammer test now this is the control this is the control and that that's the Beast it's like this is the control dancers and so what the heck is this I don't know so you're doing controlled you're doing a hardware test and you're doing for each Ranger to the gate type the key types one [Music] fkk type is one what is gate tight so this seems to apply to two to three cubits but then there's this support for this gate type thing in here which basically makes it only apply once so that eunuchs cubits I so goes through all the periods ah so this is a map of where to apply these just go to hell me what says this is a map of where to apply things is in if I try this R and waiting for channel should have run everything else probably come on run run it's nonsense run if I say one let me go if I say one hmm why is that the king tiger why is that applied twice oh I don't get it and how is this harm or test applied then special armor class no our test case that gates at gates a palace gates a gate says gates are coming from where's the gates I come from the Primus of this can't believe this or is this gate set coming from coefficient said gate say just set it like that because hey why not it's cool right so they just come out with a gate sent like these okay dad where you come from whatever okay so I gotta take it to this be more but now I okay now I understand this is not a specific this is not a specific thing like it just lost like an hour if it is but whatever this is not a specific it just copies the probability but it's not a specific what happens if I do what happens if I combine some of those right so for example let's say you have another control here and another control here and now you saying come on that's odd yes here and it's things here so it's a sort of combination of those okay yeah this is doing some sort of extractions instead of phased estimation or whatever like yeah and if I do this like then it's totally off rapid clock come on well yeah basically I computed it but that's puzzling but then why would why would these godsake be explained like that it's just awful maybe it's cuz I didn't read but anyways okay so we got something to play with at least yeah but now we understand the horror mark business not done like that okay so there's some extraction going on here and then there is now I understand a please dad there's no extraction going on here and then there's these feast this other component that is the the control freaks and science and so that's a controlled and that's what we're doing to think so we're controlling the ants at and if I compare it to this guy here you're controlling a not the answer at the ends of this game is now controlled is this is this different approach okay anyway but uh it's at the end of the day it's the same idea right I see QE rights at the end at the end of the it's Vicky but I'm curious to see just I think there's a lot to learn from those kind of techniques on how to extract certain things just because I think it's curious what is it really extracting somewhat the face is somewhat it's in theory according to these it's calculating it's calculating like these whatever that is that's what I need to figure out that's what I new figure on because that gives me that value in theory maybe I did maybe I need to take a look at the code more carefully see how that is actually used in here because then they do that this is some some some sums and multiplications and whatnot yeah cool okay but we're getting somewhere at least I figure out what why does this feel the way this is built yeah stay tuned for more people |
Quanah teleportation comparison so that's where I want to do today to explore a bit farther sort of you know the continuous verses of this create quantum computing implementation so what-what Senator dies and I am still unsure about the premise that correctly but does nobody has complained so far I think that's that's the correct way of pronouncing it and then the the sort of the discrete version of Quanah I so this is the IBM experience in this disk Senate though I'm gonna try a key I found the quantity repetition here I probably need to find it I think was in Strawberry Fields documentation mmm so algorithm somewhere let me see blah blah blah blah blah blah operational circuits kind of know it's introduction maybe should you search teleportation docks it's not that's no but it's and it's not Strawberry Fields Penny Lane so software Strawberry Fields okay now this is Strawberry Fields straw refills to commit yeah exactly the right one yeah cool stuff by the way here with this simulating instance could use very well chrome so I haven't tried the editor yet them I probably play with this as well Zhou mmm teleportation I just keep like I'm getting distracted dilapidation yeah Conant repetition tutorial but is this or is this because here we solution lost Direction wish for chronic quantum algorithms no quantum algorithms state teleportation I think that's what we want to do what else was there state gate this is something that I'm I'm guessing the equivalent in this great quantum computing would be sort of the matrix dilapidation so sort of your encoding something in again I don't know encoding a matrix in a gate and then having the same effect on the other one maybe something like that cows in cloning Boston sampling quanta neural network and this is something that I also worked on that I also have done a discrete quantum computing version of it and okay but let's take a look at let's take a look at that and then next we'll take a look at and beam splitting and then probably we'll just go back to the actual Yellow Submarine project because I think I think I'm diverging too much of that and then probably I'll try to understand that based on what I understand here and then I might make a separate series really dive into strawberry fields or exon ado because I just gonna be I'm I think I'm losing the focus here a little bit but let's just just get onto it so States repetition I took a look at this briefly in the other and the other video as well so because meme splitting is the way you create entanglement in continuous quantum computing but let's refresh our mind my mind actually not yours so was the teleportation here kind of thing right so Allison Boclair entangled Bell they hold one of the qubits each of them exactly today by using her Margate and then applies in gate okay so the curry Bell state basically and then they have each of them one cubed Alice applies it in form of gay to q1 controlled by this next Alice applies a harem arcade and applies a measurement to both qubits that she owns then it's time to for phone to call Bob she tells Bob the outcome of her 2qb measurement depending on what she says Bob applies like a different gate and exactly how old how will the test result the real computer blah blah blah blah blah here we had here we had the this circuit so this is the Q this see if I can zoom in this over the way it seems I can maybe I can open the image in a new tab that makes more sense [Music] yay so this this basically the the idea the basic idea here so if you've got an entangled pair of qubits exactly hmm you've got an entangled pair of cubits and so alleys does this on her anzhela cubed which basically I'll just I'll just try to fire up just try to open up a circuit so we can take a look at it I just don't want to repeat the whole thing again but actually I realized that I kind of forgot a little bit about it so but you know one since using the actual such three three so Alice does this and this which basically gives her a superposition [Music] no no no no no no no anna-san skew took a mr. Churchill one of them to the murmur getting the place in and get into Cuba controlled by the one bells so I don't I don't know why the Zen is here flying okay but the idea the idea here is you you apply a Haram art here and and then you do a control so you see entangles Allison tangles her control qubit perm and silica bit with her own cubed in a way that they are let me see correlated right so if I now do this they're always gonna increase this year or one one these two here so and then she goes ahead and she and that's this operation just let me just I'm I'm a bit confused by this ed here right now I think it's not needed so then she applies a measurement here that's not what I'm looking for that's what I'm looking for a measurement to both qubits okay so on mmm I mean of course these two qubits have been entangled before so there's also these and these entanglement and now al is basically so Alice basically applies a Hatem art here why was this Haram art needed she applies a hot iron because then it's funny because it's like it's one of the first things I did and I kind of realized it's hard to come back to those things it's pretty hard to come back to those things and it's pretty hard to read the circuits like that I remember that I did this like really with his ears and once on a notepad and it worked fairly well but I thought by now I'd be able to actually Stanford to the data at least applies how am I getting appliance measurement both qubits and she ohms so if she misses she measures zero zero then Bob shouldn't do anything if she measures your 1 1 0 1 1 10 Bob should apply to X gate Z gain or Z and X Cade [Music] so basically jumping a lot you okay put that that kind of works so that kind of works with so basically because these measurements with their dis partial mesh measurements what they're doing is they're kind of clack collapsing the rest of the state right so so if she had a I don't want to use the notepad because I know that because that's not scalable and I just know that it's gonna be easy to understand like that but I try and understand that just by reading the circuit kind of but it's yeah I feel I'm missing that intuition again that sucks so this is entangled exactly and then so when we measure these and we measure that basically this is gonna make this is what's gonna make the difference right so if you if you measure zero zero if you measure zero zero it means that was a zero it means that never happened that control nod so it means that was this hero so it means that also never so you know it's kind of like feels awkward but it's like so let's let's do the case zero zero right so bye-bye meaning that that this is the zero and this is the zero so if you if those are if those measure zero it means that that this was zero right it means that this control not never happened which in turns mean interns intern here means that this was also no I cannot say that this was zero right because this was zero and then it was in a harem iron so do still zero and one yeah okay but this is still zero and one this is still zero and one right exactly so so this means that because this could be zero one and if it's zero then Bob's keep it stays zero and if it's one Bob's keep it stays one we've effectively you know kind of teleported this right so this means that Bob needs to do nothing and just measure that's what they're saying here exactly so Bob does nothing just rescue bit and in the same so exactly so you see you see how this this is the if feels like you you gotta go down to the measurement and that kind of go back and and see and understand why this works that kind of it's one way to read the circuits but it's not trivial so if it's zero one right then it says applied the X K so then if it's 0 1 means we've measured one here which in turn means that I'm not so sure if this is the correct read but it means that this was a 1 which means that this sign here was flipped here the sign was flipped the sign the the amplitude so the controller was applied and if the control not was applied and we measured a zero it means it was a 1 here it means that because this was one the control here this controller was applied but because exactly this controller was applied so basically this qubit was then kind of moved to one so kind of I kind of yeah I think that's I think that's that's what's happening here and then which then means that in this case because this is a concrete example right where this is a zero in this case then we got apply a next gate to turn that into you know and to its original thing into the zero so the concept here is that the idea of the discrete and I'm probably missing some stuff so I definitely should do a sort of a refresh and this um I mean there's so much to explore it's just it's it's a lot of fun but this basically means the concept here is you say you have and then you use partial measurements so alleys Allison tangles and in silico bit with her own - then - then measure like she does she does she does the the harm our operations or not and then she measures and then backtrack sight so because of the measurement that she's done then Bob knows what transformations he has to make in order to get Alice's original stain and I'm guessing guessing this is just one implementation so but this is the this is the basic idea whereas here it in in Xanadu it's sort of a similar concept because you've got conditional actions based on measurements right so they say is while originally designed for the screen variable bottom okay the results showing in the following circuit so I the thing is I don't know why they use the X in the set gate which are not that are they I don't think they are continuous quantum computing variables operators operations so but it's the same concept right so you see here that you've got in Silla bead is the other one I think because well you're trans you're what you're teleporting is the momentum and the position so and and so you're entangling alice's entangling that and then making a measurement and then based on the measurement so a measurement and and here the thing is because you have different types of measurement if I remember well so you've got measurements and position measurements on momentum and some other fancy measurements like counting stuff because this is really tied to the implementation right which is the photonic type of implementation so this is not like I think the measurements here really do not map into to the measurements in discrete quantum computing but it's more like okay how do we measure our beam aligned right how to measure the fall in sight we can count them we can check their momentum you know stuff like that I think so basically that's the idea because but I'm curious about what is the entanglement really looking like inside because the beam is it's the same concept that then the phase and the moment the player that the momentum and the position the position are always agreeing for example is this what it beam splitting does maybe that's what I should take a look at now quickly but that's the concept is roughly the same so you measure position and measure momentum and then if measure position then you go sort of an I assume the X is a displacement and I don't know what the Zed is if it's the same thing here chemos are spatially separated teleport her known state to Bob Alice now performs a projective measurement of her entire system now this is the one that shows a teleport is the ancillary thing it's different it's a little bit different there's no insular cubed here a commode is there I don't think so there are three because they're three because one is used for position and another one for one for momentum one for position right cameras are now especially separated teleporter non-state alleys now performs a projective measurement so the first one is the actual key mode to teleport the state to teleport protective measurement offer anti system into the maximally entangled basis States this is llama entangling this is this be a 50-50 beam splitter homodyne measurement in the X and the P quadratures respectively the results of these measurements are then transmitted to Bob who performs both the position displacement exactly I know momentum displacement okay conditional to the P measurement yeah but took over the exactly transmitted stayed but those displacements should be permit rised if I understood well the whole concept here so how does Bob know the parameters for those displacements uh-huh I don't know this can be implemented using the Blackbird quantum circuit language ooh Blackbird sounds cool okay that's it let's take a look at the beam splitting to understand a bit more in the anatomy of this the anatomy of this entanglement then splitting beam splitter okay now I won I won I won gates I want gates quantum programs I want kids introduction states gates do we have here yes yeah beam splitter here you have beam splitter so what is it doing what is it doing I have no idea absolutely what does this here mean Medina measurement heterodyne measurement photon counting yeah yeah yeah so you see the homodyne measurement measures the deposition the heterodyne measurement measures position and momentum then photon counting okay whatever but I what is the beam splitter to win game splitter beams later entanglement beam splitter entanglement it's a paper which quarter our physics forums this is this benefit or conditions different to phonons to be entangled by beam splitter lots of references given by the forum users and conclusions massive entangled pairs must already be part of the of entangled pairs and that's the beam splitter just swap the entanglement between the members can the beam splitter be used alone two entangled photons or can it entangle them only in the presence of many other elements like polarizes wave plates prisms and tangle man I mean I don't want to go so much into details I just wanna know what's the entanglement that this creates like seems clear beam splitter gates because it also has parameters applied means for operations with specific modes it is assumed that this is real parameters transmitted amplitude reflected amplitude first mode second mode what is it transmitted amplitude and glossary references and further reading beam splitter nope nope nope okay here we've got some definition for the annihilation and creation operators of to me olds denoted and the beam splitter is defined by okay they will transform the operators according to the Phillipines respond to input coherent States to input coherent States to to output coherent States where by substituting the by substituting the in the definition of the creation and annihilation operators in terms of the position momentum operators it is possible to derive an expression for how to beam splitter this forms the quadrature of the quadrature operators okay so it seems like it seems like it is correlating it seems like it's correlating the position of one with the position and the momentum of the other I'm just guessing right this is kind of correlating these with these and these okay action on the position and momentum eigenstates controlled face da-da-da-da-da-da-da cubic face this is some pretty dense stuff but it seems like the beam splitter is correlating position or position and momentum so the position of of the one key mode with the position and the momentum of the other one and momentum of the one key mode with the momentum and the position this sort of like a difference here with the sign is up here the minus sign is up here and here is up here whatever that means really so it's kind of where am I I wanted to go to circuits quantum algorithms state teleportation but I was as I as I was saying um as I was saying so it correlates those things and then it would make sense that you measure the position and the momentum and then you can probably derive what are the parameters for the displacement you must do here correct I don't know so let's see what's happening here so let's take a look at the code a little bit if I understand if it can be understood PCI Ellison Alice is one bob is two so there's beam splitter this beam splitter then there's squeezed why what was squeezing I don't know squeezing squeezing then beam splitter Alice Bob Alice performs the joint measurement X Kate scale psi some important notes I infinite squeezed vacuum stains are not physically real realizable the function scale whatever that means the function scale can be imported from this the BS gate accepts two arguments set and Phi a variable storing the value of pi is used for setting these parameters in Python this can be imported from Nampa what a sigh so you do so here the the ex Kade because it seems like it's not a conditional application it means it's applied yes oh yes right it's applied yes oh yes it's just somehow permit rised so that's kind of the difference here because we're probably dealing with because of the continuum thing I guess I mean intuitively that seems to me what's going on said good Alice but measure X measure P okay so you measure X into into upside and the measure P into Alice okay okay okay so you see okay so then those that I was confused by the variables and there's some sort of scaling going on which I don't know why but the idea is you use the exact results of your measurements as input for the x case and ZEB gates which DX get and ZEB gate which is then I guess like parameter izing the DES displacement it's permit rising the displacements okay this is really at an intuitive level fairly more simple to understand because it's kind of it feels more logic it's like it's like you entangle you entangle this with you entangle this with your channel or whatever right if you don't call it this way or you entangle this one in the cubed so so they said so the positions and and it seems like really what it's doing it's just it it really entangles them in the sense that they get the same position in the same momentum I mean there's a scaling factor here but it's what it this seems to say it's pretty fairly simple is here or seems the code seems pretty straight like fairly straightforward so and then literally the measurement and then literally you've also entangled that with this one so you need so you kind of create you entangle the three of them really and it's just you need the three of them because you need to destroy those because you measure them right so you destroyed this one in the middle and then you literally apply whatever you measure position wise and whatever you measure momentum wise as display displacements to to Bob's cue mode and and then you have it it's funny because it's much more complex from a theoretical perspective like what those things are kind of looking like but at the intuition level seems more obvious at least to me that seems fairly obvious and fairly similar to what you would usually do with a traditional classical computing thing you would basically kind of copy stuff and then you know and basically use the result of your operation as a parameter of another operation etc so this feels quite quite intuitive whereas that the discrete one and I might be missing done don't get me wrong gamer I might be missing here some of the details so I might just dis might be PS not as in beam splitting bus in the other meaning of PS and and whereas here is complicated because you got a backtrack from measurements you don't understand the circuit because of the entanglements I think the entanglement here is fairly complex because of the controlled operations intuitively it's just a bit more mind-bending I think this is just a bit more complicated but you you can grasp it easy okay cool I hope that was helpful I'll try in my next video to really go back to the yellows to the Yellow Submarine project and then actually try to dig into that a little bit more um and then kind of jump back and forth the Strawberry Fields documentation and the code and then see see if we can grasp that it might be too early but let's give it a try |
so I kind of feel I can just to spread over many things that I'm trying to go at the same time and I just don't like that I wanted to kind of finish the Rubik's fear insert that I started like a couple weeks ago and I didn't finish because it was giving me the wrong and so I was gave me the opposite result and I don't know why two strange words so let me see Silas I okay so I was translating that is the chasm UK on cubed 0 for some reason I was getting 0 and if I open the if I got projects I open the this one that's the original one in chasm and I apply how do I get and I measure right in here I point out of a gate to measure so what do I care thousand iterations thousand iterations mmm thousand shots it's one right cool so um why is that I mean I literally copy pasted the whole thing you see search for mobs so literally copy pasted the whole thing so there definitely that you can see already that transpiled circuit the compiled circuit looks different right so Kasim just turns the whole thing into a you three single you three gate whereas the search one does something we funky which is it does these like a big chain of few three gates hmm but it's like that those literally are the same rotations right six times pi divided by twelve minus pi divided by point time 0.25 twelve times pi divided by three maybe let's do let's try something that's so what about what about I should get better at the shortcuts of this editor but I was just to replace all I'll just leave this one here okay and we're not gonna do anything here so we're just measuring so we're just measuring Keys X there's no harm resolver so we're just doing this gate and here we will turn all the you three gates all the u3 into whether it be this way I won't just do it this one okay so I'll just compare these one operation and we're also just not doing any hard work and we will run these 4,000 shots and we will run these also a thousand times you see what we get syntax error grade I shouldn't have the comma in here let's run it let's run it when it's running okay so it's a u2k okay so it's a perfect 50/50 rotation see this error line five oh these are the things that happen with you and replace everything okay interesting now let's analyze this okay so this is definitely what is these so let's analyze this okay so this is basically this substantial difference in here so we're talking like really so that operation ready that's not okay so pi is pi now PI spine so here pi is just it's just there as a constant I find it interesting okay so how can we how can we do this now how can we know exactly what we're doing here so okay what's the best way to understand what should be the result of this operation and why that's these wait a second maybe it's because of noise couldn't be that the simulator has no is in here because that's way too perfect that's way too perfect circulator that's the circuit simulator noise [Music] [Laughter] simulation shouldn't half noise really shouldn't have nice but why let's try to do something a bit more simple than like what what about just let's just do something like hasn't UK high high high and let's do a u3 rotation so you through rotation type i pi we run this thing we run this thing a thousand times happens so the utrecht aid cert the brightness on the screen is just killing me chasm you can't open chasm open chasm okay you're free have you paid what have I done Kasim you gained what's wrong not an operation or iterable Kasim you gained how is that not an operation oh sorry on q0 umm what have we gone expected on I didn't receive the per year what yeah well a notation semicolons whatever come on so what do we have in here now it's a one with almost hundred percent probability as well well maybe finally and finally so what is in here so when you're gone it's not supported why is this not supporting so why is this not supported if you can just do these that's super interesting so why it's not like why can't why can't I just use Kasim we can try as well okay so okay that makes sense that's a bit more so that is something that so six divided by six times pi divided by 12 is the same like pi divided by 2 right so maybe maybe with the negative we're getting into funky land here kind of pi times 0.25 which is basically minus XA minus pi divided by 4 correct and this is 12 times pi divided by 3 which kind of it's basically pi times 4 so this is easier if I do these thousand times this may be scattered over the parameters to be honest it's just got to do the parameters that's just but I can't believe that that leads to kind of like take me to the completely opposite so that's a okay so Kasim I guess authentically so what's the chasm that this is turned into and and this is basically a YouTube page - zero point seven and 12 point 56 that's that's it's just weird I don't know why this doesn't behave because it's like that's not even close me that's 406 had a mean if I run these if I run these maybe ten thousand times but it's not gonna learn it's not gonna make it better I think six thousand four thousand it keeps it will keeps that proportion that's that's really like if I go and copy this code in here mm can I just create a new file can I create a new file file name test its chasm add file so I got a test and I just do this right now I run the test and I run it 10,000 times yeah that gives me that it's so basically what this means is that the so it's two things so it's either there's some when these compiles it just kind of assumes a certain noise model yeah and so it turns it into something like that or but it runs it against the simulator I don't know why I don't want to what am I even saying something like me so that's super awkward same input and why is something like not supported according to according to the documentation so if I say something like that right that should be the same like saying you won right I times four so I run these all times if I run this thousand times yeah well I think that was the probably as ever this probably is that rotation I never run these thousand times well I get the same fine that's an easy one works I don't know that's it's like it feels like I can't I just can't maybe maybe I'll just put the numbers in there just maybe it's the way pi is computer that it that works differently I don't know so that's again let's go back to the original example so we've got these okay and now we've got these and so so do you three good now easy six times pi divided by 12 six times pi divided by 12 right let's which is two digits okay two decimal Tajiks so I'm gonna but minus pi times 0 25 it's this and 12 times pi but by 3 it's this so if I do this and I do this exactly here my piece right because here we're using an amp I and n chasm just has chasm in there so maybe an amp is way more precise and maybe that's the reason this happens because I mean I'm pipe the pine Empire has more you know has better or higher position and and then chasm just says 3.14 and we're done but now the inputs are exactly the same ones ok so we got six hundred four hundred six hundred four hundred and like the magic happened like the magic happen how is it possible how how is that possible okay almost but it's not perfect but it's better it's better yeah it's it's gotta be it's gotta be in the precision so this means to turn that example into the into into the right example so if I just go back to okay that was this one right okay so it's this so Stevie timing here so if I do these so if I do this just stupid so if I replace all the u3 by the industry becomes by you three years so replace good so I literally need to just turn those things into into the proper or or I just say I don't know what's how do I know what hi okay so what if I do the following so what if I do let's try these because I just don't want to do I don't want to turn that into actual numbers maybe maybe just works well so let's remember so this is if we apply harmonic eight in here so now we're gonna get always we're gonna get always like one right so that do these and now let's see if I just go here and I just say you know what you know what we're gonna use basically okay so this is one so if I take these in here put it back in place here turn all the chasm commented gates into chasm we found a comment and now I just say you know you move so we will not import PI here now to say you know what I equals 3.15 okay what happens so if I do these and I find hot Martin here see if there's gonna be now any difference right running a thousand times okay okay so I think I forgot a comma so I ran these so here we had always one right and now we've got caught what's the problem what's the problem haven't I just have I just forgotten anything in here is -20 0 36 Kasim you can try keep it more precision maybe or is it just a weight circ rounds that up so where's the problem happening right so what if I just go and turn half of those I'm not still getting like am I still getting a really different result okay I'll figure it out at some point okay if that doesn't work now it's just a matter of so I think that issue here is in the way the the stuff is the primers are calculated from a precision standpoint because here you see like four digits four decimal sorry so if it just but I find it unbelievable that it just really gives me the opposite result and so I if I do these here I don't know how to mark gain here and I just just turned those guys all into more into these ordered order to do to run the code sometimes so now it's all one that oh maybe I I commanded the harem art and I commanded the hearth in here that is weird that go back to at super with you can I just put those things side by side I can't believe can I have these now 6:12 it's like maybe I maybe idea maybe I did a typo somewhere I don't know just and before it comes fine maybe this is where things get messed up you know that's pretty nuts okay so I'll have to do what and this is just bothering me too much I'm sorry I'll have to another video please I really will turn all those things into the actual real numbers two digits and see where see where the problem is I just can't believe this I just can't I really can't believe that this is the this is what's happening here so maybe maybe there's a spot where I can identify the things called really wrong okay so if I do these if I do like oh now we do the next operation okay so we're gonna stick with pipe means being lamp I okay so we do now the second operation the first one is kind of it's a bit of an imbalance there but this is the second operation now so the first and the second operation and that still happens we're running also thousand times you've got like four decimal so four digits after the comma and here what am i doing and so here we've got nice and you've got like all one and he is still okay okay at some point this must go wrong so pointless this must go wrong and I'm gonna find it out thousand times times sometimes how's it finished as it Rhonda has it run this they are the three gates now it's zero now it's zero good where is the problem run the code thousand times go here run the code not sometimes I'm gonna have to finish up now have to have much time today oh so now zero oh okay so here things go wrong so let's take a look at these and so yeah things go totally wrong it's the fourth so what's the issue yes nineteen times pi 19 times pi zero point five times time then eight times five times okay so here things go totally south because we've got and I'm suspecting that this is got to do with this with the yeah it's got to do with some runnings rounding error stuff what if I just turn this one into say for example what if I get rid of these okay let's say I get rid of these and so we're on it and here I kind of get I kind of the same so I take these comment that out get rid of obvious in here and I run it without sometimes happens so I get I get it like seven seven hundred and three hundred okay I don't know I guess I'll figure that but I at least I found where the problem is so this is where things get flipped completely maybe it's because of the nineteenth those are really big numbers and it's just I don't know that's funny it's really funny cool anyway I don't know it's just probably useless video but I at least she got what's going so that Kate that doesn't work at all it's so all it's so here okay we'll try to break you down I mean several steps I don't know I have to think about it anyway thanks |
so as you might remember I kind of published this year they last week was like you know the first one to solve this puzzle get surprise from me and yeah a lot of people took part in these basically one person know I know I know more people play with these but nobody actually submitted the result other than one person who actually got it right so um okay with the new ones I guess but I'm gonna I just wanna what asked to go and and and take a look at the video from Valley so validates been a follower for quite a while and he's also won another book before and in another giveaway sort of that I that I did a while back and so he really very kindly shared the video where he explained the solution of the puzzle or one solution and I'm kind of gonna go I also want to go through another one so the idea is you've got this black box in here that's got some dynamic rotations as you know quark has quark has some some cool animated gates that you can play with it basically show you the effectivity of a gate through time and so I use some of them one of them to actually make a rotating black box and the challenge was turned that top Q so turned the first cubed off right so and I give you another cute in here that's already off just that you can use if you need to the idea was okay I didn't really formalize the contest a lot but like you know a straight swap it's not allowed right so because they obviously don't turn these keep it off my point is is swapping this stuff so but let's take a look at Val its advantage solution yeah let's just open the video as you can see the first qubit is oscillating between 0 & 1 but seeing the second qubit is in the state of the zero stage I can make it play in my favor so whenever the first qubit is in stage 1 I can flip the second qubit to stage one and then do the reverse I control the second village and child so now you get both qubits to basically morph at the same time v cubed then it will be it will flip if v cubed is in excited state then this is we turn it off that's cause so he got it off so he got it so he got it off basically by almost doing a swap because the trick I mean the essence of a swap is that you you know you basically you basically do two or three control nonsense the basic idea of a swap right it's another way to make the swap basically can decompose it into these and now say if this is a one you know obviously that's gonna see obviously that is going to I have to fix that it just doesn't work the way that I wanted to work whatever so it's almost a joke already doesn't ever work so it turns it switches this one on but then this is also turned on which is this one off so in theory with these kind of setup you wouldn't need the third you wouldn't need really the third the third gate in the year but you need for the Z you you need for the other you need for the other case where you've got like a 0 and a 1 right because in this case the first gate takes and we thanked the second gate takes effect and but then you need the third one to kind of correct for the swap so that's why you need three three gates in here so as almost in this case because this is rotating so it's gonna be it's gonna it's sometimes one right you're you know let me see if I you guys can see that because I think the idea could be seen as well that if yeah so these these works as well because it's the same sort of effect right because this is 50% on and off and so just to control notes are enough to create the same effect like a like a swab but it's not a generalized swab so I wouldn't work for any input so I don't know if it counts as soap or not I'm gonna give Valley the price because he actually did it but I wanted to should actually I know this but then I kind of paint in them whatever so but I know there's another way to do this which is really unintuitive I think a lot of people a lot of people just restrict themselves into putting gates in here right so and you can also put gates you know before the black box and and so one way you know if this is rotating it looks like it's rotating really smoothly right if you if you put a hardware gate in here you see that it's doing nothing so this means that it's it's gotta be rotating in in a sort of two different different different acts like not the not the x axis it's probably rotating along the y axis if I do a square of Y gate no wait a second I made too stupid here you go a square is quite of not gate exactly so ya say if I do this card negating it it basically stops rotating so it means that I have somehow neutralized that rotation effect so if remember a square root if not it basically takes you to the is the - I or the I I never I never remember which which one is which the minus I or the plus I state so this means this give it is definitely rotating along the y axis because if that's the only configuration where we're or that's one configuration where the this type of rotation wouldn't have an effect now if you place these before the gate the same happens but the magic here is that if you do these right you actually literally like turn the QE fully on because what you're doing is so your first rotating then your then you let the gate to their have their effect which kind of never happens and then so you were doing and not another another square root of not operation or gay and that takes you basically back to one you can actually does this work yeah so you can do that if you want and it's kind of the same idea right so it takes you back to zero so in just two gates you turn the keep it off and you don't even need you don't even have to use a second cubed that's it it's I think it's a really interesting piece of intuition to be honest because it's you know the notion that you can neutralize certain effects by sandwiching operations this is quite powerful I mean that's definitely I think one of the principles behind error correction right I mean your your sandwich in things so that you can error correct for things that happen that you don't want to happen so that's essentially it's essentially the same things it's a yeah I hope you enjoyed the puzzle it's as you can see it can be done in two gates and so but valid solution was good as well and he's gonna get the e-book Valley just pick the e-book that you want it has to be quantum computing ebook and will get it shipped to you virtually of course because it's gonna any book yeah but I hope that I hope that that you enjoy this buzzer I was this fun it was really improvise to be honest I apologize if the contest was really looking like a bit like you're a bit like cheap it was just like a beautiful we can we can equal so I think yeah I hope you had fun cool stay tuned for more challenges I'm thinking about doing something more with this all these puzzles so stay tuned for more |
This was actually the easiest puzzle so far. I solved it in about a minute, maybe less. |
Dammit , I don't use Twitter that much 😂, @Uncertain Systems I guess , I am not sure or maybe Ill be more active on twitter,lol., Community sharing via YouTube?, Can you , post the circuit for any future challenge , I guess you can do that , by community sharing feature, Missed this challenge |
Awesome! It was so fun playing this intuitive puzzle, really like it.<br>Your solution to the puzzle was the most efficent because it turn off both qubits👐🤓 |
I wanted to kind of I wanted to kind of do a video where first I'll show myself hi everyone it's been it's been three I think about three months that I started this whole thing let me just think if I just scroll down yeah three months ago and and we've just crossed 300 subscribers so I'm super happy about it and I wanted to kind of like give you sort of a small tour around what's what's in the channel and and because I've been doing a bit of cleanup I'm putting some playlists together because I kind of realized the thing is moving really fast and and and just you know just to give just to give people sort of a sense of where can things be found I mean the most important thing is I kind of recently got to write a little bit more about the channel just a sentence really because I started this whole thing by just saying you know it's just me learning what quantum computing in kind of exploring and ensuring my sessions but it's really I think it really came down it's really really you know you can boil this down to RO non edited exploration of quantum computing it's something that it's not really commonly available out there because a lot of the stuff that you find in chronic bidding are sort of like really well polish videos from kiski from from other people from other companies that they kind of try to explain chronic bidding and and it's it's sort of in a way that it's really curated and it has to be perfect and has to be corrected cetera so and I come I kind of wanted to get rid of these because that's not my daily job I just do this sort of started as a as a sort of a way to create accountability to myself but then I realized it's really helpful and it's really half of people as well against and you know I don't have to be correct I can make mistakes I can jump on doing the videos right away and and that's kind of the value for me because I I don't have to sort of spend too much time boiling the ocean you know editing the videos and and no I'm just you know just the rumor he realises one sample for people you don't have to watch all the videos but I think it's nice when you kind of realize that he gets tagged and then you know you're finally assembly figure things out and siphon just the woman still too much of your time basically I've been creeping some of the playlists here recently and I think I'm not yet done but basically those are the major groups right so you've got book reviews well I only have one one of them right now you've got quantum games I was a lot of fun as well already bit of quantum chemistry as well but this is really you're just starting with this because in general I'm doing sort of project reviews I'm getting started with project reviews I'm just doing two so far quantum chemistry this is about the Jupiter notebooks and quisqueya and the IBM kind of experience and I'm also doing I'm also doing a I'm also doing the one with the yellow submarine project that kind of opened up all the box for 4cv quantum computing for me I was like okay I was not aware of all that so and I'm kind of like at the point where I'm finishing it out right now but basically let me just go back here so quantum AI and machine learning I've been doing some of the stuff here based on papers I was kind of fun in the beginning the quantum decay and then off with them quantum Gon's narrow networks and stuff like that I'll probably explore a bit more but I'm kind of at the point now where I did a bit of the QA or a algorithm as well this one here I'm gonna realize that the machine learning party so far be boring or it's not it's not a bit underwhelming for me it's not really what I'm looking forward to exploring quantum computing because at the end of the day it just boils down to using permit rise circuits as machinery models I mean there there must be and there is for sure some kind of more new type of machine learning that you can do I guess read that somewhere but I'll see I'll come across these probably later on in my journey I don't know um I'm not so sure if I will just put that aside for a while and then try to explore a bit more other or they're more kind of like you know weird quantum computing stuff um I got textbook algorithms sure the QFT TFT I probably got a refresh not because I realized I made a big mistake here [Music] I think it was part one port I think I from the very beginning I mean if you take a look at C whereas if you take a look at the circuit that I'm building it's like I'm using I'm using control rotations we're just totally wrong it's you really control you gates so I don't even know how I just made up the you know whatever conclusion I was like I think the learnings are still valid but I'll probably redo and refresh that it's definitely it's definitely not the correct way to build things to use that tools and providers I've done a lot of d-wave a bit of Q sharpening the IBM Q which kind of was I think the bulk of the videos are IBM Q based but I now at this point where I actually learned about quick we are and I'm I just fall in love I just fall in love with the tool and I think that's definitely the one that I'm going to stick with for the next for them for the next month's what else yeah I mean some other slice staff face keeper I mean it's it's been mostly I think I'm at a point where I've done I think most of the textbook algorithms like the famous ones and I'm pretty satisfied with what I have each of them has also like a two minutes sort of explanation with no math and and really I think I'll start drifting into project review so I'll trying to kind of learn all the staff around kind of based on different projects try to see you know what are the things that I'm missing and then it kind of the reviews I think I think that's that's what I'm gonna those are gonna be my next times probably yeah so I mean there's a bunch of stuff in here you know just browse around if you have any ideas any other that you omitted touch let me know and it's just been a lot of fun and I'll keep working on this it just makes my everyday awesome really you just look always forward to making those videos perfect |
entangle entanglement is a type of entanglement correlation at the end of the day so don't get lost you know within buzzwords and entanglement is correlation added into an intuitive level and it's correlation between more than one qubit so at least two qubits and this means that in contrast with classical programming or competing when you have two beats basically those bits are independent when you have two or more qubits those qubits can be correlated which means that you can program them in a way that they for example will always agree when they measure or they were always a screw and they measure or they will have the time disagree or disagree etc you can visualize that by taking a look at this at this side of the of the grid in in this visualization and there are way there's many many different ways to do that in a gate type of model but one of the like one of the things you can do always is use control gates control X controls that control Y and that will create different types of entanglement this is one example harm or gate and a control not so basically what this does is it it entangles those two qubits in a way that they will always agree when you measure them because depending on this on the value of the cubed 0 then this operation will be applied or not you can check this out by yourself I'll put the links below of all the other extended videos and you can take a look at stuff like the controls there as well so everything should be linked should be linked in the description |
and this week we've got Jack Jack Cerrone I think that's the right way to prance his surname correct me if I'm wrong though Jack this is his Twitter he's a key skill advocate he's also an Internet senator right now at this moment were chatting the other day and he was like explaining me that he's gonna be working on refreshing some of the tutorials on their side and basically he's got also he's github site in here we're kind of highly recommend you guys check it out because basically he's got everything that he's doing all his current projects and you can subscribe his newsletter which I am of course subscribe his newsletter and I definitely recommend you know you're interested in any staff around like physics and the mathematics of physics cuz he's he's really into that side of things as well based on what I've seen and I'm super happy that he actually agreed to be part of the show so we're gonna take away these video now I haven't watched this is that we're gonna watch it together it's gonna be about 15 minutes I think mmm yeah so let's see how how he did I mean these puzzle was so I added to be an extra display in here which I haven't liked it's not any other puzzles the only reason is these because if there's a lot of qubits and basically these display shows you the system level view of the system and you know you kind of can see so with these displays you can see what each key beats probability look like eyewitness play you can see okay what are the probabilities of each state the whole system can be in right you know it's not that you have to use these but it kind of gives you another view to the panel and maybe sometimes gives you an easier way to understand how the system is set up so you can turn it completely off turn it completely off would mean that the column for this year 0 0 0 state goes all after hundred percent so that's kind of the goal with these display or they're all back to snooze so let's take a look at how let's take a look how Jack need to essentially figure out first which of these qubits were entangled and you know like where the correlations were kind of where the correlations exist within this given unitary here so what I did is I took a gate like for example like you got his ex Kate here and I placed it behind the unitary and I kind of looked at you know what it's action is I guess the qubits when I placed on these different wires and what it kind of indicates to me is that yeah there's definitely some you know weird kind of correlation going on here like for example you know my place next week on wire number two here the last wire turns off obviously the only way that could really happen is if you know wire two and the last wire were entangled in some way are interacting in some way with a multi-unit gate so what we're going to do is first of all we can observe that this middle gate here all that happens when I place an X gate on it is like the qubit itself here in the middle gets changed you know the none of the other ones do which kind of suggests to me that there might not be any entanglement between 8 and the other qubits there's the second assumption but we can kind of test it ever if we can maybe turn off this little bit first all right so see how the percentage of measuring it I guess and like this year or the ones they kind of went down and then I went back up I didn't make a stew me that I need some sort of rotation in another direction so let's try liking this here maybe not that's right there we go okay so eighty gay worked so basically yeah we just kind of saw that we have to rotate it along the I guess around is that access as well as rotated that's a good piece of intuition I mean it's like basically if the rotate if you see it's rotating but it's not really ever going through the like going back to probably all four on it means it's not really aligned in the axis you're rotating so you've got a need a correct for that small offset somewhere right soon it'll rotate through using any you know other possible and perfection that's kind of a good thing to trial kind of like I guess correlated in certain ways exists for the correlation between the first wire and first wire and the fourth wire and the second wire and the last wire it kind of suggests there might be like some sort of C not gate interactions going on and you know since we're trying to I guess universe unitary of this fire gate here anyway as well you know Friday you know okay so just see where that gets us between the qubits that we observe to be entangled if that makes sense so right here when we apply this X gate here we kind of see that this down here turns off which maybe suggests to me that this first wire here would be like the control qubit and it's you know a gate and this here just a few puzzles it's allowed it really it's allowed to just please the gate before it's like it's not you don't have to just place things after this after that the pasul gate like this the black box like you could just leave to XK there and you know I would count that as a as a well solve puzzle but I like the Jencks trying to kind of think about okay so if this is what I'm observing um what does it mean what does it mean that there's like a control like which is a control wire and which is the target wire which in some cases really makes a difference right so I'm from Tron that perspective is nice I mean just approaching it this way would be and put our control here Oh interesting okay I actually don't remember what I put in the box to be honest in the pine box but I think what any video other way around that you actually you know the qubit that's making effect it means that that is that that is the target and so to invert I see not you just have to do a scene out again not a reverse you know right like so this appears to be kind of oscillating back in sort of the reason I'm quiet is because I'm thinking yeah it's difficult to thing and talk at the same time I know apparently not this so we're definitely going to need to rotate this on some other sort of axes maybe exactly it's the same part that you could apply the same tree key for the middle q right so I don't remember the solution nope okay so what's actually just don't do this because I feel like I'm not really doing anything I feel like I'm not really using my brain right now so let's actually try to think so when I apply the t-gates rotating by PI over 4 I believe around the Zed axis and I am applying the square root of XK if I keep rotating this thing ok nothing happens that indicates to me that my guess vector in the Bloch sphere is like lying along the plane like you know I think if we thing is the control nuts were inverted I think it would be easier I think but I can't remember what was in the box yeah without the flock Sears right it's on purpose otherwise would be trivial because he would see where the qubit are individually okay 20k I think I think should apply the same liking that needle cubed there you go and I think now you know it's a kind of a quarter rotation because I'm missing 25% isn't it it's cause it's nothing to do with your skills it's really complicated kind of and once you get into a mind like once again it is in there hey guys so if it wasn't a fifty-fifty stay here we rotate by PI over four around so you're off by 25% so you're in the plane like you're correct like you're just offering 5% then so once you align it and then you apply it square root of x then you go back to zero it says it's again it's not I think that's the problem is that the X so if that's the square yeah that's PI over 2 actually yeah yeah that's correct [Music] interesting again super difficult to visualize in my hand exactly what's going on there but does make sense to a certain extent I guess okay Celeste all right the final thing that we have to do is consider these gates here these sorry I see it's not using the system display to be on a sudden level would be helpful in this case because you can see if you hover over those states you see what other states and so you kind of that would definitely help you see whether hotter Mars will work or not because if so if this is the all 0 state and then this is the state where the second qubit is one I sing a hallmark here go to the job because they're equal probability right like all the states so this means literally that cubit is just in the 50/50 I think autumn Ark or whatever all that trihard mine nice I think it's I think it's really interesting to see how think how people think through these problems because it's not trivial and and and you know it's like one you're watching these and you're like oh yeah you know you're kind of like more relaxed I'm like when you're really doing that like in it's the first time you see these it's taught it's actually taught I recommend you guys try the puzzles that we have on the webpage this is probably getting super boring before it's not it's not it's not again I don't remember but I think if I seem to state distribution like this that the the state of the system I would guess a hot mart in both qubits who do the job I think [Music] but I might be wrong since I never sleep another harmless but they are Margate oh that actually made a change the Harmon Gator missing but it's not a hammock it actually the XK square of not gates should work as well so I'm not so sure that's okay Oh actually I think it's because the way they reason they entangled - like if there's an entire this like a control not gate the way to reverse that is to another control gate like but the target in the control staying the same qubits I think right that's the control not it's its own universe I'm gonna try to visualize right now because I don't know it's just it's very complex very complicated to I guess thinking merits you know entanglement in terms of two qubits in China visual it's actually impossible realize mega bloks Pierce's like that's so let's just accept it move along so rotation by X appears to not be any now so we're going to have to rotate in some other direction exactly so now it's not nothing's happening so it should be I think should try another another type of rotation so obviously if we just try to apply repeated squared of x gates we got nowhere in fact so that indicates that we're going to need to rotate our vector and state vector in some other way okay I guess we can try rotation around okay I'm gonna do this in terms of so you're obviously exciting exactly there should be there's gotta be a cell rotation you probably just a figure out which one because you're you're in the why you're in the why explain and because yeah and then it's just the right type of rotation just never figure out which one and then and then once you get it aligned you probably apply a square root it's quite a square a square root of not given that and that that should be even thing we know I feel like I'm literally just going at the strategy that like enough rotations will eventually get me to the place I want to go yeah okay that's a weird rotation yeah so it's a TK it's a tea gate so you're someone off by like this 25% then wait a second then hey why Limit why would these work so I just don't ruin myself what was that always the you something is this credit or square square root of not and then oh he's doing that before the control not gate so that might have someone expected I find it but yeah like the main kind of I guess strategies that I used was first of all trying to identify like which keywords are entangled yeah that's good behind this thing and then kind of you know trying out expectations first and if I can't I guess to rotate my vector into Blake my state vector or you know I guess like you know this is sort of like on-off probability like percent chance of being in the on state of the off state thing if I can't I guess rotate and I say that you know air quotes if I get rotated into like the on or the off states then it indicates that you need to rotate I guess your state vector in some other plane like you know if I was just looking at the X rotations I would need to also consider that rotations or Y rotations or something like that I mean you could probably see that some of this was just like guesswork and trying to figure out yeah but it's like how they should rotate in yeah yeah that's how it's supposed to be neat the qubits but yeah that's how it's supposed to be cool nice I mean it's supposed to be a bit of a you know trial in there and then once I get place where you really know how to move from then it's where you kind of apply the intuition right and it's a that was good that was good I mean that was a complicated one and as I've already mentioned before if you guys want to play with other puzzles go ahead and check out our pencils page and uncertain - systems.com slash puzzles dot html' still there and you've got different levels and if you like that you know go ahead and subscribe to the channel as well that always helps me and boosts my morale as well that kind of I'm doing something that people like and pushes me to go and and and put more original stuff out there so play play with the puzzles there's like different levels number one two and three are really basic so I'm still working on more advanced levels and the idea is that you know there should be no matter what your level is like level one is really basic but like level ten is really complicated right so yeah and hope you enjoy and see you next time |
Thanks. I am enjoying these videos. |
I can't hear him speak. |
The puzzle link is here :) <a href="http://bit.ly/3glfviw">bit.ly/3glfviw</a> |
Link to the puzzle, please ☺️, @Uncertain Systems, I have an interesting solution. I'll tweet it., xD <a href="http://bit.ly/3glfviw">bit.ly/3glfviw</a> |
quit so where were we basically um these things didn't work well and I think I kind of know another way that I could do these instead of um instead of what am I doing here okay so see she said that goes done that goes away so oh wait Oh possible way to do these I'm assuming is that we basically well we kind of say this is an operation right so we're saying opposite upset is these right and not and then we're kind of now I mean that's probably ways the right between left line lines of code but this is just a dumb p'suer that I can think of and now I just basically kind of say for because you can say Forex mean range zero to cubits - - let me just - now offset controlled by - it's X can use I probably can do something like this right so you're you're kind of putting the operation in here and then you're just adding multiple controls keep its X does this work or not and here would be kind of the same idea I'm going to keep those lines commented right now so this is just so this is the this exactly so I'm trying to keep it good and so now what I was testing basically I was testing EQ it's three and these are this one qubits [Music] show current the QB to occur in the circuit we appending the core over iteration [Music] that's probably let's see if this is gonna run no flat into ops or moments another operation or a triple upend okay [Music] what if I just I'm gonna just print that well so it's yielding all this stuff that should work Grover or calls yelling oh yeah here then here we're not yielding anything but maybe this is the reason so I just probably have to do something like yoke the operation probably probably but if not oh yeah come on it worked look at these so what do we have here come on Omar Zen Hanuman why what is that doing here what is this dad doing here what is this app doing here our Oracle what is this doing here so all this is doing here oh it's just as that it's not being controlled no it's missing the controls so I should have missed the controls there should be control controls in it what have I done here x-range upset controlled by qubits X yield opz so what if I just do this cropper Oracle so why am I getting here that's not good whereas if I just with a cropper iteration and I comment this out I wonder code now I should get jaunty org that's the actual decision operator and now it's it's also not working because this is what this is what's getting in there so you're still getting just is controlled by oh well well well should probably reassign the value now it should be good to go I think that works oh yeah oh yeah not entirely sure though [Music] so maybe a 2-1 so what if I use the Oracle just the Oracle let's just print the Oracle I just print the Oracle see what happens mmm okay now it works beautiful so if I just say number of qubits and may we run the code and what is about the number of values okay that's still something that I've got okay yeah that's cool okay so I found a way to make a multi control X it's pretty neat good good good good good good what else yeah so basically now the question is if I wanna if I want to because I've achieved that already so I can get rid of these think of it these comments in here communities so once I know that now the next step is how can I just give a number in n be values and then let the Oracle come up with these because basically basically you know this is kind of like a sort of multi it's like a multi control set but now what if I want to just say for example you know to flag like five values right so I have to kind of start with okay so how many values when it started with in this so this should always be the first one and then the next one should be kind of peak sort of one cubed and turn it into like a sort of surrounded with egg skates right so you get that so you get that effect off let's say you know the anti control right so so I should probably I don't have put it into a function because I don't really see the reusability of these to be honest so I would just assume now I would just kind of say you know kind of like if and B values this bigger than one right all we need to do is well I'll say while and metallics is bigger than one we can do is well we need to kind of start from cubed 0 right we can just randomly pick with zero and then [Music] thinking ideally you would turn that into a binary string and then you would kind of use that binary string to say what's the element you're flagging for example right so there were you've got zeros but an easier first implementation is if we only allow for example if we've got like say five or six cubits we only allow to kind of flag up to six elements but that's not that's that's just attempt just putting the problem for later on because I wanted to come basically you know do some to some kind of like accuracy tests on this new way of or this slight modification of quantum counting so I would just rather go this way basically so just as the most generic approach so I need how I need Google so - - or cast into a binary representation by a decimal base all the binary if you want a textural stationary number it's binary use buying was being okay and so this basically is a format for painting the leading zeros if drink so what is these have string new format string literal string the trail that is prefixed with f4f detected in replacement fields with expressions named for a name our name friend mr lemarchal literals in integer integer bill integer so what if you just mean you mean what [Music] the European format 47 so so you would do something like these are what say you do something like so you would say format and B values right and I'll be the binary presentation and so what what you would then do is you would say so for now you want to eat trade over those binary values right no no no so you would you kinda you would say so you'd say while so it's a while and B values it's bigger and zero right I have to do these yeah then basically get the binary representation to that and at the end we'll just update and B values okay minus one and so in between we'll just now say or so for X mean wrench from 0 till till till be what size oh it's a string science python length product - string length links miss lane right nice lane string okay so now we're saying basically so we have the index and we say if the x equals zero and do that basically and so then kind of so we need to track whether Zen has been added Brian false default really is apparently our false so if it's one then basically you'll say leave this if the said hasn't been added and now to is you actually we actually do that right when you apply these in the cubed in the position X ok mmm and then you say is that added for and good and so else is it if else like that in Python Python - if-else statements so how long do we play just wanna keep track of the time cool you've else [Music] if a leaf okay or a leaf or just else okay else so else oh here by the way also else it's just a control right so what you want to do is you want to basically have these upsetting here and then you kind of say else objet equals herbs and fall by kibbutz necks now coat there's a lot of edge cases with you know you probably want to error control some of those things but just I'm gonna assume it's working I'm gonna assume it's always gonna get in here first right so should not really check whether whether offset is defined or not else if it's zero right well we just basically do we just basically do is wait a second so what are we doing here so we're gonna do is we're gonna so we're we're gonna I know he's gonna work but basically they Cirque God X cubed x okay so apply it in X K then we we update the the offset and then we're playing over the circ circ X on cubits X so you're basically doing a sandwich with X so we get like the anti control I have no idea what this is actually going to work or not so you're iterating over the range blah blah blah um and so we kind of okay then we close it up by just decreasing decreasing that so we can get out of the loop okay so the only thing that is doing is for the first instance of one we're gonna add a click the actual set getting there otherwise it's gonna be a control gate and if it's zero it's an inverse control the problem is if it's all zeros right so this is kind of a niche case right where you want to basically it's bigger than zero speak of like equal and see your honor so this is a special case I think that's not gonna work out so if and B values equals zero we're gonna just do something here if not else and we're doing all these stuff in here okay but that's not exactly now we're doing is basically so we're doing we're just doing these to be honest and I needed yoga right or we know we cannot do that to be honest so all we needed gu is okay so give me a second so we need is we need a a next layer right which is basically a next layer which is basically a it's just a least and so we need to do is we need to [Music] kind of is in a nicer way cuz i wanna have like if MP values equals zero I want to yield basically a layer off I think I know I think it's gonna be easier I think it's got I think I know I know yeah I think I know a way easier way to do that so let me just can you say so can it yield yeah I have it I have it I have it not gonna go so I'm gonna yield circ so first when I want to yield all the ex gates then we want to yield so circ X 4 cubed x how can I compact that I don't I'm not really good with contact notations so what I could also do is so just basically this you know so I'm just basically these cookie honest guys to be honest it's easier another its programming one y one 101 for a lot of you but it probably seems like this and it's been a long time actually how programming so I'm gonna do these I'm gonna say if yeah so if basically we need to that this this we need definitely and so we're going to say if so if the X right o 0 then we're gonna just basically yoke cert X I know it's a lot it's a lot of yield and I know it's probably an efficient but it's fine this basically builds an X for each qubit where and there is a 0 in here right and so that's kind of like first X layer then we're gonna do a last X layer which is gonna be exactly the same last night's layer and in between in between which is gonna have juice is gonna have like I'm not the control X that's it it's way too over complicated so we're coming gonna have just which is gonna have these right I think that I think that does the job to be honest try so we can try right so that should do it really so if any values is one right you should just have okay let's try it so let's just do Grover Grover or a call let's just do [Music] Oracle and let's just say we're gonna have five cubits and first one value right so this one value should just go here get get that okay but how do I know the leading zeros how I'd the leading zeros I won't have the leading zeros crap but it shouldn't be a problem to be honest because okay so X it's not gonna be X we want in here is we want to process that from like from the end so keep me okay so we're going to start from the last element of the of the of the binary string right because everything else is gonna be zeros yeah but then we don't have the X I know if I have a one yeah I need I need I need that okay so wait a second so I need that to be ID I need that to be I need that to be exactly decimal to binary binary yeah so what's the stair like an except that I'm set to these because I want to have the leading zero that's right I want to have the leading zeros when I've taken zeros dududududududu six years ago [Music] hmm that feel I feel call okay so you can do with ability flexibility binary I do what is these though that I feel 16 okay right here you know come on okay so this is when you wanna end the presentation getting lambda X even attention percentile is here because you can use these what is lambda X what is this does this work at all so what if I just um whatever just don't do any any here just let me test something quickly okay so I'm just gonna do this blah blah blah I'm gonna print these so I'm just gonna say I'm just gonna say quickly so sites on the lambda is these pine thermal one done there's no I'm done well unless it's mall I'm gonna miss function okay this is just a quick way to create a function uh-huh okay that's cool okay hey okay okay okay okay okay not cool interesting so get me no print print get being off like say three with like five cubits right so on Mondays I just want to quickly know this works that's awesome that works cool so cool okay so we'll get these in here basically know that we could just whatever we'll just put it in here and then we'll just say get binary okay so we're gonna get another presentation of NB values that's it okay so this goes away and now we're going back here back here and back here okay cool which is doing Grover Oracle and we're doing five one what happens see what happens are 30 minutes right now what the hell is going on London missing what occurring in what oh yeah sorry sorry so it's basically an two qubits right and the kids there should be nd cubics let's see oh that's beautiful that's beautiful okay but I finished something years I'm using 1x1 layer excellent year end am i something is not right wait a second something is not right so I'm calling five key reason and V value is 1 right so for the MV value is 1 so yeah that's it so Envy values one okay but we're getting the envy value of that minus one okay that's all we're getting because we're if I say one I wonderful I want to kind of have the controls that for these zeros right run code so I should all regenerate us the yes beautiful look at these so zero one but still why two times what are we doing here uh what are we doing here oh yeah well we don't need that obviously anymore we don't need God help you see you anymore look at these look at this and so so now works so now we're doing these and it kind of generates an Oracle that flex one element here ma'am now we're gonna say please slack five elements run code nice so you see it so this is one element right so can I paint on these I don't know yeah so this is one element second element something's off with the something's off here with the I think starts from when a second is this working well so something's now working well again but we have like one two three four five multi control things but they are not being painted in a nice way hmm or print it in a nice way because of the X gates in here but maybe we should do this with the Momentum's so so it kind of said kind of maybe it's clearly organized what was that with them with that not my man momentum at moments moments spoil circuits gates I mean if so that's a moment is just that okay circa moment okay cool so I couldn't basically I what I can do is I can say I'm hopefully this is gonna pretty nicer so I just can say that so m1 it's a Cirque moment okay and I can I just append to the circulant probably I can some appending is to this moment now this is one thing right so this is so this is M cool it will search moment and now it's just basically instead of yielding me we're gonna say am cool append these operation and this thing is gonna be for you know M 3 here in the last layer so on M 3 you know we're gonna say so M 3 and yes hopefully this will work and saw at the end of the whole thing what we do is what we do is we're gonna have to return a circuit or what certain and now we're saying this is the way that we're supposed to own this is supposed to work search moment you're creating it like that so you're kind of doing these like this and you're just saying doing em one and two and three and or basically in return they are returning a circle with these three moments let's see what happens yeah run code they see that that makes it be more clear it's not your depend okay so how do we add stuff to a moment so you can just create a like that construct some circuits circuit append special-operations minutes away or somebody's a moment with pollyannaish 20x is a means of bringing three cubits this is the operations circuit a pen moment moment moment so what I just can't say moment can I just take a look at the API of this thing circa moment on on Cuba's with operation highways operation but with a given operation at it okay so ways operation okay so I'll just go and say so I'm sorry how is that reading that ways operation well the operation operation boom what have we got it here no no it's actually me sync okay cancel positional argument operation no way what happens to here so we're line 63 I know but that's not 18 okay here with operation where where is the operation missing the operation to append returns a new moment I have to kind of initialize it like this now it should be a problem this is basically it returns a moment so you're 10 oh you're gonna have to do like these or stupid kind of like these right so m1 I'm not I don't care about stuff not working well so this is just so this is Jesse no sir command certain moment what's the problem circa moment what's the problem treat Cuba doctor has not receive its what I don't get it I don't get it line 6 to line 17 when you do these qubits fine but it's like tricky adoption has knowledge of qubits sector qubits why is it what Dynamis things this is an operation so why isn't he's working well why isn't he's working attorneys methods - its operations and qubits Wyatt why isn't these working probably should open polite because it's getting dark in here approaching the hour so why isn't this working moments moments circuit what else can I do so operate on determines in a moment has operations touching the game qED's with operations operations moment qubits is it that I need to give it me it's here works come on see 7x cubed Z or cubits - so what is it all is the problem here so what is the problem here it's telling me that agree Cuba doctor has no answer a kibbutz because including a moment with Kiwis X and this X for the second and this is this is actually ok for m1 so this is here this qubit is defining here ok but why isn't this just working come on this is an array ok this is an array it's an array of operations is an array of operations is any trouble is an e trouble so this should be at least that's what it that's what this is telling me and it just be an operation problem no fine it's not fine that's fine right maybe it's a troll I have no idea I gotta try something somewhat that so this is I cannot just maybe it's because of its gotta be an interval so maybe maybe I just got a do these so you're outside and say o P equals ease this is gonna pass or not maybe it's because of the reference yeah maybe it's because it's passed as a reference and so yeah a task is not a complains about em - okay that's not bad that's not bad so it complains about em to the why this is gone what does it say now insert 924 + 2 equals circle and so no maybe that was the error though it's getting before to be honest okay now m3 has not known I'm so stupid I'm just so dumped why am I not dumped first that works here as well it just gotta be it just gonna be an equal right I'm so done yes now finally now it works for one for once or not so what have I done well I gotta heal that baby I gotta kill that kiss is gonna yield multiple circuits yeah and I'm gonna yo dad in here baby inside the loop yeah I know I should see five five five five five five five five high five police okay I like that I like that more I like that more no I don't like that at all where are these egg sandwiches man where where where ah come on I think I'm just noting these alteration you know what I think it was correct in the very beginning I fear and fear one because m1 with operations the with operations with operation and there's just a damn operation in here okay just a demo pression with operation M this frame should be created in here so what doesn't what is the problem it's a problem why why why doesn't this work you create the moment and then you add the operations to the moment run the code but it's there but it's there one a line 18 it's their torches have to give it a stupid name source with operation search comment with moment wave with operation with operation waste all creation and how is it used where is it used to with operation like that okay okay so first of all it's kind of duties I haven't know how this works in [Music] screening or create a new moment and that's not one this must work in this way come on it really means not you gotta be kidding me if not so and you just just going back to this thing with operation just the operations that certain of Zurich but and to its operation this is this is m3u with operation and just get rid of the brackets in here I can get these things here so now we've got em one silk moment and then m1 equals m1 dot with operation just operation right why wouldn't this work what am I doing wrong something really oh no it works okay but it's still this is not thrown in a nice way I'm not like how maybe I'll just add I want it I want to make sure that it's building the right circuit that's that's my whole point in here cuz I've done the whole thing with the moments for nothing otherwise so yields the circuit with a moments ii ii ii ii ii ii ii ii ii ii i that's a moment how can I paint the moments okay so the paint the moments are not painted like truth be told [Music] let's start small on tour so what does it - what does it do it - okay yeah but that doesn't that's not what we want so that we definitely don't want these around the place where there is a set okay so this is not correct how are you doing with this okay call that ten minutes so definitely so the lair of X gates but not there where there is going to be oh no actually it is it is fine that's fine that's correct because this is the zero and this is the zero zero zero one but I want this refers to be honest to be honest I want is reversed okay let's say let's say that's fine I don't care what it's worse or not so if I add if I say three but I should that's fine then it means that it kind of works this kind of works right so so now I've got three just those things just get moved these lists and then it just moves in here okay yeah seems fair seems fair so I think it's fair yeah that works okay cool seems to work so I can basically now create any combination of so any kind of Oracle that Flags a given amount even amount of numbers so what I'm trying to do here is basically cover I'm gonna call this basically you know I think gonna call this clover fusion property fusion and so the fusion is always gonna be the same right put in here Grove in fusion it's gonna be the same if I run the code now it's always gonna be DS yeah no matter what that is actually it does not depend on n V values so it can get if rid of these right and exactly so what you have we should have in here is [Music] so we've got the Q meats and so we also have a so we're gonna have a another function just as a as a helper function in here that's gonna yield us it's gonna yoga's just a bunch of just a layer of parts everywhere okay so this is going to just yield us these so we can get a bit more okay so now we kind of have decision or each layer okay kinda now basically have something here where we can just say append okay append and now we basically can say an H layer and qubits okay we got an H layer then we apply grower Oracle that flex it's got n PQ eats and it's like Santa values and then we've got basically for the diffusion okay so and this is the qubits so and these should be if I run this code now we should have a fully functioning cropper iteration so the first layer then the Oracle and then the whole thing at the end good so if we do three cubits and we are flying one value and - you work like Grover's algorithm so if I I'm gonna test this now a little bit here so and so yeah so this is the east and with like one element and we took Roberson that we can measure and so this would basically flex the element 1 1 1 right so if I now basically how does it works I can just use the science on printing circuit so I can do is also basically strange works print right that was supposed to print any stuff in the air and I'm resolved where other thing it's not me the simulator run is it gonna catch the results automatically if I just run this you're gonna do this for me is it gonna do this for me straining straining gasps trying to get works you write a time I think right for one hour so it's perfect output so something's broken in here what is it broken sir has no measurements yes sir custom measurements that's true that's true so we're gonna add a we're gonna add a so we're going to apply a going to apply a search measure saying that works like these right so measure or this measure circuit gates measure circuits look just a measurement we'll play twenty-two odd target so got manager after school of that I cannot find an example of these are work keep it with a key okay we don't care what key search is gonna measure these for everything and now I shall work forget my list my latest resolve a home so on okay finished correct okay cool that works that works perfect so it seems to work if I basically now say please like me to values right and it should kind of go the zero zero zero right and and the other one zone yeah perfect you see you see okay so now I have a fully functioning Grover something to generate Grover algorithms egg it's a reserved Grover circuits right so that's cool my next step is now to kind of go and and and do these right so basically so basically we'll kind of the H layer is not gonna be like that so at the H layer and a half like so gonna have to change that little bit so we're gonna go and and implement these as and as okay we can I just do a hotter more layer all over the place like the beverages matter because we want that in the plastic anyway and so we're gonna do these is then we're gonna try to control the like a in entire iteration of her over and then we're gonna we're gonna try to do this and measure that cubed and so these should be what I want to find is one of n correlations between our kind of prove that there's a correlation between these sixty two point five percent and the number of elements in this element that this clover iteration is signed that's kind of quantum counting and I want to kind of see how much accurate this is as we increase the number of qubits and all this kind of stuff okay which is kind of essentially a little bit it's a different a bit of a different approach than the actual full-blown quantum counting where you just do we actually do Quanah phase estimation for that but we'll see so now this is kind of this is kind of fully functioning so next time I'll just probably do a bit of accumulation in there okay that's nice so I like the concept of how you can generate things I think the momentum stuff is not really needed in here but it just helped me understand that can you have the layers and construct the whole thing so but am am straggling as you can see I'm struggling with the Pythian part a little bit but it's fine but I guess it's kind of fine because this you could do it probably in a bit everything's in the way for sure in a more compact way from - perspective it's not a problem perfect we live it here |
Where is the next part after this video?, I never came back to it but if you want and are interested in the topic I'm more than happy to connect :) if you send an email to uncertainsystems@<a href="http://gmail.com/">gmail.com</a> ill get back to you and we can have a chat about this or other questions you might have ;) |
yeah yeah yeah so we won what do we want we want we want we want we want we want can i can i um can i do one thing how can i clear can i clear um autofill search engine google okay whatever uh i thought there was a way that you could just clear the search history although that might be not that i'm looking for inappropriate things but you know uh anyway we'll try that later so what are we doing what are we doing we are going back to the senpai stuff um and uh we are going to replate right blade right play directly not the company but the actual thing here so login and uh let me see why it's not remembering can i just yeah google login so there you go um and i was here and i was basically systems roadmap there you go the actual pdf uh okay yeah so last time i got stuck with this uh i got stuck with the three-dimensional uh what the is this guy i don't wanna buy followers you're gonna you're getting a ban how can i ban you from here no can i ban this user can i ban the user block report report uh i mean i'll just block it cool um can i just delete this stuff the message this twitch i'm using twitch uh the streaming app the streaming yeah whatever i'm just losing time with this so uh what are we doing what are we doing we are working let's go to twitter share some share some why is not come on let me see if i can log as in again except cookies no i don't want to sign up i have an account already what are you doing tweeted.com already have an account sign in no because i think i'm using signing as this guy so okay that worked but it should remember i like the black theme and i know it doesn't remember anyway oh cat pictures man um twitch.tv slash and certain systems uh some uh triple integral off so that's what we that's what we got stuck right with the because i i looked at the solution of this problem and i saw that there's a d3x here ah it bothers me so much that you can't imagine how blocked i am at the moment i just like the learning curve is just it just went like this uh because this is probably this is like a three-dimensional vector probably right uh and so r is just a a a radius right so this is really just x square plus uh it's the distance this is probably just x squared y squared z square uh all added up or something like these and i need to make a derivative a triple derivative with respect to that and then i was stuck in here i i just don't know where to go that's the problem is i'm i'm i'm just totally stuck totally like this is such an epic an epic stack that you can't even imagine this is one thing that i could try solving if that actually is the issue right but for these i need to do a triple uh sort of triple integrals and senpai yeah learn to write man because well that would make any difference right because we're integrating with respect to this whole thing integrate so you have this triple integra yeah yeah so okay so you actually can do things like these interesting uh-huh interesting can we try it so let's just uh let's just comment i just comment on these and say we have uh can i do x y z i think i can do x y is that equals symbols and then i just do x y z i think i can do something like that can i um print x print y for instead can i do something like this uh python x two score one a yeah okay it seems like it works so i can do that and i can i can just do integrate this let's let's do let's do the following so let's try uh what is the d so 3d distance is calculated 3d distance calculation so this is um with squares isn't it okay so that's basic stuff i guess but it's uh yeah okay so the original point is one so this is like why it's minus zero minus or minus zero so it's square plus square plus square and the square root of this square root of um i mean another thing that i learned watching a video of a guy i really recommend that's called uh mr or m mr p solver or something like that in youtube um i think that's how he's called yeah this guy so this guy does like really great pi videos and and in one he's just made a good comment saying um that when you do exponent exponentiation uh which i don't think i'm doing anyway here like these i think yeah i think here instead of using a division you should use a ratio i think rational senpai i go to the beat files exactly that is i think the symbolic expressions so exactly these because then it really takes that like that's an important thing but i didn't know that rational so um but whatever so what we're doing is here so square root of x squared plus y squared plus that squared what does what does these uh why am i why am i even doing that yeah well the the the why am i even doing that let's grab these why am i even doing that um even if we just do even if i just do two dimensions so even if i just do x squared plus y squared oh but i can't plot that now because that's two-dimensional should be three-dimensional now nice google mr google yeah that's not oh that's cool actually [Music] i'm trying to it's probably a super dumb question but i'm trying to think about why am i doing that so let's do this what difference does he make right so we if we define these symbols and then we say well uh and then we say can i just say r equals um square root of x squared plus y squared plus z squared can i just do that and then keep using r what if i just print these see what happens yeah okay uh the conjugate of these and uh can i just let's see if that simplifies the thing if i just say real true positive true okay just i mean they must be real they don't have to be positive okay so let's just give it that at least because the thing at least that with the conjugation makes it easier okay and now and now let's let's try let's try what happened to these um here's when it gets tricky right i want to do x y and z and it's like to be honest not zero but minus infinity to infinity or let's try to i don't think i think that's gonna just blow up oh okay so what do we have here yeah okay so it just takes the ends outside it doesn't do anything okay as a triple in gration uh-huh and one it doesn't solve it right now with respect to r no oh sorry that's just uh that's just a label um what will happen if i do that that's just going to be stupid probably if it solves it at all no solution awesome uh i mean what would each of us have infinite is probably zero oh god am i just being stupid i'm probably being stupid and i'm not realizing um how the heck can this end up looking like this how how is that possible i can't even approach this with senpai and i don't know ah it doesn't solve the triple integral this is because [Music] i don't degrade what is maple that's because of issue whatever is the test simply doesn't know how to integrate these why uh so what if we [Music] what if we do that what if we just integrate on x for example right what did we just integrate on x what happens it doesn't integrate it uh can we just do like this oh it's the wrong why doesn't this integrate it because it's the same thing or what it shouldn't be why doesn't simply integrate these with respects with respect to x come on why what if we just say something stupid like these make it simpler okay then it does integration uh but if i just do oh then it still does integration if i do square root of square root of x i should be the same no sorry this it still does integration well this doesn't do integration i'm stuck people i'm so stuck oh my god i'm so damn stuck it's incredible oh i mean they don't tell us they don't they they don't tell us what their r is defined like that but it's probably something you can assume uh but it's just like oh my god man i mean like really i'm just giving up like how can it just be anything like that jesus god god god god um only on the radius it's just not ending never ending what else can we do um there's just no way that you do that i i don't know i don't know i'm lost i'm like i'm like truly lost how can i even approach these uh show that the probability of this topic okay that's another thing and that's what we're that's what we're working on but i'm just i just thought when because i saw this d3 here i thought that would help with these but it just does not um okay it did something it just took a while but it did something yeah so i don't know um i think i'll leave it here uh i'm just i just have to get unstuck somehow i don't know if that will make a difference right if integrating this is truly painful truly painful this is truly painful and i just probably need to just sit through these because i'm i'm just i'm just doing this kind of half an hour streams because i don't i'm not finding the time these days for these but i definitely have to get unstuck with that that just doesn't know how to integrate it doesn't know how to do it anyway um doesn't even know how to do it i think i i the thing is i if it doesn't know how to do it maybe i just should try this by hand but i also don't know how is that going to help me um get rid of these maybe maybe i just have to make some kind of change of variable or something i know do it with r but then kind of but then kind of say well that is the maybe maybe that's how you get there maybe that's kind of like you um you know you kind of say no look r is r like r is uh r is like symbol r and we know it's real and we know it's uh positive and so we we we do that um with respect to r and what do we have and we have these things here um yeah and if we if we solve that breaks awesome but if we take these things here you know i can i can differentiate with respect to r here is like we have a case where it does not depend on r here it does depend on our wait wait a second am i doing this well are you real positive and we're saying this is these and we conjugate and then we do that and we print these and uh and then we integrate r goes from zero to infinite um so we have this integral in here which we should try to solve r is not available anymore why doesn't it know how to solve it for arc a is more than pi divided by two here's where the actually pi p is in a way maybe maybe just maybe i can just do it like this i just have to become why why why isn't it solving this real true if i say this is which i i don't know i can assume that what if i do that okay looks better why doesn't he know how to integrate that though this is a bit seems to be seems a bit stupid isn't it but it doesn't know how to integrate that if i put like a big number 100 times n squared why is it that i think it's giving me different different results now that i'm used to in the past oh no okay whatever no that solving for this doesn't help but if i don't if i don't give it if i don't give it the bounds then it does find this and if i try to solve for one why is it that i i i think it's just giving me different different results i'm getting this paranoia where i think it's giving me different results than it used to i hope i haven't messed up anywhere okay but i think i'll just leave it here i just don't know i gotta i i gotta well i don't know i just don't know i'm stuck and i've been stuck for the past like five streams i guess |
something which is basically um i don't know how to start so let's put it this way um what we've been what i've been working on in the past week or so is this thing with a smart contract where you you know the idea is you go and and kind of mint an nft that's like your role a role recording or a role content object about like some research or problem solving that you're doing let's just let's just say research i mean it could also be learning whatever whatever it is that shows a real human thinking through a process and uh um you know you upload that um to uh ipfs or um i've been doing a bit of research it turns out probably the best idea is filecoin because actually filecoin is what adds that incentive layer on top like ipfs is just a raw network and so it won't like you won't get your files to stick unless other people or the nodes in the network pull the data right and so um what ipfs does is basically uh what filecoin does is add adds an incentive layer an economical incentive layer on top of that so it basically you know pays notes to actually pull information so i mean essentially it is what it is right if you want your data to be hosted somewhere that's not in your computer you better pay for it right i mean that's that's that's the whole essence of um of that economy right um it's really in a way a marketplace so i haven't yet really gone through all if that's not relevant really that's not relevant for the smart contract staff because smart contract just cares about like i want to have a content id um i want to have a content id uh i want to mean i want to mean a um basically i want to mean a um a piece of raw content and i want to get compensated for these that's the idea right you get compensated with something the problem is and that's kind of why i also phrased these short brief stream as like the hard questions right the problem is why would you even do that right like what what does this give you okay let's say you have um it's a it's sort of a cryptocurrency that it's a custom currency called ansys coins or whatever it is right um and then you know sure you can maybe have that listed in an exchange like coinbase i guess um and then people and then this this currency has intrinsic or has an extrinsic extrinsic value because you can you can exchange it for fiat currency right um but that's maybe too much like i don't know is navy is the right war it's like it would be cool if that currency has value intrinsic value right you can do something else with it than just turn it into dollars or euros or whatever it is that your currency is um so that's one of the hard questions right what could you do with these well well so i mean if if i think about these is like it it brings because reading about file can i realize that i mean if you don't have if you don't build essentially marketplace then why do you even want a currency right like it means if you know what i mean is if you upload stuff to get um something in exchanges because you this something that changes valuable somehow to you and then so you know who's who is you know who's the the where's the demand and where's the um the demand and the uh you know i forgot the stupid word in english the um supply exactly so you know validators also get money i also get currency right uh get coins because they are validating so they're bringing value to the net to the whole thing but essentially the whole goal of these was like okay what if so what's the point of of doing that the point is to build a distributed um to build a distributed list of of these pieces of content that you know we we could use to you know train an ai right or train a machine to learn and to reason like a human would do essentially but then the point is like what's you know what's the what's the value for the consumer what's the value for someone who wants to consume that piece of information whether it's a machine whether it's a human uh that wants to download the data set like what stops me from just running a cloud like a a um you know just basically building an archive and in file coin by hand where it's like you know go ahead you can upload stuff here and that's it right um there's this you know i'm kind of like i almost feel like there's the the whole contract side of this project is is what i'm questioning at the moment and i'm like what's the what's the point what is what what is it that like someone's looking like staking nfts what's the value of sticking nfts what is it that you're doing with and i won i want english english so you stack anethesian blah in exchange for stacking rewards and other benefits is known as nft staking um but what do you what do these platforms take out of the out of the staking it has become the new means to earn positive income in the crypto wall hotlers all nfts invest in decentralized finance systems the centralized finance brings the blind splinterlands is a blockchain based collectible card game similar to a heart hearthstone which player collect and use cards [Music] is set up as a dial and vine and smart chain hmm but this is not staking you know this is just you know similar holders of v tokens can pull their holdings in automated market makers whatever bandwidth the dodge capital is taking nfc is a smart investment what is it that this platforms take out of that because i can understand staking coins right like makes sense because it's it you know you you stake your eath right so you're literally borrowing your ease um it's a bit like a kind of a loan mechanism right but in this case it's like what is it locking up non-functional tokens on a platform in exchange for staking rewards and other benefits allows holders holders to earn an income from their collectibles while maintaining ownership but what the do they do with this nft is the platform right [Music] you lock tokens in a digital wallet to support a blockchain network's operations and security in exchange for rewards i don't know i don't know i have to think about these because this is the same thing here it's like what purchase the band nfd reaches the nft into the club let's take your of the publishing royalties pool mecca i mean i guess this is what [Music] maybe maybe i can check that in detail so uh what is it that this is doing go to roadmap streaming band music so publishing royal estate band and so mechanical and public performance right this pool music synchronization royalties pool um by staking so you buy the nft and then you stake the nft and what like what is it that you're doing then you're making you're doing an account you're a performance or a spool publishing royalties pool so you're being because essentially we should probably be doing the same right rather than give just a one-time a one-time reward to the to the owner then it's basically you're staking that and so by staking you're just kind of giving the um i'd say you you reward the owner of that material every time that that that that specific content is used to train um is is used to train an ai in a way right so that's probably the the best way to do these right it's just um you're aggregating these these data but i mean this data is public in a way right uh it's kind of it's kind of yeah like it's kind of i mean it's it's not public right if if i'm in the owner of of some of these and i just put these in file coin like uh like i file coin right at the end of the day you you kind of have all these information across the network and so nobody really stops you from like that's what it is we don't really want to get into a a setup where we have to think about security and who takes what and you know whatever it is right but but essentially by by just having maybe these nfts stake in mistaken stoke stoke whatever the the present pervert of steakies um you want to be able to kind of capitalize on that so uh essentially whenever someone wants to use the data to train something um you yeah they essentially uh they essentially actually use ansi's coin to get access to the data and then this is then spread across the um owners and validators maybe right yeah so that could be that could be one one way um of thinking about these it's just i'm not so sure it's like yeah why not right i mean it essentially that is the marketplace right so get that stuff mint it uh mint it and then uh provide that data set basically right um yeah i don't know if that is the i mean what will be what will be so the way that this work is you would actually basically have to pay to the contract for the contract to give you the cids right for the contract to give you actually the the um the access ah i don't know if there's a more advanced way of doing that where maybe things are stored encrypted in the in in the file coin network uh and then the contract gives you gives you basically you know a way to decrypt these things um maybe maybe that's maybe that's the idea and then you can use the contract to actually you know pull in these yeah probably that's what we have to do so we'll i think that kind of makes more uh makes more sense right so i'd say if and you know it it should in a way be a kind of zero sum but not zero sum but what i mean is like if if you know um that the every time someone's paying every time someone wants to access that stuff they basically get a um they pay say one coin and so um half the coin goes to or you know whatever like seven seventy percent of that goes to the owner um and the rest goes to uh to maybe the validators or something like that so it also is an extra incentive for people to validate stuff although i'm currently not keeping track of the validators so the validators just get rewarded now probably validation should just kind of give you an initial reward and that's it just a one-time reward for validating um yeah so you're incentivized to keep validating otherwise you're not right or it would become a bit more competitive yeah but i think that is the [Music] that is probably what um what one should be using join the network community governance yeah i mean essentially it's independent like what i like the contract is is independent or you know it doesn't care whether you've stored it in file coin or you just have it in your own node in ipfs you just want a content id you just want a content id and um if you're the owner of the continent id and you're stupid and just make it public then you're not going to make any money with it again right it's like we don't want to make like we we don't want the actual contract to make money we don't want the actual um uh you know dap or we we don't know we don't want that thing in itself to kind of make any money it's just a way to um in a fully distributed way to kind of collect these content ids and then incentivize people to kind of pull these things together so that others want to consume from them and they you know and then this is kind of like exchange right yeah maybe i think that um yeah that could probably be it to be honest if i go to a replit and i take a look at the code this means these means essentially i don't care about these essentially i just want to see id but okay it actually does have an implication which is what if the cid is not valid right so here we have basically the [Music] um the validate the validate function um so what we will be basically doing is i think we keep that i think we reward the owners every time it gets validated three times but then there is going to be another uh function which is basically um consume ah it's not consumed but basically um i don't know get get get cid right um and so i i don't know how you do that i think that it's to be honest i don't know how you do that because i think that has to be payable right i think that is an actual um what does the payload mean i don't know uh but i think what it means is it's telling you actually have to send money it's it's an action that requires you to pay money so it's not just the gas and stuff but it requires you to pay something i think public and then what this gets cid will do is kind of it will it will return a valid cid um the thing is i don't know if there's not a way uh you know a way to validate what if this is not available yet i think if we go this route we have to have i have to think about a mechanism of like okay are these things are these things really still there and accessible because if i'm a consumer and i pay for these and then it's just a cat video or or it's it's not really um the thing that's supposed to be you know we don't want a person to have to pay for these uh and we don't want and we want to penalize the um the owner and the validators amendment i think we should actually end up we'll end up having to keep a list of validators and what validators validated what things because otherwise there's no skin in the game so validations you know what i mean uh so we need like a list of validators and the tokens they validated for sure so and we need to um basically store validator and token pair it's kind of complicated but it seems like we have to go that way where we are like where validators must probably add some kind of collateral or something like that it's like the same way that falcone does it right so a storage provider has to provide a collateral and then if it doesn't pass some of the checks then some of this collateral is just taken by the country just takes it i think there's no way that we we can get around this because if if we want people to pay uh in order to consume this uh the the the content for whatever um for whatever need they might have um what we'll probably do is a valid cd if so if we find i don't know how how do you do that but i don't know if you should have like a regular check probably should have a regular check i don't know how you do that probably off chain right this may be uh there should be some some kind of mechanism where uh some kind of mechanism where the um nfte also the owners actually proved that they still have that stored somewhere and if they fail to do that then they get penalized right [Music] maybe the way to do that is the following and maybe that removes the need for validators maybe what we should do is function that will be just an idea right like function um something that basically uh owners mass provides some proofs regularly otherwise the nfts age and they are gone provid stopping any um um any sort of um rewards you know and and so because this means that there is certain commercial involvement um if you want to if you want to provide your nf if you want to provide these data in there you must invest at least on once a month kind of spending a certain amount of time so it's a bit of an incentive not to have cat um cat videos in there um i still you still need validators probably the problem is you still need someone who kind of catches that the fact that you know that is just uh not a proper video not a cat video right i have to think about this be more so but the the idea of the owners and i kind of in i think i mean i i got inspired by the way that filecon works where it's like they regularly have to provide some proof of space-time storage and stuff like that and and you know something that that tells that their contract is still um still something that they you know they fulfill right so the owner has got to still prove regularly regularly that there is uh something in there and that it's not a cat video and that means there's this kind of money involved yeah and maybe uh owner's collateral i don't know they should right um one time it almost feels like that's just i know it's standard stuff it almost feels like if we want to turn that into this kind of marketplace that's going to be in place right validator is also collateral hmm validator is probably done in collateral because validators is like you already have to pay to validate your holiday because you want to have like this one-time rewards the thing is you can't really um you don't have an incentive to to um to fake validation right because essentially you do i mean because validation requires some effort you have to take a look at maybe the video and you know the reason i don't like validation is because it's still left to human um interpretation right like you could you can just always have people you could also always just have people saying ah that's not you know that's not really what we're looking for when it really is maybe misinterpretation of like i don't like that that's just too much error prone but this i don't know how how we could replace um validators human validation with the mechanism that what would incentivize let's put it what would incentivize you know what would incentivize the owners to not upload cat videos um yeah because the consume on the consumer end you might just take a cid but you also will probably just take a lot of them right um and so you don't you are not going to be able to go one by one and check whether they are cat videos the validation needs to be there it needs to be a human validation but it's almost like man i don't know how does wikipedia curate stuff i mean you you just have people curating that thing that you know kind of you do actually have people that go and check that things are correct what are the incentives right for doing that in this case in this case you will actually have yeah you need that you need the validation ah damn it's too complicated no i think we need the validators validators need to put in some collateral as well but then why um yeah well if no validators don't need to break collateral uh that's why you kind of have the system where you have like you know people are given a random cid to actually validate that you need three validations for this to get done so you know you assume over all the chances the chances that validations are evil is like you need a lot of people with a lot of different addresses paying all the money to actually break that somehow right it's probably the math but i think that's fine but the owners need collateral because the owners um collateral for availability essentially not for the content itself right it's flying the content because then the content is like you get into disputes right like three two of the letters say that's a cat video and then you're gonna like ah then you're gonna have to get people involved there's more for availability because availability is something that can be checked um automatically so with the aging mechanism um exactly because you want to list the thing to be to be available uh so it can be consumed and the kind of videos you just rely on the sort of three reviewers mechanism and the random cid provisioning so that you're providing that you're providing a random cd to review and you don't like the validator choose because then they will be able to choose their own cat videos to validate their own cap videos and you don't want to do that um but so you need to get you need to get a cid which returns it about cid and so that just you just pay for it get it and i think that aging mechanism provides you the guarantee that the things exist look maybe maybe we don't need to why why do we need collateral we don't want people to kind of it's like oh if you do that you're gonna you're you're gonna have to you're gonna penalize actually you're not gonna get penalized you know if i wanna if i don't want if i don't wanna have the thing available then i don't have it available and that's it cool i have to go um but i think that is really the way that it should go about so so that aging we're forcing people that otherwise will we get the cids out of the list and this means they don't make any more money for these so um any more coins i think that's the only thing i need to add this and i want the sort of the refresh h function to refresh h and they have to regularly call that yeah i think that's a good addition i think that could work i think that could be an interesting concept yeah see you next time |
okay we are what I'm gonna try to do is I'm gonna try to solve a very very small example with the QLS by hand using quick of a really simple system of equations that we can do so that we can do is 1 cubed so I'm gonna try to see if that helps me so the idea that I had was to do what about 2x plus y equals 4 and X minus y equals 0 right so the obvious solution for the system is where x equals 2 and y equals 2 right yeah and so in this case I guess a would be 1 1 1 minus 1 and that's awfully close to some quantum gate I think it's in the hard working and the hormone has like they should be still normalized B so B would be 4 0 right or 4 times 1 0 and and that is actually 4 times the kids you're all right and and that is X right so that's what we want to approximate approximate X for but the truth is if the algorithm is gonna give us an X that it's not directly teens is gonna give us an X that's normalized so it's gonna give us an X that is gonna give us these so then we'll have to figure out so it's gonna give us these ok let's hear it but for these because because the thing is we can use a much more simpler answers for these and what I want to test is I want to test whether you can just use the hard over lab to solve these and I know that it might not work I don't know let's see okay let's let's try to see if this works because the way that I do this the way that I'd approach this problem is as I say right so so where we want to do we want to calculate these eyes you know this being our hands that's nice being on science and we want to make sure that this is overlapping with these and so here because we just need one cubed right because a is like that but we needed to compose a because that is not Timmy check give me 3 3 matrix checker or sometimes these immature matrix matrix calculator it's probably not unitary interesting whatever uh let me see you it's just what I want to check what I want to check I wanted to check one same kind of forgot and I forgot I want to check oh yeah the quantum gates so quantum gates quantum gates Wikipedia quantum logic gates ok let's see [Music] look at this so in theory so if I take these and I added to these I actually get what I want don't I yeah yeah because it's all ones so okay so that turns out to be easy as well okay so a so actually a is X plus that okay so this means we kind of have to do this twice right like we have to this one for this portion of the other of a 1 for this portion of a then add up this stuff right I think that's the way it's supposed to work I mean I don't know how the processing is going to look like afterwards I haven't connected but or I did check but I don't remember okay so this means this is a and so let's go to query so really simple I think we I mean we all need one cubic for these obviously and so I think a 1 permit rised rotation here just start with PI or let's just start with something like start with 0 so so there's no rotation so this is our anzacs ok then we what we want to do remember is we want to do so this is the answers we want to multiply by a but not a like the whatever component of a first we're first waiting the X so this is just so this just means X right and now in the second cubed I what I want to be doing here is I want to be you know preparing a state that represents B so I can harm our test and loveliest now how do I prepare B when B is not unitary obviously because b is these it says four times these that's what bothers me is how can I get rid of these because that's probably the reason there isn't using a cost function like this one helps because you can get rid of it you kinda can get rid of but to be honest if I would just because this is literally four times like as we said this is four times zero right I know that seems too simple so it's just just the identity so I'm not some I'm doing nothing destroys universe huh so I'm doing nothing right or just identity and now and now I'm supposed to so now I want to do the hardware test which was basically a control not like these and then checking the chance display and so this would be zero because the way the harm art overlap test works is you kind of get these so you you do this Plus this Plus this minus that so that's the way the hardware test works zero and zero means they're totally different we want this to be one right so we wanna yeah you can see here that they are completely orthogonal the states so that's why you're getting so and you know and the idea is you start with this random I mean allows your point five whatever oh sorry miss probably zero point five and now things now another thing start moving right so so this is no longer zero this note yeah there's no long as you're on um there's a little bit of these two components in here but my guess is if if I do PI then or PI divided by true okay so now it's one so this means I've it means that so what this is telling me is that these ends at is a perfect solution because it's a perfect overlap it's just it just feels too simple it's too small scale that it just feels uncomfortable and our Y rotation of PI gives me what state gives me it gives me the state 0 1 which is basically sorry wrong it gives you the state 1 yeah yeah but that's that's that's correct right I mean that's kind of so that's what we own oh but it's not it's not correct because we because he was was your EIN what am I doing wrong oh wait a second this is just the X part of the whole thing ok and so maybe I should be taking some notes you know I need a note-taking app somehow I don't want to use paint for these but I can probably use paint and kind of you know take some notes in there oh oh but I can't hey I can take notes in here actually come on so so for the for the X part because remember a is X plus Z so for the X part like we're getting a we are getting a solution off am i doing what am i doing first of all why doing something stupid because I need at the end to do that for to kind of sum up the whole thing right now this is the other control cost function some of things it gives me a hundred percent one okay let's just move on and so this gives me like an one hundred percent one and for the Zed case so if I change these with Zed gate and I go by the zero right now I get okay so now now it's kind of correct if I get like because if I do hi it's gonna be zero we won we won the parameter to be we won the parameter so now it's a perfect overlap so it's a hundred percent zero okay I think so this is a hundred percent sorry this is a hundred percent zero well and now if I add them all it should be like the k1 plus the kid zero I don't know if this is the right thing to do as in like as in like that that's that's the solution which basically it's like like normalizing so this is literally DS right but like I mean they should be normalized shouldn't in that and so this is probably a whole mess what I'm doing right now so what am I trying to do so it's one one and and so so what what this is telling me is that so eight times this which is the plastic right it's not equal it's not equal to be definitely but it's so because b is got the four so b is gone it was like four times zero right so if you was like four is your own because that's a problem i don't know what are these constant I don't know whether with this constants if we do let's do the letter P so this is a small metric so it shouldn't be a big deal to do these [Music] because I don't know what I should do with this no really with this what this is kind of normalize or not normalized or whatever if I do these right and this basically gives me two and and the if this gives me two and this gives me basically zero so actually that is proportional to the solution right I'm just missing a factor of two proportional so that that was not a bad I think my intuition can't be that wrong my addition it just can't be that wrong let's recap what are we doing here so we're doing these and so yeah I mean I I kind of you know D I basically did the optimization kind of mine but just by trying arrows I just tried to values zero and PI and here the optimization should work differently and now the whole point of this algorithm is not just whether intuitively these words or not because these as a cost function as a as a construction may not be optimal for an optimizer right so it might still not be taking us down the right gradient down the right slope to minimize whatever so these I don't even know what I'm doing these then but what should I so what do I do with those with those what I don't know is what I do with those coefficients what can I do with those coefficients because I can't just prepare be like that right and and eggs should be normalized so the truth is that if I do stick to these can interest so I do stick to this like convention where's mine here so the the matrix is like these so this is like that right and if I multiply that it's basically these zero and in theory this is where is that so in theory this is equal to DS correct [Music] mmm so oppa so this would be then equal toy to these rain which kind of I can see that if my if my original vectors these fourth euro and I want to normalize it then I should put these friendship divided by the square of the norm so XI divided by sixteen right [Music] should I but still that doesn't so let me check quickly so the second is the kind of at a time what time is it I'm kidding so if I do he's so divided by 16 it's kind of them still 1/4 right so still would be 1/4 that would be the normalize thing that I'm getting something something's off these four right like maybe I should normalize that as well yeah somebody for this to work out I should actually normalize B and so I should try to basically implement yeah but it's that's not the you turn that that's not a valid state is it that's not about its thing hmm how do I know what be like because the example I have how can I take B in a way that works with a circuit now I'm super lost I feel like I feel this is this is really basic so we also given analyze complex either in the physical form or kind of state B which can be generated by injury I mean is it just a precondition that those are the only things you can do by unitary operation apply to the ground state of n qubits so wasn't there a way to turn Curnow invert a matrix there a quick way to do that isn't it a quick way to do that [Music] I hate returns from a collector to neuter matrix I've been searching for sorry n by n okay that doesn't help because they okay by definition that's so I should just normalize it and that's what I've done I've done that doesn't give me a doesn't give me a valid quantum state doesn't know doesn't give me a valid quantum state so how can I use B how can so okay so I need I need should clean that up probably I need a [Music] common I need so I need a you that basically you know multiplied like these kiss me kiss me that right so so qualities so you basically meet like you know so um a plus he right should be so in cp-40 so it's 4 and C 0 all right and then B&E can be kind of whatever they want but that's like that's like none that's that's definitely not something that I can certainly not unitary I mean I can it said okay it's a sad day because I don't care about this stuff it could be done with a dead guy over the nest gate I see okay so it could be done actually with a what am i doing come on it could be done with a nice gate was it taking no to this here so this could be done with the truth be told is that gate like four times as that gate would work us well right because some so and then they have description here sign because because these times these basically lives it like these and so what the factor for that that's what we get okay but it's effectively the identity will do the same and and it's correct so if we're not doing anything here yeah the identity would have the same right so that's really what you use so that's fine but what do we do what do i do is for that's my problem I don't know how to come back how to come back to how to kind of then get back to a final solution right because so with X I got a hundred percent one with Z I get a hundred percent zero and so I assume that this is a one plus your stay as your plus one state which is the plus state which kind of gives me a solution that's proportional because it gives me these here and it's this is just proportional to that but how do I know what the proportion is because that's definitely something that I need we need to add to these which is kind of my x2 then say hey here you go that's a solution right because my solution is 2 2 and I just found a solution that is my solution is 2 2 but I found 1 1 so am I just being blind and stupid because 2 2 is the solution right I have some stupid I was making this from I think that was the wrong thing I was I was not applying this of the right so 2 2 is the solution and so this is what's actually these right and so these is the solution that's that's crap that's not what that's not sorry that's crap so this is a solution yeah no this is yeah so because I know the solution what I can yeah of course and that's why I take the tool yeah ah come on it's it's there I just I just did this I just apply this in the wrong okay so let me let me can I can I select everything get rid of these so uh I'm sorry guys sorry I the wrong button hitter but now we were back here let's recap I was saying let's recap so what we have is we have come on so we we've done I know I know I know I know how this is going to work I know how it's gonna work so again we so a is basically um X plus a correct for X we found the state 1 for step we found the state 0 and so this means that our our actual you know X it's not X I mean this is really not X yet but like something that's proportional to X so our solution is basically like 1 plus is your own right so this means that we're kind of stating here is if we normalizing right these sorry so if we if I do and if I basically do a times these then I get what do I get so I actually get these do I so it's kind of proportional to some extent is it yeah well like you get like these yeah yeah kind of its proportional by these alright right because if a is like 1 1 1 minus 1 yeah exactly so now this is not really like our X right because remember these is equal to these divided by the norm that's what the tutorial here tells us as well here we go so here you go now here so if I know that I know that now I know my solution I know X is 2 2 right so the norm of these is the square root of 2 squared plus 2 squared which is basically square root of 8 which is basically 2 square root 2 and so if I so this is basically 2 divided by 2 square root 2 2 or the 2 square root of 2 the 2's cancel out and actually yeah I get actually exactly that yeah which is basically what I found so if that is correct that matches so that works right now the question is whether this is good enough for for a gradient algorithm or credit optimization to work or not that works that allows us to find the simple harmonic overlap test allows us to find to find that exactly and would have what happened with the coefficients the coefficients are just gone right like what did I do with them nothing really so it was X plus said it was explained that what I did write x plus that basically the two different circuits and that's really because for me like be right I did nothing because b is just B it's the B is just for zero right is just for zero so it's kind of like 4 times 1 0 but I'm am I able to solve for these if I don't know so if I let me see if I select everything just don't wanna like everything and so if I have so I mice the solution that I find is this one right and I know that that these is actually and I know that this is actually you know it's proportional so there must be like kind of a a in here right a so this is proportional I'll call it like it's proportional to T's right so P squared squared plus P squared squared right so those basically things okay so these things cancel on get it like you twos so sorry so this is like a P squared over two plus P squared divided by two but this in turn kind of is equivalent to say P like all these you know so I think I can do that right I hope my maths are not rusty which basically means that this is P divided by square root 2 applies P divided by square root 2 so 2 times P divided square root 2 yeah so I have like that one is equal to square root of 2 P times and this thing cancels out and so I've got basically that do those things cancel out to pee mmm have I made a mistake somewhere what I want P to look like I want t to be hmm something's something's not correct in here I made something mistake so sorry that's the bottom part of the whole thing right that the 2p squared the tool yeah yeah so sorry so this is um p square root 2/2 P Square the tool exactly so that basically makes it it's gonna be made I think the way you were doing this right was like so I can flip that and say that's like square root of 2 which my maths are not rusty on us times p square root tool and so that least me was like basically 1/2 no no I wanted to another 1/2 what I did something is something I did something wrong I'm a master be rusty this is correct did oh here I'm a mistake that's not correct that's a mistake okay yeah that's a mistake that's what I made a mistake so here if God yeah but I guess you can solve for that sin man right so this where I made a mistake because I cannot just that doesn't work this way anyway but you've got so you've got like no but wait a second you have these so you ha actually have to P Square so you have like square root of square root of like two times this is great okay so this is P correct yeah this is P so this whole thing here then becomes like this whole thing here becomes gonna just make that bigger probably is gonna be easier so I can move so this whole thing here becomes basically being addicted to come on yeah basically PNP cancels out and so yeah but I just proved the Equality I just want to find P what have I done what have I done man what have I done that's correct so no what am i trying to find so I just proved the Equality but whatever I can find oh come on wait a second so I've got these and I'm trying to find ah no that's uh that's not that's not right let me start over okay I know this word I wanna I wanna first it up my maths are not that rusty so we have we have these right and this is supposed to be so okay these times whatever constant is supposed to be equal to it's supposed to be equal to a vector how do I solve for that tool like basically Q right we know it's the same because we know it's gonna be it's gonna be both the same divided by Q squared plus Q squared so 2 times Q squared 2 times Q squared right so this is like 2 times Q squared 2 times Q square which basically is q q square the tour yeah QQ right and so we're just saying that basically QQ equals what like P times u squared 2 times 1 discredits 2 1 1 so those things go like that so I then get what what am i doing oh my mother so drastic come on I'm not gonna put myself into shame anymore how do you solve for that come on no like seriously Soho you have please do not subscribe so you I've got like these I know it's a vector that's like I know that it's something QQ right and I know that this is like 2 times Q squared which is basically I've got like Q divided by 2 times not by Q squared square root of 2 and Q divided by Q square of tool and this is yeah but this is effectively telling me you can be whatever but if I but this must be 1 1 right and so the Q can be Q can be whatever I understand that if I really want to find X like I don't understand maybe it just works okay whatever I just probably do something wrong my super rusty but you get the point right so you get the point we found that we found the right solution with one cubic and yeah basically now still that doesn't mean that that doesn't mean that the over the question but we know that I bothers me that bothers me we know that we know the four zero right we know the four zero because it's gotta be two two I mean and if we have if we have these as a kind of intermediate solution and yeah that's so and then you have like one one one minus one then that kind of basically takes you to two DS and we want these to be like four zero right so this means this is gonna be some kind of queueing queuing here that so something's something's not correct no I don't know okay I said I said I'll stop I'll stop I kind of should I'll try to figure out I want to put myself into shame anymore but yeah that's basically now the question is whether these is something that you know works well with an optimizer all right that's another question whether that kind of cost function works always an optimizer but it should it should work well come on it just bothers me so much me a second okay all right what am i what am I doing wrong I guess I'm feeling so shameful at right now at this moment so we found our very our our V parameter like our V alpha thing like kind of found Z state right that should be equal to these okay good so now the question is what's so what is what is these right so so if we have these we know that these it's gotta be a vector of elements QQ because it's good it's good it's we know it's got to be somewhat proportional right and it's gonna have basically Q we said it's curved to right because this is so this would be u so this would be like square root of cues of of two times Q and so that would basically give us 1 square root 2 times Q so yeah so that's that's that's this here so I can take that part of here but I I want to solve for Q I want to know I want to know what Q are what Q is because if you use for example 2 2 right because essentially that's telling me that I can say q well yeah because that's the norm that's the norm of any vector like that right that's just the same that's why I keep running into circles so and how can i how can i how can i basically solve that I know it's along this line so I know that it's okay so I know that it's basically like it's got to be it's got to be some kind of X some kind of X right and I know that this is the so this is the the matrix that I have and this Shuki okay so this is the way to solve for that red but it's also not that no no Wai Wai wait a second because that should give me this times these I think okay so this basically means that this should be okay so this should be these plus D is right so it should be 2 times X square root of x squared of 2 and this is 0 should be 4 0 and so this means that 2 times x value is going to should be 4 is that correct but that's not correct that's basically that's just not correct so what am I making a mistake because that would basically mean that x equals like these and that's not what no square root of 2/2 and if I replace ah wait yeah it's true sure of course and x equals then okay so then sorry then these is the vector with solving for her and and so this is basically square root of 2/2 divided by square root of 2 which basically goes away and yes I have it I have it okay mask range is rich rich the end okay cool we have it it works but now the question is still whether that works well for an optimizer no sorry that was too much of a long video for for this stupid mathematical cringe but it was fun it was fun nevertheless I mean I'm resting oh man I'm rusty okay cool but I figured it out at the end some I'm calm I'm calm I like that so it works for one cubit so this is QLS for one cubit with just the Hana Mart overlay test as a and so you know the idea you want to minimize that right so okay the next video is I'm gonna try to actually do that in sir or maybe in Kiski just and then try to see if if that works as well let's see if we can do that that one egg one cubed example I'm gonna hard-coded hard-code the 1 cubed example see if that see if that works with the optimizer and it finds the right thing okay so that's gonna be the the code part cuz then I mean then it's just a matter of scaling it so you've seen what I've done eh they compose a into unit into a unitary into a set of some of unit Ares the coefficients you use them at the end to really solve for the X right so B is something you also turn into you kind of take the coefficient out and then you you could get that that final that stay do you want to represent and in the coefficient you have to keep you later to actually solve for the X that you want the if in this case we didn't have to have any coefficient in here so I don't know what would happen but I'm guessing that you can also take that out and then at the end use the coefficients to solve for the actual X okay perfect so but I was kind of lucky I guess that I could turn this into unitary so easily but I could try to do and code that next time maybe or maybe let's try to code it to like another a bigger example maybe this one cubed example I don't know one good example but essentially what's doing and so here in this in these in this part like the the whole concept here is big different right but we'll talk about this in the summary video so here the cost function is different so we're not doing the just the overlap test we're doing the motorola test we're calculating different things that you kind of take out of expanding those equations and then you just you know kind of follow the math and do that but I just wanted to do once intuitively anyway what's fun |
okay so it's recording already so um what I want to explore today is the topic vqe variational migrants over a bit farther and basically you're not saying there yet I'm just checking it was the UCC unitary coupled cluster that's one one of the things that was mentioned that I found like if you check out the other video I was taking a look at David David Cobb chicks cop chicks blog the other day and this is a lot of the stuff that I was researching afterwards and sort of you know googling around I found that the the the thing with the answers it's really basically you know something you kind of either know by intuition in terms of what answers is the best one to use or your kind of trial and error and for I think for chemistry related things the UCC was a popular one used because I want to take a look at this a little bit more um a little bit more in detail there was another question if I go to David just let me check exactly this is the so you should see now the the block because there are a couple of things I wanted to explore one thing was this this concept here because I it's just imitation thing some because I'm going relatively fast with this I'm also sort of keeping and ignoring a lot of the mass and all the notation and I mean I know the whole thing with the bracket and whatnot but so in and preparing a quantum state this is what you do with the Ann sets that's organ explore today and then measuring the expectation value it's like here the way the way that it brings it is you know there's a way you do these by decomposing that into a combination of poly matrices because then once you know that you can basically measure the probability of 0 and 1 and then kind of to do these the frequency has zeroes and minus 1 and it's just I got kind of confused maybe I'm just it's maybe I'm just stupid but it's like what does this mean to measure the expectation value of h h the her medium metrics that you're trying to find the icon the lowest eigen value off but that's gonna be so the next video so let's focus on on these first and for these I'm gonna go with the just just Google you see see all just Google a unitary couples cluster and I think that's what it meant I have it written in my notes so unitary a couple cluster I'll just it's just Google this for a second so maybe strategies are quantum computing molecular molecular couldn't chemistry just open them on another tab first see if the let's just go so read the abstract of this quickly the variational kromagg and solve our combined stability of corner computers to efficiently compute expectation values with a classical optimization routine approximated appellation of EQ into the simulation of molecular energies using the interact couple class that anzats we introduced new strategies to reduce the circuit depth off implementation of UCC and improve the optimization of the wave function based on them so we propose analytical method to compute the energy gradient that reduces this sampling cost of game is there I wanna I want to see what's the UCC circuit well you see see and that's circa can I just something in our chief archive strikes what kind of computing I'm curious about I haven't really read a lot about Google AI so maybe so they have actually this in the paper is this Treasury kind of committee molecular energies using integer okay let's take a look at this I just because I haven't really stumbled upon a lot of a lot of Google AI staff and and I know that the the Gulai team is the one that is actually taking and actually doing stuff on The Chronicle being us one so I come as a political but that's isn't it the same okay I think that's the same a stroke I just read so let's see the load it's 23 pages long why do I have another mouse pointer in there quantum science in technology [Music] just quickly scan again see if there's any circuit when I think okay so there is indeed a circuit quantity vice circuit is just a measurement let me just zoom in a little bit circuit illustrating the measurement of the term on the set basis parameter optimization cried in evaluation 3 so he measured the imaginary part of that resembles the karate and Konig Radian measurement thing acronym gradient that I was that I assigned one of the AI one of the machine learning papers and I was reading a while back soppy a big jump in the beginning because here's some results um but basically basically basically is their background with quantum chemistry and second quantity quantization classical up in each approaches to quantum chemistry [Music] a unitary coupled cluster this the shortcomings of this traditional CC ants as described in previous section can be overcome by redefining the excitation operator to begin to train a person on succ coupled cluster the goal the total energy of the system is obtained from the variational principle the answer version 1 spends the same space as the original C senses does not lead to equations which can be tractable solved on a classical computer to see these we can examine the BCH expansion of the similar of this similarity transformation Hamiltonian for infinite there is currently no known method for efficiently following the energy and amplitude questions in a classical computer then further ok so this is basically so it seems like there is something that is already existing on the classical world that has some limitations and then basically there is a way you can remove those limitations by making whatever a unitary the problem when uses out is that it becomes unfeasible to evaluate the energy with using a classical computer but but basically the with the vqe algorithm comprised of three initial wave function my application of the tri-state preparation unit race they might have the excavation value I think I'm getting a bit confused by one thing let me just go back to hear me dramatic age because I think so if H if we think of H being the if we think of H being the matrix that describes how does the end it's a Hamiltonian that describes how that's the energy of the system evolve then that kind of that kind of makes more sense to me because then I wouldn't wit if Li understand the state as in that's your model and then the age is then your apply age as in like you now transform the model based on those rules and then you measure but I don't understand I don't understand this part in here mm let me the the paper from Google seemed like a good starting point but let me Chronicle second quantization classic elimination approaches mmm seems a bit a bit too let's see let me see if I find something a bit less technical first what's in here is it the same PDF PDF PDF stars of quantum computing molecular energies is in the integer couple cluster ants ants so let me quickly scan done that's the same paper okay okay so that seems to be think okay maybe I'll try to then let's let's try to type into this a little bit a little bit but it might be a bit too technical for me to understand absolutely everything so forgot introduction the solution to the time the time independent run use equation for molecular systems allows for the prediction of chemical properties holding the key to materials discovery and catalyst design let me just understand that for a second time independence renders equation despite advances in the field of quantum chemistry many relevant process is the prediction of chemical rates and the description of transition metal complexes remain challenging these difficulties stem from approximate nature of classically tractable quantum chemistry approaches which often fail description are strongly correlated systems which I fed a description of ceramic related systems in addition the application of a Kozak methods its exact diagonalization of the electronic Hamiltonian require exponential resistors with current classic algorithms submitting the exact simulation of molecular energies the system comprising only a few atoms family vision that computers could provide a tractable way to simulate quantum systems this idea from our last buyer Abramson lloyd decade later has been developed in series of chrome algorithms for Cronos simulation 13:15 fist algorithm extending these approaches to the calculation of which this is the first proposal further developed inserting combines Trotter ization of the molecular Hamiltonian and face estimation to compute the ground state energy of a molecule faces dimension in here early studies on the quantum vs. is required by this algorithm sure that the circuit depth scales fortunately numerical studies indicated that the scaling for real Michael's is closer to out n to the 6 where is this all going she's probably the version of quantum event solver is an alternative algorithm that is closer to near-term applicability due to lower coherence time requirements the vqe algorithm finds the best variational approximation to the ground state of a given Hamiltonian for a particular choice of anzats the success achieved by two subroutine surface or in employs a chronic computer to prepare parameterize wave function and sense and measure the expectation value of the Hamiltonian given a set of values for the parameters the second sub rating is an optimization algorithm yeah we read that okay there's our process quantum errors and small coherence time requirements yeah okay there's a point for simulation on black line which is in this case a trial wavefunction is prepared by the application of a parameter is unitary followed by the calculation of the energy via Hamiltonian averaging calculation of the energy via hamiltonian averaging that is maybe so what is 31 we just go back to the top developed energies many mice using a classical optimization they're currently the final cost of the cockroach one depends on number of iterations required for convergence and the amount of operations involved in each preparation and measurement cycle James and tramps and superconducting circuits turn ok traditionally a unitary coupled cluster approach has been used as the answers for the state preparation these methods Pro method provides a Hiroki of wave functions that can be prepared in a chronic PD using a polynomial number of gates and is believed to provide better accuracy than classical coupled clusters which is generally regarded as the gold standard of quantum chemistry despite these advantages recent studies have pointed out that the number of parameters and UC might still be too large to a lot of practical collections for large molecules okay so we aim to describe it more detailed information of a QE approaches for molecular systems using a UCC answers okay background sounds good so let's see within the born-oppenheimer approximation a molecule is comprised of a system of electrons interacting in potential in the potential produced by nuclear located at fixed positions we may describe this problem using the formalism of second quantization whatever that is I'm really just reading I don't understand most of this stuff and mostly what I'm saying always but I'm hoping maybe maybe there's maybe it takes something out of that an interaction between electrons can be represented using annihilation and creation operations a P and a P transpose a a sapiens s and P transpose they obey the following anti commutation relations associated with fermionic statistics you need electron mass and I like to charge a Bohr radius a zero close constant spatial and spin coordinating with mean field so this is just a way to describe the interaction between the electrons of a molecule classical up in each approaches to chronic chemistry the inherent difficulty of solving the Schrodinger's equation for many electron systems has motivated the development of a series of standard models for the construction and calculation of proximate electronic wave functions in quantum chemistry one electron functions the heart the method provides such as singled to mini indeterminate solution in this scheme the molecular orbitals are expressed as a linear combination of atomic orbitals the keynesian coefficient are the operatic actors present mean field approximation to the molecular wave function unfortunately the heart default method is incapable of approximately the electron correlation effects that are essential for computing energies with thin or close to chemical accuracy to correct for this problem one can expand the wave function as a superposition of all the determinants in the electron space that coefficients in the expansion can be premised in different ways different this is way too deep right now for me state repression measurement chronicles is a version of Chrome OS algorithm applied to UC and since the classical opera routine arts Exposition value Hamilton in terms to calculate energy in estimates a new value for the couple cluster amplitudes traditional UCC on a quantum computer okay so this is about how to implement a UCC so so I go about all this crazy stuff in here the Kieffer's remember our precious brokenness the truncatus this expansion of proper education and chronic chemistry's to consider only single and double excitations exact and its exact four seasons of two electrons if not local kids are available an equivalent alternative to see not Gate specifically the developed frightened truck business more Missourians and MS Cade its unitary evolution can be represented by the sum over all joined rotations and qubits J and K other register for an angle center around the axis fine which can be freely chosen the MS game the action of UMS creates a full entangled state under this thing this non-local gate can be made to act on arbitrary subsets acute in various way ways where is this circuit illustrating the measurement of the term we must apply H or an aurochs and are alike an X rotation or equivalent to change bases when measuring Polly y and Polly X operations once the state preparation has been performed the next step in declaring mr. collusion of the objective function corresponds to the energy measurement to avoid performing phase estimation which has a prohibitively large circuit depth for current and near future current devices we employ the Hamiltonian averaging procedure interesting so okay so this is so they talk about the Hamiltonian averaging procedure introduced in 3135 in this case the energies covered by measuring the expectation value of every term in Hamiltonian and adding them to obtain the total energy where every Hamiltonian term comprises of a tensor product of polymerase is obtained from the estimate the number of measurements required to convert energy so this is that this way to avoid using phase estimation okay interesting but why would face estimation work in this case so it's the Hamiltonian averaging procedure the one that's used to measure the energy performing the face estimation why why why you want to avoid prefer face estimation which has Britain meltonian averaging procedure copy in 31 and 35 so what is the averaging procedure that is going way beyond so far I feel I'm stepping kind of right at the edge off my capabilities open the box a little bit too much but up up up up up up some the UCC it's clear that I the way to explain here I don't really I can't really grasp quickly even if deep dive into this a bit more calmly the dddddd this measurement thing is what I've done okay UCC for dummies Uniform Commercial Code it's not what I want um always die he's very coupled cluster units for a couple cluster example couple cluster couple cluster quantum implosion of unitary couple cluster let's take a look this 2016 trade so and classical traditional chemistry the coupled class standard is one of the most commonly used methods which is critical is emitted by its nonunitary nature their location as an idea so Shinto the problems have extremely inefficient in classical computation here we provide a physics pyramidal evidence that indeed the unitary version of the couple constants as can be reliably performed in physical quantum systems and trapped iron system we perform a simulation on the electronic structure of the molecular ion h h+ where that is where the ground state energy surface curve is probed energies of excited states are studied in the bond dissociation is simulated non-perturbative boy okay so what is a doing the conceptual procedure and B F the experimental realization of this is simulations from the ground state of the target molecule talking about the target molecule age mapping to quantum system preparing trial quantum state by UCC unguents measuring the measuring the energy of the state this is the minimum know adjust the parameters prepare another quantum state and apply the Hamiltonian yeah minimum current state of the target Hamiltonian is found measurement of energy why is this so complicated weirdly explained - proposition are you gonna try a couple of cluster nonsense that's the same paper does the Wikipedia say couple clusters a numerical technique used for describe many body systems it's most common uses oh one of several bla bla bla Benicia quantum chemistry methods in the field of computational chemistry focus essentially takes the basic molecular orbital method and constructs a multi electron wave function using the exponential plus operator to a comfort electron correlation some of the most accurate calculations for small to medium-sized molecules use this method the method was initial develop I for its cost and command 1950s for studying nuclear physics phenomena but became more frequently used one in 1966 this guy and later traded these are the guy reformulated the method for electron correlation in atoms and molecules it is now one of the most prevalent methods in chronica mystery the electric correlation couple pyramid wavefunction and Sasuke plus a theory provides the exact solution to the time-independent schrodinger equation where H is Hamiltonian of the system just double check because I Hamiltonian represents the energy of the electrons in their clay in a molecule okay in the atomic molecular sorry you don't see that because I have it on another top molecule Tony just double checking that I'm that I don't have any big gaps in atomic molecular optical physics and quantum chemistry the molecular Hamiltonian is the Hamiltonian operator representing the energy of the electrons and cly in a molecule d or this operator and they associated equation play central role in completion chemistry for computing properties of molecules and aggregates of molecules such as thermal conductivity specific heat electrical conductivity the elementary parts of a molecule are the nuclear is a nucleus okay so and II the exact energy of the ground state coupled cluster theory can also be used to obtain solutions to excited States the wave function of the couple class the theory is written as an explanation of answers I feel a bit lost still feel a bit lost no just because this is really frame to me I mean so what is this one is the this is the one I just yeah this one I just saw just wanted to get the this other one to wonder if I'm through the Google stuff probably should just keep going through it so molecule is comprised of a system of set of electrons interacting with potential or the potential produced by then look at it at fixed positions what is the formalism of second quantization second quantization second quantization also referred to as occupation number representation is the foremost institutionalize quantum many-body systems in quantum field theory it is known as ever the fields are thought of as a fellow prisoner too much so let's go back to this the method pairs are here kiev wave functions no where was I the the the background within the born born Oppenheimer approximation molecule is comprised of his system electrons we made this comes from an interaction between electrons can be represent using annihilation and creation operations the day obey the following anti commutation relation is associated responsible a scalar electrostatic repulsion between the claim the constants or a responder is it on beginnings for electron mass is constant nuclear charge estimation relay the function represents one electron functions spin orbitals are often obtained from men from in field calculations it is hard after moving a translational and rotational degrees of freedom the electronic energy of a molecular system is a function of three q - six parameters that will denote by our Q the number of atoms the function er is called the potential energy surface the accurate corrosion of pests one of the main challenges of chronic chemistry as it required for predicting and listening as its it is required for predicting and understanding a wide range of chemical process such as a reaction dynamics bond breaking chemical kinetics the prediction of thermal thermo chemical properties such as reaction rates intra- accuracy required from ab initio calculations of the pans so there's the finish of the chemical accuracy classical ivanishin approaches to quantum chemistry the ignorant difficulty of solving the Schrodinger's equation for many election assistance motivated development of serious tanto models for the construction of calculation of perks ms electronic wave functions in cracking mystery actual correlations corrosion effects that are essential for computing energies within the closed can we click here see so I think that's kind of a key element of the whole thing here it's basically saying the classical method is not good enough to sort of counter for correlation effects that's why I'm quantum computing probably a chronic computer is better at this see I had a couple Class C methods expectations respect to reference chosen to be the hearty Fox day business this idea can be formalized by defining excitation operations as follows [Music] so the key point of establishing the size extender so it's clear to me that I not going to understand you to see so easily but it's a understand more less was coming from more or less and either has to do with the there is indeed a certain sort of a superposition what it's what I found in this paper that was kind of a big weird is that the that the reason for the reason for doing this averaging procedure and the measurement is to avoid performing phase estimation that's kind of I like to understand a bit more why I like to understand a bit more this part in here and and and what is then the why is this brat thinking that this cat thing here what is it that how is that than the average of the energy state has performed the next step in if you can recover from the objective function to responsibly energy measurement it's all next okay so I know next I'm gonna stop here that's a tough one that's a tough tough tough one but I I'm gonna stay away from the UCC for for a second cuz it's too much chemistry related and less relevant for me I would say right now but it's just stick with the fact that it's a that it's a good model but I'm basically still trying to understand sort of what are you doing from a quantum computing perspective right so you're preparing you're preparing that model and then you're applying then you're applying the Hamiltonian because basically I meltonian transforms that state and then you're measuring that um but that measurement is what I'm not kind of trying to understand why is this the thing you want to minimize and and and why is this has anything to do with face estimation and versus versus this averaging approach so that's what I'm gonna try to explore in the next in the next video the outcome for me for this video is you see see so far makes no sense for me to understand at the technical level because this chemistry related and I just have no idea about it so I would have to build up a lot of other knowledge that I really don't have the time and the mental effort to put into right now but it's like the concept so it's a well known thing it's a version of a classical golden standard and then the works well on quantum computing on a quantum computer especially on a sort of a nice device right but what this is then this is my next thing so what is this measurement so what is this thing here and what is the keep I keep missing keep recurring that I keep keep losing the so why exactly why to avoid no where is this come on the background of keep I'll keep the paper linked so it's the dimension part the choice inversion energy measurement this this this here this here this is what I to avoid performing phase estimation which has a prohibited a large so why would we I mean even if you can give if you're if you know anything about it and you're watching this video and you wanna give me a hint just go ahead so why do we why why would face estimation even help us to understand that so what is the why so it seems like that face is the thing that we want to minimize why |
we gotta embrace technology and so um i'm gonna try to do integrals with python anyway um yeah i think it's critics i think it's a great excuse because in the uncertain systems wrong i think the exercise here right um and i've been doing the you know kind of reading the past um going through the past um videos about like the whole key of the call free transform stuff and um and i think it's at an intuitive level i understand or not that i'm comfortable using it right i understand why the integral makes sense maybe the inverse i'm not so it's not so clear but let's just try to move a bit forward with the problem um and the problem is asking us to show the probability to find the particle with this momentum and so well what means is i guess what we have to do is translate that to the momentum um to the momentum operator form right um to the momentum form so and i don't want to take a look at the solution but what i want to do is i want to want to want to want to take a look at whether we can solve this with zinpai for example let's see uh and i think i try i think i started something with replay but uh i think i'll have to use the replica i think i did start something here where um quantum mechanics exercises a month ago oh god uh but yeah so i think i was trying to hear something with with um i was testing testing how to solve this with python and then i realized that it's not that easy because but i'm i'm obviously a noob with all these right so i just like to have like maybe a python file for some reason i couldn't get a notebook to work um i you know you would prefer to use a notebook but let's see i don't know senpai seems to import like that if i try to import it on a notebook it tells me that it's not installed or that it's not available so i don't know i'll try to do some digging into this later later on but but for now this seems to if i just hit run this seems to work or what i think you just have to say python uh x1 with pi do i no or maybe maybe this is the shell maybe the shell what am i doing so here can you guys read that can i zoom in like probably better like that what if i just say python x1 dot pi does this work yeah that prints b okay so that actually at least works i can just i can just run the exercises like that and see what happens and not have to um basically jump into this and say you know let's try to let's try to do that so what do we have we have a free particle and a wave function that a t0 looks like that um and we know that alpha is a real parameter and now the question is computing the normalization factor i mean we could even try to do that right because we know that n so we know that what this means is that that if we that if we do that um the integral of the probability density function has to add up to one and maybe that's a way for us to solve for n uh so what we need to do is have the wave function kind of you know do it like these then calculate the so kind of do the times the complex conjugate and to to get the probability density function and then uh which i kind of forgot y was not intuitively uh obvious we'll probably have to explore that again but and then and then kind of like to the integral of that and then um assume that integral has to equal one and then solve for n so let's maybe try to start with these because to be fair i have played with senpai in the past but not so much and so if i just like uh let's take senpai quantum mechanics first of all let's see what is in there in terms of quantum mechanics um because i know there's something right but i don't really know how much of it i can use constants dagger in the product sensor product these are kits it's too specific so i just it's too what is that operator so you can define operators uh no let's just use so well what i would do is and this is like exercise [Music] 1.2 is it is it one is it s two oh god rename cool and so we import senpai and maybe first thing we want to do is n equals uh set expression or not symbols sorry is it symbols symbol do i have auto completion in here hello hello hello auto completion do we have that how do i do this now for my source code now i don't have a why is that cpu so high settings debugger packages oh there's a packages thing here numpy senpai okay okay whatever um i just had it here before all right is it symbol symbols symbols okay basically so this is n which is what we're looking for and then we've got like alpha which is basically i'll just call it we'll just use a because alpha is too long to ride and then and then r what is r though because here's not involved so r i'm just assuming is the radius right so we'll just we'll just define it like that and then um basically what we have is the uh wave function right it's basically a um can i how do i how do you how do you write expressions in senpai just senpai i think you just you just do it right yeah so you just actually write the thing so you just actually just say for example n times um is it exponential like that i think so uh minus a times r and then print like how does this so shell cool yeah nice but i wanted to is it so invalid invalid syntax um senpai yes it's it's x okay yeah yeah okay so print how can i print stuff nicely uh oh print like that in any case this will happen in the ipad and qd console sladex any printing what is in it printing let's try that i don't know actually why i have to do i have to run it to be honest i don't know is it printed nicely yeah okay but we don't have latex installed i guess in its session that's interesting in this session there's an interactive way to work interactive steampunk sessions that'll be cool because um simplification what about what about i run i try to run these in the shell can't i just copy that oh here's a shell but i wanna can't i just copy that oh crap i have to start python obviously python and now paste so this is like that oh what image session i like that that's actually okay aha so you kind of have all these things in here you have a bunch of things available for you interesting what if i just uh okay what if i just run these commands no uh okay because i have all the s and p and stuff like that no no okay cool so let me so whatever i just say um n equals symbols n um a equals symbols a r equals symbols r and then i'll just say uh n times x of minus a times r yeah okay that actually tries to print it in a nice way but it's not really okay interesting yeah but maybe it's too complicated for this to be interactive right because i have to define all these different things before yeah but maybe maybe that works as in like i don't really have to actually keep keep like um defining all the stuff but yeah that there's an advantage to doing it like this yeah it's fine i guess how do how to access okay cool but it's cool to know there's an attractive mode um so i have this stuff here and now what do i want to do so what i want to do is i want to um find the complex conjugate so senpai yeah the thing is i want to use um i'd like to be able to use the uh to be able to use um what is this ah oh it's april's fault joke i didn't realize oh god ah interesting filters for stack of just for selfies anymore i think i'm not into the mood for this right now um solve i want a complex conjugate how do i do that sign apps are called conjugate okay so so it's just can't it's just a conjugate thing right functions but like are these things available to me symbols i have to import all this stuff import conjugate and i okay so yeah but i think i you know what you know actually i'm pretty tired of writing all this stuff like this so i think i'll just say from from senpai import all i know that's not the best practice but um what can i do does this still work yeah that still works cool but i don't get auto complete so so i want to get autocomplete like these or what anyway so what if i just say conjugate is just the conjugate well i can say alpha is real so i can just actually say type uh oh look actually i can uh symbols i can type type type true integer true i just say real true okay real true right so i know we know that alpha is real because that might make it easier for these and so yeah okay conjugate of n and then uh okay but here you can see because it knows it's real it knows the conjugate is the same so it actually but yeah okay so that kind of is the expression and so now what if i just say times wf right can i do i have to actually rerun the thing every time or can i just no okay i don't have to click hit run okay so that does this and now i want to integrate right so simply integrate integrals how does this work integrate just just integrate it's fairly straightforward that's pretty cool so um i'll just call it the i'll just say okay so what if we just want to do with the integra it's like an in an indefinite integral right so we want to integrate that in the guard into grade dummy variables with dummy variables okay so indefinite integral definitely integral okay uh [Music] why is it telling me that i need to do that i don't know specified dummy variables 4 so variables four oh so i need to so i need to know yeah okay what the variable is uh of course was that we're integrating we're integrating over r i guess right i guess we're integrating over r it takes a while so it's doing something which is great because i don't have to do it by hand yay okay times the integral of that that's nice okay um and now so now i and now i know so and i was like this must be equal to one and i have to solve for n how do i do that so um i guess solve so i guess solve solve all solves always for zero right solve so what does solve do okay we suppose all equations equal to zero so solving these it translates to solving these solve for x so what happens if i just say solve these minus one right and we solve for n and we print so we integrate we solve for n and we're printing that can probably take quite a lot quite a long time and what is the solve gonna tell us is what n is um i can just say n can i just say that and then say prince print end it's pretty cool though yeah let's see if that works then um boom no okay so okay so i can't just say solve like that i guess okay just say so can i just run it like this see what happens okay so what do we have here um invalid limits given oh sorry what is that comma here well uh exactly so you integrate these these on r y minus it one and you do that yeah see what happens oh come on there you go no this solve there you go integrate the yeah yeah sorry guys now this one is taking a while and we'll see if that actually leads into anything i mean we can start taking a look at the solution maybe in the meantime hey so okay uh pi so a is like boom that's the solution let's see if if that's god okay let's see if that's what what happens and it didn't print it awesome so let's just print this thing it didn't take forever it didn't break so that's not a bad sign um yeah what about whatever i i get i think i lived here i'm happy i just managed to i think i think that's good it's a good way to do that uh basically try to find a way to speed up these exercises so that it's not always about like you know the identities and all that stuff like i'm happy if i have a way to solve programmatically the equations and stuff like that and at the same time i try to understand what they mean right um oh whoa whoa whoa whoa whoa yeah sure but how do we how do i evaluate that that's the thing right like how do i even know minus square root of the integral and stuff like that like simplify that simplify simplification simplify so let's see simplify and we add another parenthesis at the end see if that does anything to it and we'll leave it here i guess why is there why is there because these are two possible solutions okay and here's just like something that simple it depends on alpha but not an r uh okay simple hmm how though how is it possible that it i mean r is just r hmm because that really gets you that's really that really forces you to think right in terms of the symbols not symbols what is really a symbol what is not like because i wonder how you would do this by hand and why am i getting a actually at least i'll just not replace simplifying need to repl measure simplify a simplified doesn't really need a maybe just doesn't let me integrate into grade solve solve yeah let's see what is this trying to tell me let's try to [Music] take on like paint it would be cool if replied would have like something to take to draw like that yeah so i mean actually i have it here so it says minus minus why why doesn't it work okay so it says um square root of one oh god that's gone why what's going on here with this pen man why isn't this working i i just wanna oh god that doesn't work anyway uh so 1 over the integral of e to the power of minus a r times e to the power of minus a ah okay so r is i think that's what makes it like r the r conjugate i think what if i tell that r is real as well right is it going to make it easier what is it going to tell me because i think that's what's blocking the thing from solving uh what is that square root of two times square what is piecewise competing piecewise what is piecewise so these are different solutions again and it's still times square root of minus a why isn't these inside the conjugate of dawn it's a real right it's the size of radius we know alpha is real we know n can be anything so i think that is that that is correct that we conjugate it and then we say the probability so these times these unless this is not yeah no this times this minus one then solve for n i think i i think this should be correct but i'm getting something weird and i just i have to find a way to you know make sure i get the type of result that i want um i'm just not uh sure i understand that it says piecewise i guess i guess this gives me all the all the different solutions right copy so essentially essentially that's one that's another one that's another one this is all so these are the solutions not true why not true i don't understand that but anyway okay so i guess it's telling me such time equals zero but this is far from this is far from any of the stuff that you can see here right so here it's like they say n equals like to alpha okay i mean you can think of this as a like a root right because it's this three divided by two so it's the square root of the super power of three in a way so okay that's not maybe not not bad that there's square roots in here but it's definitely not this because the square root of 2 there's no 2 anywhere what is it hmm because if i and if i would do this by hand it would be like as i said right so uh so you have we have that form and then we have like uh you know [Music] and e and then alpha r the conjugate is just the same so i would just say that you know the the [Music] so the square thing here would be just n e ah how do you do that so do you uh i think it's like that right so times two and then you do the integral of these and basically the integral of these is just uh i mean we know this is a constant like times constant so a times x of something like this right and i want the results in english and or do i have to do whatever parts i think you might have to use for parts [Music] i don't have any examples here that i can steal from yeah but it's essentially it's like so essentially it's like the constant time times the integral of that minus the integral of these times one is like this is zero right so so the constant can just go out i think that's correct it's correct to assume that so n squared n squared goes out and then you have the integral of e to the power of minus which is basically the same let's just eat our two so and so so basically if these must be equal to one um well then we know that you know cosine so this is basically yeah i guess a cosine of like r2 plus i sine no that is ah that is not true that is not true that is only true when there is a complex exponent correct correct and these are all real things so [Music] all we know is that the square root of these is no and times that so we know it's like n squared times these equals must equal one right and so so n is one divided by this stuff which is the same as like actually just making the exponent positive and having a square root of two and now this just makes no sense this thing here just makes no sense why there's an alpha to the cube oh final maybe i'm just refined fine fine normalization constant maybe that's just um i mean i think i'm following the right procedure but hey who knows seems like that's what we're doing there equaling it to one so okay guys i don't know why unless i have to add the time evolution to it or something but i don't know why that is the case in white spy and woodlawn solution a anyway um good progress though at least with the replay staff as well so got that to work a little bit cool cool uh yep see you next time |
so I'm trying to I'm gonna try to explain really briefly what my how my solution for exercise for works which is a solution that does not require any fancy knowledge about Kiski or or not it was purely treaty fight it was just an idea that I spontaneously had and I thought it could work and I think it just worth walking through the mental process or just walking through the intuition for that for the solution I know I'm not going to go into too deep of Tootie detail in these but basically just because I'm I am not so sure if I can if I have the time to recreate the full solution i I've got it I think stored here somewhere because I I definitely have to recap a lot about the actual you three gates but the idea is that was that even the solution actually what was it the city solution so I don't remember so the the idea basically is that so you're given the unitary gate right and then so how do you figure out how can you decompose that so the the idea is to take a look at the problem from a different perspective which is well at the composition it's just you know try to approach it right with just a given subset of gates not with whatever gates you want and so in this case we're given just two options the youth Brigade and the control X gate and the idea here is okay so how can we make a circuit that does the same so I had this idea where I thought you know what if I so this is concept of called on computation and I'm really bad at explaining things in the insight so forgive me for this might be be chaotic but the idea is I dressed me just before starting the video I was playing with these and I'm actually have a new pen I'm gonna try to because I'm playing with the I I'm playing with is this this is working at all or not doesn't seem to work I don't have a confident configure I think here for that but basically with this pen I can I can paint nice stuff and say hey hi but I think I got a configure this maybe well I haven't really I haven't really set it up anyway I might not use this now the idea of a computation is the following so if you let's say you have a TOEFL gate right and let's say you want to implement a multi-tool for the gate so you want to put on the TOEFL gate with three control qubits now let's say you don't have that instruction in your you know scripting language or whatever it's kiski or whatever right so that one way to do it is you can use temporal qubit so you can use kind of work qubits intermediate qubits to say okay I'm gonna use that keep it as a now a result sort of an intermediate results so I'm this are two of my inputs and then you know when those are both on then this is gonna turn on and so my third input is these right so the idea here is the inputs are this state please these cavities given this cubed and then so what happens is what you do is you end up with the result of a TOEFL gate so the reason so how do you know that this is working was if I put our our inputs into superposition we're basically gonna get all a list of all the possible correct answers to these right so this is all zeros you know the thing is it's only it's only one when everything is one now the problem of the solution if you realize is that that actually depends on that work cubed as well in here and and so this is a problem because we might want to use that qubit later in our computation and so if I the problem is that if these qubit is used it it will probably mess up with this what happens if I put a heart in here yeah you see it just messes up the whole thing and you don't want that right because it's entangled so what you do is you basically what you do is you you you can uncomputable dependence so you can let me try does this work well it doesn't feel well calibrated to be honest so you want to compute these and if you do all I can even do this like oh that's so nice okay I got a better set that up so now now if you pay attention the keys cubed is always should probably have a shortcut this is always off so this means this cubed is not any more entangled with anything else and so if I now if I now put a hard work getting here that's not how it has that that's obviously the same that I was getting before and this is the way oh yeah I know no that's the it's it's got to do with measurements sorry apologies for this so let's imagine that we are not I'm computing right so I'm so bad it is good so this is the pre pre uncomplicated thing so the idea here is the you I don't know what I miss pending so much I'm expanding all these actually it's probably not needed but the idea is if if I accidentally measure these being zero oh my god here here so if accidentally if this will accidentally collapse and measure a measure to zero it kind of spoils the rest of the computation because now I don't have any any valid solution well because this QE basically is entangled with the other one so if I if it got it gets measured to you then it just spawns it whereas if I do this here like that pay attention the valid solution is still here okay so and and that's because we have an computed and so it's become independent now the the idea of my solution is if we are able to uncomplete or maybe a another way to think about it is disentangle or entangle the qubits we might be just close to a pretty good solution because the to be honest if you think about this problem you know if this if these qubits were not entangled right it will be fairly simple right which is before it will just be probably four for you three gates and we would be done right so how is that kiss kid I'm gonna target trade gain unitary operation separation me 3k in a crate gate gate I think that's how I that's the way I did it unitary gate it's in kiss kill extensions should I import that import everything from his key this the this is what I wanted to do or is it not extensions and so a unitary gate and I think I can just I think I was doing something like the UK is basically a unitary gate with you as a matrix can I do that data yeah and how can I turn how can I turn this kid victory operation can I just might just do that I forgot about my I forgot about unitary unitary Cade I think I can just say I say I just do on I think I can just say QC QC c apply okay I can bestow like these you gate apply in Detroit game and to lung cancer get control quantum circulatory Kade is definitely have to recap this it's a shame I didn't keep my solution come on Keith keep textbook can I just search for why just keep it please geek patient so or just gain no I gained its circuit sorry I'm circuit circuit and its supply I think that's the way it works should be more confident with these things oh it's Jim Carrey oh I can Akari okay planetary gate okay took qubits okay so it's a it's a unique hari and then I give it to you Kate and then I give it the zero one two three and then what if I just so Kiske visualizations case key visualizations blah vector something like this what blog vector that's the way it's done [Music] come on I just wanna be the example I just have a fish memory you know fish memory polychaetes oh here we go here we go so good getting this back in blah blah blah you see gets that one okay but I probably have to have to import the visualizations I think right yeah probably is not defined from hisskill okay here we go so you can see that it's entangled right so the the point here is if this was not is if this was not entangled then it would just be super easy because it which is the combination of affinity of you three gates to you know rotate the things so we take them back to the initial state and zero now it's not that simple the reason I didn't get it in the first round is because I rely I cannot even think that yeah you know it's it doesn't have to work just for the initial zero zero state it has to work at least for three different dimensions right it has to work at least for at least for the for the zet for the X and for the Y dimensions and then it and then it intuitively that's the way I thought and I think that's because then you kind of get all the you know computational basis possibilities covered it's probably the wrong way to put it but it's you get the full space you know defined so exactly so the way that I thought it's like how can you disentangle that well then with the you know with with uncomplicated right so if you if I figure out which control X gates will disentangle then it you know I can't be that wrong right the thing is this only for kids and there's not so many combinations of gates that you can apply that will disentangle of thing and any of you if you kind of try quickly you can realize that you will realize that if you just do it no control control X between 1 & 3 just randomly trying I literally this is literally guessing okay so and I guess it's more than one combination that does that one too you're a tool oh okay so you see with this entangled one a little bit right because now it's it's it's not just a thought in the middle so and and and you kind of keep trying right so the way that I the way that I did it and don't have the time to repeat the whole thing but you probably can get it in under two hours or but the way that that it worked for me was with okay so three one so I did three and three one so here you go it's a little bit and they uh if an ID cos so once you once you once you've got this mean I'm so bad at explaining that but the idea is once you've got them disentangled you can start rotating them around but you can also do this in between so this is then to zero to one sister right solution I don't think this all right solution three one two zero two one let's try qcc X to zero you see the X to 1 there's no magic to this but you can see that those control gates already kind of do a really good job and so once once you're once you're kind of confident in it might be like now if you try all the combinations you'll see that it does and you can't disentangle them more so it probably means that you you still need to do some rotations here and there to do the internet disentangle them I don't know exactly I have taught me to be honest I don't know exactly why this really works and so well and I'm guessing for a certain unitary gates it wouldn't work so perfectly but that's the point now the thing is once you get everything back to zero everything pointed up at zero what you need to do is you need to reverse the order of those operations because these are you're just on computing so if you want to replicate the you gate what you're doing is you're you have to do it the other way around right so you have to kind of reverse those in those operations so you get the same behavior like the UK right and so this is the this is the essence of the solution now it's not enough to get it to work with with you know just the initial state zero zero so taking the state back to zero zero zero but it also has to work with the plus/minus basis and with a left-right or you know whatever other the y be the y observable basis so now what's what was interesting is that as as soon as you try and see what happens when you apply a harem art to all the qubits in here is that you see that per unit irrigate that's absolutely nothing to it which basically means that whatever operations you come up we've done here can't be it they must be rotations around the x axis because otherwise they would just mess up with with with that right so if it doesn't do anything in the state it just means that that they are always sort of rotating around these axes somehow right otherwise you would get after applying the unitary gate in here you get a bunch of other stuff so and that's not what we want yeah and basically the only thing that you're missing is to make sure that it also works for the for these ones so for the other so if you do now an SG orgy right know we're an ass sorry - 0 123 ok so it also has to work for these and if you we see that they are also entangled right so yeah and basically the way that I the way that I that I got this to work is if I remember well think so let's see let's see where does this solution take me now this is this is really messy in here and I'm so bad at explaining things this is really messy in here and the detected because you want what you want to do is you want to get them in this case you want them to you want you don't want them to be in state you want them to all the pointing towards why right so that's what you you want to do now what I would suggest is if you just focus on on one of those I mentions then you try to correct in the other one so that's what I'm trying to do now is I'm trying to basically say okay so what happens if I just copy paste this thing best is actually it actually give me what I want so those are just row tations and the only reason I did them this way is because I don't know how the way you three-game really works so I didn't want to spend time looking at this but you can compress them since one two three four five six seven I think if you do these I think that works as well and yeah okay so from import numpy SMP yeah okay so that kind of works if I apply the yeah if I would invert it so that that kind of gives me these and if I so that's approximating you already so that was a good solution let me see I can just and just do it this way I think oh and this is you know this was literate and why by trial and error that's why I can't replicate that super easily okay yeah if I apply a hard mark gate first now why would I want to make sure that happens here is don't stay the same and stay the same because effectively all those you three rotations are along the x-axis now if I take a look at if I do the same sorry if I now do a it's fine is gate it's not you can see that it's not really it's not where we want it to be right it's it's not those things are not pointing here so I'll be I'll be totally honest and the truth is I got like I think that I just managed to a thing if you apply something like these or 2-0 like I don't remember even which ones I applied because I don't render the final solution but it just worked by adding two more you just work by adding yeah I don't write it just work by adding a couple of just two more control X gates oh no I'm sorry not here I think I'm stupid cuz I should in first I should reverse that Ash apply to the beginning yeah doesn't matter that's the point is yeah this is probably the worst video ever explaining the solution I it shows that I really don't even know how I got this to work I'll definitely deep dive into this okay I want out of this I want to learn two things I want to learn more about the youth brigade and I wouldn't learn more about in computation and and stuff like that because I don't know how is it possible that is the control like skates actually do the work that that they show here yeah but basically that's it you're probably highly unsatisfied with my explanation at that point but it's really it really comes down to these it's just purely intuitively just uncomputable look at the state and try to bring it back to zero trying to bring it back to class and trying to bring it back to I so to the sort of pointing you know the or is it - I or I I think just bring it back to the you know basically to the to the the different different initial states in here and once again a combination of rotations that works for all of them then you're basically done and so yeah and I think I got a score of 55 finally so it's not the best I got one control not too much I think you probably can then tweak it from there or try to find another initial set of rotations guess yeah that's it basically I'm gonna do I'm gonna do probably another set of videos going through different solutions in here because I think it can be interesting to see how other people solved it and some people have really put in the actual f we're not like need to keep everything nicely in code so this person has basically gone through all the solution and misusing transpile blah blah C it means like that's what I wanted to avoid these kind of try to go to some you know a bit of the formal way but it's this is I think really well explained I was taking a look at this like yesterday's really well explained in here the way this is done but it's literally it literally took me two hours with a bit of luck okay so no merit in this solution to be honest it's just I wanted to see what the the the intuition behind I'm competing actually really worked and I'm happy to repeat so cool any questions you know just write in the comments below and stay tuned for more content on these because we've got a lot of other topics coming up soon cool |
this is it I think I think I'm ready for giving you in no maths explanation of Shor's algorithm so I'll first a disclaimer just let me go back to the actual a so this we won't certify I'm trying to find the I'm trying to find we're not gonna try to keep it short I'll probably do it to mean the version of it but serious so basically what I want to do is the following so there's a caveat to my no maths statement here which is to be able to understand Shor's algorithm there is a non Quantum part which is basically actually quite mathematical I mean that's the reason it works is because of a mathematical trick which means you can't really explain the full logarithm without understanding the mathematical representation that the algorithm does in order to exploit quantum computing features so this is explaining here I highly recommend you guys check out this article if you want to really dive into this because it explains I think it's it explains it fairly well um all that you need to know and all that we need to know for this explanation is exactly what what is here which is basically so you have to take that for granted right now for the video which is basically if we are able to find that period so you see that here it kind of repeats right so there's this is one and then here is another one so if you're able to find that that period in here which is like 1 2 3 4 5 6 and so so everybody's every 6 then you are able to find the factors so the prime factors and that's the that's because the Shor's algorithm is to find the prime factors of a bigger number so and let's assume this is true too to prove that you do have to go through the math um and that is something that you know you can't really you can't really avoid because it's basically a mathematical trick there's probably some analogies that can be used to explain that in a non mathematical way but the idea is that if you if you if you understand that and it's good but but the way the quantum part works can be explained without all the mathematics which is really my goal here um but I do warn you that if you haven't checked the quantum Fourier transform videos go check them out because it's the base it's it's one of the basic building blocks of the algorithm which I'm going to really roughly explain just just for you to get the full picture but I think that's the something if you want to take a look in detail I also have a couple of videos that explained the quantum Fourier transform and it's inverse without the maths so go check them out now having said that let's get let's get let's get to it so in one of these articles is an actual overview exactly so we're gonna take we're gonna be taking a look at this quite a lot see if I can zoom in a little bit because so this is how the quantum car looks like in words basically you've got some pre-processing in here that helps you determine what gates you're gonna be building you're gonna be using to build that part so this is important so you do that not in the key P in the QP you either that outside and then you've got some classical processing at the end which basically allows you to then figure out really the prime numbers just so you understand but what this piece the quantum piece is doing is basically the goal of these is as trying to find that that period right so we'll focus on that and then you have to as I said know if you if you are able to find the period then you're able to find the prime factors there's ton tons of materials out there that explain mathematically how that work so I'm not gonna I'm gonna keep it out of scope for for these because I'm interested in the quantum part which is I don't understand because it's really I think fairly simple once you once you put the pieces together it's it's a fairly elegant piece of of circuit and it's just I think there's a lack of out there currently a lack of maybe willingness to explain things in a way that are not mathematical so that's what I'm gonna try to do here and now see there's the block here is the universe of the QFT now how does this work so the idea is that the idea the basic idea let's start from behind I think that makes a lot of sense it's done if you're if you're able to encode imagined that we would be able to encode these values 1 2 4 8 16 11 right traditionally as sort of a sort of a wave right so you've got like this and then you've got like 1 and you've got 2 and then you've got 4 and you've got like 8 and you've got like 16 so and and if you if you kind of keep doing these right like you've you get that that kind of waves and then you would get the kind of repeating part so if you would be able to do that then that's exactly the input that the quantum Fourier transform needs to tell you what's the what's the period like I mean what's the frequency in that case right because that's what the QFT does and go check that out because the idea of the QFT is that it's just um you encode these let me clean that up you include this wave into your into a superposition right so basically you've got like so if you've got here you're all the different possible values of your superposition they all they all have the same they all will have the same probabilities be measured but each of them would have a phase which is a slightly rotated and and because of that you will have different like you would have the that wave that I just draw will be encoded in the phases of the superposition let me see if I can show these because I remember that I did some examples maybe there's maybe I still have them here quantum Fourier transform exactly maybe that's few that still words because that was a quite a free transform there is some example kyogen because if I remove all that because this is the actual corner free transform so that's just to show you what I would I what I mean by encoding it in the in the nickel superposition right so so here's an example exactly here's an example where you kind of see that it's sort of a square wave in this case right just like these these and these and these but you would have those colors like slightly changing from blue or yellow in this case and and that would be a more smooth type of wave anyway but you include them like that so you include them in the faces of your different possible states and once you have that you apply the quantum Fourier transform and you get basically with this what the conference forum is doing is is it's kind of um applying Hannam arts and applying rotations it's communication of hundreds and rotations in a way that you're kind of collecting all the information so you're wrapping things up and then you end up with something like these which basically as an example tells you that maybe if this is like two and this is like six that those are the two frequency is that this way if you've encoded here is made of but again just go check the QFT video that's that's what it does so and and so this is really this is really what this piece here is doing right so what the first part is doing here is basically um let's say I can explain that so it's um it's basically encoding the just an easier way to explain that so first of all you see here that the first step we do we have is we're preparing a superposition so you're basically preparing the stage to encode your wave the thing is because you if the the way you're going to encode the the face is by using an effect a quantum quantum computing feature that's called a face kick back so the face kick back I can show you quickly an example there's an example of a phase kick back that it's simple to see which I will show you because so if I go to Kindle the Kindle thing and then um exactly here there's a face kick back I think you can see here face kick back so I'm gonna try to do these so it's those are controls ads so if you have let's say I'll just the new new one we'll just have three registers will have 200 watts and we'll have a one I think it's needed exactly and then you do like here and here so maybe I'll just maybe it's easier just to see with one can can you just can can we just see it with one probably we can because I think that example is so good so as you can see they're all blue so the face is the face of the qubits is the same but once I once I apply a control control rotation that's I say help me visualized can i how can I visualize the face because I think what this notation sadly I can't visualize the face of each separate cube but essentially essentially what this is doing is it's changing the face of off both of both qubits you can see that example here so in here have a more complex example let me show you because if you would apply if you there isn't you can set if you would apply a if you would apply a rotation on here right you see the color is different right you see right into the colors different and so when you imply in the control rotation that color is different because here you've got the faces of both qubits playing together that's that's kind of one way to see it here if you if we go and do the same example and we have these so and this is a quantum feature this is basically one of the things that is super powerful is that just because of the way the qubit interpreted you interact with each other that happens and this is something that you can then use to our advantage so the first one I think what they do is the go back here first one is a rotation of 45 degrees and then 90 degrees so the first one is actually like these and then this one goes and this one is on 90 degrees so you see that you see that it gradually that's pretty cool you see that it gradually changes right here so this is this is what you see in the book here by those phases that you can see here this plane and and this has happened in the register one like in the in the kinder in this first two qubits despite the fact that they are only used as control gate so that's really an intuitive right but it's really a quantum effect that it's worth noticing and that's exactly it's called phase kickback so this means when you're when we are rotating the face and a qubit that is that is on the state one the same phase gate gets kicked back to the controlled cubic to the to the keys are actin that act as a control and so this is a really cool way to encode if you are if you pay attention we're really encoding a wave so to say right in our superposition here so this is what this is really what what what this step here is doing so if you pay attention to the nature of that imagine imagine that you were you mentioned that we are basically we would be able to encode these numbers right into the into the face and into our faces so we would essentially at some point have an overflow right because we're doing it's modular 21 so you have a certain amount of cubits that you're using to represent that and where am I here so you have a certain amount of cubits that you are using to represent to represent the the number that you're multiplying so the idea is that you've got to figure out a set of operations here that implement so this box here implements your your modulo like multiplication because it's like ^ 0 ^ 1 ^ 2 ^ 3 I mean and here 2 is something that you've picked up random it's kind of your input um and when when you implement that you do it in a way that the that the face gets the face gets kicked back here in all the elements of your superposition that have a 1 and the lowest value and then this face gets kicked back in all the elements of your superposition that have a 1 in the second lowest value and so on and so on and so on so the effect this has is that you end up exactly with something that looks like that but you've got like all your space here covered I mean actually you've got your space covered because that's just like that's just the part that you're that you're you're you're losing because of like that's kind of your register - and that's your register 1 and you end up with that so in because you end up with these then you're now able to basically run that through the QFT the universe of the QFT so this is confusing and in this book and I've tried address that in Twitter but I haven't got an answer yet in this book they present the this is by the way programming quantum computers book and it's really awesome and I really you should really buy this but there's something that's confusing me because they they I think they mess up a little bit with EFT and the inverse of the QFT the algorithm talks about the inverse using the inverse of the key of T which essentially means the input is a wave encoded in your superposition and the output is the actual it's the actual frequency of frequencies so yeah and I think they use the opposite the opposite definition so it's kind of confusing a little bit but then they are contradictive could try to king themselves in the middle I think I don't know but that's the that's the basic idea and that's it really that's it because once you have the wave so it's kind of by multiplying this and this really comes down to how you implement that it really comes down to how you implement that so the problem is there is a there is a rather complicated it's it's a rather complicated thing to do right now because you need a lot of qubits for these even for smaller factorizations and you need it as efficiently as well so it's I don't know if I don't know if it makes because what I what I what I want to probably do in another in maybe what I want to do in the two minutes video is sort of prepare an actual example that is gonna help you there's gonna help understand better visually what's happening within the algorithm but intuitively that's what's that's what's happening so the the the the trick here is that each of these each of these operations is leaving a trace so to say it's living like you know the footprint and and this footprint is the face is being kicked back into into your separate position so you end up with an encoded with a weight that's encoded into your position which is exactly what the inverse of the of the QFT needs to actually do its job so that's really that's really eat I mean there's nothing else to you know the the whole algorithm is what is more complex right so you definitely go and and read the the actual mathematical part that's around the quantum thing because I think that's that's what what's gonna give you the full picture the idea is you pick an X right which is in this case here - you pick an X here so exercise - and then you basically come up with a priori the gates come here and then you run the algorithm so by doing the multiplication with the gates you're basically encoding you're encoding the results into your super position by moving the phases and and then because your because you're you have those results proportionally rotated right and remember the phase right so you can think of the phase as being like like so you've got a full rotation so the idea here is that you have a the number that you're gonna get here as a result say seeks right it's not really the period it's actually what it's telling you is that it's 1/6 of the of its it's a 6 sorry it's just it's it's a 6 over the maximum amount of of the biggest number you can represent with that amount of cubits so it's it's trickier than that I think it's pretty complex to explain measured initially in a sort of a short time frame but it's like and and so this is exactly this is exactly then you divide these by that by by that number and then you've got sort of the fraction and that's like that's your fraction of that rotation that you're getting and this and this is then telling you kind of what's the what's the cycle yeah but I think I think I'll probably do an example that's maybe gonna be more helpful but basically that's the intuitive idea yeah so just one one one more quick time you of the point impart you basically prepare superposition you do a multiplication like the the the actual you know the these multiplications here these operations the the trace of those like the results get kicked back into your superposition basically giving you a wave encoded like a phasing coded wave so you've got like an equal superposition and then inside the the colors here are kind of you know like of course that's that's crap but like you know what I mean so the colors the phases are are encoded here and then you basically run that to the QFT and then you you've got your your answer back which is exactly what's the what's that what's that what's that frequency yeah and that's basically it so it's really not that complicated intuitively of course the devil lies in the details but intuitively that's what the circular swing which is pretty pretty was very interesting to put all the pieces together I hope that was helpful and I really will try to do an example with a seam later hopefully that's that's easier to do and it might take me a couple of videos but I think that can be probably really illustrative perfect perfect |
after giving it another thought I don't know I don't think this is gonna leave me anywhere the creation of design of a different gate that would kind of not have side effects of the harm or because I realized that think about thinking about the body's kind of realize that the effects of the harm arts are not as much fault of harm art but also it's a combination of the harm arts action and the fact that we are acting Q and the Q level right so um and at the end of the day the the fact that we play our Martin here it's implicitly acting at the level of you know these two squares Sophie we want to detect another pattern then it's not it's not that you need another gate mm your mind but it's not just that because if you know the fact that you're applying it to this give it always kind of restrict you to the problem between these and these right so if you if you wanna detect another pattern in between other areas of your amplitude least metrics you would need to implicitly first do some kind of rearrangement which is at the end they would with the swamp dance right so cuz so when I was like I I was thinking why don't we just do sort of a first operation because it seems to be in the first step is the only one that needs to be correct then everything goes well in terms of the hardware applications but there was like well yeah kind of if you but that's kind of saying the swamp right so you to the soap in the very beginning and then change change the controls and all this kind of stuff so they match the proper wires that could be one way to easy explain the inverse DFT as in you say basically the swabs are to prepare the data in a way that then the harbor's can pick up the right patterns but it still feels a bit artificial in terms of um trying to explain what the algorithm is doing because then you probably have to start with Harmar in the top which is like why because I like the interpretation of we're starting here because we're basically trying to identify cycles right so I want to stick to this interpretation the fact that we turn identify cycles remember that if I've got dog basically right and control and basically need so this is gonna be one minus one I mean a demo at the end of the day with what's what's kind of really happening here right is that you're trying to divide us into cycles right so pay attention here you've got like we've got one right so obviously if you've got a one here right I'm ray Ron so when you play harm our hair right you're gonna fold that in that your first of all gonna tell you what's the what's the relationship between what's the relationship between this part and this part you know in the simplest cases where we're talking about pure frequencies right um and not like mix set of some set of ones you're basically gonna have two options or two possible outcomes one is well they are the opposite in terms of faces right you can see this is zero this is maybe this is the opposite cetera in which case it means that we are in the middle of the bigger like full round right so we kind of gone through the house because it means that the next half is gonna be the mirrored half so this tells you in this case that you know it could be one right and another way to look at it is if it's equal if you've got like zero regardless of what else do we got here doesn't matter like the pattern is always the same because basically what this is telling you is that you so if this repeats the same it can only mean that the number that we're gonna have in here is even right and the way that the harm or peak set up is by saying they are the same so I'm gonna fold that superposition into the zero half into the half where we're zero so this stays empty and so and I think this exactly where my whole idea now kind of like exploded because it just I just realized that so wait a second so basically at that point we already know of course what's the key bit gonna look like in those cases right I'm I think for a super position for a firm or complex wave it can be a bit more complicated to understand or to explain but I think I think we can do a good job there's one so and so basically I just didn't realize until now that well it's it's actually trim you'll to see that because in this circuit there's nothing else happening to this wire I mean it's just as a control but this kind of control usage in here can be be it's a rather thing can be seen rather as they you know if the QT is one is your type of thing and regard I'm trying to exactly so this is basically telling you already that that give it must be easier because um yeah because it's gonna be an even regardless of of it's gonna be an even number Brandon you can even frequency and that's why there is a slope at the end it's just really confused it it's just I think the problem here comes to the fact that you're used to read a circuit like you know kind of step by step right like this step this step this step this blah blah blah and then when you get here like why are we swapping but but it is actually easy to understand if you think about the same way that you think about the key ste let me the same way you think about G of T here as you're not understanding this whoops like the first time I said that it's like well you you gotta understand this not just us you know this is like an operation in just because like I realize that you need to understand that in in conjunction with the rest of the circuit wire with something with something because that's what we want to build is this kind of cyclic pattern of data and so you one the values didn't have a one to basically go here go here and cascade and then kind of activate some of those controlled operations because then I can control see rotations that is gonna you know that in conjunction with the hannam arts which are creating the super position for you so this is gonna create the right type of rotation because each qubit has based on their power of total value within the number that's representing because it's a binary number they're gonna have a certain impact on the rotation of the face so these rotations are only and that's why the rotations are powers of 2 right 8 16 32 64 so it's so you're just kind of using the binary representation of the number as a way to rotate so and then that's why this also makes sense now you can think about the inverse of the QFT or it gives the yarn off I think I kind of stopped that is qft no that is I like to think a bit about this bit more like the inverse of the 50 and this like a giftie because it's more like eft it's like going from from wave from facing color waves to an actual frequency and that's what the Fourier transform does and I know Craig that it doesn't really matter that you can you know that 53 times is the same like the inverse DFT cuz all students are cyclic but it just makes more sense to me so I'm so you can think of this in the same way it's just it's just that what you're coming from you're coming from the face and colorway so you're basically trying to detect patterns detect cycles you're trying to take the cycles all right so you're saying good so if we have like a cycle here that falls into the zero part it means this has to be even so that's why that's why and so then you've got now this part and and now we say okay so the first thing that we have to do is did this fall into one right um because if it falls into that's that's a thing still let me try to explain this I'm not so sure I fully grasp the rotations or the interpretation of rotations here but if that's supposed to fold into one right it's because so it's because this was an odd number right and so when we've got an odd number but we've got an odd number we should correct this but type of correction here I mean and this is short like this notation basically the skin this can and probably should be better represented like this just for the sake of understanding really what is happening here right like I don't know if this is a thing for it's like a convention you can pack them all in one column but Greg does this a lot and you can do this in quark so so now that rotation basically what is supposed to they're supposed to correct what is supposed to correct the fact we now want to take a look at the contributions of so basically now we've got the one is fixed right so now we got the so now I want to take a look at the comparison between this row which is all zeros on the second qubit starting from the left and all ones in here these though has to be corrected because in the original is missing the original input this is a comparison of these here and these here as a pack together with these here and these here so the difference here is you can see that they are like they are kind of like 90 degrees apart right because that's not like 0 and 180 and this is like 90 and like 90 and minus 90 so if you consider if you consider like these and these is like one pack and this is the other ones and you're comparing the green and they land and the violets or less or whatever the color that is this is there are 90 degrees apart and so the Harmer is not gonna work really well there you want to correct that so they so they are kind of like either hunting partners do you think race apart now the if you exactly the soul but because we're picking one of each I mean we're picking one thing like that here so we gotta is that it's an awfully I see the need for that but I'd not he had entirely sure why this works but I I'll promise you that I'll do an executive summary where this is really fully understood the thing is if you if let's imagine that this is the number to keep it that's activated the disk if it is activated what's the difference between so now I've got 90 degrees of power and if this is activated there's still many theories apart but they are opposite aha the point is you see and take Africa yeah take that for granted for now but you see that that the problem that you're gonna pick up here reflects their the influence of that of that cubed not that of that cubed right and so here well this is gonna be like whether we're gonna basically stay with the rows where this one or with zero that basically is telling us what's the value that that cubed should have what's the influence of give it should have so and I don't know if you but when I don't know if you see that but when I when I started going through this sounds like wait a second there is a way to build the gifty without the swamp so basically basically you can basically do that if you don't care about the amount of cubits right after each column or we know what the contribution should be for a particular key bit so basically after the Hanuman right say let's get rid of the swaps sorry no let's just so basically as I said the if so if this guy here this cubed is 1 then we know that these cubed it's mass the odd right the whole number must be odd which means to discourage my simple one and if it's zero this cubed must the whole number very even must be stays here so and a similar reasoning goes for the next controls so here if this guy is one then this should be 1 this is 1 this should be 1 and if this is 1 it should be 1 right so basically you don't need that anymore so you've got like a yeah it's basically you basically got a K of T without the swaps it's just that you need twice as mine just give it's twice as much qubits and your outcome register is the one in the bottom register so this is this is the upper register this is the input register right hmm of course this is useless because as you can see the only thing that kind of keeps you apart keeps you away from compressing it into into 3 into the 4 cubed is just adding the swaps at the end but these kind of breaking down this way have helped me understand really one of the swaps they're doing they are actually assigning their ride weight to the right Givi so the Harmar is picking up the son harm artist thing is the homeowner is picking up cycles but these cycles the outcome of planar mark is telling us what's gonna what is the impact of the first give me because the first because you know if this is gonna be fault into a 0 then we know that's gonna be an even number risen like it's because of I mean that's what we're doing here right so we're saying if these like we're saying if these are say if this is a 1 if you forgot a 1 please go down here and activate the biggest chain of rotation because mm why well because it's not going to be an uneven cycle so it's basically not gonna repeat itself at that point whereas yeah because whereas if it's if it's a zero like now right when once you're at that point in creating your super position right here you've got half of your stuff full so now you're saying okay so now you're gonna say is this was this gonna is this gonna be a need like this is an even number if it's an even number then we just want to double the same cycle right so that's why if it's a 1 right we're basically so it's if it's a if it's a zero we just we just want to double the the existing data that we've got here so that's why then we just need the horror mark that's waiting here and we don't need those rotations so BAM right and then you've basically got it doubled move those things around whereas if it's if it's a and an even like an odd number right you you want this one to basically activate a series of rotations that them what they do is that they they tell you down here in the how 4 this is 1 and so when you will apply it harm oh sorry exactly so now you're basically this rotations you're you're getting ready to then apply the last Harmar that is gonna double em beer or that right so you're you're doubling and mirroring so you've got the the desired structure which is the fact that this is just half of the cycle so that's what the role of the sort is here is to do basically cut compute the final wave facing color wave based on the right influence that you use each of the qubits 1/2 and so you can read this in the same way basically so this is it's it's simpler than I thought I thought would be friends here I know I thought I would have to design I said like whatever gate and but then I realize that it's not the keys it's not the fault of the hearts only it's a combination of these it's just the fact that you're if you want to detect cycles right you're basically these cycles are influenced by the chaotic cycles I'm struggling to find the right wording the influence of the the first cycle you can detect in here is influenced by the cubed that is sort of the the rightmost the lowest contribution QB because if it's on it means that the whole thing is just split in half and they are in there to house of one one bigger picture and if it's even it means that basically that you're it's that the half kind of repeats itself right um so I hope this is clear enough I really hope that's clear enough but that's basically I mean now does this work for sense your inputs right I was thinking a lot about this and I was afraid that we would get some kind of nasty nasty interfere not nicely the coherence or whatever and we do but in terms of the phases right that we can't really detect the final phases but the amplitudes will be correct so and as far as I've read people talking about this and people say that it's a bit of free built-in feature of quantum computing that if it works for single amplitudes and it should work for super positions as well because it's sort of it's it's the consequence of the linearity of the linearity of the operations but I'm not a hundred percent sure that's always the case I mean I'm assuming if you mess up with a circuit and build something that is not the way it's supposed to work then that my don't really true but I'm willing I mean I'm basically in the test this year and I think it works because if I create a let's say that we want to have so let's say we want to have here we've got as an example if you got just one single amplitude right zero zero zero one let's write have two if I apply autumn art here now I basically have one and three so now it's a mixture of 1 and 3 right so you got it sizing coherent because you can't I think the reason it says the reason you can't really you can't really calculate the faces because it's entangled qubits I mean because it's a subsystem right but we see we see that's the outcome we can I mean I'm assuming that's correct and I guess that I guess that the reasoning behind this is now and that would be your hobby or your face encoded your face encoded data that's interesting though that's a fancy thing so this is your amplitude but basically the idea here is we it was easier to understand this one we just had one right because you could see the pattern son fall but here it's like what's what's gonna happen with with autumn art well the steps here we do pick up upon including I think where we are not gonna pick up a punning quick cleanly is sin so after these how tomorrow yeah after they saw tomorrow we see yeah you see you see what happens my name is autumn art from the front to the back so basically these farmer doesn't pick a clean pattern because after blindness Corrections I mean and you know it's just not and this is inside I realize it's because I put the hardware in here um so basically what this is telling you is that this is not like a clean pattern right so when you're not gonna do that QB that give it here at that point if you take a look at the it's not that you see it's not zero or one it's not even be it's not it's it's really so um it's a bit entangled so the thing here is basically you know that's not this is the contribution that we want to associate with that QB down here and but this is still gonna work because basically what a control not will do in this case is kind of keep track of both possibilities and that's why we ended up creating a superposition for the outcome here where it's like you know in some cases this give it might be zero and it's okay this might be one and that's the actual QB that is the this one here right so you see the difference the third keep it from the left or the second from the right it's zero here or one here so said that that's what we want exactly that's why it also works for more complicated super positions just because of the linearity of these operations like that's gonna keep track like if they even if these cubed is not like a clean Z or clean one if it's like somewhere in between it's still gonna keep it's gonna translate that into our already so that's awesome that's really cool that's pretty cool man that's really nice so it works it's one for that and it's nice so here we see that if this is the one this is the like that this is what we have the difference then we already see that we don't pick up the right pattern after the first autumn are like a clean pattern think yeah it's a clean pattern everywhere where we don't pick up a clean pardon easier thing that's even fancier when you've got like something like these then I've got for so busy you've got yeah but you know it works it works so you can see these and these are the same perfect and yeah this basically tells you that's cool cuz this really tells you why this whole thing works in the first place for works in the first place for know so it tells you how wide the Haram are why the swab gates are needed there you're doing the same thing just using the same four cables for wires right you're just saying okay now I picked my heart amar like my heart picks a pattern and so at the end of everything I know that this pattern that I picked in here um it's the one that should belong to that cubed simply because that's kind of how you how you would generate the cycles the lowest the lowest value cubed is affecting you it's kind of influencing the latest like the big picture cycle cycle whether it's gonna be repeating itself of what it's just a half off a bigger bigger cycle you know and that map's whether it's an even or number which basically can be just at remind by the by that cubed in here so I probably know another I probably repeating myself three or four times but I I just wanted to kind of make sure that I in the sense myself is I think that that's definitely that's definitely it's a here you have the key of tea without swap gates |