- &quot;Why do you want an iPhone&quot;<br><br>- &quot;I don&#39;t know, it looks cool.&quot;
stringlengths
1
962k
I think we should be live so good morning from Germany okay let's see let's wait a couple minutes see if more people are joining just give some time to people as well I mean I guess if you guys can see me if someone drops something in the chat is gonna be super helpful so I know that that this is working but it seems like it should be working so basically I don't know if all of you were in an some session yesterday but the idea is we changed a bit the format and said you know let's use the let's use the the potential of each type of a format the best we can and so we said Sam is gonna do is sort of the more the more open discussion and and so the silent studying type of formula whereas whereas I'm gonna be more like just hands on going through these my own way my own style and this comes with pros and cons obviously because this means you get the experience of someone reading the book or reading the text that hasn't really ready before which you know I'm that kind of lazy lazy type when it comes in terms of mathematics and stuff like that so I might not be oh hi Arielle nice nice to see that it's working I hope not with a lot of delay but yeah so that's that's the idea right so I mean I'm gonna be doing some of my own style and and that might not fit everyone's way of approaching the whole thing but I hope it gives insights to people on you know on how how to use that so let's and so I'm gonna use the good thing is I'm going to use the whole full two hours to just kind of go through stuff and then if you have questions in the chat just just ask them in you know we can do sort of Q&A in general and all that stuff so let's let's let's start right away and let's not lose time with this if you freely try me at any time I hope I'm not going to be some money tour in mine I don't go offline again but it would happen if I go offline I should I should catch it fairly quickly so you should have miss anything so it's not gonna be any open discussion in terms of you know blocking half an hour at the end or whatnot it's just gonna be all all mixed time for the next two hours so I hope I hope the we did you all enjoy that good so today okay so it's gonna be a bit messy right I mean I just five minutes ago I took a look at this stuff in here it's like ooh so this is fun with mattresses is this a couple of things my goal was to approach section two so there's gonna be and it seems pretty mathy so this proving universality this can be interesting basics basic circuit identities let me just quickly take a look at these so so there's an introduction then we go through quantum gates because I see there's some problems in there and I'm when I was talking to Sam the other day I was like I know there's some problems in Section two okay so this is more like an introduction of the gates and so I was thinking I don't know where I read that I I don't I don't know if this was while while reading Mike and Ike or while reading cuz I'm sort of in the very beginning of the book but I don't know where I read that but someone mentioned or maybe was I was Craig from from from from August sir and I think I think I think he might have mentioned it how's it going so slow I just want to go I just wanna go to the block where it's like it it might pay off too sometimes when you've got the chapter of a book with problems to actually approach the problems first without taking a look at the actual theory just to double-check its it serves two purposes so double check what your with your current you know when your current knowledge is but it also helps to when you go back to the actual theory you're kind of you kind of be more engaged I think with you're paying more attention to certain details it's like oh yeah that's gonna help solve that problem that I was not able to solve so I'm not I'm quite tempted to do that right now I know I said I would recap some of the stuff in chapter and chapter one but I'm almost I'm almost like screw that and let's just go with these and I'll probably go back and see you know if I'm missing bits and pieces to complete that because it seems it's a good way to move forward make sure I move forward with the book chapter three it's gonna be challenging because it's gonna be algorithms and that's gonna be quite heavy but let's let's get down with you so let's let's let's start with the problems this is the whole thing is going a bit slow right now okay so and this see three sets of problems classical logic gates with quantum circuits basic synthesis of single qubit gates building the best and an gate let's take a look at this so okay so classical logic gates with quantum circuits using the not gate expressed as in as X and Kiske this C the C not gate expresses CX in case kid and the toefl gate expresses c CX and case k functions to implement X or and the man and or gates okay no I hope that's or is this just an example you know okay let's give it a try let's notice it is the XOR gate the end gate I so slow that is a NAND gate okay the or gate oh and there's some tests okay okay and they're all failing okay let's give it a try then so so let's just go ahead and copy that I forget how to run things you know really easily so now we've gotten okay so let's let's let's do an example let's take the example here and then let's has this been copied or seems like so this is basically defining a function let's go through the let's go through the text so I hope you can see that I hope I'm not like blocking with my camera I might I might just move the webcam view to another place if not okay so there's a cubit let's let's make that big for a moment so we can just focus on these quantum register classical register a quantum circuit okay and then we encode zero as the qubit state zero and one has the qubit state one since the qubit is initially zero we don't need to do anything for an input of zero so for an input of one we do an X to rotate the zero to one okay so this is just this is just a sort of an exercise to see it's sort of a mixture of quantum and classical I guess now that we've encoded the input we can do a naught I see you wait a second ah so that's just encoding the input okay so just preparing the input so if the input is 1 then you you need to okay and we're only allowed to use not control not and the CC not okay hmm finally we extract the zero or one output of the cubed and encoded in the beat in the classical bit so we do QC measure kind of realize after like we done the session a week ago and I'm I feel already rusty with the language I'm not I'm not fully in shape so get the backhand the chasm simulator one shot okay and when we turn the output and so if you do something like these what always to was it shift enter it that works yeah and then if we go and copy paste the the tests something's wrong with the tests oh yeah it's not wrong with the tests it's that those things are not defined so let's just get rid of this for the moment okay so zero input zero gives output one input one gives output zero that's what's expected for the not gate okay so now we basically I guess it's all about doing the rest that doesn't seem to be a doesn't seem it should be too complicated let's see maybe the limitation of the gate is gonna make it complicated not so the next is the XOR gate so I see this is basically okay if you're given the sort of the the scaffolding of the whole thing and then this just how you modify at the very beginning your quantum program goes here so okay so you measure and then here goes the rest but I guess I guess we're gonna copy we're gonna copy the the input encoding part I think that that's something that must be there so basically you're you've gotta encode that into your into your quantum circuit so if input one and I'm not this is not going to be efficient folks so it done done criticize me if put one is one then so got to quantum registers okay so q0 is so it's negated and then basically if it put 2 is 1 then Q 1 is negated so that should that should basically give me the right encoding and so it's an XOR so we're gonna do an XOR so next or this should be let's see if the drawing tools work ok so I don't order this new thing here I hope you can see that in the screen but what the XOR should do if this is AP if this is input 1 and input 2 this should be the output here should be zero one one zero so basically I think I think that a control nut should be a nod I think that's actually how even the control knob is sometimes explained as is as in being the XOR because because the control not okay but I gotta output a zero right so and I have only two registers or or can I have more registers because the thing here is I guess I guess nobody cares would I add another register sort of the outcome raises it because the point here is I cannot like you know just operate with these to read with this not very sorry a one resistor with three cubits so I probably I think I can just do that so I should do something like that which is initialized to zero and then basically if I would say you know if I would say the if I control so if I couldn't if I control on on once and say flip the flip the actual flip the actual output be it let me maybe instead of talking I should be actually coding so if I do something like that bqc control not oops it just went all gone it's all gone okay control not on the QB 0 and the QB - right so basically what this is gonna give me it's gonna tell me ok so there's a if there's a 1 in the QB 0 then my QB down there's gonna be flipped then I go and I do QC CX q 1 q 2 so what this is basically doing is if Q 1 is 1 then Q is gonna be sleep now the problem here is if I if both are both are 1 if both are 1 then it is basically this is basically going back to - 0 the output the output right so this would be this is the QB this is 1 this is the circuit then I do like these and I do this is the control not and then I and then I do another controller in here so this is gonna this is gonna basically flip the whole thing back to 0 and so therefore I can't really distinguish between I can't really distinguish between the the output like the input 0 0 0 0 or 1 1 right I thought now would be trivial so I might have to add some correction in here right something to correct or you can always add I mean at the end of the day I can always add that should be so if I if now I say it makes it difficult to just reason like this i maybe with quick is gonna help me so if i do like these and i do like these right that gives me so that gives me a feels is easier like that so that gives me a 4 0 0 4 0 0 i get i get a 0 back 4 0 1 I get a 1 back which is correct for 1 0 I get a 1 1 0 which is which is correct for 1 1 I get oh no that's that's correct ok I'm stupid that should be right I mean let's give it a try clear get rid of this and so I should measure not q1 but q2 and I think that should be C if I now go and copy the tests for the XOR gate the tests for the XOR gate yeah okay that's correct right or should I check with the XOR table list now that's correct so the XOR is an exclusive or assets yeah stupid okay good so the end gate good that's an interesting one I'm I'm sadly I can I have to say that the thing here is I as I'm doing another serious part in parallel where I'm basically trying to decompose the toefl gate which is a NAND gate and it's something that if I if I was not doing this right now that would be a hell of a complicated thing to do because the problem with the and with the end gate is that okay so let's let's let's see if I can oh yeah what a second no but it's not health complicated because I have a CCX I can use it okay so that's that's cheating the thing is that what's tricky is how to do that without a CCX so literally because the CCX it's actually the endgame right so if I just if I just go ahead and say okay so I see here that there's probably a better way to do the xor gate because you only have two registers in here and I kind of cheated by changing that I think you can because my point was my point is I'm assuming I cannot I don't want to destroy the the the but I don't care I mean I'm not destroying any inputs or anything but I could just do this on sort of the same the same circuit isn't it isn't just one control eggs actually an XOR if I if I now cuz now I realize this is a 2 in here and I kind of modify it to 3 so if I if I stick to 2 and I say control eggs so what's gonna happen so if it's 1 1 right so if let's go back to the oppa drawing here so if if I got a if I got 1 1 then this circuit is gonna transform the the the circuit into 1 0 this is going into 1 1 this is going to transform the circuit into 0 1 and this gosh okay that's easy sorry ah so stupid it's like what it took me 10 minutes to realize that anyway yeah that should work cuz if you wanna if you don't care and you say like I can't reuse the it's just I can reuse the this part here that should work so this means basically that if I clear that and I say get done with this and so that's it then you measure 1 and that should actually work as well so let me check yep that works simple you see sometimes to try to overcomplicate things over complicate things and in here then it's it's kind of easy in the sense that I'll copy the same I can almost actually copy almost the same and and use the CC not the CC X and I think that should be like this think and then you measure cube tool and then I go and copy the results for the for the and gave for the end gate now what was fine everyone's fine cool yeah that's the an Kade and now let's go for the NAND gate Papa Papa is the nun gate and that's it super basic question is I guess like an and gate but then negate it so it should be 1 1 1 and 0 correct table that's cheating yeah 1 1 1 so I mean I guess that this is as simple as basically negating the result so if I go and do this and then I say QC x on Q to write some kind of really kind of negating the result should that should do it that should do it that should do it that should do it yes let's do it and then he or gate and and and or gate here I can use three registers I guess the reason I can use three registers is because it's one of those operations that you can't you can't really know the input from the the input if you know the output right the same with the end this is something to do with reversibility as well but I we haven't touched that in the book so I don't want to talk about it much Oh what have I done no no no no no here so what would an oar look like so the Auris basically would give me one like four for all these cases right so so I guess I guess I can do sort of a I mean one way that I could do that is a route sort of a reverse and in the sense that I say first I prepare the first let me copy the first let me copy these it probably doesn't look like I'm having fun but I'm pretty much pretty stressed because this is so basic ok so this here and then so what I would do is I wouldn't a gate both right and then say and then try to run an end because then I should basically with an oar I should get a not an end sorry an end exactly because I should basically get the the opposite of that I should get a 1 a 0 here a 1 here a 1 here and a 1 here and so i if i negate that that should work right so if i why is it crawling so badly so if i basically copy that so it's kind of copying that but I got a before hand I think apply next gate to zero and one because I want them to behave the other way around so so I would do something like that and like these and like these right and then I think that should work I think that should work let's test it out let's test it out here I feel I'm bad at the keyboard today yes good okay so that was pretty basic here you go [Music] basic but it's still it still cost me some trouble it's good let's go to the next exercise let me check quickly the chat anything is all fine slack any comments no all good so let's move on strings seems to be working fine so what's the next exercise so that we've done the first set let's take a look at the second set in the third set then let's see let's see how this goes so this is loading slow not good ooh okay so we've got one exercise another exercise interesting and a third exercise let's go through I don't know if I should create if I should basically save that and then save us and I'll say set one and then I'll create a new maybe notebook that's probably the easiest way to start clean with this so one show that the harm or gate can be written in the following two forms here the equivalence is used to denote that the Equality is valid up to a global phase and hence that the resulting gates are physically equivalent hint it might be even it might be easiest to prove that that e ^ you know I PI divided by 2 m is equal into m for any matrix whose eigenvalues are plus minus 1 and that such matrices okay so I'm I'm not I'm don't think I can pull that off in terms of doing a sort of a mathematical proof that's just not the way I roll I can definitely take a look let's let's try to approach the problem at least let's try to kind of break down some of the things in here and and then see if when we go back to the chapter we can have I can easily put the bits and pieces here now I feels a bit odd if you depends on the audience of the book right it's really personal feedback here this is the type of exercise that I would expect in a sort of a Mike and Ike type of book but not like in a book that it's supposed to be really practical hands-on coding but it's my personal it's my personal taste I guess so showed under har margate okay so what do I know and here problem is okay first I haven't read the second chapter but I do have some background background knowledge on these so I know that the Hana Mart is a rotation in between the X and the z axis or the Bloch sphere now what really helped me to see that is which I see that I have seen that I've seen that in the pre in the in the session yesterday from Sam there was sort of a flip background and someone showed Q control and I want to show that again because that's the first time I think that I saw an animation of what what the actual harm or gate is doing and maybe there's maybe it's somewhere else but you control keep control what's there that's the block but we can take a look at it because for me it's before seeing that it was always like oh so just it just goes from from you know Z pointing up to the plus stayed but you kind of don't realize the fact that for this rotation to work both ways so that it goes from a minus state to 1 or 1 to minus this has to have a particular behavior right and Products Pricing industry solutions resources I don't I don't remember how I was how to get there but I think it's in and you get gotta get started somehow and it's not what I want open controls get started maybe that maybe that's maybe that's something that's free now maybe I'll just Google for harder more blah sphere animation that helped me is that helped me a lot [Music] what I'm inspire it can't be that difficult to find an animation of that bossy visualization oh yeah I think that's a good I mean okay it's not animation but it's that tells you so it basically rotates like that so it does a advance this kind of like fancy thing around the sort of the edge and then goes back here and that means so if this is X right how can I change the color of this here so if if this is Z and this is X right the the basically the opposite should also work like kind of that it's probably extremely confusing the way I'm painting it here but it's like a it's like imagine the so the the the opponent middle is kind of centered and then the rotation goes like that so that's really I think that was really insightful and I think that somehow expressed mathematically with an X plus Z at least at least that's how in queer for example when you if you take a look at here at the yeah so here you can see that it says it rotates 180 degrees around the X plus z axis now this this is this kind of gives me an intuition that okay there is definitely some relationship in here so the harbor gate can be expressed in that form now I know that the square root of 2 this has to do with the amplitudes that you're gonna then have a TN of like as a plus state or a minus state so that kind of thing it kind of makes it kind of makes sense I'm not I don't feel like I would be able to formally prove that there will be a loss of time for all of you see me trying to do that but that's definitely what I think that makes sense and then this part I remember either I remember in this section 0 let me go back to section zero there was something in linear in the linear algebra part that talked about Exponential's so exponentiating e to a matrix which is pretty awkward right and it's all like if I hadn't this a bunch of things that if I hadn't had a lot sort of the like to to have gone through I would be totally lost in here right now the one is these part in here X matrix Exponential's exactly so the notion of the matrix is finished is very specific idea but one that is so important that it warns its own section in this textbook cuz I remember we're doing that so maybe there's something here that you could pull off to actually or you could put together to use it to it kind of make the proof and so age is some hermitian matrix see first effort but wait a matrix inside an of an exponential seem super weird how is this even still a matrix well it's actually become it actually becomes much more apparent when you expand our exponential function as a Taylor series if you recall from calculus the Taylor series is essentially a way to write any function as an infinite degree polynomial if you go to find but the main idea is that you choose the terms buh-buh-buh-buh-buh so okay okay so and if we choose FX equals e to the power of x we can create an equivalent polynomial using them Maclaurin series since they're the derivative of e to the power of X is simply e to the power of X so I'm not entirely sure here of how I would interpret that but I know also that if you take a look at and it's funny because just just go so slow sorry for that we were doing the the problems why is this just crawling so so slow it's just me but so I'd recommend as well a video on three blue one brown where he explains they explained what's the meaning of e to an accomplice to the Euler number e to a constant to the power of a complex number which is like if you think about it just like what how do you even need to bread that right and it's really interesting to see that so three blue one brown Euler I think that's how how you would basically find it the faster exactly so I hope that the sound is not gonna just mute it I want to keep the commercial the IKEA commercial beautiful so basically the idea here is that what this means it's basically rotations right if you plot if you plot sort of the function e to the power of Z that being a complex number you'll kind of see that what it's doing is is drawing a rotation and so my intuition tells me that the reason you can do it this way is because it's because the matrix in this particular case can be interpreted as a rotation as well right so so it's almost like I would see the equivalents in the air but I'm not gonna I'm not gonna be able to and then the whole thing here is also it's pi divided by two so complex so I times pi divided by two I don't know if this basically means I don't know if this basically means that you're rotating it's like Harmar that rotates the other way around right could that be for example if I were to make a gate here and instead of the axis X plus Z I'd say Hyundai degrees no how could I how could I do that so I think about think about a way to put it in here because basically the harem arts so harem our matrix is the harm our matrix is the following right that's not that's not the what's the harm I matrix that's not it is it there should be maybe it's somewhere in quantum gates okay so let's dive into this let's maybe see if there is here oh yeah so that's basically it okay so so if I would add here a I multiply that by I times pi divided by two I I have this I have the intuition this would basically give you a gate that rotates the other way around this means instead of rotating so if you've got the blocks instead of rotating oh sorry instead of rotating counterclockwise and this is like you gotta imagine you know this being X plus Z that this is gonna rotate like that so effectively it would it won't just change the result so they are physically physically equivalent that's that's my my intuition here playing and now this has stopped being responsive completely at that point I think it might be the plug in the drawing plug in that's messing up there is valid C's as a demonstration on this expression on Stack Exchange oh that's cool I mean I'm not gonna go I'm not gonna go into take a look at those solutions if they already exist I just wanted to see how my intuition would basically play in here right but if if I would just say here for example I just wanna I just want to double check that let me do a quick reality check with myself so the way I would write the the matrix here would be basically 1 divided by the square root of 2 what should I use here I can exact like that like that like that and I think now I should do it negate it right it's like a minus 1 yeah so that gives you so this is the this is counterclockwise okay so but now if I would say I want to multiply that by PI divided by 2 then I should change that and say no I saw I times pi and here I think that's how I should express it and so that might be totally wrong okay I'm just trying to play with this idea okay it's not it's actually rotating in the same direction but let's see so let's call it and the other harem art but this seems to be there seems to be the difference here if I see this this being the if I think the this tribes to represent them at the phases so it seems there is like a global phase of 90 90 degrees let's apply to it so but if I would go ahead and now I have my gate in here and I will just apply it here yeah that gives me the same you see okay and if it's a so I'll zoom in and if I turn that into one it goes to minus and if I tap locate this gate it goes to one and this goes to zero yeah so they are equivalent but again like I'm just I'm just playing with the exercise I haven't I'm not gonna really formally prove that because that's not how I said I'm not the type of audience but basically intuitively I think that kind of makes sense if I assume this is a way to represent harm or gate which I kind of feel like because of the the what we've seen not here but in the other part of the kiski book where's like it's it's these matrix then if I just add that portion into it it gives me the same type of behavior so I'm assuming that's that's all correct and all that cool so let's move on to exercise 2 and I'm sorry if I don't respond to the comments right away because I'm not I have the comma I have the chart sort of on the screen and I I have to really still get used to it and look at the chart more often so okay exercise number two the harem art can be constructed from our eggs and our set operations we haven't seen these operations yet but I know these are rotations right so parameterize rotations so again if I was not if I didn't have the back background knowledge I would not be able to approach the exercise I think but it's just I think it's a it's fun to just go through the exercises before going through the actual chapter and okay so it can be constructed from our X and our Z operations as well so the our X being a rotation on the x axis and or addition and the z axis which kind of intuitively makes sense to me I think because at the end it's a combined rotation right and so I can sorry I really want to find the harem art gate animation boss here I know it's uh maybe in here now that's the okay that's the image yeah but okay because it's just cool to see the animation I think but I guess I guess my point I'll try to draw it over here okay so it's a combination of those things right so it's almost like if you would I'll choose another color it's almost like if you would say like you could approximate that rotation by doing little steps like this and these and these and these and this and I'm offered draw a drawing but you get the gist of it right so you're it's kind of like you're almost rotating like first on first on the okay now that's but that's not what that would be the y-axis so you would rotate on the no yeah you would rotate on the x-axis first let me clear that so you would rotate on the x-axis first a little bit then you would do then you would do a bit of rotation and like that kind of whatever is like you're you can imagine I think that's why this is going sort of a stepping function like your step step by step you're kind of approximating this smooth this most turn around the X plus X plus z axis oh yeah I know actually I think that's what it means really it's a bummer that I have to use I cannot use this cross browser but I guess that's what this thing here means it basically says okay so rotate so it's this whole thing applied end times like this whole thing applied end times and so this would probably mean apply a rotation than an X rotation of an angle that okay so in a purses infinite right but if you just pick a really big number so you're let's say I mean maybe not a big number let's say 10 right so yeah so you're going to read us that these 10 times instead in 10 steps and so you want to split your your angle your final angle which is basically 90 degrees right in ten steps and so you do ten rotations on the Z 10x like you do but you do a tenth of the angle I'm awful at explaining this stuff that's why I don't teach but I hope you get what I mean so maybe let's see if we can let's see if we can animate or do something like that - because again I'm not I don't want to prove anything here but close close so what does it okay so what's the exercise about first of all for some suitable chosen is it said a theta one implemented for infinite before a finite and the resulting gate will be an approximation of the Harmer whose error decreases with n okay so I guess the larger the end the lower the error because then you're approximating I guess when you step the function when you do like you approximated you might not end up exactly at plus at the Plast state but close to it the following shows an example of this incremental of this important of these implemented with Piske with an incorrectly chosen value of theta and with the global face ignore that reminder okay the exercises determine the correct value of theta show that the error when using the correct value of theta decreases quadratically with n okay so what does these two so theta is pi it shouldn't be pi should be pi / - I think shouldn't we're not it depends on n so here they do and in ten steps let me try one thing how can I can I draw the how is it so kiss kid draw the Bloch sphere I'm just just having this idea where I would basically copy that so let's execute that by hand just just so again I'm not gonna do the I don't think I'm gonna prove that but I just want to play with whether you know to check whether my intuition is correct so let's do that let's create a blank circuit and then let's do this whole thing but instead of a for loop we'll just do this manually okay so I'm gonna go with my guess and say that this should be actually PI divided by two and okay so now what you're what you're doing is you are I would be applying those two gates here and basically what should I run can I can I just plot these blocks here somehow without having to run the whole thing otherwise it's gonna bother me a lot I think can I draw that draw the blocks here let's see a quantum circuit that's not what I wanted to visualizations maybe that's gonna help me what I want to do is I want to do a step by step and I want to basically draw the blocks here at each step and see where this little arrow is going interactive visualizations pretty q-sphere representation no that's not block multi-vector okay a bossy representation so how does this work Oh so create a block see representation graphic representing put array using as much blocks here as qubits are required state vector or density matrix ah so we can give it a state vector okay so uh huh so that's how uh let's go do this and in hand so there's an example here so you actually okay so I do need to measure and run it against a state vector simulator okay let's try but do I need to measure can I not just keep the mesh I don't care about the measurement or no I should measure it probably because not because getting the state like they said sort of something that's kind of illegal in a real let's try without getting the let's try without the measurement so I'm gonna copy that pace and basically what am i doing it's not I'm just I guess that's not gonna work so I are ket states executes QC for this back-end and then and then plot that let's see what happens well maybe maybe I should import Kiski first import kiss kid no let's actually take the whole thing here and copy paste this thing I didn't have numpy import it but that's not plotting anything maybe I do have to measure let's see let's see where am i here measure what is these what is this what am i measuring here 0 1 0 1 2 2 2 2 2 if I do have to measure let's take a look at this what's the error and it's not defined wise and not defined of course is not defined why did it break before though oh because there's a loop in here okay so you can see because the code is then to plot how the error goes okay sorry so I'll just say we'll just go ahead and say N equals 10 okay what else am I missing here index 4 so this is in this is in measure do I have to do I really have to measure that it's not defined really where do I need to import it from from this one okay yeah yeah a lot of gluing and you know I do need to make oh oh oh it's worked ok cool cool cool cool cool cool cool okay but that's attractive and I'm lucky because ah nice nice okay that's pretty cool it takes a while to get there okay but basically so this is okay so we've done a bit of a rotation in here okay so but how can i it's probably impossible to turn that into animation or whatever right now with the time we have but if I so okay so it's kind of here right so do the effort and try to remember that oh wait a second I'll basically what I'll do is I'll do it in the next cell in the next cell but without all this stuff so just kind of copying everything again and running this ah stupid I should run it what I should do is okay now it's now I'm running it two times okay exactly that's what I wanted to do yes so as you can see it is indeed so it's it's indeed starting to rotate is it that q0 I'm not I'm not entirely sure how could I you know I mean I wanted to basically animate that but it's not gonna be I could also try with with quark if if this thing would just be not so lucky I would be able to do a good job so if now I do know so I'm gonna take the whole thing again but now I'm gonna I just wanna I just want to do like some step forward and do like these and so I'm kind of rotating rotating okay okay and what's gonna happen now if that works if that works buh-bye sorry okay so yeah yeah yeah it seems it's working you see now it's halfway the harmonic that's halfway Tejano Mart so by combining those two rotations you're basically doing what I what I said intuitively you're your kind of thing you know and you'reyou're eventually if this is not gonna break now eventually you're gonna end up somewhere close here that's the idea okay that's I think that's cool honestly at least validates my my thought you could also do it with I think work the problem with quark is you're gonna have a really small block sphere to take a look at these things but if I was to parameterize say a now I'm not gonna be able to do that here because you can parameterize Z rotations for as a rotation parameterize that gate at this one you can privatize these air rotation and and the X rotation and then let that grow with time maybe that work let's let's play with this for a second because that could give me a built-in animation from from scratch so what is it doing nah so I want to rotate that's gonna be difficult I want this to rotate basically pi divided by 10 times and then the T that is what quick just uses to then add the animation part of it so T times that and here same so let's see it's this kind of working or know maybe I should tweak the should actually have that I caste grows from minus 1 to 1 oh that's not what okay let's not get lost with these let's use the time more wisely but you could eventually build I think a kind of an animation in here that's that okay but that's the okay so it's almost ten good we're halfway through and we're I think almost done with the exercises so that proves my point I think okay but I'm not gonna approach the the rest of the exercise as of right now but I think it seems so what the exercise is then doing is calculating the error okay that's interesting so the error is calculated based on then an actual proper execution of Harmar gate and then you see and then you can plot that and see how it how the error kind of goes goes low that could I don't know if I had the time I would just do that maybe do we have the time let me see let me think can we do that so this whole thing here seems to work now step to run the circuit and see how many times we get to the outcome of one because although I would just say go ahead and do it by yourself yourselves and because I also want to have some time to take a look at the actual theory but it's definitely an interesting exercise to do so you're comparing this error and then you're plotting the air yeah I mean actually let's let's do one quick try let's be lazy and let's copy-paste the whole thing and pick pi divided by two and not pi if my mouse will react so let's copy these let's go here and say we do this but instead of Pi we pick pi divided by two because that's the because that's the that angle we're trying to put the target angle we're trying to person it right and now this is what's supposed to show me that the it decreases quadratically with n probabilities and n so [Music] I don't know how to visualize that correctly but it seems like it's curvy right so it could be quadratic yeah okay so but it's it's like with ten you've got like a point one error no wait a second that's not correct that's a really big error then instead of 0.4 I don't get it it's kind of increasing okay it's something to come back to maybe I maybe I haven't picked the right ankle but that should be the right angle actually see if I pick a big n say 20 what's gonna happen so kind of stabilizes really quickly but the error seems to be is this the this is the error or is this the the probabilities I'm not really sure what I'm plotting here anyway it's not really clear to me what I'm plotting here but it's kind of curvy so I guess that's good he is decreasing so maybe if I choose PI because I'm convinced quite convinced should be PI / - but if I choose PI what's what's happening so now it's decreasing now the error is decreasing so it's the wrong angle could be okay let me take a look at the third problem and improved rueake it's in a perversion of the approximation can be found okay so what this is saying is if you okay so this is another another way to practice approximate that with with the okay so it's z-rotation with Alf with assented divided by 2 to N and then an X rotation and then another Z rotation interesting why why would that be why would that be a better version I mean I guess that's just a better version I don't know okay not perfect but roughly perfect but it's definitely a place and something to come back to I'm not having here I'm not fully sure I grasp what's being plotted and how it's being plotted it doesn't seem to feed my intuition in terms of the angle being PI divided by 2 because that's the angle you're doing it's 90 degrees right pi is hundred eighty so pi divided by two is 90 degrees that's the final it's kind of the final effect what you're trying to approximate it's not basically so that should be the thing okay maybe I'm just seeing this wrong anyway let's go to the next exercise and see if we can maybe spend like ten fifteen minutes on this on the last set and then try to take a look at at section two actually that's why everyone else here in the first place so building the best end gate and I suspect I know where this is going so um let me save that as set to I I'm I'm gonna consider sharing those notebooks they're really messy as you can see and without the context it makes no sense but it's may be useful for someone trying to go through these as well Python 3 mm-hmm good so let's make sure that we import everything that's needed in problem set one you made an and gate with quantum gates this time you will do the same again but for real device using a real devices it really vice gives you two major constraints to deal with one is the connectivity and the other one is the noise the connectivity tells you what control X gates it is possible to perform directly for example the device I am bq5 tenerife air has five cubed numbered from zero four and it has the following connectivity and so not all the qubits can be connected to each other I assume that's what it means here the one zero tells us what we can implement tells us that we can implement a control XK between q1 is control and give it zero as target two zero tells us we can have Q 2 and Q is zero and so on the noise of the device is collective is the collective effects of all the things that shouldn't happen but nevertheless do happen noise results in the output at naught but not always being the result we expect I guess noise being basically that basically errors right things done don't perform as they should perform for the gates noise levels can be can vary between different gates the control x gates are typically more noisy than any single qubit gate okay i'm intuitively i'm assuming because it involves two qubits the chances that that something goes wrong or higher we can also simulate noise using a noise model we can set the noise model based on measurements of a noise for real device I try PI oh now I see that let me give me try that let me see how can I go back to can i go back to to to do to do to do to my notebooks in here can I just do that yes said to so let's let's give it a try let's see what valid says hi let's go to the bottom so pi oh come on valid you're removed in any way ok let's let's go back to what we're doing sorry thanks for thanks for trying to share that yeah I guess you know you guys can go through these also at your own pace and then you know share that and for me to it was I just wanted to make sure my intuition was roughly correct so I think we're in here yeah probably because I haven't saved it so okay but that's basically this thing I don't know if I am supposed to also probably create that coupling map in here right now probably so you can also simulate noise with these so that's a nice model okay this is something that I'm really just copy pasting Island ok errors type okay so this is kind of defining maybe the AHA error probabilities okay that's interesting gate cube it's interesting okay so this is basically giving you a nice a dictionary that then allows you to create a noise model okay so you can done radically on a divan on IBM cue devices but you know - not to worry about all these okay that's good will create I guess what they're gonna do is create a so create a simulator that kind of behaves with these with this noise in mind and and has that kind of limitations in here as well I'll try that later sorry valid I see I see now you're putting them in to correct a message and I'll try that before we jump into the into the theory okay let me just go through this first so this is the yeah this is the okay it's a nicer a nicer way to define the end it was kind of the way that I seem in a way that I did it and so and now let's take a look and plot the results this is from exercise one remember so okay so it's not perfect like 89% over a second what is these probabilities as an ant zero zero so it's almost always correct to save nine percent of the times correct but then there's ten ten percent of the times not correct still quite some error we compare across all the results to find the most unreliable okay so of all the possible inputs so the input that's the most unreliable seems to be zero one that's interesting but not one zero it's almost the same no no sorry that's the most reliable because this is a probability of a correct answer so the most would be one one funny it's the one that should give you yeah lets the lowest so what the way this is done I guess this is just okay just comparing stuff in the coding here so the N function above uses a CCX gate to implement the end but you know you know you now know how to make your own okay it's probably explained in the chapter I have been playing with some of this stuff in some of my other series already but you know it's so this is something that now we could just go and ahead ahead and try to implement a equivalent of the CCX gate find a way to implement an and gate for which the lowest audio both probabilities is better than for a simple CCX okay and that's it so a couple of thoughts in here it's basically that we you know you you just have to go and I guess figure out another way to implement a totally gate without so with minimizing those errors right the question here is it seems like it says control X gates are quite a have quite high errors and so we should try to minimize those the usage of those gates and use as many one qubit gates as possible to implement the that hopefully the TOEFL a gate and I don't know if this is explained but we can take a quick look at this basic circuit identities I am suspecting this is gonna go down this path in here so it's it's I think it's gonna be more about what type of one qubit gates why does it look so messy have less errors I smell this is the tea gate why this is so messy is it just a rendering streaming is going well just going well okay control rotations okay so there is indeed here bit of a theory on on how on how to implement a control a general a general recipe for employing and control to the operation and then oh it spoil our alert okay so this is how you do not do it okay good luck arriving to this by yourself it's taking me I didn't even get to that in in my previous series but I'm at a point where I almost got to so I kind of had a strategy in terms of how you would do that by with control X gates or control square square root of the FX gates but it's not the point here is to use I think the t gates because I think that T Gate is the one that has the less amount of error we're back to being able to against T gate it is because okay wait a second it is because of this kind of application that gates are so prominent competing in fact the complexity of algorithms for fault-tolerant quantum computers is often quoted in terms of how many T gates they'll need okay that's what I mean right so I think the t gates for some reason at least for the IBM fault or and schemes typically perform these rotations using multiple okay harem art and T gates just try to refresh that see if this rendering works well because it's just messin out with everything what is valid saying you can find a discussion about this angle on slack kiss kita undergraduate scroll up and search for a discussion where there are 61 communities okay cool thanks for the thanks for the pointers so yeah now it looks like it's rendered properly pom-pom controlled rotations the tea gate somewhere in here this is the subject the noise which basically consists of case that are done by mistake seem simple things like temperatures try magnetic fields or activity on neighboring qubits can make things happen that we didn't intend for large applications of corn computers it will be necessary to encode our cubes in a way that protects them from this noise this is done by making it much harder to do by mistake or to implement in a manner that is slightly wrong this isn't unfortunate for the single qubit rotations rxry in our is that it is impossible to implement an angle setup with perfect accuracy such that you are sure that you're not accidentally implementing something like setup plus all this stuff you know okay there will always be a limit to the curacy we can achieve and it will always be larger than is tolerable when we account for the buildup of imperfections over a large circuits we will therefore not be able to implement these operations directly and fault-tolerant quantum computers but will instead need to build them in a much more deliberate manner faltering schemes typically use the age and the t gates it the t gate is this and it's a rotation around the z-axis by pi divided by four and is so is expressed mathematically as these in the following we measure that in the following measure that the h entity gates are effectively perfect this can be engineered by how we measure we assume by suitable methods for error correction and fault tolerance using the haram art in the methods discussed okay so that's basically the reason why you use t u s-- t-- gates to the composite i mean i guess cuz okay cuz look we can i can show you what i had in mind not going to go through the exercise now because it's basically basically go ahead and implement that and I and I guess you can implement that and see that the errors that the probability of correct answers is better in this case and so but my approach to build my initial approach to build the TUF legate was more along the lines of using using sort of partial I would say it's kind of like partially rotating and then correcting if you need if you need it correct right so the would you at the end of the day what you wanted what you want to have is you want to have in your output qubit come on in your output QV do you want to have a an X gate applied when those two elements would be one right so one way you can go about it is you can basically start rotating towards X that would be the strategy and then you kind of correct if needed and so you know you'd say okay so I've got a 1 in here so I'm gonna I'm gonna rotate right but now if I if I have a zero in here I kind of want to correct that rotation sorry not not the X but I'm gonna do 1/2 X rotation and that's something that that's why I didn't want to do that here because I mean if you if you're a beginner that's and you really you're watching this and you're like what the hell is going on here this is another type of gate I don't know if it's introduced in chapter 2 or not but this is like you're doing an X but halfway you're not going you're not kind of staying in halfway between 1 0 and 1 so if there's a one rotate halfway now if this still is a 1 but this is a 0 right so if I do this I'm now gonna I'm now gonna basically oh my god I have to make sure why I don't know if this is my internet connection or I have too many things open but it's a super slow so I'm sorry for the bad experience here so now if you've got like a 1 and 0 right here you're gonna have you're gonna have a 1 so to say so in this case you've got to correct that rotation because you don't you don't want that to happen right so you you want to correct that rotation by applying them the same gate that is rotating the other way around but then you and then you need to undo that exactly but we're missing one thing which is you know I mean obviously if this is a 1 then we want to complete yeah yeah so now you basically have okay so if I see a 1 in here I want to do how half a rotation if I see another one here I want to complete the full rotation but if I see that these you know either because if this is 0 and yeah so if it's 1 0 0 1 this bunch this part here is gonna undo that rotation I think that kind of works but basically I mean take a look at the other videos that I'm doing on these recently they are in the Grover's algorithm for NIST quantum computers for News computers and these machines but and that's kind of the general strategy and I think the the the one with piece is really similar but I think I'm think I should not should not now invest more time in diving into these because I I feel like it's not the purpose as the whole thing I would love to I usually usually get lost doing these things that will be they'll be really I don't know if here it's explained a bit but it would be super helpful I think is it explained let's take a look so by tracing through each values we have ideas we have ready scribe it could now implement each control V gate to arrive at some circuit for the doubly control u gate it turns out that the meaning whenever see not gates is 6 okay the totally the totally is not the unique way to implement an angei in kind of computing we could also define other gates that defined that have the same effect but also introduce relative phases yeah that's exactly what I'm doing now at that paper if you go I'll show you quickly so you go to if if this is gonna allow me to of course so if you go to quantum intuition YouTube the YouTube channel and you basically take a look at the videos the playlist sorry and you go and take a look at the better so Home Videos now the I think it's this one in here I'm explaining basically that because I'm going through an example of that paper from Rod where they basically come up with an algorithm for an improvisation of course algorithm that works for nice computers that have exactly those limitations that the guide is explaining right okay I'm think I feel I'm going to off of attention right now with with all this so I'm just gonna go ahead and wrap it up with the exercises and yeah basically there is sort of an a strategy behind this way of implementing which is the same at the end right it's you're kind of you're kind of step-by-step rotating towards your goal and then you are in doing those rotations whenever you kind of catch the cases in the input that that shouldn't you know actually you apply the target operation that's see that's the idea okay any questions so far I see do still some people watching live that's good I think I haven't really gone offline that's also good and I'll just then basically take a look at section two or maybe maybe you will skim through section two and then talk a little bit about section one and kind of try to see wrap up in like half an hour or so a general view on chapter one and chapter two before we then you know move into the next sessions that will be deep diving into the actual quantum algorithms this is why I really want to spend more time because I think it's much more I mean it would help me much more to go through the book if you get your hands on actual algorithms even before all that I know that some people prefer to go through the heavy mass first but it's not the way that I like the light that I like to do it I like to kind of go back and forth and then it helps me kind of understand a bit more how things work and why things are the way that they are so let's take a look at the chapter - let me just have a good tip so and I'll make that maybe bigger for now so you can read this better I don't think you can read that better anyway but yeah maybe that's gonna be easier so then and then I can then I can go back to the Jupiter no bugs if you need it because I think this chapter is not so much code intensive okay but this is the introduction so you know having some qubit is not enough we need to manipulate them typically the gates can be directly implemented in hardware will act only on one or two qubits introduction stuff so the chapter then concludes by looking at small scale uses of quantum gates for example how to build a see I mean that's a bit dissipate I mean I haven't really read the last chapter of this the last section of this chapter but I didn't see there and I sort of an in-depth explanation on why this works and why this is equivalent which is maybe a bit like if I will be a UH like I look at this circuit I have no idea what's going on even even having the background that I have I have to break it down mentally and kind of okay so that's what's happening that's what's happening that's what's happening and even that part at the end that part in here is still really obscure to me I think the face correction because I think up until here you're you're doing the tough Leggett and then some nasty face kickback is in there somewhere if I've got some face the faces that you want to correct and I think that's what's doing these but why you have swabs in here I don't know so this is not if that would be explained would be it would make more sense I think but um okay quantum gates so so there's some kiss getting here but I think that this type of kiss key doesn't really it's not really worth some elastic stuff okay so to manipulate an input we need to apply the basic operations of quantum computing these are known as quantum gates here we'll give an introduction to some of the most fundamental I think it's trimmings going yeah fundamental quantum gate so this means their actions understood in terms of the box fear okay the poly operators the simplest quantum gates are the palace XY is that their action is to perform a half rotation of the Bloch sphere around the x y&z axis therefore they therefore have effects similar to the classical not specifically the action of the XK takes you from 0 to 1 the Zed gate has a similar effect on the state's plans in minus half has the I'm not so sure the I think yeah I think the plasma - state notation has been introduced before somewhere in the prerequisites I think ok so this is how the gates are implemented in Kiske this is these are the matrix representations it's like I don't know I think this type of content doesn't really like I'm not super tuned into these I definitely it's definitely interesting and it's definitely important to know some of this stuff when you wanna maybe do some you know reasoning yourself I don't know the job was to help us make calculations regarding measurements really the matrix okay they're their job so much of this case have already been shown in previous sections they're their job was i okay was to help as my calculations regarding measurements but since this mattress is a unitary and therefore defined a reversible quantum operation I don't believe this has I think there's a comment in the discussion on yesterday session about the same was like I think I don't think this has been defined what reversible is and why is this important so we refer to the gates as x y&z gates are more than s the Harmer gate is the one that all that we've already used it's a key component in performing a next measurement if this keeps me this keeps bothering me a bit like the concept of measuring the observable x and all this kind of stuff it's it's so much not obvious until you really get into something like variation algorithms and simulation algorithms where you're like now ident now I care about observables like if you like if your problem doesn't care about observables and I think that is a huge mental effort that you're putting into someone who's reading that it's like why should I even want to measure the X you know what I mean it's it's personal taste I guess I was really confused and if you take a look at my channel you can see that probably for like four or five months I was like hey why do you even need that like I'm just always gonna measure in the Z basis and then when you get into simulation then you understand why it makes sense because then it's more than its it's more than just X Y Zed it's about a particular thing you wanna measure right and then this kind of has its own representation in there but good so like the police the harm art is also half rotation of the Bloch sphere the difference is that it rotates around the an axis located halfway between X and set this gives it the effect of rotating states that point along the z axis to those pointing along the x axis and vice versa so it turns your in two and let me let me do a let me stop you for a second it's a personal critique again but I think it's so I think it's so important to understand the concept of interference that I almost feel like really confused that it hasn't been introduced after that point now because that's really at the core of almost everything you do in quantum computing right and let me let me explain what I mean so let me just exactly so if you've got like a the the zero state right and the one state and you apply a harm or gate so let's say you apply a hardware gate here like let's assume this is a given right so you're you have you have that and I'm you know to simplify notation I'm just gonna I'm just gonna write it this way okay I know that I'm missing the cause like the the amplitudes and all this kind of stuff to make it like normalized and whatnot but this is making it making it easier for me and this this gives you this way that's basically what this section is telling us right so it's telling us here a horror multiplied to a zero state takes to the plus state which is basically basically dot dot part in here but it's not so obvious for me it would be super interesting if if you know people would get inside in Y danced a harem art applied into the plus on the plus day take you back takes it back to zero this is where I think I mean it's a neat way to explain it's a clear way to explain what interference means for quantum computing and it's like all the algorithms we'll take a look at later on most of them use interference at their core right so if you let me change the color now if you apply a Harmar to these right you're basically so I'll just go over here I mean that's slow I'll have to I'll have to change the tool I guess but that takes you to zero god I don't even know where my mouse is now here so zero plus one that's your zero here and now if I want to unpack the one it's gonna be zero minus one following those initial definitions so you can see that there is destructive interference in here and we're only left with the zeros and I think that's if instead of just give given that as an explanation you explain here interference I think that would open up a lot of ice you know for me I was a big like oh yeah that's how it works at least at that small scale you can't it's difficult to do that when you've got like more than two qubits because then it's just too many you know operations and stuff you do by hand in terms of canceling things but it helps you illustrate that concept it helped me I mean it might not help everyone but that's so I think I think that's an important and important thing that I'm kind of missing here maybe it's explained I know but essentially it says the effect makes it an essential part of making X measurements since the how were behind Quantic ability but it only allows easy measurements again that's confusing why would this be useful for someone who really doesn't know anything about simulations or a quantum simulation which is where the actual observables really be come in handy I mean I guess probably people I like shut up it is you know many more cases where this is important but without having those cases in mind it's really abstract to understand why would this be helpful at all so the property that H that are multiplied to zero is plot so some things are more our primary means of generating super positions yep you've got the matrix form in here so they're quarter turns on the Bloch sphere around the z-axis and so can be regarded as the two possible square roots of the Z gate [Music] yeah a lot of stuff in here that you need to carefully unpack if you're a new person to these I agree I will help full will be helpful to see sort of the graph of the rotations on a image I don't know if making a sort of a gif or like an animation would be cool or useful or not but that's definitely important always SDG it's the SDGs it's the okay so it's the s dagger ah that's why they were DG cons dagger okay so see is the universe of the s HS an s dagger gates along with the palace other single qubit gates we've already seen x y&z two rotations around the x y&z axis by a specific angle more general we can extend this concept to rotations by an arbitrary angle theta this gives us the gates rx ry and RZ the angle is expressed in radians so the poly gate corresponds to set up I this with their square roots require half of the end goal and so on yeah so you've got two specific examples of RZ when they have their own names so the one thing that is still now I'm seeing I'm just seeing my video bidding in the preview delayed and I see that my hand is covering the entire screen when I when I do the the the time when I use the touchscreen that's awful I'm sorry for that that you have to see my hand okay but I one thing that I'm still struggling with is the equivalence between RZ like our the our third gate in the actual Z P and s gates there are just special cases because I have the impression because usually the is that the s and the T gates are cases where you can so you see that the the relative phase is only applied to the one component but if you think about a an arbitrary set rotation like any other angle that's also adding some kind of phase to the to the zero component I I just still confuse me it's confusing me forget that it's not not for now not for today but you've got basically these things in here all single cute operations are compiled down to gate u 1 u 2 u 3 before running on a real IBM quantum hardware for that reason they're sometimes called the physical gates okay so you've got a bunch of physical gates that you can compile all those into you gate the IBM Q R with this gate is implement as a frame change that takes zero time okay no idea what that means though what is even a frame change Multi qubit gates so to create quantum algorithms that beat their classical counterparts we need more than isolated qubits the most prominent multi qubit gates are the two cubed C naught and the three cubed toefl gate is already been introduced in the atoms of computation this essentially perform reversible versions of the classical X or an N gates now that the C naught is referred to as CX in kiss Keith we can also interpret the signal as performing an X oh yeah there's been a hole so there's been a hole I'll show you that this with an entire discussion between me and someone else in the kiss kiss slag Michael Tracy I think it's called I hope I hope you're fine if I show that I mean anyone can join these and psittacosis in its in general but there's been a haul like there's been a there's been a bunch of discussions in here about about the different interpretations of off the control eggs operation and I think it's worth you go you guys go read through that as well it's an interesting discussion and just basically my point my point here is that it's it's it's kind of interesting to see how well like some people disregard the conditional interpretation of the control not saying that that it's just too classical and it's not like you know it doesn't help you think quantum sort of say but I think it's useful in some cases I mean it's definitely useful when you're building things like the top of the gate to think this way but it's maybe something that could be so these together with let's see if I can put my thoughts while structured in my head right now so when I was starting to learn about quantum computing I played the game hello quantum right and so this game is a game by James Wood on that walks you through the different gates and stuff like that it's really cool game wow that's actually my video so what what was really interesting is that the game basically gets to a point where they explained what the controls at gate is and they're like these three ways to see to interpret controls at gate at least and so that was for me really shocking right there's different interpretations but at the end of the day it makes a lot of sense do you know the deeper you get into corner competing you realize not it's super important to understand that the same way you've got different you know dimensions within the Bloch sphere you're measuring in moving things around you also have different interpretations of gates and sometimes some of them are making more intuitive and useful to understand an algorithm and sometimes they make it just completely confusing so the control not is one of them where the it says basically you can think of it as a classical eggs or you can also think of it as performing an eggs on a target cubed but only one the control cavities one and I think there's another two station which is which is basically as a Face Swap that's what that's what Michael is explaining here that you can see that gate totally as a as a face well I'll explain you what I mean so if you go to work and I apply say I'm here and I apply a tea gate right and something like that right so pay attention that now you've got like a phase of zero degrees here in a phase of this is gonna show up - hundred thirty five yeah so if now I apply a control not tell me this is so slow I have too many things open that's not working well apologies for these but this is I don't know if you see those things on your side but I'm having big performance issues with my browser right now if I apply a control X gate you can see that the phases have been swapped so that's another way to take a look at the add the whole thing right and it's really interesting that you can just think of it this way as well and so this definitely helps you in certain you know in certain moments if you turn or reason about why is the control not being used in a particular algorithm and maybe you know that's something worth putting into the book as well that there's different different interpretations for that so well this is the position mind we can simply can simply define gates that work on the same way but instead perform a Y or Z on the target cubed yeah that's pretty that's another example right so a way it is so many different ways to see the controls that gate the totally like a controls that gate can also be seen as like if I put us in a superposition of all zeros and I apply a control set gate you will see that what happens only we can see the effect as these face is this particular element of your super position the one which is one one is faced by a hundred eighty degrees that's another way to interpret that right so it's definitely definitely a it's definitely worth that's been the source of so much so much confusion on my site in home my whole learning journey that crazy so composite gates what is it so to do when we combined gates we make new gates if we want to see the matrix representation of these we can use the unitary simulator of kiss keyed for example I started something like okay annex gate and then zet gate it's not what it means or I know a next gate applied to one cubed and is that to another okay so and then you're combining that gate into these okay and then you kind of make the matrix out of that so you could use that as a single block in your out in your algorithm so you're doing here what are you doing you're doing the unitary simulator and then what are you getting get the unitary and then you use the fanciness some fences to display this in lot X okay so basically the gate unitary it gives you the matrix to represent that okay interesting I feel this is quite heavy I feel this is quite quite quite heavy for for just like two point two but let's go ahead and find with mattresses I want to spend the next 15 minutes kind of trying to go through it I already know that I'm not gonna go through two point five proving universality it's not how I said how I roll I think it's a fun thing to go through probably just interesting mathematically but I don't see the usability of these for someone who just wants to get into you know again as quickly as possible into understanding what's the different you know mental model or computational model for quantum computing so fun with mattresses manipulates is the heart of how analyze quantum programs I would disagree with that okay I mean yeah if you wanna analyze it mathematically then yes in this section we'll look at some of the most common tools that can be used for these unitary Metreon matrices starting universality is inherently an endeavor that needs math you see that's where it's like I don't have anything personally against this kind of statements but if I would just go that I would just this would just turn me off I mean I'm not like okay sorry let me let me no no let me correct that I'm gonna correct myself if you want to study universality then yes yes yes that needs math correct but not quite a committing in general so first we need the concept for hermitian conjugate yeah I feel like this is math mattress six as an outer product spectral form how did the composition what is the power of the composition so I guess I guess a lot of the tools presented in here will probably help okay I kind of see here I think this is probably gonna help you get that exercise with the demonstration of the harm arcade and whatnot yeah yeah yeah it seems like this but like I'm not that's not it this is not me being lazy I mean it is me being lazy but it this is not me being yeah I don't care about math is that's how I would actually approach it so I'm not I would tend to just come back to these things later on if I really think that I need them see the standard gate said so Clifford gates astana gate said for every possible realization of faltering quantum computing there's a set of quantum operations that are more straightforward to realize often this consists of multiple so-called Clifford gates combined with a few single qubit gates that do not belong to the Clifford group this section will reduce these concepts in preparation for showing that they are universal okay so I guess so I guess I'm gonna skip that I'm sorry it's just I don't like doing these things I get it I should but I'm not and maths our math is fun I mean don't get me wrong math is fun like it just I don't know don't feel like it but there's some interesting identities in here so if you do Hana Mart the next gate and a hotter Mart then that's a Zed gate but I think it would be much more helpful to see those things I don't know graphically with the Bloch sphere playing with code so there's some some identities in here that okay I think but I think again the purpose of introducing all that is to then have the right tool set to proof universality which is totally but if I if I was you if I was to suggest a change in the in the chapter structure like this whole thing here from you would go to the very end of the book as a that's an annex you want to take a look at if you want to dive into you know the maths behind universality and all this kind of stuff so a a book that does a great job for people that are for an audience that has been more like me it's the the O'Reilly book like because they basically go ahead and let's see if I can Kindle of a can go to just show the chapter structure so quantum computing [Music] the table of contents and again that might be the wrong that might be I might be the wrong type of audience for the Kiska textbook but that's I mean I'm being honest here so that's my take on this so there's an introduction to the whole thing and then there's basically notation you know a bit of the basic instructions and then you you start talking about multiple qubits what I liked is that you jumped right in to go to doesn't work I guess it's collapsing so again here so then you jump into amplification quarter phase estimation this it gets practical really quick and I also like the fact that you start writing right away with arithmetic and what I really liked is that instead of this is also to to give input to the people that were in the previous session whether people say you know it doesn't the half adder exit example of the of the first chapter it doesn't really help you understand the power of a quantum computing the way that this book approaches it is like they show you the arithmetic and then they say you know what you can do arithmetic with and and within in encoding the results in the phase right so it gives you that kind of that's one it gives you a I was like oh there's more to that than classical computing and so that's that's something that I really personally like but again this is just my my my five cents and if this thing would just work for once yes okay so this is all Pam param param composite composite gates bumper improving universality so this is awfully slow and I don't know how to make that better next time so I'll have to work on this in terms of the how the browser is performing it just is such a big lag maybe should close some of these things I don't know close these so proving universalities 2.5 which is not opening so how much more time we have 10 minutes kind of ten minutes okay now it's getting better proving it over solid a so yeah I guess not doing that but what is it what's the gist of it so with a few hearts I mean I guess I guess intuitively you can think of if you think about a block sphere and it's like okay you with a harem art no adharma like with with rotations you can just go everywhere right if we have the rotations across like I think even just two of the angles right like two of the axis you would but actually be able to reach everywhere I think that's what I would intuitively think about yeah our X and our Z I think okay but I guess with a harem art with a decayed and a harem are you could I don't know it's yeah that's I personally think that's just for a negative depends on the audience if your audience is someone who's using that as a material as supplement for like a university introduction into quantum computing and quantum mechanics I think that's definitely not bad but I'm definitely not that type of person basic circuit identities making control that from a control not you see the thing is I'd focus less on at focus less on the the actual technicalities of how you build technicalities of how you build those those gates using other gates but more about the interpretation of them I think that's something that if I had had that if I had gone through that before in a more consistent way I would have had a an easier time understanding certain algorithms so there's a okay swapping QB swapping qubits you can do that with with control X gate but you need though three of them a B oh yeah ba a BBA some a one a one from eight from A to B but with a useless at the beginning we can also think of it as the process that swaps a one from bit way but with the useless PA at the end either way the result is a process that can do this for both ways around yeah here I'm missing a bead was there was there an introduction to the no cloning the no-cloning theorem theorem and stuff like that I know this is more quantum mechanical and maybe less feels like less practical but it's also interesting to understand why why the swap has to be done this way so making the see knots we need from the cenotes we have this case in the corner computer I'm free and by the physics of the underlying system changing the I should obviously not let's say with this with a second problem described or if we have a scene out with control beats cubed C and target cavity how can we make one for which T acts as the control and C as the target this question would be very simple to answer from the control set for the control set for this gate it doesn't matter which way around you see that's the then you drop in those sentences without having gone through the different repetitions of the controls then it's it's pretty confusing I think so you know control set city is the same as controls at TC for control that gate the control qubit must be in state 1 for that to be applied to the target given the above property of Z this is all these only has an effect when the target is in the state 1 we can therefore think of the controls a gate as one that multiplies the state by two qubits by minus 1 but only when the state is 1 1 yeah it's one of the fun ok so this is a way you can reverse the controller and and in the ex gates I'd guess here's another way to write the C naught gate why would this be useful for I guess it's useful for some other reasoning in there but it's pretty heavy all this stuff like I'm I'm like out of laziness just crawling through that not because I have done this before but because I really I think I've I've been facing some of this material before in other forms and shapes but just doesn't appeal enough to be controlled rotations so that can be maybe an interesting thing says how do you build controlled rotations or how do you any kind of control gate right that's a comment that's a question you would think I was like how would you how would I do that I mean obviously with an editor like query you can drop the control control thing anywhere and you can even do like a control harem art but like how you would build that in Kiske right because you don't have a CH a CH operation I guess so and I guess the gist of this is I don't know how this is explaining here this method works because x and y-axes or Thor know which causes the X Kate's to flip the direction of the rotation therefore simply works to make a control RZ the control RN X could be similarly used so you know gates we can also make a control version of any single cubed rotation for this we simply need to find three operations a b and c and a phase alpha such that uh yeah I guess the strategy here is here a b and c are gates that implement a B and C okay but the strategy is kind of this kind of the same as in like you you're I don't want to open the drawing tools because it's gonna bring the whole thing again so you're basically approaching your V like your V gate effect by using okay control sets control sets or is this just a set as in like yeah I think it's controls I so you're kind of doing an undoing based on this and then I think this little guy up here is just a face correction that's what it is and then the toff elite gate is the three cubed gate with two controls in one target it performs an X on the target only if both controls are in the state one the final state are the target is then equal to either the end or the NAND or the two controls depending on whether the initial state of the target was 0 or 1 and hopefully can also be thought of as a control control knot and it's also called CCX guide to see how to build build it from single and two qubit gates it is helpful to first show how to build something even more general and arbitrary controlled controlled you for any single cubed rotation you for this we need to define controlled versions of yeah so that's the strategy right so you're you're approaching okay so V is V would be severe target is e is an abstract gate you you want to define gates that are sort of getting halfway that that's what the square root of u means really you know kind of go halfway that operation and then V dagger is kind of go halfway backwards so you're undoing the path you've already gone through so by tracing through the valid metal you can convince yourself that a you get is applied to the target even only if both controls are won using ideas we have already described you could now implement each control V gate to an fit some circuit before the W control you gave it turns out that the minimum number of Cena gates is blah blah blah and then this is being dropped in here which is a monster of a complication to try to understand that but it's not this is not the guides fault I guess it's just I don't know what's my my take on all these just to close it up wrap it up for today it's 11:00 I could spend like 2 or 3 more hours on these and I really haven't even gone back to chapter 1 I'm sorry for that but it's my my take on this I'm happy that I went through the problems first I think that actually definitely helped me to get my hands on dirty with some of the stuff and it felt a bit that the problems were bit disconnected from the actual like Matthew Matthew stuff I mean if you really want to go and make the proof of all this of this problem here then the Matthew Matthew stuff is definitely helpful but as I can as I can see if you go through the 2.3 fun with mattresses this probably gives you the right tool set to approach that demonstration like that demonstration I think I think that that proof I'm probably using the wrong English words yeah so that's probably I mean I'm happy that I went through the exercises that's my my take on these I personally think that for a certain type of audience that's that's not the optimal to first chapters or three first chapter zero one and and to feel like super heavy on on on math which is not a complicated type of math but it's just heavy on math and you know people not doing research as their full-time type of job might just have some some hard time getting used to it now whether this helps you to approach the algorithms in Chapter three or not that's a that's an interesting question we'll see I guess I'm gonna I'm gonna structure the next sessions just focusing on the and the algorithms you know one or two at a time try to understand how this is explaining here and then try to break them down somehow so you see what's the mental process that I usually follow to approach those things but it's all in all feels a bit like it's difficult to give concrete feedback you know it's kind of cool you okay thank you thanks thanks valid for the nice feedback I mean it's again it's it's difficult to just you know put all the mental process through my mouth I go in for my head through my mouth so that you get what is going on in here and don't get me wrong I'm not saying the the way this content is built and here's wrong I mean it's it seems to be everything you know of course correct and whatnot it's it's just doesn't feel things are in the right place it's maybe my my my feedback but definitely approaching the problems first was a good thing so I don't know is there any other questions if not you know happy to you know answer comments later on if you put them on the video once it will be available on the channel and you know see you next week I mean I'm enjoying this a lot it's actually quite tough to squeeze all this stuff in one in like two hours but it gives you an idea of how at least I would approach reading the reading the guide and reading the book and that it's not always easy because you think you can't avoid going back and forth let's be honest you can't avoid going back and forth so it's something you have to live with and you know it took me 15 minutes to figure out how to do a an xor gate when it's just a control-x gate so no shame in here I guess thanks for for the people who've been joining and you know through the whole thing I hope you enjoy the content and you know feedback in and Twitter flip back in slack and the kids kids like feedback on the channel everything is welcome and there's another session later today that is going to give people more time to work on those things by you know by yourself and then ask more in-depth questions that you can ask you the channel of either chatting here so hope you guys have a good good rest of the day and we see each other next week on sunny cool thank you and bye bye
so I got the coat I got the code from from the team from the authors of the paper and I wanted to basically use the time now to take a look at it and then see how much this differs from what I was doing right so and basically I think this is I think this is my this is my implementation yeah exactly Kyle have to it's been a it's some days now I don't have to refresh my mind on this and I think this is the one recent for the for the paper in our chief okay for the Mexican problem so and this is also for the the fork is it the fork you yes that's also the k14 I guess and it seems like if I just you know i I've taken a quick look at these but it is so much in here but it seems those are the results okay it's gonna there's going to be quite some stuff to go through here I think that's it right because they also shared this one but this is a what is these code I think that's a cleaner one is it well that's a more like a tutorial one I can't see I see the there's the the surtitles and here so they show the transpiled circuit okay it's not that it's useful to us I guess right now but with our Toph IX I guess it's the same is it so anyway this is k14 so I don't know reach which one I should choose cubed mapping I said how do they do this so keep it mapping kids and physical kidnapping without them babbling good cowl mapping physically mapping on IP MQ Palencia okay rich if survey this looks like this is some heavy heavy executions in here because they do a lot of jobs in there then pulling all the jobs somehow plotting the results okay so here we got some poor son results I see that all set hasn't looked so okay so it also kind of doesn't look so so good on D like you see the the red ones or pink ones or whatever the color disease it's a real machine that's also because this is my and I was wondering why this turns not this looks like to me I mean you look at the green ones like look at the green ones really okay but that's what this babbling machine read are aromatic alien KL divergence I don't know okay so with this and today I hear palencia okay let's take a look at Valencia so with babbling as you can see doesn't really work well and like like not at all the two solutions of these are like the solution to this would be one like all ones in here and okay and so in with Valencia let's see let's try to work for the details nothingjust was there for the results similarly results of up there so with Valencia looks better now I can't access Valencia if I remember well if I go can I just go can I just I can zoom in and out reset if I go back to I need to get the providers provide it back hands if I execute this point I just get me the back ends I ain't got a good connection today so nurse that but it doesn't doesn't prove me that I I see but I think I can get so I am cute I'm kidding I just wanted to at least try with the same machine but this is probably not available for me so so we're we're bad luck here we could try the other ones and but I see already that it doesn't have to really work Ryan I mean you see the machine the machine here doesn't really now I just want to talk let's let's learn this lesson spend the rest of the video taking a look at the coat and comparing sort of comparing notes see if theif my see if the stuff that I've been the way that I've been building it is is anyhow similar to the way this has been building here and I think I should I think there should be they followed it they followed a bit of a different approach I see because they follow an approach where they created functions that basically generate portions of the circuit whereas I have whereas I have kind of like created the created the different parts of the circuit and then turn them into instructions which kind of leads to kind of leads to this ugly thing here right which kind of kind of doesn't allow you to see the full picture together because I could turn those things into functions that they just returned that portion of the circuit and I think that's that's that but yeah well let's let some I don't know if I with which file should ice I'll just stay with that what this seems what can take a look at Falls doesn't really matter so let's take a look at different the different gates see subdivided Oracle so this divided Oracle are tough Lee's are tough for me stuff legate with one swap device topology optimal motor control X so they do I got a see an X I got a car I got to see what that generates but it seems like it's the algorithm in the paper where they actually and they do actually on compute this is the under computing point that's what's that's something that I don't do and then optimal diffusion operator circuit Haram are then multi control x CN X and then out of mine so this is building the diffusion operator and then the subdivide a Kroger method basically does and it initializes a circuit it adds the Oracle and adds diffusion but it does this only once and do we do it once no we do it multiple times okay okay but let's take a look at it subdivided face I guess this is the part that says so this is say if angle equals zero fruity in range number of data okay circuit RZ so it adds so it this is the this is the part that we're gonna try to do it this way it's not that's not that's not gonna be that's not good let's go back here so let's use the full screen data is the first that is the part that initializes the circuit that's the that is my this one's yeah so there's this seta times pi and then they go and they say if angle is zero then you do they do are that rotations of pi over the number of data and I guess what they if they give it an angle they just do the angle times pi this is for the for setting up the optimal art hopefully em art of em and art of IX art of em so not in the art of em in my case I use you to gates they use our i gates I don't know why I went with the UI or the u2 and the you won games honestly but it's the same idea Ric xri cxr eyes and then this is these are both positive PI over 4 and this is negative PI over 4 yeah and then the T is the tartness the target so here they pass the Cupid's and um tougher eix I guess that's my art off I think this isn't this is the one yeah ah but because wait a second I have Haram arts here and they don't why don't they have Harlemites case instead of for Haram oh and a tea instead of Haram arts auntie's they've replaced that with a u2 rotation let me check the paper was over music so if you place the harem in the TK by this you to rotation which should be equivalent what I just want to see if this is something that's mentioned in here you know but it's instead of this HD this H harem warrant and its harm or implicates and the T dagger in Hanover gates okay and here dated the other one that's equivalent to the T dagger in the harem arcade so this would be something to take a look at whether this is equivalent but it it problems see I'm working some nice a how could i how could I see this so what if I create a new it's a new - 3d notebook I just gotta get gotta get better at in general so what if I is all basically I'll create like one circuit circuit with one qubit and I'll create another another quantum circuit giving and to see I will add basically a Hummer gate and followed a foggy gate and q1 is gonna be a YouTube rotation that it's gonna be this one but he is gonna be one and now I want to basically [Music] keep watch here mmm I just plot blur effect or something like that yeah not block sector I were title science now that's the block nectar I want to plot the plot I want to plot a cubit I did that and I forgot how to kiss get a kiss key not do that I first need to actually run both through a state vector simulator so basically get them and I haven't I haven't touched that for a couple days and I'm already lost I'm gonna get this seen how do I get to see you later yeah I do getting the simulator stay well look at the stake like the simulator mm-hmm and then was it execute see simulator saw sometimes it's a cute cue see me later thousand times something like these see shots act like I've gotta say shots in here shots shots [Music] out of French oh sorry cute Europe keep it zero mmm that's of course not hi x/np got hi ice not defined that's why I say n P dot pi has PI not defined I was fine not defined and now I wanted to kiss kids stay back the simulator what the box here that's what I want all right I find it difficult to remember this but it's me Angus what mrs. source code I know in the source code elements [Music] documentation oh oh okay here measure no backhand get uh-huh okay should get the results actually and then you get it the state vector and that should okay that should just plot block multi-vector let's just do it basically so Topsy this is gonna be C and this is gonna be me top Q so we're gonna get rid of these and then we're gonna do a ski and we're gonna do another plot Q so so from the job so from the job you get the state vector of a given circus you have to give you this circle what you have to give it this circuit okay so that's Q did it just get overwritten do I just have to let me see yeah so that's the same that seems to be roughly the same okay and if I now if I now add two to the to the circuits the was done t dagger and Hatem art or versus these so now I will say what or today did I for example Q is why using YouTube right so Q for Q at these and now I kind of and for C for she basically a tacky dagger and a hot iron he's not defined yeah cuz thats Sarah so oh but I hope I know I don't have twice the t dagger let me just let me just do that again so just that cuz I think that might have added the t Daria the harm arcades twice okay now and now I basically go through these again we're back at zero and throw this again where is here kind of lost on Excel and they do this and we're stuck at 0 so those things those things work there I I gotta get used to I mean it's not that I gotta get used to it but yeah so whatever that's okay those are equivalent thoughtfully swap so I was so okay so this is this is basically these are tough VIX you too so what I did here is for the art half which is the the IX is haram RT and then did our harem artists are the two things in here and then cxt TV g CX r and c x TC x TC x yeah it's the same to do now the quantum so okay so now let's take a look at the top i swap so now I did a trick here I did a trick here where I I added that's that second so that M to correct that already we see me was in the operation so I don't have to change whatever comes next in the circuit tougher we swapped off we swap so c1 c2 t that he you know takes it to c 1 t c2 so now that we complicated to check because the spin States basically swapped the rest of the circuit after that but that's why I don't see that's why I'm thinking why why can't we just swap it back right after these you know I just then it leaves the contract of that function sort of sort of the same device topology okay so but this is the second look at this so we've got a heart mark c CX n TD g hamas listen to gee I'd love to compare the side by side on this way so we've got this seems to be the same since you the same I had a career at the rear here okay this doesn't seem to be the same let me paint that circuit that's kind of easier to compare so it's gonna be easy to compare if I take a look at these right if I do this and I go so this is just my I'm playing here with stuff so I'm gonna create circle equals quantum circuit so this is gonna have three key weights right three cubits and I'm gonna basically all call it basically and easier I just copied me I copied it as a function of easier fitness I copy this function and now I do you see equals quantum quantum circuits circuit three and I do basically what I will do now is I'll just call the function with this circuit and I will say control one I guess this zero one two right okay and now if I do you see draw out two MPL should tell me something nice now let's compare okay so mm okay some some actually quite some differences in here and it could be on my side so this could be where where things go south this part should be equivalent so let me just zoom in here zoom in here so no also my house because I cannot use the drawing tools so up to this part it should be equivalent then we've got these key now we've got this team here which Wow which I don't have okay is okay so now is is it's this the is this the could it be that there is a mistake here on the paper that this is the same so if I take this to the other side and because I mentioned that I thought this has a prior no this is because I mentioned I I thought there was a problem but I essentially have stuff here I also have this thing it's partly my circuit flipped which is not good now but how could we test these so how could we test these circuits so basically the way we should test the circuits is by maybe running them on a simulator right so so now I got I've got QC that generates this function I'm gonna now create a so I'm gonna add another swap at the end just to keep the consistency just to keep the just to keep the the controls and Hargett sin in order so we've got these last swap at the end now I will basically remove that okay now I'll basically take my what did I do cancel I'll take my stuff in here now make another function I'll call it so call it the same I will call it hopefully swap intuition and I'm we're gonna copy that over because i'm lazy i'm gonna call this i'm going to rename it here and uh now I gotta now I gotta basically and so everywhere that says too should say target target target target target good target target and they invent the rest should you say control so it's control I would control one sorry so once are basically the zeros are basically control one on control one control one and ones are basically control choose talk to control choose what I want to do is I wanna basically now that I've got back when I do you see you see intuition isn't equal quantum circuit circuit three now I will basically find nice to QC intuition you want to what's wrong that I get perfect I just called all my targets packets target target target target and I can also now take a look what I've done here I think I can do draw I'll do it equals so here it here we have it and it's exactly the same circuit so now we've got you see intuition and QC right as if I now do QC optical equals now we're going to test these by so did it wrong one second first all do so what I want to apply with a wet door wait I want to taste is I wanna apply a QC how to more your one two I got the three hundreds I got a starting superposition and and and then I'm testing the toughly on the superposition and see you see and and we should get then see what outputs we get and then here here I wanted to do the same so I'm going to do part so you want to and clean okay so we've got this now and then I wanna run roaster circuits in a simulator and output the and plot the histogram plot the histograms and we should only get results which are valid subset of you know inputs and outputs for that for the toss the game so we've got the simulator so I guess we're just is we're just gonna copy that the one is going to be QC easier on it's going to be QC in creation so I'm gonna call this like that you see questioned and jobs kissy intuition is not defined in touch intuition of course that's the name of the circuit [Music] you know we should try using patient kissing pictures not the papers pick somewhere they are okay so we got this and now I basically want to plot histogram what Instagram off cue see how does a plot the histogram work not this way [Music] yeah what a histogram which I have you probably here somewhere but but it but it but it but uh get counts I need a I need to get a histogram maybe the counts first first I get the results first thing I guess I got the results already and then I just need to do pop to see it it can't think that's that's the way it works and get counted and that's the yeah and I can plot them all together that would be nice okay so comes up to see intuition house let's see what happens okay they both work interesting they both give me the same result tonight so I've still got the nice way to compare that though but that's not well maybe I should measure you know maybe I should add a measurement information Oh God yeah that's what happens so basically same measure support like that as well or do I have to specify you see measure yeah okay and here kind of basically the same and now basically I measure at the end without you seems possible and circuits not condom circuit and intuition oh come on measure just fine my dimensions the measures drops results and I plot the stuff and essentially that's weird that's that's weird hmm because I should be getting I should be getting so I should be getting all the possible combinations right like if I have a layers of layer of Hana Mart's here oh sorry I know it happens that shouldn't be here it shouldn't he just was for the inputs just for the inputs okay so this we go no still he just won Hanuman in cubed 0 and 1 oh yeah ok so this is the first hard work in there yeah yeah so this is correct and then here also I want to get rid of this hot Abarth yeah so I need to get rid of 100 because I want to do a hot amides on the inputs only I didn't see what's the outcome so alright it doesn't work either why that's what I expected you know what I want to do is these right so if I start here and I go into super position and I do it damn thoughtfully you see that the probabilities of I want to get those probabilities just different altitudes right but I'm not getting them somehow that's what maybe because I just running maybe I should just shots sounds come before one of the shots thinks one of the shots in towns so if I do it is really the only stuff that's in the I think it counts [Music] that is awkward and and for this as well right why those things special and a simulator should work fairly well actually hmm okay so I'll stop here for now but basically I have I have to figure this out I don't have to figure this out it's there there is a difference of implementation in here so this might be one of the reasons things don't work I just just want to make sure that I can compare them even if I compare them like that which they should give me the same result it dawned so but it's not giving me the result that I expect that's basically that kind of distribution right I wouldn't get all these different elements in there with a go probability that's what I mean that's what I'm working for basically this is a simple as this cool but I'll save that and then I'll go back to these later because now it's basically time for the live session already right in five minutes in school um come on couple minutes why doesn't this work why doesn't this work I just don't get it I start with the hannam arts kissy-kissy intuition wanna see me later maybe I mean that's not to be eventually okay why doesn't this work let's do let's do a stupid ik let's do a one last stupid try okay basically I'll call the quantum circuit called like be I'm I'm circuit three three I'm gonna start with a Hana Mart and keep it 0 the 1 and 50 I'm gonna add the control X is your off one tool I'm gonna go off sorry the major make sure one to your to and I'm gonna draw up good MPL have it and now I'm gonna basically run run a job in the simulator and drop the I'm gonna product what is the ground 1:1 histogram off job easier one so enough of these awesome really what am I missing in here what am I missing why I don't see if this is the I should be seeing I should be seeing these 25% no yeah should be seeing each of these possibilities 25% of the time I'm doing something wrong cool I'll stop here cuz I got much time now but I'm definitely doing something wrong but I think the idea of testing it like that it's not that safe as awfully test tougher test all cuckoo cuckoo so so Twitter studio
okay we're getting started with the dmrg algorithm so let's see how much this takes um for the session now i have roughly about an hour so a bit under an hour um so we'll see this just i think two steps or three steps zero one a one b and two um but i'm guessing that's not gonna be super straightforward but uh i i hope i'm gonna have to kind of learn a lot i guess that's uh just an interesting thing at least to kind of scratch the tensor network uh topic um and uh yeah once i get something done even if it's not perfect then i'll probably just move on to the variational stuff but let's see um good so the density matrix are a renormalization renormalization group dmrg is an adaptive algorithm so there's going to be some variational stuff going on for optimizing a matrix product state nps or tensor train tensor network such that after optimization the mps is approximately the dominant eigenvector of a large matrix h so i guess what you wanna i guess what the dominant eigenvector means is um the one that corresponds to the lower to the ground state is it mathematics with the highest modulus minus yes and this matters to the power iteration blah blah blah power iteration dominant eigenvalues the largest eigenvalue maybe that's the largest one but that would be weird the icon of matrix i don't know but some eigenvalue okay so chances are this is what we want um the matrix h is usually assumed to be a hermitian matrix but the algorithm can also be formulated for more general mattresses okay so i'm not so sure what was the hermitage matrix by the way i'm not so sure if this is going to work then oh sorry wrong button so is the cue ball that i'm gonna have for region like are we fulfilling the prerequisites of these at all hermes and kubo because i don't think that the cube is hermeneutian so we can test that so hermitia uh a hermit matrix or cell for joy matrix is a complex square matrix that is equal to its own conjugate transpose that is the element of the i throw and the jth column is equal to the complex conjugate of the element of the j throw in the ith column the conjugate transpose okay how to do that i could check these right senpai conjugate transpose is it just a docker because you can transpose that uh hmm duggar you're the predator everything conjugate of an argument from actually which is called the transpose and complex conjugate so that's dagger do you know how you can conjugate operation maybe that's this is uh because that'll be something that we need to probably check but it because i'm not sure if this is um okay but that's something to check so maybe what we should do is open this up and just write it down in terms of the steps can i just run everything does this run the whole like okay so that restarts the kernel and run all cells um cool and at the end what you want to have is so what i want to do is i want to do now these so basically what i need is i need to check oh check if uh cuboids um i mentioned cool that's first kind of step um the second step or what else okay so we want the domain eigenvector the dmrg algorithm works by optimizing two neighboring nps tensors at a time combining them into a single tensor to be optimized the optimization is performed using an iterative eigen solver approach such as lang langzos or davidson before the next step the single tensor is okay so the first is like you take two of those of the mps elements and you try to find you try to find that eigen solver thing uh that eigenvalue i can vector i guess using an iterative i can approach such as langsos or davidson before the next step the single tensor is factorized using an svd or density matrix decomposition in order to restore the the ips4 before the next step the single tensor is factorized so you take two neighboring nps tensors at a time you combine them into a single tensor then you you find these things and then you decompose them again okay during this factorization the bond dimension or tensor train rank can be adapted this addition is optimal in the sense of preserving the distance between the tensor network after the optimization step and the network with the restored mps from abnormal okay so in physics this algorithm is mainly used to find ground states of hamiltonians of many body quantum state quantum systems has also been extended to compute excited states and to simulate dynamical finite temperatures and non-equilibrium systems algorithms have been developed for more general interest computations just summing two nps multiplying mps or npr networks okay or finding nps solutions still in your systems maybe that's what we want to no that's not what i do statement of the problems consider hermitian matrix h acting in a vector space that is the tensor product of n smaller spaces each of dimension d the dmrg algorithm okay so that's your big thing that's your big beast but in our case our big beast is just two-dimensional the dmrg algorithm seeks the dominant eigenvector of h in the form of an nps tensor network so maybe we don't start with uh so maybe we don't start with a beast actually i see okay i see what they're doing here so that's kind of nice uh let's see if i can pluck the pen let's see if i can plug the pin here somehow maybe i cannot probably awesome whatever um because at the end of the day that's kind of this great this graphical representation here is kind of really what the definition of an eigenvalue uh in the wikipedia is right so it's kind of like the um this thing here yeah so basically like the lambda would be the eigenvalue is it something like that exactly so a times the eigenvector equals uh lambda times v yeah that's the that's kind of the same right so because they have this big gray box that's the matrix the mps is the array isn't it i don't know [Music] i kind of guess it because in our case it's a we've got a two-dimensional tensor and then uh the array is just like one ball here i guess which is an array so e0 is the minimum eigenvalue okay for the algorithm to be efficient h must have certain simplifying properties for example h could be the sum of local h could be the sum of local terms or more generally h could be given as an mp or tensor network for the algorithm to be efficient what is an npo tensor network the mpo form is the most natural one for the dmg dmrg algorithm and can efficiently represent many cases one wants to consider suggest when ages are some local terms however however other simplifying forms of age can also permit efficient formulations of the mrg algorithm okay so what are the steps uh okay so you must be able to express agent name in an mpo4 minus product operator a matrix product operator is a tensor network where each tensor has two external uncontracted indices as well as two internal indices contracted with neighboring tenses in a chain like fashion intuitively if one thinks of matrix product state as parameterizing a large vector in high dimensional space than an ampus destruction in the case of matrix acting in the same space um but but if our matrix is two-dimensional i don't know how we're going to be able to do that to be honest so what are the steps the setup before beginning the dmrg algorithm it is imperative to bring the initial nps into an orthogonal form via a gauge transformation here we will choose to begin the mrg algorithm assuming without loss of generality that the mps tenses that the mps tenses two three and are all right orthogonal um what what is right right orthogonal tensor and an orthogonal matrix is a real square matrices columns and rows are now considered sorry del scan orthogonal unit vectors orthonormal vectors okay hmm before beginning the mrd action is imperative to bring the initial mps into an orthogonal form via a gauge transformation the compression requires chemical forms compression because the compression or rounding algorithm above leads to an interesting observation the mps after the compression can be made a betrayal close to the original one but it but it's made of isometric tenses technically partially isometrics i have no idea what is all this because distances with the result of diagonalizing her major mattresses they have the property that uh the product is the identity or attacker diagrammatically running the irrigation distances take when viewed as part of the mps and they have the property that okay because of the right orthogonality property we can interpret uh the mps tenses number three four and five collectively as a change of bases from the basis of visible indices to the bond index alpha 2 as follows this interpretation motivates transforming the matrix h into the i 1 i sub 1 i said 2 alpha 2 basis is given by the following diagram [Music] i still don't know what this is doing if we take h to be an npo form we can compute the transformation efficiently in defining the rj tenses along the way for efficiency discretionary edge tenses be created by contracting each mps or npo tensor one at a time in a certain order as follows what to optimize the first bond tensor b12 what is what is what is the what is this even the bond tensor ah those are just the indices that's the way it's called okay let's try to focus on the first step on this setup because then it says optimization so this is the step one will be probably where the variational part comes in the adaptive restoration is something that improved that there's no nps on the kind of a percent domestic spot um otherwise the algorithm would become inefficient okay so now you kind of have this and you okay so you have to do the svd to basically get that into an mps form again because then that's just like uh has more dimensions or free dimensions and that will be then inefficient to multiply stuff i guess and then the second bond crazy following the transition second bond two nps tenses corresponding to very similar steps can be created to optimize the remaining ampersands of two at a time and to adapt all of the bond indices to the nps once so that's kind of like rinse and repeat okay and that's diagrammatic summary of main steps okay so here you have these okay that's it right so you do that b23 is optimizing an intuitive method with the key step being the multiplication of h in projected form times b23 i have no idea what is these okay so what are we doing here actually that's interesting because i absolutely have no idea how to even get started but let's try to see if we can get started with step zero at least before beginning the mrg algorithm it is imperative to bring the initial nps into an orthogonal form if you are going to transformation um here we will choose to begin with the image algorithm assuming without that mps tensor are all right orthogonal um let's first start understanding so i mean the why it's then because of the writer's organality property we can interpret the mps tenses numbers tensor numbers three four five collectively as a change of bases so what is a right orthogonal okay so right orthogonal if i understood this well let's just clean up here right orthogonal tensor so that's what we're looking for rotations and proper orthogonal tensions because in the tensor network tensor network google github there where so if you take a look at the documentation there's a tutorial here and the documentation basically it was uh the tenth decomposition basic instruction matrix product states maybe i should just do this maybe i should really just do this actually i didn't realize there's interesting okay maybe let's okay let's start let's one step uh backwards so introducing matrix product states one way to work around this dimension like it is the arc is it seems like okay the cost of high dimensional tensors oh oh sorry it's the beginning sorry at the beginning let's do this okay so one step backwards let's really try to understand why is this even something done that is nice it doesn't make sense at all so in this tutorial we'll give a basic introduction basic introduction to matrix product states and show how to efficiently compute tensor components of an nps and overlaps between two nps cool um so maybe actually what i should do uh not these but like i'll probably close these and actually start a new notebook and i'll call it like just just mps playground or something like this playground cool and so we'll just you know we'll just put this here and this here and uh so this is based on these okay cool so what we do is i mean what are we what are we importing here we are importing tensor network numpy and map plot leap um cool the cost of high dimensional tensors we begin by analyzing the scaling of the membrane cost of storing and accessing elements of tensors with increasing rank and dimension um while the computational complexity of accessing an item in a multi-dimensional array is a one the main cost of exponentially growing memory required the main cost is the exponentially growing memory required to store the tensor let our tensor be ts1 to sn where each sr sub i and then d is called the physical dimension of an is rank of the tensor in condensed matter or quantum computing applications and it's usually the system size uh or number of qubits i like that actually it makes make reference to quantum computing the standard graphical representation looks like that so that's the number of qubits you'd have where each line represents uh but then really i'm getting a bit confused with hamiltonian and the cube of being like two-dimensional then um but i guess this is the hamiltonian is always a matrix right uh yeah where each line represents an index of the tensor now let's create a tensor with random entries with ranks and physical dimensions that run over small ranges and analyze their memory requirements um okay i mean that's kind of copy based anyway but like does this can be the same so this produces the following output um and here you have the memory cost uh yeah okay pretty nice so with n2 and 3 and 4 and 5 memory cost yeah scales as d to the power of n it's an exponential growth which quickly saturates our computational resources introducing matrix product stays in a way the way to work around this dimensionality catastrophe is to focus on a particular kind of tensors those that can be written as a matrix product states the word state here is related to the quantum state formed from the coefficients of the tensor matrix product states are special clause of tensors that can be written as products over many rank 3 tensors here's the diagram of such mps each square here represents a rank three tensor rank two for the left and the right boundaries okay as before the vertical lines represent the physical indices the new horizontal lines are called ancillary indices with the with the physical and ancillary indices at each side j labeled as s sub j and alpha sub j respectively and the connecting line between the two tenses squares represents the contraction over the common index of the two tensors a varying weak of the ancillary legs represents the fact that each dimension can be different their labels are in gray with this convention the mps diagram above is a rigorous representation of the mathematical expression okay so and this tutorial will take all d sub i equal to the single to a single d any tensor can be written as an nps by means of the singular value the composition okay so that was kind of that was what i was playing with before reading that right to kind of use the svd to split the whole thing um although at the cost of very high bond dimensions exponentially high as n approaches infinite so we begin by creating directly the node structure of the nps first we define functions to build each block of the nps and then the nps itself so the block function can construct a new matrix for the nps with random numbers from zero one new metrics okay create mps so so this block creates the uh the mattresses and then the mps is basically an array of nodes connect edges to build nps okay let's try to unpack these okay let's see let's see what this does so so this function basically creates a random matrix of a given dimension number of dimensions the create mps does it just given a rank and a dimension and bond dimension build the mps tensor it takes a node so it creates a random node as an array it concatenates then okay the rank will be here the the number of like these s things here right so so it creates as many notes as like ranked minus two because this is the the boundary first boundary in this in the last boundary and then the last boundary okay so that creates an nps and then connect ah and then it connects the edges so connected edges so connected is the mps zero one connected to nps one zero okay so the first index is the index of i'd say the node and then the the the other index that's being used here is the actual dimension or the actual edge that you're trying to connect so you're connecting the one with a zero that's for the first boundary and the first one and then you iterate over the ranks over the rank and connect the two because this is going to have like uh one two and three so zero one two so this is when you're connecting with this zero like the other one yeah and then you're appending data as a connected edge and so what your return is the mps and the connected edges okay but that's funny because actually i thought that they actually had function to do that well i thought if you just do the svd then you know that is already your mps but it seems like it's pretty invalid syntax is it why isn't that syntax just like that what am i missing here though okay that's funny whatever um cool it's it seems it's more like handmade but like it's like you know i just you know return mps which is basically a it's literally a list of nodes and connected edges is a list of edges that are connected [Music] we'll calculate the memory size of nps of different dimensions and ranks notice we're able to go much farther than before the two four eight and here we have like uh two three four five cool so what is these doing so this is doing dimensions ranks okay but that's creating something randomly it's not it's not creating an mps state like from a matrix right because they said that's the any tensor can be written as an nps by means of singular valid composition okay point dimensions why i don't know why i don't know why this is a problem so we have that and then retrieving components of an nps so let us now retrieve a component of a system so let us now retrieve a component of a system of physical dimension 2 and rank and 20. this is equivalent to accessing the components of the wave function of a 1d quantum chain of 20 cubits the main computational cost will be the contraction of the mps bonds where we use a simple algorithm to perform the calculation contract each bond successively until the entire mps is collapsed to the desired component of the tensor okay the component of a system of physical dimension to okay with this scheme one can calculate a component of a tensor and a time linear in the end not sure understand what this is doing though coefficients of the tensor are the selected components components are i have no idea dimension tool so what select randomly the components that will retrieve twenty nps notes and ps edges create nps so what you're doing is 4k in range so you go through all the edges and what you're doing is you're contracting you're contracting each of these so you're contracting each edge so you're multiplying coefficient of the tensor and the selected components so but what is this component what are these components being used like for this is not used anywhere i don't understand this is not used anywhere oh it's here okay a tensor components i don't really understand this i don't really understand what it's doing return the components of an nps what is a component then of a system of physical dimension tool so here you have dimension i don't know components i guess these are elements of the tensor but like so you're calculating a tensor by so you're basically with these loop what you're doing is you're contracting all the edges so you're kind of you know multiplying the mattresses and then i don't know i really know using the using the tensioner items offers a simple ability in mps class which can be used for tension network calculations which we'll use in the following trivial component is again simply done by contracting over ancillary indices of the mps we'll write the entire algorithm for n equals 24. and to my references pins again uh canonically normalized when we define the class finite mps [Music] um connected bonds i don't know mps form a special class of one-dimensional quantum wave functions which are only weakly entangled in one spatial dimension there is a rigorous proof that ground states of gap local hamiltonians can be approximated arbitrary curiously by an nps with finite bond dimensions conversely for an mps one could construct a local gapped hamiltonian which has these nps as its ground state called apparent hamiltonian evaluated the desired component what does this mean that's what i'm missing so to understand this properly uh theta products appear all when calculating expected oh look at this expectation value so in the products appear all when calculating expectation values and norms of quantum states they are sometimes called overlaps notice that the mps structure makes the inner product of tenses graphically intuitive involving the contraction of all the connected edges at uh in bonds an efficient algorithm takes advantage of the factorization properties of the resulting matrices once the tenses have been put into an nps form we make the contractions in a single in a h-bond bond h-bond bond sequence sweeping along the graph notice how the overlap vanishes as the rank other tensors grow if we take the inner product of nmps with itself we obtain the square of the norm which is one for the normalized state that's that's the whole thing here okay i'm still not entirely sure what it like i'm i'm having a hard time grasping some other concepts in terms of kind of the practicality and the connection to to to the problem at hand okay so you have big you have a big um high dimensional tensor and you but the the tensor has like i mean you can just have two dimensions right like doesn't matter that's we have a hamiltonian that has two dimensions because the problem here is i'm struggling with the high dimensionality here right because the hamiltonians as far as understand they just have two dimensions they're just mattresses right hamiltonian off a i don't know three cubits maybe maybe i'm wrong actually because maybe hamiltonian tensors maybe i should look for something like that this hamiltonian's color or tensor in quantum mechanics a scalar operator is environmental notation the hamiltonian satisfying definition but the synthetic can be written as a matrix which means it's a rank to a tensor doesn't mean this calibration also may be a tensor so we have at least three vector spaces that play over space space time and given observer sub space isomorphic blah blah it one one tensor and the rotation the current into these 3d space operators can change ah tithe so he's so is this really it's a matrix right it's a 2n by 29ers and this is symmetra which is excuse magic blah blah it's really a matrix the why is it a matrix why matrix hmm oh man i'm getting too much distracted ah i thought that would be easy or easier because essentially like for for a two matrix two-dimensional metrics you wouldn't have all these free edges here uh all these i don't know if they're called bonds or whatever um you just have like the edges i guess and then you would have elements in between because that that somewhat makes not doesn't make much sense you know what i mean like you have you have a hamiltonian that has two dimensions and so how like it actually wouldn't fulfill the the definition of an nps you cannot just turn it into an nps because you don't have these three edges in between because that's the definition right so it says here it says um special class of tenses that can be written as products over many rank three tenses and so the ranks in between or in that case wouldn't be rank three times it'll be ranked two tenses and so that wouldn't that would just make no sense so i'm just doing this wrong like it's not like i cannot just take the cue ball and do that like i i that's what i'm that's what i'm really confused about right now because you have and in quantum computing applications blah blah blah so n is the system size the number of qubits so if you have three qubits you have like uh dimensional a rank three tensor if you have four cubes like a rank four tensor would you n is the rank of tensor in condensed matter or quantum computing applications and is usually the system size or number of cubiets the stem graphic representation is these um for because for so that would be like for a three qubit state you kind of represent that with a cube and so kind of you have that's that's your tensor and so you have all the different states in that tensor no i'm so lost i'm so lost i'm gonna pause this for a second sorry need some more coffee yeah i don't know kind of stupid because like what are we trying to do okay so we have the cuba and you want to find the ground state of the cuba but the cube was just the two-dimensional matrix um so why do you need that like you cannot like uh rank two rank two tensor nps like you cannot like hamiltonian mps example that's that's confusing me a lot so that's confusing me a lot right now tensor network states for the description of quantum mechanical systems oh that's in german no way oh wait a second this is german summary okay background construction um local gap hamilton is in in one dimension is supposed to fill the area construction will consider a chain of n spin s particles in order to construct an nps for the system we attach two virtual particles of spin s to each side one on the left one right furthermore we assume that they are in the product state of maximum entangled pairs connecting neighbors sides construction of an mps with open boundary conditions maximum entangled virtual pairs are placed between neighboring sides blue bulbs so literally each of those elements is actually a cubing which will mean that what we're trying to do is [Music] i'm getting really confused i'll leave it here i'm getting really confused right now because it's you've got you've got the dimensions but hamilton is two-dimensional why is the hamilton two-dimensional if we have a okay it's not too time it's two-dimensional because it has columns and rows but you could also reshape it right because at the end of the day what you have is you have like you know if you say three qubits you have like an eight by eight uh matrix because you have like two to power three states inside the system so you can flatten these two to a matrix but like in reality you've got a tensor of rank three if you got two cubits you got a tens of rank two which is a matrix and and that can just be separated into um into two products right so so maybe consider hermitimetrics age acting in vector space that is a tensor product of n smaller spaces each of the dimension d yeah but then the first thing you need to do is a lot of times approximately of a large matrix matrix is usually assumed to be which matrix but argument can also be but here they say it's a matrix right but you gotta you definitely have to you definitely have to reshape that for this to work consider hermitian matrix h acting in the vector space that is the tensor product of n smaller spaces but then it's not a matrix how can be a matrix this is not a matrix it's a then tensor um that's bothering me a lot but i think it's a good exercise it's really a good exercise to go through to understand that but yeah it's a long journey
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
this is live yeah that's live cool so we're gonna be we're gonna be creating some puzzles together today if the if obs will allow me and the cpu usage will go a bit lower because it's like about 10 11 yeah so what i have here so i have a um i have a version of quirk opened up here let me see if i go to quirky quirky dojo i should have it in quicker dojo actually i don't know why it's in quirky playground but uh i started there simply i'll just i have to move it so what am i doing key status so basically i should probably actually commit the changes from yesterday so i fixed uh fixed it back with the gate set for the dojo with the dojo gate set i'll i'll i'll try to explain what i'm doing basically so it this is basically i wanted to kind of close season one of the of the turn to keep it off series by showing you guys something that i've been working on which is a bit of an extension to to quick that allows me to create the puzzles in an easy in a relatively easy way and i hope that by making these available right now um you know others can create gates as well and i wanted to kind of show you what's the process behind the scenes in terms of how do i usually create such puzzles sorry um uh where am i now actually what am i doing um i've got these i wanted to show you maybe a local version first so should i just npm run this thing and i think that goes to uh basically here so can i just copy the path and then i'll open up another a chrome tab so i can show you guys uh basically what this looks like so this looks like just quirk for now um but it has this little thing here called dojo config so what this allows you to do is it allows you to create a puzzle in a similar way that i do with the turn of 13 videos so maybe you can can walk through uh through an example of how i would usually create such puzzles and then maybe let me just actually uh if this is done can i not just uh copy these into so i'm gonna actually copy this file and in my web page so [Music] under puzzles paste but i'll i'll call these uh rename so i'll call these what um that so i'll call this basically the dojo or the pencil creator puzzle creator or something like this this is wait a second i i don't know if i i don't know if i should uh i think i hard-coded the uh i think i hard-coded the uh the url that this thing is is telling you so let me actually let me actually go back to go back to i think it was in dojo js yeah that's really bad like i the way that i did it is actually not the best but is it just uh where did i put out the url oh no it actually okay so it actually gets whatever is in there so it should work okay so let me go back to the web page and i'll just i think this is the so let's just uh rename this to puzzle creator so that should work and then if i go and i had already built it before so uh so that doesn't matter if it's not finishing then why does this just eat up 20 icp okay so if i go back to um to the webpage okay it's just a github pages so i'm just gonna add these and i just want to try whether it works right away in the web page so v0 of puzzle of password creator i'm not sure i'm not so sure if this is going to work though um let's push it and see so what am i youtube is not receiving another video i'm just sick of these errors this streaming stuff i have like um i think i don't know what is it is it my internet connection obs is like 22 cpu or whatever i'm gonna get better better internet connection so um so this is up and then if i just go here and check quantum intuition i know sorry uh uncertain systems and we'll just go to puzzles and puzzle creator yeah it seems to work okay so let's try it live actually so this is really just live on the webpage right now you can go ahead and um and go check it out i'll put it in the chat um so this allows this allows you to create puzzles this in a similar way that i do for the turn the computer off video all right so basically for example um i would just i don't know i let's make a random puzzle okay so i'm gonna i'm gonna create a um a random i'm just gonna just gonna add some gates in here right and i'm gonna try to black box these the way that like you would usually see so i kind of go and make a gate right like i use the from circuit column uh the from circuit part here to create a gate i usually go to the uh emojipedia random just get a random emoji the nigeria flag i don't know uh let's get another one uh i don't want to flack in not nigeria but random random so ah the polar bear okay cool so i basically you know copy this here create the gate i have to little gate here okay so now i'm basically you know that's the puzzle right like it like to mention that's the puzzle and i want you guys to be able to uncompute these or to kind of turn the cubits off right one is off already so real bad but um well maybe i can even give it like give it actually some initial values to make it more complicated so let's assume that this is the idea and now how do i turn this into an actual puzzle that i can uh that i can share right so they go to the dojo config here it opens up this thing which is um from a ui perspective it's like it's quirky right but it's in line with everything else you'll find in here if you go to the export like you know it's that's the whole thing i'm not going to make it look better anyhow but the idea is you can key or kind of configure the puzzle right so first if you've got like a bunch of check boxes that allow you to configure what the user is going to see when they um when they get the puzzle in the first place so the first check box the dojo mode enabled you got to check it out check it in because if it's not checked like they're not going to even see them like they're not going to be in puzzle mode i don't know i'm i'm i probably should set that as a tick by default but whatever um i'm i'm currently that's the way it is so then you can kind of show okay show the initial state like do you want to see the initial state right like this is the do you want the the user or the player to see what's your initial state and to be able to change it you can say that i'm going to leave it as a i don't want to show it um show the wire probability show the block sphere and show the output superposition these three checkboxes kind of allow you to control whether you want to see those things in here now i usually hide them all or just show some of them because i mean these are just fixed there and they give you sometimes too much information but like usually the these you know the chances plays are leave them there because the goal is to turn them off so um i'd say show the wire probabilities but don't show the initial the blocks here and don't show the output superposition and of course you can disable or not disable the custom gates what this does this is going to disable these boxes in here because the problem with these types of puzzles is that of quirk is that if you hover your mouse you actually can see the circuit details in there unless you make the circuit like the gate with a matrix or something but i usually do it this way so i want to usually hide this so people don't like you know um don't play with it so now i kind of hide it and then you can basically go ahead and pick what gates do you um you want to have you want the player to have available so this is the whole like list of gates that like you can see here as well and i'm going to say well what do we what do we have here a hot mart a nesgate and a y gate so i'm gonna maybe just you know i don't know i'll i'll i'll kind of allow the user to have for example the the z the y the x and uh and the harder mark like usually don't want to give the the chances of you just so using the swap gate just because people can just swap cue beats and then um sometimes it's easier to just turn some of them off if the puzzle is not about turning all the cubes off maybe i don't know but that's kind of like the one that it's easy to cheat with and maybe i don't know maybe we'll enable some like those as well right so i made it this way because usually you have less gates available rather than more gates available so um i know it's a hassle if you want to have all of them available actually i didn't think about these yeah i should probably have a check box that says you know have them all available um i'll fix i'll improve these okay i'll improve the interface of the usability a little bit but that's the kind of you get the idea right so you have these um and then you kind of click on generate link and that basically generates a link that's up here you can just copy to the clipboard and what i'd recommend always is um use just to test it use a clean tap for some reason um if i refresh stuff it doesn't always work well and you're going to have to refresh so this is basically what you get right so what you set up so you don't see we don't see the initial state we have our secret gate in here we don't have the custom gate so we can't really um we can't really cheat and check the the you know the inside of the of the box and then you have these gates that we marked as available right if you don't like you can oh you know this is just everything encoded in the link okay so it's not about this is not like anyway i don't know like we're not playing for money or something so this is you know the user could really just the player could just really go in here uh and decode that and kind of see what's really inside the circuit you you can obfuscate these by creating dummy like one of the things that i sometimes do is um what the okay that does actually has changed the uh for some reason is actually hidden i i think it's a bit buggy still but like if you get this issue why why why why have the gates disappeared here i don't know it's somehow enabled i don't want this to be enabled oh there you go you can always play with this if it gets enabled oh no you want it enabled because if it's not enabled it disables the button as well sorry for that yeah there's a bunch of stuff that i have to fix definitely but it's usable or it's almost usable so um so basically uh what you can always do here is what i was gonna say i don't know what i was gonna say yeah if you didn't like it you can go and change the stuff it's just everything in the url okay so it's not like a um i don't know it's not it's really not uh super fancy or whatever uh you can't really just i don't know uh mess up a lot it's everything in the url and um to be honest it's just an extra it's an extra thing an extra object called dojo that's that that's got all this stuff in here encoded so you can also just you know tweak the url directly but it's got a gate set in here oh yeah i was gonna try to i was gonna i wanted to explain how how do i usually obfuscate the puzzle if i don't want people to really be easily able to just dig into the url you can create a bunch of um you know dummy custom gates right like if i can make a gate and then i can make a gate out of these right like you can just make a lot of gates like that which basically um they are just being appended in the url so they just make it more complicated for someone to just basically you know take it take a look at the url and figure out what the circuit is but i mean come on like we're not here i don't know it's it's just um it's this is really for learning what's the point in cheating in this kind of games that's not fancy anyway but yeah so you can basically you know that's kind of what you can do with it um i to be honest i haven't like so i'm kind of currently working on um on these right like i've i've got different puzzles which are supposed to be a little bit more educational not just like random so for this season one i've turned the cubeds off it all started with random puzzles to be honest um it was really like me creating some of these random things like random boxes and then you know asking someone to turn the qubits off but i realize you can do things which are be more educational and so i really would like to see someone grab this and maybe do some you know something educational that'll be interesting so you know for example if i take a look at the um uh system level thinking maybe right i think those were nice so if you go here you're basically you know you end up in this puzzle um which basically uh it asks you to turn what was the goal here turn the set the system to the state with all zeros only by placing gates in between the speakers right so you have these two speaker gates and you don't know what they do but like what all you're going to do is you're going to turn all these to zero so it's got to be in here and and you only have these gates available so the kind of you kind of i think this puzzle really allows you to understand like and to play around with what these different gates do at the system level right and and that's the beauty of quirk is that it's extremely extremely flexible so you can really you know you what you could do is like you can say you know what like i i don't want to show any of the any of the displays right i don't want to show any of the displays i'm going to make like i don't know for example let's say i'm going to make a puzzle and i want people to i don't know the goal is to get a specific shape for this density matrix i just whatever i just made it up right um so you can you can do that i mean you just you know enable the dojo mode um uh disable the custom gates don't touch any here any any of these like let leave everything disabled and then you know choose whatever gates you want to have right and i promise i'm going to keep i promise i'm going to keep improving these um it's going to take it's going to take a while because i don't have much time right now but in a bit i'm going to have more time so this is going to be easier um and and there you go i generate the link and and basically you know you have a puzzle where um there's no displays anywhere it's just what you've given in here right so this is your your only display and you kind of you know just it's totally flexible you can make up your own goals you can make up your own ideas and and i think it's i to be honest to be honest this is helping me much more to understand like and to learn about quantum computing like doing the actual puzzles for example um i'm right now working on both level five and level six and so i think level six i'm already quite sure i know what i'm gonna be doing i'm gonna be doing something around the strength of entanglement right so i would i might make puzzles that allow people to understand the nuances um of things like for example uh you know you've got like uh you've got these states right and then we're going to create entanglement so we're going to create like a bell pair the typical one here right and this is uh sorry that will be this right so this is the the bell pair it's maximum it's my it has a maximum entanglement because the dot here and of each block sphere is at the center now like i don't know maybe a pencil would be how do you get them to be like half entangled right and so if you um for example if you would play with the rotations was it this here no what was that the sound rotation was down no yeah yeah exactly this is where you see so when you when you place this gate here you can see the strength of the entanglement is changing so basically for example if you place a um [Music] no sorry there's already a y half gate in here so sorry square ah square square root of oh no quarter oh come on i should probably use my pen but i have it unblocked actually whatever so these maybe doesn't take you half actually half the way but like it's not maybe it's like 1 8 or something can i just do like something like that yeah you can play with these but like i'm i'm gonna try to i'm gonna i'm gonna try to basically um you know make people try to make people think a little bit more about about entanglement other than just like what's you know typically explained there so i think these puzzles are really powerful and um i just wanted to share these to be honest it's uh i just actually uploaded it it's there for everyone uh to use and to play with i'm gonna be i'm gonna definitely gonna be improving these um it's called uh i put it in the chat it's uh it's uncertain systems.com slash puzzles slash puzzle creator and then you get to the editor and it's just quirk um but it's got this dojo config in here so the idea is you can make uh you know make a circuit make a puzzle and then you you configure the puzzle and get a url that you can share that it's gonna be in puzzle mode okay so you know pay attention the idea here is that um or maybe you know just other ideas right like what you could do is um you could as well for example take some of these um ready algorithms like i did in some of the cases and i don't know reversible edition right let's see and um you know take that as a base right like try to understand these and try to maybe you know remove some of these boxes try to make a puzzle out of these actually a better example is uh one that i've recently been playing with uh which is super dense coding right um so for example you've got super dense coating and one of the things that i had been playing i've been playing with this is a concept where um you know i would go ahead and and make not just a swap but like mess up with a swap right like add add some gates in here do something like these that make this maybe not work ideally even maybe like a dynamic one right so you see that that's not working well and so what you could think of is you could think of making a gate that is basically um no it's basically three four five six snow will be nine 12. i'm just trying to get like i'm getting exactly that's 12 to like 14 or so exactly and then i just want the rows 3 3 4 5 three two six and i'm going to be calling this what and uh basically that is now my like a faulty sending gate like you know so i can go ahead and replace these and and basically i've got a puzzle already right so you've got something where you can tell people hey this is the um you know this is the part that sends stuff there's obviously something going wrong in here please go and fix it right like they won't know how you've modified these because you will go here and say well those remote enabled i want to see only the wire i don't want to see anything because at the end of the day everything you care about is just the target message so you don't want to see you know you don't want to reveal the system state maybe i'm gonna generate the link copy the link there you go and boom works so you have this here oh look at these if you don't mark ah yeah i'm okay if you don't mark anything like if you don't if you don't um what was that here if i okay if i don't select any gates they're all available that's not bad but what i want to do is i want to have quick check boxes here that check the whole like entire columns because for example i don't want to allow displays right maybe i don't want them i don't want people to be able to kind of take a look into the into the stuff um or i just might say i want to re i want to just really reduce to like the quarter turns into the eight turns because i think you should be able to solve this puzzle just with those okay no you should you will not be able to maybe you will no you will not because you need to neutralize the time ones so you need to at least allow for these i mean you know be be a bit thoughtful in terms of what gates you you really need and and try to always make it as minimal as possible because it makes it more it's more fun but don't try not to block the user completely so generate the link copy to the clipboard and let's get it let's give it another try yeah here you go so now you've got only these gates available all right and so um you kind of have to figure out how to how to fix these why is it that you know this is not being replicated at the decoding end so and and yeah that's basically that's basically what i want to share i think today uh to be honest so um i'll be taking a break from the puzzle shows from the take that turn the cubits off i'm gonna i'm gonna make season two for sure but i want to make sure season two is a bit more meaningful so if you guys have any feedback let me know um if there's any comments or anything that you like you didn't like any people that you want to see in the show let me know um i do have some people line up already for season two so don't worry for these um you're not going to be left alone and um and i'm gonna be um hopefully oh yeah if anyone goes anyone creates cool puzzles and they one and maybe you guys want me to feature them in the web page here like i can make a community section actually um maybe maybe i can make you know i could definitely make a community section so i would just make like a uh you know let's get the maybe the index one right and just copy can i just copy that copy paste rename call it called a community or something and so and so i'm thinking that that could be an interesting and interesting thing to do so um so i'll basically go and say no welcome to the to the community page um i'll be listing some cool uh you know puzzles created by all the people uh and maybe sharing some other cool stuff in here as well if you want uh any of your work featured here just um just get in touch you know i don't get in touch right um so i'll just commit this community page added i gotta add like i gotta add some sort of mini there but i don't know how to do this i'm definitely going to add some kind of mini because i this page is not linked now anywhere so um it pushed already is this working might take a while though did i call it community yeah i think it takes you to have a little bit to build this community with two m's yeah that's about right maybe if i give it the shouldn't oh that works she'll work without as well though shouldn't he well maybe doesn't whatever oh what did i do what did i do no yeah there you go yeah i have to link it somewhere here i don't know how the template works but i'll be i'll be i'll be putting here maybe sort of in the sa in the same fashion like like i did that if you guys have any puzzles and you want me to share puzzles let me know i'll put them in there and um cool i mean you can go crazy right like i uh this is uh this is a great puzzle the one that i uh you know uh got correct to play where it's like you gotta fix uh broken gross algorithm it's actually a pretty complicated one i have to say and i'm really amazed how craig uh solved it yeah that's basically other than that i'm really happy of how things are going i don't know if you guys uh are enjoying the content in the channel i'm gonna try to kind of um i i feel i've been spreading myself too thin recently with different videos and other topics i really want to kind of go back to like a more uh pure exploration mode at some point um and i'm going to be doing some of these in the next weeks in the next days as well definitely but it's been it's been definitely a lot of fun especially the puzzle stuff and uh it's like now at least i can create puzzles in a way that it's much more comfortable and it just you know works right out of the box like that so it's not perfect but it really follows i think it follows quirks um look and feel uh quite closely which i i like it i like the way this looks like it's just quirky and um next i'm definitely going to be working on on some other stuff in here that i'll show later i'm not going to be probably putting this in the channel because i really want to keep the content of the channel as like more you know purely quantum exploration stuff but i'll be i'll i'll be attempting to build um oh that's my local that's a local copy where am i even showing you guys this so oh crap there's an interference map sorry that shouldn't be here this is not a real display um it's right now it's just a uh it's it's a density matrix and it's not what i want it to be i'm trying to build an interference display so i can um show in sort of the circuit like at a given point in time without interference uh without the interference effects so we'll see how that uh how that goes so these and and a bunch of other things as well so you can kind of you know i'm thinking about adding like random gates where like not random gates but gates that randomly happen so for example i what i want to do is i want to add a gate like i want to add the notion of um like an error gate like uh so you kind of set a gate like you imagine it's you know whatever gate in here right like and i um you would configure it and say i want this air this gate to be like you know uh 10 chances 10 percent of this being the identity so nothing 20 of these being an x gate and 70 of these being like a y square root of y gate or something so you kind of specify the gate as you know being something randomly and then um i mean not even randomly yeah it probably should be some sort of it probably should be like an animated game where over time it just does weird stuff like these yeah that could be interesting the reason i'm doing this is i wanna i wanna do it so that i can add a bit of uh you know a bit of paper to the puzzles a bit of like uh an additional component where like i don't know i i maybe can simulate some sort of errors happening in some of the wires or something like this error simulation would be awesome in quirk actually um yeah i think so anyway i think that's uh that's all i wanted to share with you guys i hope you enjoyed the the live the short live stream and yeah i'm hoping to see people use these i mean if not it's fine it works for me i just wanted to share it and the code is available in github of course uh and it's in my playground ripple um i'm gonna be changing these to the uh yes it's in quirky playground this is the place exactly what security will never release no okay yeah it's missing test and there's a bunch of stuff that's missing this is really still like i just wanted to get it out there guys don't take it too don't take it too seriously um i'll be i'll be polishing some of the corners here and there um i'm just showing you this because if you'd like to change the locker icon that's something that's at the code level so i can't you can't configure this right now um but yeah and also i'm a bunch of things i'm not super happy with like because once you're in this mode i still leave the dojo config button um showing which kind of has this weird effect that if you want to create a puzzle like you're not going to be able to because basically the gate said that you get like has the lockers in here that's not what you want so always you know for this to work for now if you want to work for your own puzzles start always from from scratch with a clean with a clean slate like you know just go with certain systems slash puzzles slash puzzle creator and and that will basically take you to something that looks like quirk but it has this dojo config in here and so you can um you know if there's anyone who is uh joining in now uh you can create your puzzle configure the stuff in here and then share the link and that's it you get a nice puzzle so cool um i think that's it to be honest so what else i wanted to or is there anything i mean if if if any guy there's just like a couple of people watching so but if if this you know if you've got any questions sort them in the chat if not i'll just go and take a good sleep i think because it's not that early here but it's it's it's fun i mean what else i am what else i what else i i could do with these there's so much that like so for now the way that i'm creating puzzles is really just like um as i said like i have something in mind right and i would prepare and i would kind of prepare this circuit like um maybe let's go and create one like i don't know let's create one puzzle why not like what time is it like it's 35 minutes in stream so it's not a big deal um let's go and think about like what will level six look like so one puzzle that i have in mind is as i said like i want to play with the idea of maybe let me see i can maybe plug my pen and get to work in a way that it's nicer yeah now the pen works that's cool okay so let's let's let's see the if i how how would i imagine the entanglement puzzles looking like right so um i want people to understand i want i i want the the player to have to think a bit harder about entanglement and what it means what can you do with entanglement like i don't want it like i think it's i think you shouldn't have we shouldn't have the basics of like um hey create a bell pair uh or hey like i mean that can be puzzle number one like it can be [Music] also not it's not also something i think it's i think it's going to be much more fun if the puzzles are a bit like turn the cubits off right but the qubits will be entangled and so i'm gonna allow you to see the type of entanglement maybe for example for example we do something like this but that's going to be a black box right and that's maximally entangled and now and now i'll say okay maybe that'll be the first puzzle um turn the qubits off right and the gates that should be only available probably because you can do these the nice thing is that like if i allow you to use control gates it's fairly easy because you can uncom you can you can try to uncompute these so you can play with these and say ah look at these i've i've already disentangled that and then like let's assume this is the black box okay so let's um let's go and create a make gate and call it like let's go to the uh so how do we want to call it we want to call it like let's get a random person with veil that looks like that's literally the way that it works i i don't put any uh thinking into what i'm what i'm using in there so um so let's say let's see this let's imagine this is the one the black box okay uh so we know here what it does and um there is a way you can disentangle these by placing like this gate not this gate but like a particular gate was it was it y rotations there rotations i think i think it's gonna have to be oh look at this that does the trick okay it's maybe too easy though like i don't want the puzzle to be too easy but as a first puzzle that could work wait that's a white gate work so y gate does basically these this is what i want the x-gate won't do what i want why it won't do what i want that also won't do what i want let me just go back to the control that and so the truth is that in here you've got like so if this is in the plus state or in the minus state is that that's the minus okay that's minus that's i always struggle to understand which are the right controls for these so what if i do it this way so you can see that about what's the logic behind the y gate being the one that actually works okay because the y get at some point the white gate will take you to um so if you're in the plus state [Music] um the yeah if you're in the plus state of course the y gate will take it at some point like zero or one so if you do these or you do the no how do i do that yeah exactly these so this this takes you to zero and then it basically removes the entanglement because this gate doesn't do anything else in here it's everything in between makes it like yeah yeah so that that that you know that could be the first one that's a it's fairly simple it wouldn't take uh someone like too long and so the way that i would do this is i i have this here ready and the goal is to um the goal is to turn the cubits off and i said that i can do this with uh this gate right and then once i'm here i just need to be able it to be honest to be honest uh once this is done like then you just you just need these right and and and you're done yeah so i think actually you can only i think i think only this gate would be will be doable yeah it's double only with this gate now the thing is what you have to think about is like do you want it like if you only make this gate available you're gonna obviously make it too easy so you want the user to be able to uh the player to be able to make mistakes so they kind of think about okay why doesn't this work so my intuition tells me that i should probably allow for the quarter turns and the 8 turns because that's not going to do anything to it um that's not uh yeah the whites that it's the white dust things this doesn't do anything and does it yeah exactly so i think if we leave the quarter turns and the eighth turns it's enough and then what i want to do is i want to hide the i think i want to hide the ch the chance displays and i want to hide the um and i want to hide these because i want just to show the block spheres at least for this puzzle and the goal would be um to get both block spheres pointing app so to disentangle this thing i think that's and i like this puzzle because it it basically confronts the user with the fact that they're going to have a block sphere that has a dot in the middle and like a lot of people don't see don't know these right like when they get into the quantum staff they're like oh yeah there's a block sphere like you know any any point in in the surface of the sphere it's um uh it's a possible state but like nobody tells you really straightforward that points in the middle are entangled points now i don't know exactly why if that is a nuance of the mathematical representation in here which is saying that um basically this cube alone doesn't know anything about itself other than other than what that's in the in the in this plane in the in the y and x plane somehow this is something to dk into definitely but you you get you get what i mean right so um you get what i'm telling i guess so basically what i want to do is i want to now say i want to configure the puzzle so i want the dojo mode enabled i don't want to show the initial state maybe i want to show because if i show the initial state then i know then it's going to be easier for the person to i don't want the person to be able to change it and they i want them to think about it um so i want to show only the blog sphere and i want to disable the custom gates and i want to have i said all the quarter turns and i want to have all these guys in here that's cool and i'm going to generate a link copy the link and then gonna test it out so let's see it works okay so we have these and now we have to figure out how to how to turn the two qubits how to take both block spheres to the like pointing up so and we know an answer so this is one way to do it this is an and then uh and then you basically you know sorry you do these you do dots that's pointing up already and there we go both pointing up that's the puzzle solved it's not complicated but it makes people think i think okay so we have the puzzle so this is the puzzle and then now the next thing i do before publishing the puzzle is i definitely make a uh a bitly um version of it so i don't kind of go and you know have to manage this whole thing in here so um so i'll go ahead and create one and now i just have this thing here which you know this integration works really well so just copy the link and then i would just you know go to the visual studio and open the index and say well let's go level six so so basically the goal here will be um turn or make all the block spheres point up that's kind of the the goal of all the puzzles or at least you know yeah so i'm going to create basically going to say puzzle 6 a it's this guy here that's it and well basically more to come right so i i i just really wanted to walk you through the entire process at least once and i mean it's nothing fancy right it's just having the i think it's everything about like having some good idea about like uh what would be useful for the user to you know to kind of make them think a little bit about how to solve the puzzle yeah people can just you know you can just go ahead and and and run through things um just you know speed run the thing and then figured it out but that's not you know uh it's not it's not the point i'm the i think the effect that i'm trying to create in here is is what i said it's like is to confront someone with things that they might not know people might not know what the hell it means to have like a blossphere with the the state in the middle right and so they'll first have to figure out how to get the state like how do i get the state somewhere else like if you know if they first play with these gates here like there's no like to be honest is nothing is gonna change if you play things you know after the gate because they're entangled uh i think nothing's gonna change right anyway so if they if they you know someone goes ahead and and they you know place the gate in here you know they'll kind of see okay it's not totally pointing up right that makes it be complicated because they are a bit small um but now they see that like uh that it's somewhat doable and so when once they try with this gate they'll see that now it's totally pointing at the surface yeah okay but that's you get the idea right it's all about these little things like you want to create these like little aha moments of um or fake confront people with things that they are not maybe necessarily aware of um and i know you might be aware of these but like you know not a lot of people know this at least not a lot not a lot of the people who go through the first you know uh days and weeks and months of the learning process and so that's the type of audience these puzzles is all um are also designed for um where was i here and so git add and i'll just commit and i'll say added puzzle 6a during a live stream totally improvised push and then we can see the puzzle live but basically now you're able to at least create puzzles without any uh without any uh you know tweaking the url and whatnot because it's it's a bit tricky i know as i said it doesn't work perfectly if you mess up with the links and the urls i'm going to be i'm definitely going to be improving these at least not to make it beautiful i'm going to leave it like that but i want to make it at least less error prone um and kind of add some usability in terms of checking dot like checking a lot of the boxes um i'm not gonna make sure that you can solve it with the gates that you select it's your own fault if it's not solvable with the gate that you offer um what i should also do which i don't is i should probably also not allow for gates to be made what happens if i click here i mean maybe maybe why not why not anyway i think i i think this is pushed already now so let's refresh this there you go puzzle 6 is live so um now it's just time to tweet these tweet tweet twitter tweet twitter twitter twitter twitter so just published puzzle 6a during the live stream that is about to finish here you go no i don't want people to go to the puzzle directly i want traffic to the web page also feel free or feel free to create your own puzzles using the new the brand new pencil creator and i am gonna basically so this is in panzel's puzzle creator go yay quantum computing quantum intuition ah whatever quantum computing call let's tweet these yeah these things work well i think i didn't mess anything up right shouldn't have messed anything up hopefully um puzzle is there and uh the puzzle creators here cool yeah that's awesome um yeah i hope you enjoyed the uh i hope you enjoyed the uh sort of behind the scenes a little bit um i usually spend some more time creating the puzzles like this is you know just the the an example of of simple puzzles for the webpage like for those levels and i do you know i def i'm definitely going to put more thought into like 6 b c and d kind of make sure they they become more complicated as we go um but like for the puzzles that are you know the go to the show i as i said i started with random stuff but i'm also gonna be uh i'm also gonna be you know i usually would also spend more time actually thinking about the different ways making the puzzle big and stuff like that um so it's not all uh quick and easy but it's really about like finding those things that you want the person to go so it's almost like making up making up like a labyrinth or like a classical puzzle to be honest there's nothing really quantum to it other than just um kind of thinking about like where is this person gonna you know get stuck maybe and what's gonna help them solve the puzzle that will make it like ah okay now i've actually learned something so um yeah uh i hope that you i hope that you enjoyed this it's been a bit of a longer episode uh or live stream but uh yeah i wanted to kind of share this and now it's out there and you guys can use it and if you want me to feature some of the puzzles as i said in the uh in the webpage and the uh community section that i have to actually link somehow in the in in the left mini here on the left column uh let me know i'll double check the puzzles myself by hand and i'll blow them here with the proper credits to you guys and um yeah if you're you know watching these you're not subscribed uh i kind of feel awkward saying this i'm i don't say this really often go ahead and subscribe if you want to support the channel i also have a patreon uh account that you can uh go and and uh you know uh basically um support the whole quantum mutation project and um yeah other than that i think it's time to go so bye bye bye bye finishing the stream now and poop
Very interesting , Ill try to make good puzzles.<br>But none the less great project., Looking forward to receiving them!
okay good we're ready to go we're downloading some data today um i'm i'm trying i'm trying obs now for the recording so i'm going to see if we actually the pdf scrolling goes better um so chicago portfolio optimization d-wave we want to have both the article and we want to have also the medium paper uh good and okay so so um or i should just download this and uh why is it and it's so slow it's it's as shitty as as before is it is just chrome uh or is it like uh so is it just chrome or seeing me so adobe adobe reader let's see so what if i open the what if i open the um [Music] downloads this guy okay counter preparation what the hell why can't you just open the pdf the document is being prepared are you kidding me like how i can take so uh anyway uh potential portfolio results august the data data i'm looking for the because here in the in the in here they talk about 60 us assets and not 40. i think but i think it's basically the same idea right i think i think it's the same the same concept just with 60. so let's see if we can get the data and i think so the 60 stocks include these are these ones okay data from yahoo finance uh okay initial results we track five portfolios from market close our two stock solutions the opposition from the return the cqns and cqr portfolios that were based on the selection of portfolios chosen by d-wave quantum annealing community worse than the 60 stock benchmark or both the chicago quantum generalized portfolios not optimal and selected out of six and seven acid solutions underperformed the sixty asset universes they were chosen from one portfolio i'll perform the s p uh 500 all one achieved equivalent results part of the prices august 18th whilst while the markets have increased in the past five weeks by seven percent of chicago and rancho portfolio of six stocks kept pace with the market while the chicago net score portfolio sent stocks underperformed by 1.7 however our ideal portfolio which had the best cqns score out of all one point i got outperformed the market by seven percent or double the return like that in other words we found the ghost delays called an x um our realistic competition is that three weeks of results on one portfolio selection it's not enough to draw conclusions we might have gotten lucky in the small optimal sequence portfolio and unlucky in the more generalized solutions we plan to expand our footprint and both evaluate more equities burden our search and evaluate more equities at one time scale up our search okay whatever let's let's i just wanna let's see i think it's still as shitty as in uh why why is it that it's so difficult just to scroll through a just a damn pdf i think the i want to zoom in whatever i think the i think the uh chrome uh one is good enough um so i'll just open it in chrome uh okay but we want to download the 60 stocks um and at least go through the uh what i want to just go through the steps uh that are outline uh is it in page nine here download the one one year of daily market data for a specific set of n assets and in this is current as of that moment all the data for all experiments calculate covariance of each asset with the market and and beta and based on lock returns um calculate covariance terms between assets calculate underlying and summary values including sharp p ratio and chicago nescor for an all asset portfolio halt all 40 assets for an equal investment amount um let's let's see if we can download the data okay so we have these stocks how do so they say this is coming from yahoo finance right you finance download market data [Music] um to forecast the future of a company or gain markets and historical data can be downloaded as a csv file to be used offline which you can open with excellent single program the data request is beyond the wrench i started historical practices available three i find it's all available that i would okay but um how do i do that how do i do that so uh okay here okay so here i can download i guess i you have open high low close a close volume um do i have to download them one by one or historical data so i can do my portfolio maybe right i guess i have to sign in progress and trade now watch lists watch lists personal finance news markets [Music] finance home csv is an actual symbol now i realize so if i go and i just search for the least like aa for example right like no it went too fast yay oh i cannot i cannot to watch least but i don't think i can download then uh if i had to watch list i'm i'm trying to i don't want to do this 60 times um maybe we'll do a small at that point i don't know if it's work like all the way through the 60 cases and just do a small example uh like i can download the historical data here but i don't want to do it 60 times if i add this to a watch list i got a sign in i don't want to sign in [Music] historical data historical data and so um [Music] yeah let's say i'm not going to be rigorous with these okay let's not like this is not i'm i just want to compare like i don't really care about what their particular results i want to when i what i want to compare is i want to compare what does the g wave system give me versus what does the ibm system give me so maybe we should pick just some of them and play with like a small example so okay what can i do so i'm gonna download a uh yeah so that's a year worth of data daily right like they do daily or what did they yeah daily market data for a specific set of n assets so i'm gonna download these as a csv yay okay cool we'll pcap like a a a l historical data start data that's so slow download then we will go with aapl and i'll pick and i'll pick maybe oh that's apple and i'll pick like two indices historical data historical data yeah i'm pretty lazy i have to admit i don't know download and that will pick like i don't know um what indices are so here there's uh they peak like gsbc and rut whatever these are gs was it pc yeah oh that's s p 500 okay historical data what boom let's try again let's try again okay that failed then we'll pick something else rut and w5000 so ruth just know such index are let's see the russell 2000 what's wrong with the indices temporally down then i don't know i'll try another one if not then i'll just speak to other assets and just get down with it oh come on if okay then i'll just speak like let's pick what's the one for tesla tesla quote what's wrong is it that like i don't know maybe let's just finance yahoo.com can i can i not download these from like maybe maybe this google data i can download as well so what if i do again try tesla tesla tsla and so oh now it works yeah maybe i think it was uh okay so i'll try actually uh to get to get to indices as well and so the other one was the s p 500 right we tried that's the one that broke the whole thing though dammit i hope that i'm capturing the audio from the microphone here uh i hope so yeah i think should be download so now i've got an index and now i'll go for uh which other one do we pick do we pick um what's another one from here let's go this one let's go this one i'm i'm extremely worried that you're not like that i'm not capturing the audio i just hate myself for these and i don't know uh if i can't stop recording and then glue things together um i'll probably do that just to make sure that i'm actually capturing the audio let me just download this one and then we'll uh although i have five already it's fine we'll just get another one six just to have two indices in there um so i'll stop the recording now for a second and check whether um i actually am getting the audio and then glue things together okay i'm testing so it seems to work from an audio perspective and i'm hoping you know i'm changing i realize i can change some of the uh encoding stuff and get a lower cpu usage which makes the scrolling actually better also from a pdf perspective i hope so i'm getting cpu of 11 right now 7 it's not that bad i guess it looks fine with web pages i'm at 16 17 again uh six percent uh we'll see how this goes okay so we have uh we've got these now so how do i even open that so i have a csv file with the uh with the market data um daily basis for a year i guess i should basically calculate yeah so it's a csv file so i've got the data open high low close blah blah blah blah so it's a date it's an open it's a high it's a low now how do i calculate uh what i want to calculate which basically is i want to calculate the summary values the covariance of each asset with the market um and beta and then three and then three based on log returns how do i even approach how do i even approach these what is these better what is better it's a measure of volatility oh that is actually how bad it works covariance the return on individual stock the return on the overall market covariance how changes in a stock return stocks returns are related to changes in the market's return variance now sorry that kind of took me the away from the from the actual paper so and better three based on what returns calculate covariance terms between acids calculation and learning in summary values including p ratio in chicago for an all asset portfolio hold all 40 assets for an equal investment amount okay first i should open probably a jupiter notebook so i'm gonna contact powershell right um and so we're gonna go to to workspace to my quantum workspace if that opens if that starts hello hello there you go so uh ls so cd workspace right we're going to work space and here we're kind of gonna probably make a uh we'll call this support folio optimization portfolio optimization um and we'll just go inside in here and here uh jupiter notebook should i was it like this i forgot how to open a jupiter notebook on you can you can um okay we're good so i'm gonna create a uh i gotta work on the setup i feel like um i mean it's not that i have a beast of a machine but like things go slow while i record it's not okay i have absolutely no idea how to read csv data so first of all we should work on these i guess python 3 read csv data python 3 or i guess npm covariance not by covariance so [Music] i guess numpy great csv beta how does it work numpy i wonder if there's a dark way to port the contents of csv file to record array much in the way that r is and so you can use numpy's gen from txt method to do so by setting the delimiter r to a comma um so from that so let's let's first of all what we should do is we should take this data from the downloads folder okay and move it all to the workspace right so i should have a shortcut for this that searches so workspace and now we have here and we'll create another folder called data and we'll just paste the whole thing here okay so i'll get these in here and now do uh so my data and so we'll just basically do like data and uh it's like aa right i think computer comma print my data okay so there is uh something being printed in this is not a number uh can i open the file first of all so let's go back quick access now i should pin this um instead just going all the way to users and workspace and portfolio optimization can i just pin the workspace somewhere in the quick access bar yeah paint to quick access nice workspace awesome uh portfolio optimization data let's open a a see what it looks like in excel um so i probably want to load all this stuff into uh different arrays and then kind of calculate the uh calculate what the paper is telling me to calculate right so oh yeah so the first is basically uh yeah the first is the dates it's not a number and then you have like the 17.84 18.23 okay so how do i how do i print this data in a nice way uh python okay now values okay heading on this gives a pandas data frame allowing many useful data manipulation functions which are not that available with numpy records so okay so this is another way to do that to type then number strings needs to tighten on what if i qd type none what's it gonna do okay now actually tries to guess this stuff writing unicode strings without specifying the encoding argument is deprecated setting coding use now for the system default send encoding so i have to set the encoding so it's encoding what am i doing what sorry coding okay so i will just encoding okay on it open high whatever so i can ignore but i think i can ignore okay i can ignore the headers so ignore errors and select columns i'm not interested in the date i guess extract columns skip okay so there's my skip header the file you're reading in a generator that generates lines keeping the first n columns if your numbers are space separated that's something like and i probably actually i probably want the different columns right like let's bring the lines into columns so once the file is defined and open for reading jen from txt splits each non-empty line into a sequence of strings empty or command lines are just skipped the delimiter word is used to define how the splitting should take place quite often a single character marks a separation between the columns so that comma separated files come on semicolon delimiter another common securities is the tab character by default when elaine is decomposing to sears and strengthens visual entries are not stripped of leading or trailing comments keeping lines and choosing columns the presence of a header in the file can hinder data processing you need a skip header optional argument must be an integer which corresponds to a number of lines to skip it into the file um okay the use calls okay so there's a use calls argument okay so if we want to import only the first and the last columns we can use use call zero minus one okay use calls and skip header all right let's keep header so we're going to basically say [Music] skip header one use calls what's it like with the brackets like these say just one which is one first okay so that's the yeah that's at the date these are the dates okay so okay cool so here we have like uh yeah yeah all the okay cool so that's the first data so the first the first part so we uh what i want to have is so we have open high low close so i know i should have them all in separate arrays i should import them all as a matrix or i'm just i just care about clothes i think i just care about the closing value right probably um i think let's just keep the close which is basically 0 1 2 3 the fourth value so this is just a close and then we'll just say fourth value and there you go and so uh all we wanna do is we just wanna get so we just wanna basically are the files that we have we have a aal aapl right so aal is like uh you know probably i'm just it's going to be easier if i go and say uh data source is basically an array and then i'll just i'll just give it the uh i'll just keep the name and so it's going to be a a so assets i'm going to call these assets a-a-a-l-a-p-l what else do we have tsla tsla what else we have we have i'm going to remove the character here and the file name just because i think i think it bothers me i just want to avoid these leading to any problem so we have w uh 5000 and we have what else we have gsbc gs pc so we have these assets and then so basically what we want to do is we want to have uh as data so this will just be an object you know what that's what i would do and so what i will do is uh this is just like an empty array right so so and i wanna basically i'll make a function um or i'll just iterate over the acid so i'll just basically yes acid data 4-h can i just i'm i just i'm such a note with these python for each i i gotta look this up every time every time every time for every pets painting pants pretty big okay for iron wrench um it's a dictionary so if a key value in dictionary items okay so the key value python three trade the dictionary real python just please four key in okay just like that okay um so for acid in that's theta so two is basically um you know data or basically you know i'll just basically say acid data acid equals these and we'll just basically asset name for asset name in us data or asset as a key i'll call it apparently as a key here and print class data about syntax why it's a semicolon okay so we got the a ah where's the okay so w500 okay cool cool cool so we have this now we have everything in a dictionary i don't know if it's the best way to represent this maybe i should do a matrix uh who knows and now the next thing that we want to do is we want to calculate so uh where were we um covariance covariance of each asset with the market uh so how do i do this covariance and better based on log returns covariance between assets that should be probably easy coherence with the market um how do i do that so um uh numpy covariance so let's see what now an amp has to offer python number function when i pass it to one-dimensional arrays i get a two-by-two matrix of results i don't know what to do with that i'm not credit statistics but i believe covariance in some solution should be a single number um when a and b are one-dimensional sequences is equivalent to okay the matrix returns a a a b b a and b b okay uh so i should probably get stuff into mattresses because i guess i'm what is the best way to construct this so it's useful for what i'm trying to do afterwards right because what do we want to do with the covariance is we want to build a matrix and uh graph a cuba for each portfolio size and we're aiming at doing a portfolio size of of two for example thinking what is the best way because it feels like i don't know how it's going to be used later on and so the conference of each asset with the market this i could do okay but how do i do this so it's the covariance of a one-dimensional thing versus versus like what a um it's got like multi because then it's it's just a covariance of of one asset against many uh assets and how do i do that uh how do i do that so numpy numpy come off estimate covariance matrix given data and weights so covariance indicates the level to which two variables vary together if we examine n-dimensional samples then the covariance matrix element is the covariance of x i and j x i and x j the element c i is the variance of x i so that's what the what we just read about the matrix so m is array like one or two dimensional ray containing multiple variables and observations each row of m represents a variable and each column a single observation one d or 2d array array an additional set of variables and observations y has the same form as that of m that's my point like how do i do the covariance with the market coverage of each asset with the market i guess there should be is a market like my uh like set of assets is that what what this means um sorry i just went not what i wanted to go i wanted to go back up in here i hate this 80s 80s 80s i hate this 80s slow scrolling so how to calculate covariance of an asset against the market covariance um covariance covariance i want to calculate the covariance of an asset in the market so how do i do this and better okay so entire market this is a slop offline better coefficient is the covariance of the return on an individual stock and return to oral market and how to copy the variance of market um better values perspective how the financial markets are prone to large surprises and relations are always normally distributed therefore the stocks better might predict about a stock's future movement isn't always true like are we are we just doing the averages what we just do the average or the mean or something and then to the covariance between like these i guess yeah i guess that's what i'm gonna probably go for uh i'm such a noob with all these right so what i would what i want to do is i want to calculate uh the mean across all these vectors or something like that uh sort of per day right and then calculate the covariance of each asset against these as data so uh so what like market data or my market summary right and then uh yeah i think it's better so how do i do this how can i do this i have so this should probably should probably turn this into a matrix and then uh so numpy [Music] mean array so how do i do this i guess i wanted to our rays so i want these applying median no i want these okay so i have an array of all these things right okay so i can and then i can apply mean on a particular axis so i can say np array so i can go ahead and say uh why is it going so slow so i can go and say acid so this is assets data class data asset matrix right and then this will just be an mp array and then i'll just say data right aal aapl psla 5000 gsbc okay and so np array and so now i wanted to kind of the market summary would be that i say which is x is zero um i think the axis here is these we see which is what we won yes so x is zero so np mean a x is zero x is zero and then you know what these i should do in another cell just in case here we have everything ready and now i go and i do this and i want to print market summary and peace will be fine yeah uh how do i import numpy i'm so part of i was just not born for programming i think for remembering those constructs or the lines uh it's not defined of course it's not defined it's uh acid matrix what we want to do okay so now we have doesn't seem right though so what is the uh what is the length of this all right print now it's time f54 and what is the [Music] print length of these that makes sense okay cool um so we've got the uh so i've got the market summary and then now we can calculate the covariance right uh between each asset in the market so i'm going to create another variable like these so i guess i guess what we want to have is market covariance so this will what is the what is the null is it like is it like it's not like now correct or python does python have no values unknown okay across these and then we say basically market covariance as a key is basically np it's actually going to be the matrix mp curve uh covariance of uh of what of acid data of us data as a key and market i'm going to call it this thing here market summary does this make sense market summary and then press then print market covariance for example off like a a okay okay since we got something might be wrong but at least we got something it's not breaking cool okay okay cool so we have that um portfolio stuff optimization so we've got the covariance and now all we want to do is we want to go and do the [Music] covariance between assets or and the better also based on log returns [Music] so now we have the covariance of an asset and the market and then the variance of the market so that's that's a better coefficient so what is the variance of the market numpy not by variance so basically um [Music] okay so so if i do try to uh print np var variants of like um of market summary okay i get a number if i do then so what i what i should do is i should do basically the uh the covariance of each element divided by these so i kind of have to do uh the covariance is in the market covariance object so we're going to do another another thing like that right and we're going to do uh as better and so um so for each asset key and that's a better as a beta as a key equals basically the um the market covariance the market covariance that's the key for us a key so market convergence of asset key divided by npu var off of market summary i have no idea what i'm what this one thing is correct acid beta pretty nasty okay no yeah okay so there's basically the why is an array oh yeah sorry so the covariance is an array and i i want the first the i want the zero one right side one this is what i want right yeah so we have for each for each asset we have the uh the asset beta let's save this okay so where are we right now i mean i i you know if it's if it's a little bit wrong we can correct it later it's all it's all fine i just wanted to at least go through the um the preliminaries of these today so we have the variance of each asset with the market we have beta i haven't done it based on log returns maybe i should do these but i i have to understand uh i don't really know if this is already what it is uh or is it like beta coefficient is it that there's like uh what returns returns and talk about the return i have no idea what's like the return of an asset is it is it the close value i'm just using the close values maybe it's maybe it's not we'll just we can change that that shouldn't be a problem as as as soon as as long as we get like the the actual the actual calculations right then we can change the the the data that we use it's not a problem then okay let's let's try to go at least get through uh how much time we have left okay uh kind of getting late actually so let's do the covariance terms between assets um okay so here i i need to specify then um i need to do a double loop right like the covariance between assets so so we will do basically what we'll do is so we'll do something like that but basically have instead of an empty dictionary and we'll call this like acid covariance and so what we'll do is we'll go as a key as data right this is correct as a key asset data and then we'll do another a nested loop in here as a key b as a key a in us data and what we'll do is we'll first do that we'll first do um can i just say asset key a plus so we'll just concatenate it this way that's a key b uh and so here we'll just calculate the covariance so we'll just do np covariance between then we'll just do print as a cove and see what we have yeah yeah okay so we're calculating the covariance between each of these things it's we're doing probably too many because we'll do like a a underscore aal and then also aal underscore a a here so this is kind of a duplicate in this from this perspective no maybe not a duplicate but like okay so we we've got these covariances between different assets so there you go and and now kind of i think well i think i'll leave it here so the next step will be to actually get into uh get into the actual summary values the sharpie ratio and the chicago quantum score for an all asset portfolio um hold all 40 assets for an equal investment account amount so we we've done points one two and three we're gonna go through point four in the next video and maybe we'll touch point five um again i i i might have i might have gotten this wrong in terms of the data that i'm using but like i don't know we'll adapt okay so i'm i'm a noob in everything quantum computing i'm in open uh python programming i'm an open numpy in statistics we are all learning here and i hope you're learning with me um cool we're just like hacking a little bit together perfect i hope you enjoyed the video uh stay tuned for the next one in the series and see you next i guess tomorrow in two days i don't know we'll see bye
uh can i update does this get updated live i think so um cool cool call can i can i can i can i where's my phone there you go let's just tweet about these twitch and certain systems there we go so i wish it'd be a nice a nicer way to embed things in twitter i like these uh johnny alive as we read oh god did i write life with f oh jesus anyway where were we so we actually let me i need to keep an ear open because there might come someone like a package delivery so where were we um let me open chat cool um i think i didn't finish i think i didn't finish i i quickly scanned through chapter two chapter three talks about the limits of even uh quantum computations in chemistry um yeah i think that's probably the one tool okay so maybe let's i feel like lyric into actually jumping into this one learning as an alternative to computation probably i'll i'll read that because this is yeah i'll then come back to this let me select even quantum computation chemistry um like i i i don't know maybe you gotta read this sequentially but uh simulations this question all right so i guess at some point this i i guess chapter three or the section three goes through like undecidability similar status to the more famous ep equals the mp was nc if one allows the space of the quantum computer to expand polynomially with the simulation time the result is more unclear and really the classical debate of if any computation can be paralyzed arbitrarily while encapsulated by the theoretical question of if p equals nc what is nc nc complexity complexity n c so nick's class nick's class instead of decision problems decidable in poorly logarithmic time on a parallel computer with a polynomial number of processes uh okay so it's like if we will parallelize the process but in a polynomial order okay um anyway so let's go through these section four learning as and i i'm just keeping section three because i assume that's what's gonna talk about but i'll come back to these anyway um learning is an alternative computation rather than than claim one must give up hope on problems where the most natural formulation looks undecidable or hopeless expensive we argue that embracing the undecidable interpretations of these problems frees one from the destruction of the combinatorial approaches and leads them to embracing the only known resolutions to problems that exist for halting problems uh leads them to embracing the only known resolutions to problems that exist for halting problems the first and not really palatable solution that has been mentioned is running time dynamics forward and hoping for the event of interest to occur the second and more actionable viewpoint is to understand that systems with advice can formally resolve such problems so that was in the systems with advice because this was mentioned in the previous section but that doesn't seem to pop up anyhow i was recently shown that data from the real world can act as a restricted form of advice to solve helping um to solve healthy problems once advised we need to constitute a form of infinite time pre-computation however much like the argument of finite versus infinite infinite systems the pre-computation performed by the physical universe before this point thought finite though finite is already quite strong and available to be revealed through experiments to see an example of these in chemistry one can look at one can look at the field of natural product synthesis natural product synthesis where one seeks to synthesize chemical species found in nature from simpler readily available components in a finite number of steps for the most general complex molecule it can be quite difficult to say if a product can be reached with a fixed set of reagents and conditions or at all perhaps due to some intervening site reaction in fact the conjecture this we conjecture this form of the problem may be undecidable since we could specify the target molecule as a particular strand of dna by contrast in the study of natural product synthesis the challenging question of chemical since disability is answered by nature itself and practitioners are free to discover practical routes towards a product rather than ponder if success was even possible theoretically so what do they mean they mean that because we know because we know that the actual end product exists we know that it must be synthesizable and so that is what the advice is telling us the challenging question of chemical sensibility is answered by nature itself and practitioners are freed to discover practical routes towards a product rather than ponder if success was even possible theoretically yeah because i guess the what the halting problem is telling you is like you're trying to solve with it something will happen at all or not and uh in in this case because you know that it can be done yeah but you don't know what it can be done given a a restricted set of reagents or something right and this sense empowering ourselves those observations from the physical world can enable answers to questions that cannot be practically resolved with road algorithms more generally we believe one could view the models and study of synthesis in organic chemistry and their protective predictive success in this line hence taking this point of view suggests that a purchase based on learning are fundamentally different than those that rely on computation alone okay but let me just re-read this again example the chemistry of product natural product synthesis one seeks to synthesize chemical species found in nature from simpler readily available components in a finite number of steps that's the problem is i have a um a set of simpler um species chemical species and i want to make sure whether i can synthesize a target species and a finite amount of steps um it can be quite difficult to say if a product can be reached with a fixed set of reagents and conditions or all perhaps there's some intervening side reaction in fact we can reconjecture this form of problem may be undecidable since we could specify the target molecule as a particular strand of dna yeah but why by contrast in the study of natural product synthesis the challenging question of chemical synthesis synthesizability is answered by nature itself and and practitioners are free to discover practical routes towards a product rather than pondering if success was even possible theoretically i don't quite get it i don't quite get the analogy because it's like the halting problem is like yeah it's the same like even a specific type of program you could sometimes you can actually check that right because you can do like static analysis and things like this and you know with things like you you can't solve the healthy problem for a specific set of inputs it's just it's in general not always possible so that's why you um that's why we label it as undecidable in general but it's not generally undecidable or it's not always undecidable and here's the same like i mean if i i'd say if i have a set of i mean okay i get i guess you have a set of of a fixed set of reagents and conditions and so you can you know apply all the conv all all the combinations and then see what happens i guess that's what they mean by that nature shows you okay i'm not so sure i grasped the analogy completely here but let's go ahead and stick in this point of view suggest that purchaser with the rise of popularity in machine learning naturally these is now a flurry of work applying there is now a flurry of work applying technique for applying techniques of machine learning to chemistry the applications range from prediction of direct simulation quantities or sensibility and inverse design believe the results we believe the results we highlighted here bolster the motivation for person this line of work in the general sense but also supports the long-standing tradition of chemists developing chemical physical models as well while much practical work remains to be done in finding the best representation of a pro for approaches it is now understood that these approaches are fundamentally different and indeed more powerful in some ways than traditional simulation approaches in particular recent work has shown that the power offered by data from a quantum computer can lift classical models to be competitive with their quantum counterparts in some cases if nature is indeed a universal quantum computer this would suggest that quantum computations could help fill the role of natural experiments in providing data to empower learning models but with improved program program of programmability and flexibility this might suggest that in the future a key role of quantum computers to remain scarce compared to their traditional counterparts maybe to provide data for learning models primarily run on traditional computers however that would be a rather unexciting fate for technology that pushes the limits of our understanding of the universe instead of accepting this fate we appeal to other recent work that has uh shown an overwhelming advantage for quantum computers and how they can process data move directly into the computer from a quantum sensor that's why okay so that's what's getting interesting i guess the other recent work that has shown an overwhelming advantage for quantum computers in how they can process data moved directly into the computer from a quantum sensor a process referred as transduction 76.77 oh preschool is involved okay this this transduction i think i remember seeing this paper transaction i mean the work is not appearing there at all but uh it's probably worth a it's probably worth a rigid as well transduction also doesn't appear anywhere transduction 2019 oh this is an actual talk crime signals from one energy to another is an important error of crime scenario earlier i guess the idea here would be that you were somewhat somewhat inputting the data in the point into the quantum computer with its sensors this would suggest that quantum computation could help fill the role i don't know a comparison with a traditional data pipeline shown in figure 3. so as an alternative to measurement right in such cases you're performing and [Music] in such cases even performing quantum data processing on even very few copies stored in quantum memory can allow one to extract property for quantum systems that would require especially more data in the classical case even early machines may be able to manipulate few copies for limited times and store this quantum data for future models this separation is stronger than a traditional computational separation as if limited measurements are available due to the transient nature of a system no amount of computation can allow traditional measurements and competition to catch up this implies that even systems with the number of qubits that can be classically simulated could prove advantages if the quantum computer has quite a memory that can maintain states in quantum form this extends the power of these approaches even farther the relationship between this here key of data models and traditional simulation is depicted in figure one moreover if one ventures further into the realm of speculation recent computer science results have shown that if one can entangle two particles trying to prove something to another what they can convincingly prove expands to unimaginable hates including halting halting problems while this celebrated result am i yeah mip i i've remember reading with this but i've never i i didn't go into this has not yet been directly connected with the physical world it is tantalizing to imagine how it might reflect on the power of physical experiments empowered by entanglement to reveal the mysteries of the universe the question of course becomes where to find such useful quantum data and how to effectively get it into the quantum computer chemistry has long benefited from the power of quantum sensors in nuclear magnetic resonance experiments well okay well the most basic forms of these experiments are based on ensembl measurements at an effectively high temperature they offer incredible insight and are fundamentally quantum interestingly the form of these basic expressions can be closely and you find it with the so-called one playing qubit model or dq c1 and this has inspired some reason working personally advantages of the nmr however in addition to design a more advanced molecular quantum sensors is an active research area with sufficient advances in transduction techniques and developments in quantum memory correction it may become possible to load data from molecules yeah that's what that's what's cool so you may become possible to load data from molecules directly into quantum computers and perform manipulations that are probably challenging for a classical device even with unbounded compute time to replicate due to the query separations we mentioned above this could enable faster chemical identification and press in accuracy in examining quantum effects blah blah blah blah blah okay so what do i take out of these essentially yeah essentially it's if you can get data directly to the computer via via some sensors or you know with this transduction transduction um which i guess essentially it's it's some sort of probably entanglement or something like that isn't it well you're kind of essentially coupling one state to the computer state or something like that i don't know and tap resources in quantum computing the discussion thus far has largely centered around the role of quantum computer science or quantum computers themselves in your personal understanding chemistry what the radical tools from quantum information science with potential to impact computational chemistry remain untapped for example techniques in tensor networks i received much of the development and quantum information and to be able to form anzacs for greater wave functions both matrix product states and tensor network states coupled with entitlement perspective and strong correlations as they do well the theoretical developments um [Music] chrono correction quantum control signal of interest lasik excitation so to control and measure the system through feedback that gets a bit too low level for my taste traditional thermalization would allow um it turns out the exponentially long suppression of transport out of collection of desired quantum state is relaying on the abstract digital observer the development of chronological uh considering to develop a simulation for particular kinds of quantum states and stabilizes states these states can exhibit essentially maximal entanglement across the system either incredibly efficient to simulate classically scheduling like n n square iron cube okay so it's just talking about quantum error correction all the time and degeneracy as a mechanism to protect information yeah basically exactly if nature were to follow a similar path perhaps the electronic near degeneracy and resulting in tangomania these systems could be an avenue for protecting a coherent reaction pathway in addition many codes topological protection topological effects have been studied in the console [Music] section the naf access national systems do not have access to an optimal decoder to remove excess entropy the notion of self-correcting memories where systems exhibit such behavior more naturally throws an inciting connection an enticing connection state versus stabilizing that i should be practicing your systems and that's the outlook which we already read i mean you know it's pretty it's really well written i i don't really know whether i want to go through section three but it's it's basically what bothers me a little bit is the the example here with the synthesizability synthesizing stuff but but the just the gist of the idea is that you learning as an alternative to computation so it's just i guess the the difference there is just the data right it's the observational data that's that's kind of what makes learning is that you actually adapt your computation uh based on based on data based on yeah on on stuff you observe basically right but in a sense the process of learning is also a computation i don't know if it's not a bit more meta in this case but like you know what i mean like your input is just your inputs are your your computation your current state or your current computation uh model and and and and new data the training algorithm is an algorithm is a computation right so i i that is why it's still difficult for me to kind of break those apart and and think of learning as being distinct from computation because the way it's like the learning itself the process of learning how do we how how we actually adapt the computation part computational part is it is a computation right from that perspective i'm not so sure about the i mean it is i mean at the beginning what they say about the the pillars of experiment experimentation and you've got theory and experimentation and then computation being the third pillar um it kind of yeah it kind of makes sense yeah that's that's probably that that's probably what that's not i mean let me you know what i'll just ask i'll just i don't know why twitter or when so i will just ask i think just go to jaron and historically so i think here so quick question [Music] quick question or um after quick after a quick scan one thing still remains unclear isn't the learning also a computation um like i get it i get it that i i guess so i get it why i get i get it one can make a difference right like or you can you can differentiate and say look this is strict computation and now and and learning is computation and data right um that was give me a second i think that was not the tweet he did mention it a bit below exactly here so this is different computation it helps your friend approaches we take some of the hardest problems in chemistry after quick scan um one thing supreme isn't clear isn't isn't learning process itself also a computation i mean like like i i i write your sort of that's roughly learning that learning equals calculation plus data right feels still feels like the yeah it still feels like the the process itself is a computation okay definition is roughly meaning that learning equals calculation plus data so yeah so the computation part would be like the query the query part of it right like but it still feels like the actual process yeah um it's a competition itself i mean that is like i get it like i i get that's what i'm that that's kind of it's it's my struggle with machine learning in general it's just seeing another it's a bit like you're going like another meta level right um so instead of writing the code but that's the thing you write the code that writes the code right but that that's what makes it also a computation so i i don't really think i don't i'm trying really hard to try to think about like whether i have to meet something but so after quick scan one thing still remains unclear isn't the learning process have physical computation like i read your definition as rather meaning that learning was combination quite positive but it still feels like the actual learning process competition it's condition itself yeah because like that that is and i and i get it so i i i i get that you can say like okay with this approach one can have a more relaxed view on you know undecidability because it's like either you run something until it happens or you take a look at the history and try to infer the future right or try to take a look at data and yeah i i i you know maybe i should they should sort of deep dive more into into into the essence of all these right machine learning in general and because it does feel like it's something it's definitely a step forward in the way we think in the way from a computational perspective it's it's definitely a wave it's sort of a step forward you know in science and whatnot but it still somewhat doesn't feel really so magical um and so eye opening like i i don't know maybe i'm just it probably i just don't really understand or don't really kind of haven't really had that like aha now i get it it's it it seems rather obvious not not in a don't get me wrong not in a way that i'm like oh that's obvious and easy but like in a way that it just it's yet another computational approach to solving a problem just take the data and adapt your stuff give me a second back here again um yeah that's basically so what is it okay just let me quickly scan through this [Music] talk about scaling costs instead have some model competition where cost could be quantified we'll generally be assuming this means we use a finite often local set of operations called quantum gates or within a digital gate model stock interactions are that computers are built from module components moreover some of the results will just information is not a square complexity time complexity quantity just can't fast forward time either this best question how fast this is a pleasing time so it turns out that assuming one only has the available space to represent the system serially the answer is no [Music] there's some special system okay fast forward it cannot be done in my general case if i polynomially resolution time this results more unclear implies no simulation which retains a complete level of detail at quantum level can simulate physical systems faster than nature it's kind of like an obvious restriction in in a sense that like we are part of nature as well so we're building is natural in a way [Music] some reactions like rusting can take months to occur using a single molecular realization the simulation could take comparable times to witness a reaction event making discovery in this fashion totally impractical however must transition state theory based on static calculations of free energies and canal access to rate constants on time scales much faster than direct physical simulations the observation of chemical methods have been so successful making predictions beyond physical time scale sleeves one believing that perhaps physicists always emit some form of reduction that will allow us to forecast results that we actually care about okay so a recent string of results i'm going to communicate with science print that in fact even some very simple systems with construction terms this is some questions that are fundamentally unusable ahead of time that's that's yeah i mean but that seems to be the measurement problem it in and of itself right and this is the problem surprisingly includes whether simple one-dimensional systems thermalize which has some implications for the predictive thermodynamics internal systems systems are much stronger than simple cause of dynamic systems so thermalizing i think that's based on what i check recently it means so they becoming like thermal equilibrium um i mean it's like what is heat anyway and what is temperature this is something that what is temperature um no no no physics temperature oh this then the heat right what is heat it's a form of energy okay that is transferred between systems origins with different temperatures falling from is the thermal energy okay so it's it's an energy it's just an energy surfing an answer check out the abstract do it but like how i mean something in the abstract with the rapid development of quantum technology one of the linear regression simulations interestingly even for full-scale quantum computers and available quantum computer sciences is really marketable string results that directly impact each other some of these results you impact our understanding of chemistry in the real world we take the position that dark chemical explanation is best known as digital experiment while on one hand color has a power computer section it also shows limitation things that are personally leveraging results that quantum computers cannot specifically while we build controversial stains and some chemical problems are basically just problems which can deliver their solution in general not only career sciences yeah and beginning to predict power of thermodynamics models and topics however argue that the percentage is not the fittest but rather helps shed a light discussion because in chemical models like transition state theory molecular orbital theory and thermodynamics models that benefit from data we can socialize recent results showing that data augmented models are more powerful road simulation these results help us appreciate the success of traditional chemical theory and you know not only can chronic respon but they can extend the class and power models that you know in the last discussions oh god but i mean that's not the point man ah sorry oh i thought it was an answer to my question yeah yeah that is the is that a bot i think that's a bot is it yeah yeah that's that's that's a bot that's a good one uh uh i think it's blood because yeah i shared the actual pdf all the better next time [Music] so yeah anyway i think that hasn't really changed questions no algorithm can answer this leads to want to ask if there's always a predictive model or algorithm that's simplified for some bad questions versus a resulting results there are indeed even related relatively simple questions related to physical assistance which can prove that no single algorithm can answer for all such systems infinite time leaning on the ergotic hypothesis what is the arc ergotic hypothesis in physics and thermodynamics their garden hypothesis states that over long periods of time the time spent by system in some region of the phase space of microstates with the same energy is proportional to the volume of its region i.e that all accessible microstates are equip probable over a long period of time the time some region is proportional to the volume where am i where am i god here under the assumption that the system is regarded indeed many standard molecular dynamic simulations play both possible directions um [Music] now i know what translationally invariant means i found this the other day it means it means it's invariant depending on like this there's something like time where you can like it doesn't matter where where and when you do stuff like the price is always going to be the same repeat it indefinitely this type of arm is known as an unsettled problem the first example of which is the famous hot problem of touring [Music] it's correct perhaps most you know familiar class of mp complete problems is even when provided with a supposed answer a model cannot cannot verify if it's crime this implies that for a number lacking energy or free energy representing a system either that number cannot be generally predictive tension that is the mapping of physical process to halting problems one type of master the operations of the physical system to operations of a turing machine with an infinite sized tape if that tape were finite one can spend a very long but not infinite time examining all possible states of the system to have the answer to any questions related to this data system for example in starting dynamics of a finite physical system one could discretize the possible states and expand and expand an exponential amount of time in the system size demanding an answer find out our little consequences on the verified view of very exponential of even the modest size finance system would be aligned on the age of the universe despite their somewhat similar predictions in practice too long to compete we are embracing the viewpoint of undecidability dynamics a lot of the possible dream of treating chem equations by the exponential enumerations ester and completing this search and can code the halting problem an aversion concerning real dna that tends to form in life systems essentially to other constraints that make its activity more predictable what give up yeah i don't know so the learning like as i said right the the the to me like after reading this whole thing like it's still as i as i kind of tweeted in the reply uh to me it does not really seem like there's something so distinct about you know the distinction between learning and computation is not that clear as at least jared seems to make it look like here because this is rather than being diffident i think it actually encourages thinking about learning existing from competition and helps to refine the approaches we take like it is not technically like i i that's that's the that's what i say here right it's just the learning process itself is still a computation that's what that's what is kind of confusing me a little bit but maybe so that's another paper open access maybe i should go through this one power if they didn't quantum machine learning so i see there's okay the same figure being used in here it's eight pages what is the abstract use of quantum computing for machine learning is among the most exciting personalization of technologies or machine learning tasks where data is provided can be considerably different than commonly studied computational tasks so okay so he's there's a claim here that the tasks where data is provided can be considerably different than commonly studied computational tasks this is what i'd like to understand more what is that considerably different like in this work we show that some problems that are classically hard to compute can be easily predicted by classical machines learning from data using rigorous prediction error bounds as a foundation we develop mythology versus a potential quantum advantage in learning tasks the bouncer tight asymptotically and empirically predictive for a wide range of learning models this construction explains numerical results showing that with the help of data classical machine learning models can be competitive with quantum models even if they are tailored to quantum problems we then propose a projected quantum model that provides a simple and rigorous quantum speed up following problem in the falton regime um for near-term implementations with demonstration data prediction advantage over some classical models on engineered data sets designed to demonstrate a maximum quantum advantage in one of the largest medical test gate based quantum machine learning to date up to 30 cubits okay so that paper goes through a specific example that will show an advantage but i get the gist of the story where is like i i know that like quantum machine learning is of no use if the data you have is classical um and if the data is quantum then it's a bit more unclear but it seems like that's the way it's supposed to be and then the idea here is that you can have um yeah basically basically if you uh if you have the sensors putting data into the quantum computer that's how how you kind of get you know over the problem of of the fact that like otherwise quantities will be useless for that from that perspective right because you always have to have a classical coding process where you know then you you lose your exponential exponential um advantage but it's still yeah i don't know it's kind of still not clear i did a bit of a detour that was sort of part two um you can watch part one as well it's in youtube uh if you're interested into the first chapters of in the first sections of the of the paper um but i think i'm gonna i think so far i'm gonna leave it here i don't know what jared will answer but it's uh i'll come back to that eventually i'll come back to quantum machine learning at some point because i'm starting to gradually gradually kind of sense this is a really interesting direction to explore from a quantum perspective as well and the whole quantum simulation world right um where to me it does it doesn't seem that's the actual killer app of quantum computer rather than schwarz algorithm right um yeah i mean it's like yeah i don't know if i have it here right but it's like these little things where you're gonna wanna when i measure whether you're screwing something straight on the wall or on the floor something's like a surface even you have the bubbles in there like you're you're using nature's you know computational capabilities to um get answers and simulate stuff yeah i'll go back to the learning stuff uh i'll go back to the to the physics project in the next stream but that was a good just a nice detour i think um i'll somewhat get to it at some point anyway have a good day
<a href="https://arxiv.org/abs/2106.03997">https://arxiv.org/abs/2106.03997</a>
Could you add the link of the papers in the description please? Thanks, This video btw was a bit of a tangent ;) just thought the paper was interesting to review, ​@Iron Man So depends I&#39;ve done currently 3 big projects and you can find them rganised here: <a href="https://www.youtube.com/c/UncertainSystems">https://www.youtube.com/c/UncertainSystems</a><br><br>The first one is called Quantum Computing from 0 to 1 and it&#39;s about my learning journey of the basics. There are some coding videos in there but they are rather organised in learning logs<br><br>The second is building Unsys (<a href="https://github.com/dncolomer/unsys)">https://github.com/dncolomer/unsys)</a> which still needs a major refactoring. It started as a QC simulator but I&#39;ll pivot it to an entangling modeling tool<br><br>The third project which is what I&#39;m currently working on is learning QM from scratch by using Wolfram&#39;s model as as a reference<br><br>so I don&#39;t have really specific coding playlists but rather do it on demand as I need it.<br><br>If you are looking for some specific coding idea let me know and I can suggest potential past videos if I have them . For example got some videos coding Grover in Silq: <a href="https://www.youtube.com/watch?v=XsqSwgrpWK0">https://www.youtube.com/watch?v=XsqSwgrpWK0</a> r here ding some coding of a grover&#39;s variant in qiskit: <a href="https://www.youtube.com/watch?v=WjobVigFRsU&amp;t=1155s">https://www.youtube.com/watch?v=WjobVigFRsU&amp;t=1155s</a><br><br>I hope this helps! Also if you wanna connect let me now via daniel@<a href="http://uncertain.systems/">uncertain.systems</a> and I&#39;ll send you an invite to my discord server. A cool community over there ;), @Uncertain Systems thank you!!<br>sorry now im confused i have a question where your programming qc videos start or which playlist is?<br>2)suggestion:i really love your method of learning because you learn what you need at the moment and then you apply it <br>Would be cool a video about your method for the qc field, Added it as a pinned comment ;)
Awesome
so now it's time to get into the implementation of the Oracle that's all we left it in part three basically the subdivided how they call how to call it the subdivided phases implementation that gets rid of the others and so we're now getting into the actual Oracle implementation yeah so when let's see the Oracle implementation but that's the or well isn't it yeah okay so this is now going to be a I don't know a let's see what is this implementation that they're going to discuss yeah cuz I just did it with my my own idea here and now okay so when this era is not 0 or PI the SAP Oracle in equation 8 consists of the following gate sequence so X be controlled rotation control rotation of z XB XA control rotation along the z axis a due to the limitations of the current IBM q processes within the fractal within the framework of chasm we need to control X gates and single qubit gates to execute a controls that get exactly to control X case and a sin and a single qubit gate so this is this is basically this what I did here right but you could so what this is saying is that you could actually replace that would control that work no because it's not the effect that you want it's control uh-huh so this is the so this is what they would propose okay but they're saying basically that you've got to do it like I proposed because of the limitations am i right off of chasm we need to control X Cades and single cubic is executed right here the error values and single qubit gates are on order of magnitude on one order of magnitude smaller than than that of two qubit gates therefore we focused on reducing the number of control x gates and there are single qubit gates such as u3 gate is basically not a problem okay so they're saying is the assumption here is the the errors caused by controlled operations are higher the error rates so you should try to minimize that so that would not be optimal because you've got for each of every sub work I've got to controlled operations so what they're saying is that this would be equivalent to to doing like these it's a correct I'm not so sure sixty degrees 60 degrees here you've got I'm not so sure that's I'm not so sure that is okay so there is a bit of a different thing here that's not definitely not working or you can compute that so hence we approximate the whole sub Oracle with two control X gates and 6u three gates by kak decomposition 1819 as shown in Figure 7 the error level of a controlled XK of the latest IBM q processors used in this paper is about 1% at best hence we approximate this Oracle circuit with two control X gates okay so now it's time to take a look at these a bit more in depth so this is the I guess the ideal that's how they would that's how they approximated let's take a look so let's take first look at the upper part so what is going on here maybe I'll so this is a an RS that kid or is this dead kid that's I keep having problem with that let's see first of all let's try to see if that works the way this is assuming that is a it's assuming that I do this and then you know and then we basically do control kid and then there's another grade and now we take a look at the amplitudes here so and then the phases so basically that's four for the two qubits that are in the rightmost side so zero one there's one cat 60 degrees one zero there's one cat sixty degrees 6 degrees 60 degrees here there's no cat here there's no cat here there's no cat here there's no cat that seems to work what if I do it here so now because what this is basically saying it is okay so it's kind of its kind of saying you negate the cupid on the top right so what we're doing here is if you've we paint all our possibilities and say this is the this is the this is the QB the word that we're negating you basically wanna okay so from one so this first pass basically what it does is it flips the cases where you've got a one zero right because you're gonna you're flipping the zero and so so you're flipping that qubit into one and so that one one combination with the control set will actually rotate you mm-hmm and that second pass here is gonna do sort of the opposite the mirror and rice is gonna take a look at these is gonna then kind of catch that pattern in here okay fair enough so that's there is a new works now I keep keep getting confused with there are Z gates and the Zed gates rotation because the way in here the way it's put in in query right the RZ gate says rotates around the set by an angle in radians determined by a formula but it's actually it's actually phasing both the 0 component and the 1 component whereas the Z rotation it just phases the one-component but adds a global phase so that's this okay so does this work with our that gay I mean here we've got an angle right so he all say pi-thirds and we're gonna use it here yeah and it doesn't so it doesn't because it's also flipping the so this is this is something that I'll definitely share I mean this is something that that keeps confusing me in terms of notation so the there are that versus the set gates and I should maybe make another video on these at some point because it keeps confusing me so this this is there should be as a rotation not an R is that gate so I'm assuming that in the rest of the paper whenever I see R is that it's it really should be as a rotation that's v2 right so on it's maybe just a matter of of convention I don't know but that definitely doesn't seem to work with with RZ unless if I say again one third one third I mean root is wrong set by an angle in radians determined by a formula and I'm using pi divided by three where these size which is under set by an amount determined by a formula so yeah I don't know might be just annotation thing anyway let's go hey but that works it kind of checks both ways but still seems like my previous implantation also work right anyway ex control or control or is that and so now this is equivalent to that okay so let's take a look at this um this is equivalent to that the one thing I don't care is the whole point here is made that okay due to limitations okay so it did due to the limitations of the current IBM q processes so you know to implement and control their rotation they would you would need to control likes to control X gates okay but the the error values and single crickets are one or magnitude smaller than that of two cubic gates for so the focus is minimizing that so this basically okay so I think what this is doing I think what this is doing is basically replacing that with something that that's like a harm art style rotation then then it turns that into control X and and then the the universe of that right so what is the u3 the u3 so this is something that I can't do here but I need to take a look at the IBM Q experience because the u3n thing is this is just a permit rice rotation through the different angles why that's funny why are those here numbers and not just I guess I guess it's a mistake no white 2 point 3 2 so the youth freegate so IBM quantum experience u3 gate let me sign in quickly or login I used to have a login Kiska documentation using the circuit composer so let me quickly login I'll pause this so now I'm in still all my old stuff in here quick always quick test interesting so the u3 gate gates closer okay oh nice oh that's definitely nice what's your rotation okay so the u3 okay so each of the parameters is it's the angle you rotate and one particular axis or or what what we call if you could actually if that would be interactive they'll be nice you - okay fine whatever to provide - so so this you three gate basically learn more about quantum gates - it's difficult to find things quantum gates I think it was something here and then you've got like a u3o here you go [Music] so this thing okay so that's how much I look at them the most general is this one this has the effect of returning activity in the initial zero state to one with an arbitrary superposition and relative phases so the you one gate is known as the face Kade essentially the same as the ours and lambda its relationship with you three it's this one the you to gate has the form because that's the most general form does this mean that this is just a like this is the z axis parameter this is the Y this is the X because the U to the you two is like zero pi so it's a pi rotation it's a pie rotation I'm just confused I'm just lost I used to know better how to navigate the spinach but okay so this is this this seems to approximate and this must approximate an a not gate you three zeroes your pie no no this cannot approximate not Kay you know what I'll just get into the composer quickly and see if I can play with it you three gate what I can retire here so they change that a little bit it's pretty nice Kasim I just won three I just really won 1 cubed oh really and so if this is 0 0 hi okay that's a face that's a phase rotation yeah state vector measurement probabilities density matrix state vector in yellow meant like a handle increase its pi so that's okay so that's a you know what I'll copy I can do I can use this one so um can reason so that's a that's interesting that's a z gate that's a set Gaede pi pi minus pi divided by two [Music] pi pi minus pi / tool hmm I'll be cool to see the blocks here here so I'll see what the rotation what kind of rotation these is but maybe maybe I should just go and compute the matrices by hand so I understand what these rotations are approximation of maybe I should read actually further persuasion of the SAP Oracle circuit using kak decomposition at pi divided by four I would set up as pi divided by four okay the approximation accuracy I had approximation accuracy is over 99% and the average error of the CX gate or the q processor as of June 2010 is about one percent until the control I said error is half the total error will be dominated by the two qubit gates um okay so this is a an existing method to the composing staff it's the kak the composition maybe I should take a look at that to understand better why because this is really so I have started here I feel a bit like that's that's a weird way so basically that's that's a really interesting way of decomposing this stuff okay okay the composition so there was a reference that is nine eighteen and nineteen maybe I should jump into this eighteen and nineteen kk decomposition okay maybe let me just first cool KK composition because even if I even if I compute the matrices I still don't understand I would still would not understand why those rotations approximate that circuit so that's an additional cartons KK decomposition are no this is these [Music] from Robert art Tucci the two references here are different so on maybe I should maybe I should just call that I'm never to Cuba computation in 23 elementary grades or less our technique rely on the cake it comes from Lee from Lee theory as well as the polar and spectral symmetric sure matrix the composition of numerical analysis they are related to the canonical cubic gate with respect to magic bases of phase shifted Bell States we extend this is from Steven and Igor is this tea no that's not like anyway yeah that's the paper of course can't get access to it but so let's take a look at in terms of cartons kak the composition of QC program for QC programmers this very results there's no new results it's cause it's pretty pedagogical a special case of the cornucopia has found much to competing especially in it's a field of quantum compiling the special case allows one to factor a general two cubed operation and I want to you for into local operations applied before and after three parameter non-local operation in this paper we give a complete and rigorous proof of this special case of Cotton's composition from the point of view of QC programmers who might not be familiar with the subtleties of the Lee group theory to proof given it the proof given here has the V searches that is that it is constructive in nature and that it uses only linear algebra that maybe I should take a look at this first the constructive presented in this paper implemented it's important in some newspapers despair says the commutation from the okay okay okay it's 12 pages cartons KK the composition for QC program is their motivation notation and other preliminaries so proof of K k1 so I think class specter so okay saleh i have to deep dive into these to understand basically what it means but what this is telling me is that that step is its it simply said simply a you could think of these as a compilation problem and say you know that's that's the solution and then that's how you would approximate it in a way that it reduces the errors so i'm gonna follow my approach and put that aside for now and then go ahead with the virtual vertex technique here that can be interesting and I'll come back to that part as well so trying to kind of you know I want to get breadth-first I want to get through the paper first and then dive into the particular point the particular point so here this is one one really specific point that will dive into this later but it's basically you're not like this is not required to understand the I think the overall purpose of the of the paper so and then the additional diffusion interesting okay cool so that's one more thing to take a look later so what have we got so far we've got things come back later the exact definition or a bit sort of understanding better with the quantum what kind of volume he said something to come back to later the K key the composition is something to come back later but I think that's it basically I have to catch up with with my videos and and see whether I missed anything but I should probably be taking it out of that so okay perfect that was not I feel like didn't move forward a lot or we understood this idea and that's it basically and then the virtual vertex probably is the interesting part of the paper the most interesting part of the paper it's interesting cool perfect
uh can i update does this get updated live i think so um cool cool call can i can i can i can i where's my phone there you go let's just tweet about these twitch and certain systems there we go so i wish it'd be a nice a nicer way to embed things in twitter i like these uh johnny alive as we read oh god did i write life with f oh jesus anyway where were we so we actually let me i need to keep an ear open because there might come someone like a package delivery so where were we um let me open chat cool um i think i didn't finish i think i didn't finish i i quickly scanned through chapter two chapter three talks about the limits of even uh quantum computations in chemistry um yeah i think that's probably the one tool okay so maybe let's i feel like lyric into actually jumping into this one learning as an alternative to computation probably i'll i'll read that because this is yeah i'll then come back to this let me select even quantum computation chemistry um like i i i don't know maybe you gotta read this sequentially but uh simulations this question all right so i guess at some point this i i guess chapter three or the section three goes through like undecidability similar status to the more famous ep equals the mp was nc if one allows the space of the quantum computer to expand polynomially with the simulation time the result is more unclear and really the classical debate of if any computation can be paralyzed arbitrarily while encapsulated by the theoretical question of if p equals nc what is nc nc complexity complexity n c so nick's class nick's class instead of decision problems decidable in poorly logarithmic time on a parallel computer with a polynomial number of processes uh okay so it's like if we will parallelize the process but in a polynomial order okay um anyway so let's go through these section four learning as and i i'm just keeping section three because i assume that's what's gonna talk about but i'll come back to these anyway um learning is an alternative computation rather than than claim one must give up hope on problems where the most natural formulation looks undecidable or hopeless expensive we argue that embracing the undecidable interpretations of these problems frees one from the destruction of the combinatorial approaches and leads them to embracing the only known resolutions to problems that exist for halting problems uh leads them to embracing the only known resolutions to problems that exist for halting problems the first and not really palatable solution that has been mentioned is running time dynamics forward and hoping for the event of interest to occur the second and more actionable viewpoint is to understand that systems with advice can formally resolve such problems so that was in the systems with advice because this was mentioned in the previous section but that doesn't seem to pop up anyhow i was recently shown that data from the real world can act as a restricted form of advice to solve helping um to solve healthy problems once advised we need to constitute a form of infinite time pre-computation however much like the argument of finite versus infinite infinite systems the pre-computation performed by the physical universe before this point thought finite though finite is already quite strong and available to be revealed through experiments to see an example of these in chemistry one can look at one can look at the field of natural product synthesis natural product synthesis where one seeks to synthesize chemical species found in nature from simpler readily available components in a finite number of steps for the most general complex molecule it can be quite difficult to say if a product can be reached with a fixed set of reagents and conditions or at all perhaps due to some intervening site reaction in fact the conjecture this we conjecture this form of the problem may be undecidable since we could specify the target molecule as a particular strand of dna by contrast in the study of natural product synthesis the challenging question of chemical since disability is answered by nature itself and practitioners are free to discover practical routes towards a product rather than ponder if success was even possible theoretically so what do they mean they mean that because we know because we know that the actual end product exists we know that it must be synthesizable and so that is what the advice is telling us the challenging question of chemical sensibility is answered by nature itself and practitioners are freed to discover practical routes towards a product rather than ponder if success was even possible theoretically yeah because i guess the what the halting problem is telling you is like you're trying to solve with it something will happen at all or not and uh in in this case because you know that it can be done yeah but you don't know what it can be done given a a restricted set of reagents or something right and this sense empowering ourselves those observations from the physical world can enable answers to questions that cannot be practically resolved with road algorithms more generally we believe one could view the models and study of synthesis in organic chemistry and their protective predictive success in this line hence taking this point of view suggests that a purchase based on learning are fundamentally different than those that rely on computation alone okay but let me just re-read this again example the chemistry of product natural product synthesis one seeks to synthesize chemical species found in nature from simpler readily available components in a finite number of steps that's the problem is i have a um a set of simpler um species chemical species and i want to make sure whether i can synthesize a target species and a finite amount of steps um it can be quite difficult to say if a product can be reached with a fixed set of reagents and conditions or all perhaps there's some intervening side reaction in fact we can reconjecture this form of problem may be undecidable since we could specify the target molecule as a particular strand of dna yeah but why by contrast in the study of natural product synthesis the challenging question of chemical synthesis synthesizability is answered by nature itself and and practitioners are free to discover practical routes towards a product rather than pondering if success was even possible theoretically i don't quite get it i don't quite get the analogy because it's like the halting problem is like yeah it's the same like even a specific type of program you could sometimes you can actually check that right because you can do like static analysis and things like this and you know with things like you you can't solve the healthy problem for a specific set of inputs it's just it's in general not always possible so that's why you um that's why we label it as undecidable in general but it's not generally undecidable or it's not always undecidable and here's the same like i mean if i i'd say if i have a set of i mean okay i get i guess you have a set of of a fixed set of reagents and conditions and so you can you know apply all the conv all all the combinations and then see what happens i guess that's what they mean by that nature shows you okay i'm not so sure i grasped the analogy completely here but let's go ahead and stick in this point of view suggest that purchaser with the rise of popularity in machine learning naturally these is now a flurry of work applying there is now a flurry of work applying technique for applying techniques of machine learning to chemistry the applications range from prediction of direct simulation quantities or sensibility and inverse design believe the results we believe the results we highlighted here bolster the motivation for person this line of work in the general sense but also supports the long-standing tradition of chemists developing chemical physical models as well while much practical work remains to be done in finding the best representation of a pro for approaches it is now understood that these approaches are fundamentally different and indeed more powerful in some ways than traditional simulation approaches in particular recent work has shown that the power offered by data from a quantum computer can lift classical models to be competitive with their quantum counterparts in some cases if nature is indeed a universal quantum computer this would suggest that quantum computations could help fill the role of natural experiments in providing data to empower learning models but with improved program program of programmability and flexibility this might suggest that in the future a key role of quantum computers to remain scarce compared to their traditional counterparts maybe to provide data for learning models primarily run on traditional computers however that would be a rather unexciting fate for technology that pushes the limits of our understanding of the universe instead of accepting this fate we appeal to other recent work that has uh shown an overwhelming advantage for quantum computers and how they can process data move directly into the computer from a quantum sensor that's why okay so that's what's getting interesting i guess the other recent work that has shown an overwhelming advantage for quantum computers in how they can process data moved directly into the computer from a quantum sensor a process referred as transduction 76.77 oh preschool is involved okay this this transduction i think i remember seeing this paper transaction i mean the work is not appearing there at all but uh it's probably worth a it's probably worth a rigid as well transduction also doesn't appear anywhere transduction 2019 oh this is an actual talk crime signals from one energy to another is an important error of crime scenario earlier i guess the idea here would be that you were somewhat somewhat inputting the data in the point into the quantum computer with its sensors this would suggest that quantum computation could help fill the role i don't know a comparison with a traditional data pipeline shown in figure 3. so as an alternative to measurement right in such cases you're performing and [Music] in such cases even performing quantum data processing on even very few copies stored in quantum memory can allow one to extract property for quantum systems that would require especially more data in the classical case even early machines may be able to manipulate few copies for limited times and store this quantum data for future models this separation is stronger than a traditional computational separation as if limited measurements are available due to the transient nature of a system no amount of computation can allow traditional measurements and competition to catch up this implies that even systems with the number of qubits that can be classically simulated could prove advantages if the quantum computer has quite a memory that can maintain states in quantum form this extends the power of these approaches even farther the relationship between this here key of data models and traditional simulation is depicted in figure one moreover if one ventures further into the realm of speculation recent computer science results have shown that if one can entangle two particles trying to prove something to another what they can convincingly prove expands to unimaginable hates including halting halting problems while this celebrated result am i yeah mip i i've remember reading with this but i've never i i didn't go into this has not yet been directly connected with the physical world it is tantalizing to imagine how it might reflect on the power of physical experiments empowered by entanglement to reveal the mysteries of the universe the question of course becomes where to find such useful quantum data and how to effectively get it into the quantum computer chemistry has long benefited from the power of quantum sensors in nuclear magnetic resonance experiments well okay well the most basic forms of these experiments are based on ensembl measurements at an effectively high temperature they offer incredible insight and are fundamentally quantum interestingly the form of these basic expressions can be closely and you find it with the so-called one playing qubit model or dq c1 and this has inspired some reason working personally advantages of the nmr however in addition to design a more advanced molecular quantum sensors is an active research area with sufficient advances in transduction techniques and developments in quantum memory correction it may become possible to load data from molecules yeah that's what that's what's cool so you may become possible to load data from molecules directly into quantum computers and perform manipulations that are probably challenging for a classical device even with unbounded compute time to replicate due to the query separations we mentioned above this could enable faster chemical identification and press in accuracy in examining quantum effects blah blah blah blah blah okay so what do i take out of these essentially yeah essentially it's if you can get data directly to the computer via via some sensors or you know with this transduction transduction um which i guess essentially it's it's some sort of probably entanglement or something like that isn't it well you're kind of essentially coupling one state to the computer state or something like that i don't know and tap resources in quantum computing the discussion thus far has largely centered around the role of quantum computer science or quantum computers themselves in your personal understanding chemistry what the radical tools from quantum information science with potential to impact computational chemistry remain untapped for example techniques in tensor networks i received much of the development and quantum information and to be able to form anzacs for greater wave functions both matrix product states and tensor network states coupled with entitlement perspective and strong correlations as they do well the theoretical developments um [Music] chrono correction quantum control signal of interest lasik excitation so to control and measure the system through feedback that gets a bit too low level for my taste traditional thermalization would allow um it turns out the exponentially long suppression of transport out of collection of desired quantum state is relaying on the abstract digital observer the development of chronological uh considering to develop a simulation for particular kinds of quantum states and stabilizes states these states can exhibit essentially maximal entanglement across the system either incredibly efficient to simulate classically scheduling like n n square iron cube okay so it's just talking about quantum error correction all the time and degeneracy as a mechanism to protect information yeah basically exactly if nature were to follow a similar path perhaps the electronic near degeneracy and resulting in tangomania these systems could be an avenue for protecting a coherent reaction pathway in addition many codes topological protection topological effects have been studied in the console [Music] section the naf access national systems do not have access to an optimal decoder to remove excess entropy the notion of self-correcting memories where systems exhibit such behavior more naturally throws an inciting connection an enticing connection state versus stabilizing that i should be practicing your systems and that's the outlook which we already read i mean you know it's pretty it's really well written i i don't really know whether i want to go through section three but it's it's basically what bothers me a little bit is the the example here with the synthesizability synthesizing stuff but but the just the gist of the idea is that you learning as an alternative to computation so it's just i guess the the difference there is just the data right it's the observational data that's that's kind of what makes learning is that you actually adapt your computation uh based on based on data based on yeah on on stuff you observe basically right but in a sense the process of learning is also a computation i don't know if it's not a bit more meta in this case but like you know what i mean like your input is just your inputs are your your computation your current state or your current computation uh model and and and and new data the training algorithm is an algorithm is a computation right so i i that is why it's still difficult for me to kind of break those apart and and think of learning as being distinct from computation because the way it's like the learning itself the process of learning how do we how how we actually adapt the computation part computational part is it is a computation right from that perspective i'm not so sure about the i mean it is i mean at the beginning what they say about the the pillars of experiment experimentation and you've got theory and experimentation and then computation being the third pillar um it kind of yeah it kind of makes sense yeah that's that's probably that that's probably what that's not i mean let me you know what i'll just ask i'll just i don't know why twitter or when so i will just ask i think just go to jaron and historically so i think here so quick question [Music] quick question or um after quick after a quick scan one thing still remains unclear isn't the learning also a computation um like i get it i get it that i i guess so i get it why i get i get it one can make a difference right like or you can you can differentiate and say look this is strict computation and now and and learning is computation and data right um that was give me a second i think that was not the tweet he did mention it a bit below exactly here so this is different computation it helps your friend approaches we take some of the hardest problems in chemistry after quick scan um one thing supreme isn't clear isn't isn't learning process itself also a computation i mean like like i i i write your sort of that's roughly learning that learning equals calculation plus data right feels still feels like the yeah it still feels like the the process itself is a computation okay definition is roughly meaning that learning equals calculation plus data so yeah so the computation part would be like the query the query part of it right like but it still feels like the actual process yeah um it's a competition itself i mean that is like i get it like i i get that's what i'm that that's kind of it's it's my struggle with machine learning in general it's just seeing another it's a bit like you're going like another meta level right um so instead of writing the code but that's the thing you write the code that writes the code right but that that's what makes it also a computation so i i don't really think i don't i'm trying really hard to try to think about like whether i have to meet something but so after quick scan one thing still remains unclear isn't the learning process have physical computation like i read your definition as rather meaning that learning was combination quite positive but it still feels like the actual learning process competition it's condition itself yeah because like that that is and i and i get it so i i i i get that you can say like okay with this approach one can have a more relaxed view on you know undecidability because it's like either you run something until it happens or you take a look at the history and try to infer the future right or try to take a look at data and yeah i i i you know maybe i should they should sort of deep dive more into into into the essence of all these right machine learning in general and because it does feel like it's something it's definitely a step forward in the way we think in the way from a computational perspective it's it's definitely a wave it's sort of a step forward you know in science and whatnot but it still somewhat doesn't feel really so magical um and so eye opening like i i don't know maybe i'm just it probably i just don't really understand or don't really kind of haven't really had that like aha now i get it it's it it seems rather obvious not not in a don't get me wrong not in a way that i'm like oh that's obvious and easy but like in a way that it just it's yet another computational approach to solving a problem just take the data and adapt your stuff give me a second back here again um yeah that's basically so what is it okay just let me quickly scan through this [Music] talk about scaling costs instead have some model competition where cost could be quantified we'll generally be assuming this means we use a finite often local set of operations called quantum gates or within a digital gate model stock interactions are that computers are built from module components moreover some of the results will just information is not a square complexity time complexity quantity just can't fast forward time either this best question how fast this is a pleasing time so it turns out that assuming one only has the available space to represent the system serially the answer is no [Music] there's some special system okay fast forward it cannot be done in my general case if i polynomially resolution time this results more unclear implies no simulation which retains a complete level of detail at quantum level can simulate physical systems faster than nature it's kind of like an obvious restriction in in a sense that like we are part of nature as well so we're building is natural in a way [Music] some reactions like rusting can take months to occur using a single molecular realization the simulation could take comparable times to witness a reaction event making discovery in this fashion totally impractical however must transition state theory based on static calculations of free energies and canal access to rate constants on time scales much faster than direct physical simulations the observation of chemical methods have been so successful making predictions beyond physical time scale sleeves one believing that perhaps physicists always emit some form of reduction that will allow us to forecast results that we actually care about okay so a recent string of results i'm going to communicate with science print that in fact even some very simple systems with construction terms this is some questions that are fundamentally unusable ahead of time that's that's yeah i mean but that seems to be the measurement problem it in and of itself right and this is the problem surprisingly includes whether simple one-dimensional systems thermalize which has some implications for the predictive thermodynamics internal systems systems are much stronger than simple cause of dynamic systems so thermalizing i think that's based on what i check recently it means so they becoming like thermal equilibrium um i mean it's like what is heat anyway and what is temperature this is something that what is temperature um no no no physics temperature oh this then the heat right what is heat it's a form of energy okay that is transferred between systems origins with different temperatures falling from is the thermal energy okay so it's it's an energy it's just an energy surfing an answer check out the abstract do it but like how i mean something in the abstract with the rapid development of quantum technology one of the linear regression simulations interestingly even for full-scale quantum computers and available quantum computer sciences is really marketable string results that directly impact each other some of these results you impact our understanding of chemistry in the real world we take the position that dark chemical explanation is best known as digital experiment while on one hand color has a power computer section it also shows limitation things that are personally leveraging results that quantum computers cannot specifically while we build controversial stains and some chemical problems are basically just problems which can deliver their solution in general not only career sciences yeah and beginning to predict power of thermodynamics models and topics however argue that the percentage is not the fittest but rather helps shed a light discussion because in chemical models like transition state theory molecular orbital theory and thermodynamics models that benefit from data we can socialize recent results showing that data augmented models are more powerful road simulation these results help us appreciate the success of traditional chemical theory and you know not only can chronic respon but they can extend the class and power models that you know in the last discussions oh god but i mean that's not the point man ah sorry oh i thought it was an answer to my question yeah yeah that is the is that a bot i think that's a bot is it yeah yeah that's that's that's a bot that's a good one uh uh i think it's blood because yeah i shared the actual pdf all the better next time [Music] so yeah anyway i think that hasn't really changed questions no algorithm can answer this leads to want to ask if there's always a predictive model or algorithm that's simplified for some bad questions versus a resulting results there are indeed even related relatively simple questions related to physical assistance which can prove that no single algorithm can answer for all such systems infinite time leaning on the ergotic hypothesis what is the arc ergotic hypothesis in physics and thermodynamics their garden hypothesis states that over long periods of time the time spent by system in some region of the phase space of microstates with the same energy is proportional to the volume of its region i.e that all accessible microstates are equip probable over a long period of time the time some region is proportional to the volume where am i where am i god here under the assumption that the system is regarded indeed many standard molecular dynamic simulations play both possible directions um [Music] now i know what translationally invariant means i found this the other day it means it means it's invariant depending on like this there's something like time where you can like it doesn't matter where where and when you do stuff like the price is always going to be the same repeat it indefinitely this type of arm is known as an unsettled problem the first example of which is the famous hot problem of touring [Music] it's correct perhaps most you know familiar class of mp complete problems is even when provided with a supposed answer a model cannot cannot verify if it's crime this implies that for a number lacking energy or free energy representing a system either that number cannot be generally predictive tension that is the mapping of physical process to halting problems one type of master the operations of the physical system to operations of a turing machine with an infinite sized tape if that tape were finite one can spend a very long but not infinite time examining all possible states of the system to have the answer to any questions related to this data system for example in starting dynamics of a finite physical system one could discretize the possible states and expand and expand an exponential amount of time in the system size demanding an answer find out our little consequences on the verified view of very exponential of even the modest size finance system would be aligned on the age of the universe despite their somewhat similar predictions in practice too long to compete we are embracing the viewpoint of undecidability dynamics a lot of the possible dream of treating chem equations by the exponential enumerations ester and completing this search and can code the halting problem an aversion concerning real dna that tends to form in life systems essentially to other constraints that make its activity more predictable what give up yeah i don't know so the learning like as i said right the the the to me like after reading this whole thing like it's still as i as i kind of tweeted in the reply uh to me it does not really seem like there's something so distinct about you know the distinction between learning and computation is not that clear as at least jared seems to make it look like here because this is rather than being diffident i think it actually encourages thinking about learning existing from competition and helps to refine the approaches we take like it is not technically like i i that's that's the that's what i say here right it's just the learning process itself is still a computation that's what that's what is kind of confusing me a little bit but maybe so that's another paper open access maybe i should go through this one power if they didn't quantum machine learning so i see there's okay the same figure being used in here it's eight pages what is the abstract use of quantum computing for machine learning is among the most exciting personalization of technologies or machine learning tasks where data is provided can be considerably different than commonly studied computational tasks so okay so he's there's a claim here that the tasks where data is provided can be considerably different than commonly studied computational tasks this is what i'd like to understand more what is that considerably different like in this work we show that some problems that are classically hard to compute can be easily predicted by classical machines learning from data using rigorous prediction error bounds as a foundation we develop mythology versus a potential quantum advantage in learning tasks the bouncer tight asymptotically and empirically predictive for a wide range of learning models this construction explains numerical results showing that with the help of data classical machine learning models can be competitive with quantum models even if they are tailored to quantum problems we then propose a projected quantum model that provides a simple and rigorous quantum speed up following problem in the falton regime um for near-term implementations with demonstration data prediction advantage over some classical models on engineered data sets designed to demonstrate a maximum quantum advantage in one of the largest medical test gate based quantum machine learning to date up to 30 cubits okay so that paper goes through a specific example that will show an advantage but i get the gist of the story where is like i i know that like quantum machine learning is of no use if the data you have is classical um and if the data is quantum then it's a bit more unclear but it seems like that's the way it's supposed to be and then the idea here is that you can have um yeah basically basically if you uh if you have the sensors putting data into the quantum computer that's how how you kind of get you know over the problem of of the fact that like otherwise quantities will be useless for that from that perspective right because you always have to have a classical coding process where you know then you you lose your exponential exponential um advantage but it's still yeah i don't know it's kind of still not clear i did a bit of a detour that was sort of part two um you can watch part one as well it's in youtube uh if you're interested into the first chapters of in the first sections of the of the paper um but i think i'm gonna i think so far i'm gonna leave it here i don't know what jared will answer but it's uh i'll come back to that eventually i'll come back to quantum machine learning at some point because i'm starting to gradually gradually kind of sense this is a really interesting direction to explore from a quantum perspective as well and the whole quantum simulation world right um where to me it does it doesn't seem that's the actual killer app of quantum computer rather than schwarz algorithm right um yeah i mean it's like yeah i don't know if i have it here right but it's like these little things where you're gonna wanna when i measure whether you're screwing something straight on the wall or on the floor something's like a surface even you have the bubbles in there like you're you're using nature's you know computational capabilities to um get answers and simulate stuff yeah i'll go back to the learning stuff uh i'll go back to the to the physics project in the next stream but that was a good just a nice detour i think um i'll somewhat get to it at some point anyway have a good day
<a href="https://arxiv.org/abs/2106.03997">https://arxiv.org/abs/2106.03997</a>
Could you add the link of the papers in the description please? Thanks, This video btw was a bit of a tangent ;) just thought the paper was interesting to review, ​@Iron Man So depends I&#39;ve done currently 3 big projects and you can find them rganised here: <a href="https://www.youtube.com/c/UncertainSystems">https://www.youtube.com/c/UncertainSystems</a><br><br>The first one is called Quantum Computing from 0 to 1 and it&#39;s about my learning journey of the basics. There are some coding videos in there but they are rather organised in learning logs<br><br>The second is building Unsys (<a href="https://github.com/dncolomer/unsys)">https://github.com/dncolomer/unsys)</a> which still needs a major refactoring. It started as a QC simulator but I&#39;ll pivot it to an entangling modeling tool<br><br>The third project which is what I&#39;m currently working on is learning QM from scratch by using Wolfram&#39;s model as as a reference<br><br>so I don&#39;t have really specific coding playlists but rather do it on demand as I need it.<br><br>If you are looking for some specific coding idea let me know and I can suggest potential past videos if I have them . For example got some videos coding Grover in Silq: <a href="https://www.youtube.com/watch?v=XsqSwgrpWK0">https://www.youtube.com/watch?v=XsqSwgrpWK0</a> r here ding some coding of a grover&#39;s variant in qiskit: <a href="https://www.youtube.com/watch?v=WjobVigFRsU&amp;t=1155s">https://www.youtube.com/watch?v=WjobVigFRsU&amp;t=1155s</a><br><br>I hope this helps! Also if you wanna connect let me now via daniel@<a href="http://uncertain.systems/">uncertain.systems</a> and I&#39;ll send you an invite to my discord server. A cool community over there ;), @Uncertain Systems thank you!!<br>sorry now im confused i have a question where your programming qc videos start or which playlist is?<br>2)suggestion:i really love your method of learning because you learn what you need at the moment and then you apply it <br>Would be cool a video about your method for the qc field, Added it as a pinned comment ;)
Awesome
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 &quot;look at equation 2&quot; and other times I was thinking &quot;you are doing great keep going&quot;., Thanks for the nice words and the inspiration ;) I am really enjoying the exercise of trying to replicate ur work!
so I asked as I was wondering yesterday what to work on next I basically I this we still had a Twitter and I was like well now I guess I know so basically rot any steam I don't know they say they basically have a paper on quantum search for for a nice for nice processors so basically what this means is they've adapted the Grover's algorithm so it works with with current with current processes and I am extremely interested in knowing and taking a look at how they've done that so and I find this really cool that they're just publishing this like that and they're like you know hey feedback welcome that's perfect I love this I really really love this so let's go let's let's let's go ahead so I mean I don't know I basically downloaded the PDF already if you go to our keys that's just right there for ever to take and so the system taka ko-- Sato su héroe Cunha sorry about my pronunciation and run even matter so and the abstract I mean let's just jump right right into it I mean what I'm gonna do is this seems to be it's 16 pages long and I was just right now quickly scanning it and I think it's really well structured so I probably will allow me to actually jump on different sections right away because I'm liking that already I see circuits and okay that's cool okay interesting rotations that's what I'm gonna be you know a couple of videos not just this once the focus was is okay so and they tried it in the IBM cue okay that's cool that's really cool okay so it's about down here and then okay so this it's not sixteen pages long but like nine and then there's basically a bunch of okay oh there's an appendix multi controls that gates for phase shift operator will probably have to go through that as well at some point okay that's interesting performance the performance are they using density matrix to analyze the performance or what is this that would be awesome okay cool that's really interesting okay nice nice I'm just I'm sorry I didn't I see it's it's it's a seems like they splitting this stuff into smaller steps maybe to reduce the possibility of error I don't know if this gonna be some error correction you need as well interesting okay let's jump right into it then I guess the first sections the first section is probably a bit more a bit more of an introduction the abstract sorry the app strike because noisy Tomita scale quantum machine to cumulate eric whitacre let errors quickly we need new approaches to designing any scope where algorithms and assessing their performance algorithms with characteristics that appear less desirable under ideal such low arises maybe i'll perform their ideal counterparts on existing heart we'll be proposing it okay no Grover's algorithm subdividing the face flip into segments to replace a digital counter and complex face flick decision logic that's interesting so they basically divide the face flip that's happening I guess in amplitude amplification I I'd say I don't think they care so they touch the Oracle I guess they would have to touch the Oracle as well somehow I mean it's part of the circuit we applied this approach to obtaining the best solution to the max card problem see that's interesting so you can I don't remember what I touch that or not but the using Grover's to solve the Mexica problem that's also going to be interesting multi control tough like gates with a residual phase shifts we implemented is algorithm on the IV persistence and succeeded in solving a 5 node max cut problem demonstrating amplification for on for qubits is approach that's called this approach will be useful for any problems that may certain time to reach in quantum advantage okay interesting so I think I think the first part is more of an introduction with the advent of these circuits cross at all proposed quantum volume I've seen that recently from the IBM people as a sort of an indicator of the computing power but I haven't really dived into what disease and how this is measured maybe now it's time to do that that's a reference 3 what is quantum volume maybe I can just go around all these quantum volume quantum volume is a single number metric that can be measured using a concrete protocol on near-term corner computers of modest size the QV method quantifies the largest random quantifies the largest random circuit of equal width and depth that the computer successfully implements okay it's a single memorizing references okay for example generate QV sequences it is well-known that quantum algorithms can be expressed as polynomial size quantum circuits field from two cubed unit irrigates therefore a model circuit consists of the layers of random permutations of the cubed labels followed by random to cubic gates when the circuit our honor the cute design Idol in each layer so what does this mean more precisely kiri circuit with deaf D and with M is a sequence of you get out several gates okay aunty layers each level by x t and acting on it m qubits each layer is specified by choosing a uniformly random permutation of the m cubed indices and sampling each acting on q it's only from the hard measure on SEO I don't know what they're saying in the following example we have six pivots Q 0 Q 1 3 5 7 10 we're going to look at the sub-sites of the fold substance the full set each volume circuit will be depth equal to number of key within the subset each one it's either too early or I'm just so those are lists of lists of cubed subsets to generate QV circuits we generate the quantum volume sequences we start with a small example so it doesn't take too long to run as an example we print the circuit corresponding to the first QV sequence note that the ideal circuit circuits are run on the first and give its where n is the number of qubits in the subset pass the first right okay [Music] okay so those are like random okay simulate the ideal TV circuits the quantum wallet method requires that we know the ideal output of for each circuit so we use the state vector simulator in I had to get the ideal result okay next we load the idea of results into a quantum volume field feeder calculate the heavy outputs to define when a module circuit has been successfully implemented in practice we is the heavy output generation problem the ideological distribution is where this is an observable bit string consider the set of half probabilities here by the arrangement so that ascending the median video output strings that more than two-thirds are heavy as an assertion we bring the heavy output from okay meaning that these outputs are bigger than did median set of probabilities okay example time Q so define the noise model and find a nice model for the simulator simulate decay we are depolarizing our probabilities to the sinner in the you gate we can execute the QB sequences either using a scheme calculate the average gate fidelity I was not expecting this to be so extensively in while we fine cut the cable dev calculate the quantum volume car volume treats the width and depth of a model circuit with equal importance and measures the largest square shape model circuit at Quantico villa can implement successfully on average okay but isn't this not relying on the fact that we can simulate the model circuit is that useful then I mean at some point we won't be able to simulate anymore we're right at the edge already saw or okay okay but I but I get it so quantum volume is is eight that I guess so there's a confidence here so it seems like it's basically generating random like generate sort of model circuits and then compare it's kind of compare the outcome of the processor with the ideal outcome and then you kind of measure and decide with compact with certain confidence whether that circuit is well implemented or not and so there's no error correction needed in this case in this sense right and then that's how you define the quantum volume okay although I'll probably go back to this I'll probably go back to this and I should take a look I'll probably go back to this anyway but let's go ahead so so this is a quantitative indicator the computing power of Konnor processes give you my double every year to be proven through quantum processor performance doesn't mind the relationship between gvu of a processor and the size of the quantum circuit can be performing is essential in determining when a future quantum processor can solve a bigger problem yeah so you know it's a model that we seem to stick to that basically can help us to predict when are we gonna be able to run certain algorithms write certain circuits after time of the relationship in the classical and corner computers increasing there okay the honest mass spec we've described the following iterations paper okay so far as all instruction replacing the combination of the digital accumulator plus the binary this I don't know what why what is this focusing on the algorithm aspect we describe the following contributions in this paper number one replacing the combination of the digital accumulator was the binary 0 or pi faithfully a binary sleep face sleep with a subdivided Oracle phase okay so it's replacing the combination of digital accumulator plus the binary Facebook with a so divided Oracle face and two traditional method for an end control TOEFL gates suitable for processes with low connectivity yeah that's another thing right so how the queues are connected and what are the gates the what are the wires or the QC you can actually connect with control nodes that definitely limits you so far if you're always doing instead of in the I in an ideal world scenario with a simulator but that's definitely a problem with existing hardware as an application on the first technique we present an implementation for the max cut problem that's cool the second technique addresses a fundamental need and may become an essential component of many algorithms yeah I mean it's like tough like it suitable for Priscilla yeah the low connectivity thing it's a point is approaches we have attempted to clarify the way you should between Grover's algorithm and QV okay as a preliminary step we design an algorithm to obtain an exact solution in the max cap problem in this section when the input length exceeds 4 through the total number of control not gates exceeds 100 and press and press the quantum processes cannot obtain a useful answer to many miniaturize the algorithm as much as possible we reduce the weight of the control not gates used in the diffusion operator and adapted the phase information fragmentation if the Oracle although this makes it possible to realize smaller so how did it face information fragmentation in the Oracle [Music] it's loud I mean okay it's pretty loud here you I hope I hope you don't hear that because I'm tweaking with a microphone stuff like it's that's making me a big I feel I'm in a rush but this is also because of the excitement because I feel that's the type of stuff that I that I like doing the most I know this makes muscles were a small acronym circuit than the above algorithm it is not possible to transform a given problem into decision problem so we cannot call our social epic complete the correctness of the solution obtained depends on the average degree of the graph okay okay I mean this is this is okay so background maybe I'll just keep do that here's more about where this is been executed and what are the outcomes I mean we'll come to these either either this there's a conclusion section or we'll come back to this to see to kind of go through the numbers I'm just interested in the on the actual algorithm design so kerbals algorithm is a quantum circuit to find the index of a target element given F and Y square root and operations with a high probability where n is the number of qubits and n equals to the power of n is the size of the least the feature of this algorithm is that even if the database is disordered the square root acceleration is guaranteed with respect to the classical search so use the procedure initialize we know that initialize prepare the initial step zeroes and apply harm or gates the great superposition then we've got the Oracle to invert the sign of the target elements and here the exactly element or elements here F of F FX equals 1 if X is the target element otherwise 0 diffusion apply the division operator to amplify the probability amplitudes of the target elements we also covered that in my Grover series this is more of a mathematical way of seeing it here the control X and H is the note and controlled X K and H to the target key weeds corresponds to the gates for visualization diffusion is okay I mean I've seen that expression okay so this this was about of this was a bunch of well this was a bunch of yeah I mean Craig does it like that but at the end at the end of the day these are these are all like harm Arts I mean that's that's a way to implement it so Craig get this faster what am i doing and then was it no was I think was I think I think it can't stay like this I don't know so this is the decision operator and I guess this would hear that may mean by harm arts okay you gotta correct you've gotta add a layer of X's you're gonna correct that because here we're starting with like a we were starting with us with a dot superposition but usually usually the algorithm starts with like simply this the the superposition so then you gotta correct with like X gates around these and you probably get a lot more but this is what this is saying right Sahara Mars that then a layer of X gates then what is these [Music] control X to denote the m control X get an H so where is this and agencies know the end control XK then a do the I don't understand that the way the sentence is an H to the target give it off [Music] corresponds to the case for initialization okay we'll see anyway but let's that's a the iteration repeat O&D the optimal number of iterations is this when the number of the target is 1 says okay measurements mention all the kiddies to read the target data yeah that's proposed algorithm so the general circuit for Grover's algorithm criticisms date of data space in Oracle working space first initialize all data queries and rigorous operator okay alright that's the serial number to one that's a general circuit okay the maxcut problem let's recap that as well so as the crafty mac scott is the graph theory problem of finding that maxim kind of given graph the given graph max could be considered to be a vertex coloring problem using two colors that involves filling in some of the vertices with one color and the rest of the vertices with another color okay coloring problem using two colors then we count the edges that exist between vertices of different colors as if they were cut to solve this puzzle we need to find a coloring combination which contains the highest number of edges connecting different color vertices on a general graph Michael Scott is known to be an np-hard class problem in recent years these devices can they can perform computation let's have appeared although the scale and accuracy are various physical systems his I used it mister at the early current quantum processor sorry I missed I miss the title okay so here to talk about the current processes and you've got like okay some of the connectivity examples of the IBM processors okay and you see you you can do like to gate to keep it gates on keys are not connected I think that's the idea right [Music] quantum volume I mean I'll go through that okay so I'm just going straight for the first video just what I try to cover as much responsible at the high level and I'll go back to the details of the quantum volume and all this kind of stuff later for sure so now I'm interested in how do do they really want to use Grover's algorithm to solve the maxcut problem in the first place that's here the technicalities are the processes so we proposed Grover's algorithm for solving the mascot problem of a given graph the following simple coloring approach is an exhaustive classical search step one color all the vertices black or white condemn of edges with different color vertices at both ends color the vertices with a different pattern from the existing one and return to step two okay so you're basically they're basically gonna just what search through the possible solutions I guess that's what so you've got so what they're saying here is that the way you transferred the problem is you you do this with the vertex coloring so you what was that [Music] Collinson fulfilling some of the vertices with one color and the rest of the vertices with another color then we count the edges that exist between okay so the color represents the two cutting slits you're counting the okay so and then and then you do that you basically generate all the possible combinations of you know colored vertices and so you're also you also also kind of counting them and then color the vertices with different step with different pattern go back to step two and then after testing all possible coloring products the parent with the largest number of I just counted corresponds to the max cut we can apply it we can apply girls are written by assigning black to zero and white to one so those are two colors this procedure to illustrate this correspondence we show a simple example using a star graph k12 in the figure for the max cut problem was they were super four okay yeah so you color the vertices and then you're counting the edges that have different colors at the end so this would be one two three edges we find Mike Scott will find max cut 0 0 0 1 0 or 1 0 1 by counting the cases where the state's wait a second but how is the solution carriages I know okay so that's okay so so each of this okay okay so it's a three-edged it's a three vertices graph and you see these three times that's okay let's be confusing so it sits here of an example where you actually get the max card here you have another example with the cottage is just one and you have an example the cottage is equal zero okay so I need to keep it represents what word is the example zero one zero so that would be 0 1 0 or 1 0 1 are basically solutions for this okay the mark Scott for graph with images and inverses can be found by the following procedure I set the threshold value T lower equal than M twice all n qubits to a to the plus state flip the sign of the input where the number of edges to be cat exceeds yeah that's what the Oracle is doing flip the sign of the input where the number of edges to be cut exceeds T amplify the probability of any input whose sine is inverted repeat steps 1 3 times step 5 you Christy if the output is legal for the graph okay decrease it if the output is illegal if the turns to a value taken in a prior tration then you got a max cut okay and the algorithm is otherwise the procedure otherwise the process returns to step 1 so basically okay so basically this is like yeah so M is then the max amount of edges so you're never gonna get more than that definitely and so you're setting at T at some point that you're okay so you must have an Oracle that basically flips the sign where basically if you count the number of once sorry number of the number of of different you ever wait a second how are you gonna count how are you gonna count that I'm curious if you're just encoding [Music] I'm assuming that the order of the kibbutz martyr in the sense that they mean that they have an edge you know or not know maybe let's let's see how do you do that okay I don't know how are they gonna count that how how is the house the Oracle gotta be one minute so okay let's go ahead number of iterations can be optimized by the quantum counting algorithm in addition what is the county quite a counting algorithm okay I don't know I'm gonna go out back up again in addition if an excessively low value T sets I said the sign of the majority of inputs is inverted the probability of the input with a sign not inverted is amplified since the binary tree search can be done by appropriately crazing and decreasing T we can get accurate my Scott by okay the monster straight far away to implement an Oracle for counting the most straightforward way to implement an Oracle for accounting problem is by using a binary accumulator register the Oracle we described the Oracles construction below okay we discussed how to apply the above procedure when given a start graph first we prepare five data cubes to describe the state of notes Starcraft's so okay okay so there is a researcher in that the type of graph that's used when there is a match okay first we prefer five data qubits to describe the state of notes when there is an edge between node a and B as a cat checker for each edge we use the following SAP Oracle okay so the the Oracle the SAP Oracle is going to basically encode the graph itself sorry I gotta fix the mic for a sec make for a second so I just jumped here where was I sorry I had a move around okay so [Music] oh oh oh sub s a B which basically it turns sorry to that okay so the node a and B stay the same and then this basically I don't know let's see here s is an accumulator register okay so this is an accumulator register large enough to store the number of cut edges okay so you're basically saying that Oracle the only thing it does is kind of decide whether there's it's deciding whether there's a cat or not so basically saying with the whether the the two cubits have separate values right like I have different values sorry 0 1 1 0 and that is if I go down here is where I was now personal preservation of SAP Oracle circuit with kak decomposition I mean that's so what this is saying is let's try to so there's some kind of rotation here so let's just say clean all and half basically X control Z so they do it this way right what harm are what am i doing how do I control Z hot apart so and so this is supposed to do what but where's the counting where is the counting cap so [Music] that might not be as a be a piece of got to righteousness over the NBA of Oracle's are due to the framework cousin we need to execute Lee when this that is not zero PI the SAP Oracle consistent foreign gate sequence it is the current IBM q processes within the framework of chasm we need to control X gates single qubit gates to execute one controlled rotation here the error values on single qubit gates are so there's a KK the composition okay we'll have to take a look at that as well but still proximation that's the approximation that's the ideal circuit I guess okay but here I'm missing something I mean that's not that's not the SAP Oracle or at least cuz it's it's right there's like a prime here optimal subdivided phase that's something else I I just okay Oracle circuit using subdivided phases I was confusing a circuit for these and I thought ah this is it okay I'm stupid I'm stupid that's what happens when you try to go too fast so you've got three qubits and then this is your counting register you have like the incremental thing in here so it's literally control knot and then you've got like a pink increment gate but how does this increment work I guess I guess you would do something like that is this what the increment gate does [Music] start Graff Oracle's circuit designs after the exception of always for all I just we set the speciality okay we know this phase shift appendix a phase shift data accumulator I don't know but I'm not interested in this yet I'm interested just the SAP Oracle so if this is so how would you learn if this is e each node number denotes the corresponding data key we'd be if the state of the q10 be are different the kippler register becomes itself plus plus one okay and so they're gonna be different because that's a cooler to an XOR if this is one right so if you've got 0 0 basically nothing's gonna happen if you've got like 1 1 then it's also things have 0 1 then it's activated by 1 0 that is going to be activated so that's what you okay and then here and then you aren't doing yeah so basically [Music] basically if you measure I mean if you just measure here and you do that then it's on now it's off now it's on right so if you if we take a look at chance display and we basically turn that into super position that we see that the this only these two values have the little askew like the cubed that's on the left side one because they have the other two qubits are different and here is one once it's zero and here is each one so that works as well okay and that's the plus one the plus one gate okay so far so good that's a SAP Oracle I'll never probably save that but see up my dad so far as SAP Oracle so let me tell grant with the timing so I'm seeing a pretty much gonna either stop now or I just wanted to basically take a look at the rest of the structure but okay so we got to the SAP Oracle basically the counting mechanism and that is you know if we pack that into one thing into one gate that's what's gonna kind of encode basically okay tell us what it is whether there's a cat or not between these two qubits but basically we're free employment that I guess you know if you've got more more qubits in here which are the keys were testing or checking for a cat it's our choice and that's how you are gonna encode the graph in your circuit I I'd assume it's kind of hard coded there so complete circle rotation so we can't okay see is that the approximated cover search for Mac Scott so what is these this is a basic I don't know accumulator this kind of flag data complete circuit rotation and a participated group research for Oracle circuit using some subdivided phases as the next interesting part so how are how what is what do they mean by subdivided phases is that that we're putting those phase rotations different different spots then can I could peeling them together somehow I don't know introduction of virtual vertex this is what I was trying to okay so this is already kind of more the actual prediction for the IBM q thing controlled controlled IX interesting interesting what is okay so this I'm kind of like you get introduced I don't know okay and and then so this is a is the implementation of the Oracle okay and so that's the whole Oracle in here and then you've got the position of the fusion operator that's gonna be also really interesting yeah that's definitely gonna be cool yes a team for the next video I mean I'll try to I'll try to get the next one tomorrow as always this is really really interesting to see and go through papers that actually have and go through that challenge of of basically designing an algorithm that's specifically supported by the the machines or the the hardware that we that we nowadays have available and I think the things we might learn out of that are techniques that that will definitely be helpful for for for other design challenges or all designing other other algorithms oh god it's loud here okay cool perfect yeah I hope this video is not too messy kind of recording on the way I'm sort of traveling and I just I just definitely want to do that so pretty cool pretty cool stuff so we got we got we got here cool
Quantum Intuition you beautiful man... you know I love Grover’s!!!!!, Non computer related! I’m glad there people in the internet using there intuition at such a high level!
Humm🤔. Interesting paper👀. Cool, thanks👍., Perfect👍. Excited to see the result🤓., Will try to reproduce the results, I&#39;m gonna go through all of it in a series of videos in the next days ;)
so what I uh wanted to do today is do a recap on the the stuff with position and momentum uh spaces or uh 2K so just because uh again it's one of these things where I just believe it's explained too carelessly and it's just difficult to understand from first principles if I try to recap what I uh discovered last time uh or or the way that I was kind of the way that I found a good connection to is basically saying hey you know um I know what actually we should do GPD shot chat I I I did ask this I did ask the uh the chat about these and it actually it actually told me uh I couldn't do with Google it actually told me the thing with the Fourier transform I will I want to ask why then for example right uh done so um How do you transform from position space to amount of space it's almost like so the transform position space on the space you can use the free transform it's cool it's methodical pressure can be useful in many applications quantum mechanics and Signal processing to perform the fridge and so we will need a specific formula it depends on the type of function you're transforming there are many areas is available uh that's cool about why why three transform let's see what happens let's see what they are what it answers foreign to present the function in a different basis in position space if I can is typically represented as a function of position f x however in Windows space the same function is represented as a function of momentum such as FP the frequency form allows us to easily switch between these I understand but I am not sure I understand why specifically the Fourier transform foreign it's funny because it's funny that it even doesn't that even even it even this thing doesn't kind of tell you or or it gives you like a a meaningful answer right um what I got to what I got to was basically if I remember well because momentum uh because momentum is proportional to the uh was it to the amplitude or to the I think it was uh wave function momentum uh proportional to amplitude was it the amplitude I think it was um the energy [Music] cell momentum momentum momentum momentum all the wave function foreign [Music] that's not what I'm looking for um oh it was the expected value yeah something like this uh this format foreign about all these is is it's just hard to keep sort of meaningful definitions of all these Concepts or or definitions that like because there would be more abstract right uh than just say classical mechanics so what am I looking for I'm looking for I'm looking for uh all right nodes and wave functions I'm looking for there was something that I found a place where so basically the momentum is the wavelength now the momentum is inversely proportional to the wavelength boyfriend exactly momentum exactly that's what I meant the Wave It's inversely proportional so in a way it's like the more compact the the wave it is the the more momentum it has that that is the the the brawl however this is pronounced uh hypothesis um exactly so and and this is in a way like knowing these kind of makes it a bit easier uh makes it a bit like uh oh it kind of makes sense that then the Fourier transform kind of works because you want to go to that frequency to the frequency domain because the wavelength is then uh proportional to the frequency right yeah oh they're inversely proportional to each other of course it's it's kind of the same so um so you want to go to the frequency domain to basically get that that is in a way you know that's why these two things kind of makes sense or it's not that makes sense but it explains it's intuitively understandable this way um but because the wavelet instead of so what is a wave the the wave function the wave function is something that when squared when when when you square it it tells you sort of it gives you a probability distribution it tells you the probability of finding a particle in a specific point in space right and this sort of if we just think about one-dimensional space that is just that um that x-axis a momentum wave function would tell you basically square if you squared it would tell you what is the momentum of the particle um yeah what is that what sort of what are the probabilities of the you know what what are the what is the probability distribution of measuring a certain um a certain uh momentum so because if you think classically how would you this is what I was trying to think about first principles how would you go from one to another right so in I mean if you know the position you cannot know the momentum right so but if you so if if you have a sort of if you have a if you have a series of or sort of a a function of what the position is over time then you can calculate the momentum in a you can calculate the momentum essentially right because momentum is then mass times uh mass times velocity so you can calculate the velocity if you know how position is changing so from a wave function perspective uh it's funny that it's it's kind of funny that it is it is possible to just switch from one representation to the other without having the time uh you know the time component of it um you know what I mean like this is just an example of a wave function and it's it's time independent foreign to me it's a bit confusing right it's very interesting you can actually come up with you can actually transform this to to the momentum without kind of without knowing Without Really knowing how the um how is that that position position changing this is this is what kind of bothers me and actually right now a lot where am I where is my thinking going wrong here um should I maybe get too fixed in with the formula of the Fourier transform but there is an integral so but it just um yeah foreign it is kind of in a way fine right because this is basically like saying uh uh you know what is the uh sort of what what was that um man I should I should be able to use rapidly for this a bit of a uh plot python plot of uh plug with like plot a function right sine wave oh actually why am I even Googling that you know what we can just go ahead and try let's see I think I have replied open here so we can open it open it up um and then basically uh because I'm I'm kind of working on uh this Quantum python kitchen sink thing um you know as a as a template uh but what I want to do probably is I want to go to my Rebels and just have like a Quantum mechanic exercises just go to this one right uh because essentially what I want to do is uh a normalization test playground um and I have Ghost Rider so how can I enable Ghostwriter or how can I use Ghostwriter uh uh can I just say uh plot uh can I just say that how do you how can I how can I how can I prompt Ghostwriter or how to prompt uh Ghost Rider in Rapid uh it's activated already for sure complete code explain code from generate code so okay right click generate code I have to print it like this okay okay generally called LLG Okay so plot this sinefx function let's see it's cool because I didn't have to think about any of this stuff and that's just like yeah it is it's just Plumbing man um so essentially essentially the the what I'm saying is basically what I'm trying to say is so uh it makes sense that it's an integral ride uh so uh uh this is just a com a great combination of tools as like what what is the formula of the Fourier transform um it's thinking I'm gonna break the chat line hasn't it shown that hasn't it just why it's not showing plot x y hmm uh uh well well well I thought that would should I have the output thank you console oh sorry it runs because it runs the main program I'm stupid uh so what I should just I should just write this in Main because right is the main commercial figure hmm um my plot is crazy which is a non-weed backhand so which specifically from the comments which is about 4.4 million so um it's different from the function FX and you know I don't know symbol emphasis what is a type of interval transforming an integral transformation with micro operation that takes a function and returns a new function by applying an integral operator in the case of the for instance from the integral period is defined by the formulation above and it Maps the functional form positioning space yeah that kind of doesn't really tell me uh an unrelated question I am trying to plot something using matplot leap and I get this no that's not an error that's not what I'm getting I'm getting this error look at this it is for example I can't before I go before foreign because this works right out of the box in jupyter notebooks right so in order to show figures example you don't even figure uh you can use functions hmm let's see generate code the thing is um I don't have it there okay I love to ask ghostwriters some questions as well but let's let's see if that works oh sorry uh I guess I guess um do I have to I don't know if that's yeah I suppose a redundant but who cares yeah I like that because it actually it actually saves it actually saves you the the Googling see if the actual is going to show something in the output look at these that's nice um yeah okay cool I mean if I if I the thing is if I for your transform um so uh what if sign can you even do that foreign I don't think that's plotting the Fourier transform of sine of x is it isn't it exactly the same I think it's the same code is it isn't it yeah it's kind of the same code I can just turn it again it's kind of the same thing uh anyway I mean how I'm gonna plot it right so it's not that I can plot it because it's just well it's another function but uh anyway what I was trying to get at it's basically um where am I trying what what I was trying to do I was trying to understand um yeah so how can how is it possibly have a y function how is it possible that you can calculate the momentum wave function if you don't really have because in classical mechanics you have that um you really need to to have more information it's like how is position evolving so that you can understand the momentum right if you know if if you know a position then you really can't not know the the at the momentum unless you know the velocity uh or something like this right so and to know the velocity you need to know yeah uh uh how do we how do we solve this so essentially uh how do we how do you even derive that right so you have a wave you you and I probably should and just takes me back to the Wikipedia momentum and position space um [Music] because it's telling me the momentum representation of wave function is very close relative installment constant frequency domain It Was Written right there it's like since the quantum kind of particulous frequency proportional to the momentum this kind of particles the sum of its momentum components is equivalent to describing as a sum of frequency components so the Fourier transform this becomes clear when we ask ourselves how we can transform one position to another so um functions okay so suppose we have a three-dimensional wave function in position space um so you can you know I'm always I know I've gone through this like 10 000 times right so we can write these functions as a weighted sum of of an orthonormal basis of orthogo orthogonal basis functions PSI J are yes and this is just the the base is right like that's kind of it's the whatever the position space right or or in the continuous case I mean that's how you get the integral Okay so um so you're saying this function PSI of r PSI of r is essentially what you're saying is is a if an integral so you have PSI k so it's clear that if it's a set of functions PSI k say that the set of eigenfunctions of say as the set of eigenfunctions of the momentum operator the function [Laughter] so the momentum operator and here is this is why this is probably why you can do this right because the momentum operator is where you have the differential of position essentially the momentum operator this is where you have the differential so so that encapsulates that calculation so you're saying you're in a way you're and you're saying that if you apply the momentum operator in position space that gives you the momentum right uh uh so but why are but why are we now using the these as bases uh [Music] or constructing it the function this function holds all the information necessary to reconstruct that is therefore an alternative description of the State sign quantum mechanics the quantum operator is given by these the eigenfunctions of this momentum operator are these ones and these are the eigenvalues that's something else to look at so essentially and we're still a momentum operator is related to the position representation by a Fourier transform uh I mean this is just makes sense as in it's just an outcome right like Okay so this I understand so because you're using these but I'm not I'm not sure why why is this derivation is saying I I have these and I'm gonna express it as the sum of of some kind of basis times the coefficient right yes that's fine but then what is the basis that I'm picking uh why why can I choose whatever basis I'm choosing I'm choosing what am I choosing uh I'm choosing a basis which is the the momentum operator basis and why am I doing that why am I doing that so this is then the wave functioning momentum upper in momentum space foreign function momentum space right it can be expressed as a way that some overthrownal bases uh and then we say well if if the position operator is basically that that you know the yeah the the the Delta not Delta sort of the differential of of momentum I'm I'm not I'm stuck at like why why can we assume that if I'm using these bases what I get here is the wave function of position um all right what is the meaning of what is the meaning of the eigen functions of the momentum operator okay so that's a good question what is the meaning what is the meaning of the eigenfunctions of momentum operator so a momentum operator is an operator that tells you that if you apply to a wave function then it will give you the momentum so the eigen functions of the momentum operator are basically those are these wave functions that will basically the momentum operator will just scale them so you know what I mean like this is where I'm currently currently struggling a little bit can I see here how long is the recording been running not much right oh yeah yeah very nice so um why why like why do I why can I just assume that that PSI of r I I I understand I'm following the concept I I can I can pick a basis but why am I why is that true right that you can write it as this integral the position operator what are the what does that so what is the meaning of the eigen functions uh off the position operator okay so that well yeah they represent possible positions okay yeah that kind of okay yeah yeah yeah yeah okay that makes sense in quantum mechanics the eigenfunctions of a position there are functions that represent possible positions of vertical assumptions also known as position wave functions or position states of course of course yeah that kind of makes sense um so essentially what you're saying is that Okay so if these are the eigenfunctions right so you're taking the eigen functions of uh eigenfunctions of the position operator so these are all the possible position so these are all the possible uh all the possible positions so you're saying that the the the momentum thing is the same as integrating over all the possible positions times what times the the wave function of position that's what that's what I'm not so foreign why can you why can you say that but you're integrating over R so you're integrating over so you're taking so essentially you're doing a product of Wi-Fi functions right so you're multiplying the wave function function of position by the position itself by one possible position and then you're doing this through all the possible positions that it has and uh and then you're integrating I don't I I still I'm struggling to understand the meaning of like you know to understand why this makes sense you're integrating so this is basically design functions are can be expressed yeah so these are these things right uh okay all right in momentum space this is where some of our functions these orthogonal functions these orthogonal functions [Music] why why do these eigenfunctions of the momentum operator okay so the eigenfunctions of the moment the eigen functions of this multiple Predator they have like a they have a momentum component in it because we're defining the we're defining the position I mean because the position and the momentum [Music] because in momentum space the position is basically defined like these so ah so essentially we're saying this this is kind of the case that's what we want to convert we want to go from one space to another we we want to we want to basically Express one function using another as component so we're just saying the eigenfunctions of these position operator uh foreign we're saying if we take the wave function of position and we multiplied by we we multiplied by uh each of the wave functions each of the eigenfunctions of the position of the position operator how is that intuitively giving you how is the integration of these intuitively or the sum of these even if you just think in the discrete case how's the sum of this even intuitively giving you the wave function uh of momentum I feel this is kind of one of the things I'm so often stuck with this that I just don't know uh uh it's probably the 10th 10th video that I you know or your 20th video that I'm doing about this and I I'm still stuck with that uh uh the rmp operator unit hardly equivalent with the unitary operator being given exclusively reference or namely a quarter cycle rotation face space [Music] in in physical language P acting on momentum space wave functions is the same as R acting on position space wave functions the the whole thing with the first transform helped to understand like it just helped to understand you just helped me to understand the thing that is proportional to the frequency that kind of justifies a bit why is it for a transform I just done I'm just tacked with with why why you can why you can't even Define it like this we have a we can write this function as a weighted sum of of orthogonal basis functions that's true but why is then this coefficient the you know the Y function of momentum and in this case wise is a wave function of position you take a basis that is basically the basis of the eigenfunctions of the position operator are all the possible positions that these wave function can take why is it obvious that if you integrate over these possible position functions times the wave function that this gives you the momentum wave function the positive momentums maybe because I don't understand I don't understand sort of what are the semantics of these or maybe I don't understand what the meaning of the product of the wave function of position times the eigenfunctions of position operator um so it contains the information yeah yes yes of course the information right like I mean it's what it's it's these are sort of the coefficients in a way it's just you're saying if I have eigenfunctions of if I have all the possible position elements and then I have whatever coefficient is in there then this coefficient it contains all the information about the position so I can just call it the position wave function I guess that is I guess that's the rational right so you're saying it's a bit what's saying here um it's clear that if we specify this as Diagon function of mental operator then then this this element holds all the information necessary to reconstruct that it's it holds all the information necessary as in like it holds all the information necessary maybe that's it maybe that's it it's just it this is just because you you pick the momentum basically you pick the momentum um eigenbases so essentially these coefficients hold all the information they hold all the information about put the momentum of that particle so you just add them up that's why you have an integral I'm not comfortable I'm not crazy comfortable with the notation of these though because because here's like yeah these are coefficients so this set of coefficients it's the sum of individual values I guess this is just notation because this is is the continuous case so you have that wave function that has all the uh that has all the information and then the the um the eigenfunctions of these are basically why is this just also one element so these are these are the eigenfunctions which depend on K it's a function of K with a function of b as well I guess so that would be my I guess that that is maybe the next little piece of detail is how to understand how to calculate eigenfunctions of of an of the position operator right so how to calculate the eigen functions after position operator how do you calculate these things right what does gbd say how can I calculate position operator you will need to use the Schrodinger equation which is the fundamental equation and do I oh okay yeah so it I mean position operator eigenfunctions maybe that's what I need to understand next how how do these things come to us so how do I find these things but yeah yeah kind of I think I think I got it I think it's fine I think I'm fine with these it's basically what you're saying is and then it's just a wave it it turns out because this e this this exponential thing pops up here as the eigen functions right is this is just because that's the relationship between um between position and momentum right that relationship is defined by it's still a bit shocking it's still a bit shocking that you can do these well of course you can do that in the classical case as well you just do the the you don't need to have you don't need to have multiple um you know you don't need to have the data about the position you just if you have an ex yeah but that's what I mean if you have an expression of position but if you have a function over time you can derive that and then the derivation gives you the velocity but that's not what you have to believe just if you just have because I also understand the wave function right if it's time independent it's like the wave function is the equivalent as knowing a piece is is equivalent to knowing a value of x like a value of position it's just that in this case you just have a probability of positions the squared version of it um but maybe not exactly like these right so uh you have the wave function of position and you can know the wave function of of momentum just because what you're saying is I can express position as a combination of any any basis right functions and so that's yeah I don't know I think I understand but I'm feeling still a bit uncomfortable as in like why is that even why is that even possible I might ask Twitter I think that's a good question for Twitter maybe there's just some I feel there's some basic misunderstanding in terms of what the wave function yes I said like the equivalent in classical uh anyway that was good I think I I feel like I've done a little step forward at least
Pin
🎉^3,. Bc ffhh hi top ugycexegesis c what no hey I cut my arms off hey I’m not I told you aren’t you’re a good person Heather to me OK don’t yeah I might you hurt my feelings Anna ha ha ha do you knock it off OK wet wet if I was you to brush your teeth as we can do what if our disabled and you didn’t know what does that have to do with anything but my feelings could get it. Anybody can get their feelings hurt <a href="https://www.youtube.com/watch?v=Y3QACJ2ve4U&amp;t=2m13s">2:13</a>
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 what are we doing today it's time for turn the qubits off second episode it's this time its duty with initial misdeeds I hope impressing your surname correct correctly initially is basically a quantum enthusiast and it's actually also one of the people behind community she's gonna tell us more about these at the end of the episode but basically go check her out she's got also a YouTube channel with with a couple of videos actually about quantum computing so quanta machine learning quantum teleportation quantum vector machines and yeah just support the guy I mean definitely community seems to be something really really interesting it's about it's about like you know quantum computing education its student-led I mean initially will tell you guys more about these so just I want I won't bother you too much with these right now go ahead and take a look at how Anisha does or did with the challenge yeah and enjoy inside the video okay so the goal today is to turn these three cubits off in a quark circuit this is my first time using quark so I'm gonna have to try it out as I go but I could probably do this based upon what I already know off of some of these gates okay so these three qubits are all in a 50/50 state right now and we don't know if they're offer on which we can try to guess based upon the gates we can start with the probes right here these are the controls in the anti controls I don't really know these two we can just try them okay that turned these to off just turn this one off okay so it either turns this or these two off doesn't turn all three of them off okay we could try applying some other gates to it see see gate how to our gate okay it's not really doing anything with any of these other gates okay we could probably just try we could all since they're in a 50/50 state if we apply a second how to Mar to it that should turn it off okay yeah that worked due to these bottom two it's also not working okay so we know this is already off we can keep that there so these two are either an off or non state if they're in an on state the Zee gate should turn them off okay the zi8 did not do anything there so they're definitely in an off state which we can do a control not gate to see if that'll turn them off this is the control okay this is a control not gate awesome that turned this one off this one should be off as well off as well so we can try to apply another control not gate there that didn't do anything remove that so this is just in a normal 50/50 state try not to Z gate the Y gate not doing anything the Hadamard okay yeah so ii happened how do out here turn that off just like it did up here and that's it the circuit might be able to be more efficient it's only three cubits and they're both in a 50/50 state probably do it in two blocks but this worked hi I'm Annie sha Musti and I am a quantum developer I'm also the CEO and co-founder and organization called community community teaches quantum computing at a pre university level so anyone in high school or above but a lot of our programs are open to people of all ages so long as they're willing to learn quantum computing we host workshops hackathons and classes and we make sure that we were bringing in top professionals in the field to eat each and every one of them to give the best learning experience our goal overall is to make sure that each young individual has the resources to learn quantum computing on their own and we give them the community in the to back them up you can check us out at community tech and all of our events are free so make sure to sign up for them yourselves or tell someone who you think wants to learn about quantum community about it right I hope you liked it we enjoyed it too basically check her out check Anisha out her YouTube channel is in here check the community page as well quantum education really interesting stuff and everything else that she's involved in by the way actually I realized that she's using just playing around with the pot selection just for those who don't know the post-election stuff in here that's full quick full version query by the way it's something that it's a it's worth taking a look they are not supposed to be used in the challenge by the way as a solution they basically turned the staff off right so the only thing they allow you to I will check what states are part of the eve of the final distribution because if I just give you the chances of being on from each single from inst isolated cubed you don't really know if there's a superposition right for example and so with these you can check like if I if I will prepare if I want to prepare like the plants Plaza for position with these I can check okay is zero zero in there right now it tells me that if I post a like four zero zero it's gonna meet seventy five percent of the state it means that 25% of the times zero zero is the answer and so that's kind of useful to try to reverse engineer be like what's the distribution behind the especially if you don't have all the other stuff that all the other bells and whistles that come with the full blown version of work having said that I hope you enjoyed the episode and stay tuned for the next one we're having a really special guest we're having me how stay away from musty thoughts I hope you'll enjoy the record as well so stay tuned
She made her puzzle look easy.
Awesome
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
so I got bad news for you which is a couple minutes into this video I realized I was recording a tab on my browser in my host system and not the actual entire screen so you bet so kind of I will just go through these on you missed it anyway I'm not gonna repeat that because it's you know it's not the point of these videos but I basically just went through the basics here of how to create a circular tikrit I don't really kind of I understand the concepts of great schedule moments operations etc but I don't really quite understand why the Greek cubits why this is relevant and why why does this problem have a natural structure on a greed because so basically I in in in here when I basically go through these you know here you're creating the cubits in a great shape so you have you know QB 0 0 Q 0 1 Q 0 2 and then we are appending hotter more gates in the cubits that have like the column and the row some even a harm our gate and for the ones that have like an odd and it's the ex gate so it looks like that so you still have a circuit but you're kind of labeling the cubits like if they were placed on a greet and I don't know why this is relevant I'm I was kind of thinking now that maybe this has to do with the fact that this is the way they are laid out in a cheap I don't know but let's go ahead so this is where and there I was just going through that I realized that I was not that there was not really recording so sorry for that but it's good I that I caught it so that I spotted this good so one one thing to notice here this is the gate okay so these common gates one common confusion - what is the difference between a gate class and again object the gate object are transformed into operations technically gate operation via either the method on QBR ok so here I apply single qubit gates on a similar pattern applies for multiple qubit gates with the sequence activities as parameters [Music] another thing to notice about the above circuit is that the gates from both the append instructions appear on the same vertical line gates appearing in the same vertical line considered a moment we can modify this by changing the insert strategy of the append method in sa' strategy describe how you insert insertions are placed yeah okay okay so you can basically change the way this cuz then these two moments okay so how do you do that that by changing it like this so you add the strategy in here so if I if we but can I can I apply that can I apply that consecutive thing here or am I just gonna mess the whole thing up no okay why it's a pending but it's a new circuit okay I'm creating a new circuit yeah okay so it's not that I'm very using yeah okay yeah makes sense new then in line so that's the harm arcades following earlier strategy and then Newton in line whatever that means okay so now it has so now if I do these Shaka foreign okay now you've got two moments from the one whereas if I did these can I add an in-between step in here oh uh okay no but I can do that second okay do that here and he just had one moment and you have two moments okay good next step is creating the anzats if you look closely at the circuit creation code above we'll see that yep that we applied the append method tuple as a generator and at least recall that python one can use generator comprehensions in method calls inspecting the code for append one sees that the append method generally takes a knob tree for a moment or or a moment what is a knob tree it is not a class but a contri Rosalia knob trees anything that can be flattened perhaps recursively into a list of operations or into a single operation examples of an op tree are okay I don't know whether those technicalities are relevant or not this last case yields a nice pattern for defining sub circuits or layers define a function that takes in the relevant parameters and then yields the operation for the sub circuit and then these can be appended to the circuit I'm not familiar with Python so I would probably need to kind of catch up on those topics but it just turns out to be I guess sort of a a nice to have think from a language or syntax perspective that okay that basically the way I defined a function it yields something so you can use that yield as you can then use that function as part of your append call here so it's it's a nice way to reuse it's a nice way to reuse portions of your circuit I would say so if I copy all that in here and I run it then you get that circuit okay so what does this do is Sirk expurgate so that's this X that's this X gate with power and I think that has I think that's sort of a rotation on the x-axis seems like and then this is a rotation so then basically for I and J in lens yield dot or yield that operation sort of the rot the rotation applied to these cubed the rotation is being defined here and so then you call a pendent rod X layer two and then this is the half turn so this is basically the exponent okay so you know another important console here is that the rotation get is specified in half turns for rotation about X this is the gate okay in half so that's your 5/2 kind of thing so that's your okay so that's how you specified it's the angle that you put in here divided by 2 that is it radians or there's a lot of freedom defining a variational anzats here we'll do a variation on a qq8 or a strategy and define an answers related to the problem we're trying to solve which I kind of forgot what was that I think asked that to do with a particular energy of something oh yeah this to the Ising model with transverse field Isaac there's a link to it let's take a look at this so we're now gonna create an answer and I don't know what it means that we will do a variation on a QA or a strategy I think I've read that paper or not no I haven't read that paper but this is probably what is this based on right is there a circuit or something I have a great time max car a brand of the our tourism ah there's no circuit okay so this means that we'll have to actually read for comunitaria vision problems the algorithm depends on the integer key the quality of the approximation and press P is increased the quantum circuit that implements the algorithm consists of interrogators localities at most local to the other objective function if P grows with the input size of different strategies proposed we study the algorithm as applied to max card on regular graphs and analyze the performance on to regular and three regular graphs for fix P isn't this the same thing that I checked where's like Java circuit it's just for the design for the graph for the mascot problem where you have a circuit and then kind of you're connecting the qubits that represent edges that are actually connected and stuff like that maybe in a spin glass with izing speeds the problem of computing the magnetic partition function and if an electron State our study okay transverse so first we need to choose I mean I I probably have to dive into this maybe maybe I just I just wanted to go I just want to go a bit through with that even if I don't understand everything first and then dive into the actual problem links it's not smart but anyway another important concept here is that the rotation gate is specified in half turns for a rotation about X this is the gate okay I read that so first we need to choose how the instances of the problem are represented these are about the values J and H in the Hamiltonian definition will represent these as two-dimensional arrays lists of lists for J will use to such lease one for the Rowling's and one for the comics here's the code that we can use to generate random problem instances so this is supposed to come here where the actual values will be different for individual run because they are using random choice given this definition of the problem instance we can now introduce our answers our answers will consist of one step of a circuit made up of okay these I probably wanna so this is the this is basically how to represent instances of the problem and then the definition of the problem instance we can answer these our answers our answers will consist of one step of a circuit made up of apply X power gate for the same parameter for all qubits this is the method we have written both apply a power gate for the same parameter for all Q is where the transverse field two term H s plus one so your flagging those for some reason then apply a seasoned power gate for the same parameter between all qubits where the coupling field term J is plus one if the field is minus one applies easy pocket conjugated by ex gates on all qED's so here you have an example so this seems to basically be pretty similar to pretty similar to the max cat approach but I'd have to recap that so where the circuit is like you design a circuit you design an answer in this case that that kind of represents it's a model of your problem and now so if I do this it's for going to look slightly different but if I do that here run yeah it's slightly different and then because of the run the use of random and then defined defined rods at layer and then this is the layer for the control sets okay but I kind of like the way this works in terms of you define kind of sub circuits and then you can simply compose them all into one thing so you and what happens in here is okay so your stamp so you're basically creating an instance here you're creating an instance of the problem and then Europe and you're calling one step with that problem instance yeah and that helps you define the circuit and so I forgot the print circuit and if I do that then we're going to see something slightly different looks a bit ugly maybe because of okay that's what are those things are okay so you're behind but I have to dive into this so the next video will be in maybe trying to dive a little bit to this but I feel like I'm gonna get easily lost because that simply it's a representation of the problem it's the same recap what I did with the QA or a for max for the max Cod problem maybe if I take a look at that paper actually and take a look at my own video and then we'll see but basically that's the that's the that's the idea then simulation now let's see how we simulate the circuit responding to creating our answers in circulators I guess in between simulation and run first that's not enough for access stuff which is okay interesting this is also proven to be accessible similar commands have are more prone and allow different forms of simulation when prototyping small circuits so to execute similar methods but one should be worried of relying on them when running against actual hardware yeah currently Sirk's sheets with okay I think I'm gonna I'm gonna actually split that into into more videos because I see this deal ok finding the minimum there's actual permit rise in the ansatz because that's ok because that sort of hard-coded circuit so okay and that you function measurement okay cool let's let's the next video next video is going to be into the simulation part then I'm gonna make another one so I'm gonna try to make I think the next one will be simulation and parameterizing the anzats and then finding the minimum maybe that makes sense and then I'll probably do another video on the specific construction of this circuit but I think that's really just domain-specific but nevertheless I think it's worth worth recapping perfect so I'll just stop the recording now
so let's hope this is working let's hope this is working it's my first live stream in my life so I hope we're not getting into any technical technical problems in here let's see I've got the chat open let me see let me see if I can take a look at the actual is this thing actual actually life I think so should we sure work let me open it up any technical yeah cool so maybe maybe let's yeah cool thank you I see that I see the chat is working as well that's nice thanks everyone who's who's actually joined the livestream I I've got on a secondary screen my my kiss Kate slack and we can also we can also then take a look at the comments there and stuff like that so but also have the the life the YouTube live chat as well which is pretty much real time so as I said in the about 15 minutes ago in the comments I think I think what we call to the sort of to two ways right so on one side basically I'll go through the material myself and then you can follow life and also interact with me alive via the chat via the chat in in YouTube life if you want but we can also then if you if you prefer to do it on your own pace we can also then meet in in about 90 minutes from now and then have a sort of a more Q&A and discussion as well I know Sam did it with zoom which kind of feels like it might be a better space for the discussion in the last 30 minutes but we'll see I wanted to kind of try and see if the Europe life thing would work into one as well so and feedback at the end it's it's always super welcome let me just put this here okay perfect so I'll go and start right away if you've got any questions any comments fulfilling try me I mean the chat is on second I can read that stuff as well and there might be a bit of a delay I think but it shouldn't be much of an issue and I hope you can see my screen as all here's I've got basically three things open up because I thought I would be useful to have keys get open as well just just if there's some circuits that we can you know play with quickly I mean I know it's about kiski and I'll I'm trying to learn kiss kit and see how can I quickly use it as well for these kind of things I'm probably a bit spoiled because in too much used to do queer it right now but that's why I have both opens I can see really how it feels to interact with kiss kit almost like real real time so we'll I'll try to cover will cover the same that Sam deets basically sequence section zero but I'll just go through this fairly quickly because it's most of the first two points is I think installation and stuff like that this is something that I I've gone through myself in the past week it took me a while to actually get Kiske running on Windows because of Python compatibility issues but I managed to do it so should be it should be should be fairly simple and then we'll try to go through section one quantum state Inc and qubits think some they try to cover until one point four we'll see we'll see how far we have how we get there but this is something that I haven't done so I've skimmed through the book when it when it was released and I've come across it a couple of times here in there but it's not I'm doing it first time as well as I'm really curious about this cool so let's go ahead with the with section zero I mean this is an introduction to Python I'm not a bit colder myself I studied computer science and I did do you know my own take of Java C++ and and stuff like that Python I touched a little bit but basically what I rewrite this week this is more of a sort of a a really quick Python introduction in terms of the language and notation concepts like lists the phyto list can contain any mixture of variable types leasts index from zero what else couples how I found this interesting the concept of at Apple in comparison to two lists in the sense that the major difference is that you cannot assert a boy silicon atoms cannot can be change in the list okay but not at Apple so I'm not so sure how - I guess this is useful because you can use tuples as keys for maps as well but we'll see the section it does not relate to do quantum computing in and of itself into key skip match so it's it's hard to see how those things will be useful but it's definitely a good section to have to then come back to when when when you feel that you need it what else was in here so the loop to loop over range of numbers note that these starts at 0 by default and ends at n minus 1 for range and those are sort of details that you you should keep in mind when you're probably coming across problems debugging your code those are typical typical things and if an L if and else statements I mean again feel free to go through this on your own pace I'm mostly gonna skim through these I think numpy is interesting I haven't really used to umpire a lot myself but basically it comes and it basically packs some some of those you know mathematically functions that just come in handy like the signers and stuff like that to some mods ok definition of functions I guess I guess I've always sort of having this issue between you know what's how useful it is to use a programming language to build circuits when you're just playing with it at a really small scale versus like a big scale that's why I have both things opening here and because I personally well it's my thing I personally tend to get stuck too much and on little little code issues but it's just something that I probably can get used to better so what is next we've got the basic key scape okay syntax installation and stuff like that so so now there's something we can we can play with in here so let's go I think I'll just I'll try to make this a little bit bigger so you can see it's better and I'll try to in this section type in rather than just copy taste although it's really tempting but I think that if I want to learn kiss kid I should the actual you know act of typing it definitely helps you get into those things sort of wired to your brain especially if you're not used with with with the language so um the rest of the section is intended for people who already know the phenomenal consequent of competing I can be used for readers who which just keeps try to the latest chapters in which the concerts are put to use um yeah let's go through this I think I'll just quickly skim through this but it's basically the basics of how you draw circuits and stuff like that so if you're not into if you're listening to these and watching this and you're not really familiar with any kind of computing concepts I guess don't worry we'll come into this fairly quickly so let's start by importing these from kiss kit import everything and then the object that the heart kiss get is a quantum circuit so here's how you create one and we'll call it Q C Q C equals quantum another thing that I realized is that I have one of those Dell laptops I have a webcam at the bottom of the screen and that's a really interesting design decision because you can see my giant fingers as I type quantum say okay cool so it's it's currently empty and to make the circuit last trivial we need to define a register of qubits so I get it there's no there's not a lot of background information here and why why you should use registers and whatnot and stuff like that says just so you get the basics of how you use kiski so we'll get to that at some point I hope so you can create a quantum register for an object for example let's define a register consisting of two qubits and call it Q R so Q R 1 register 2 and we'll call it so this needs sort of a a name okay that's its option oh yeah that's optional now we can add it to the circuit using the the add register method and see that it has been added by checking the the key Rex inaudible yeah so so I'll add it to the circuit ID register QR and QC q Rex so that should basically okay so that outputs the register that I have let me see if I can okay I have a couple of too many windows open on my secondary screen so good what else now okay so now let's draw this I've seen that in other videos of people reviewing kiss kit and I found it pretty cool that you can actually you can actually just do this and it prints it like in instead of terminal mode it's pretty cool it gets fancy when you've got all the like fancy circuitry in here but you can basically also do draw what am i doing you see draw output equals MPL and that basically gives it a nice shape that's cool so they are they're ready it's just naming so playing okay so let's go ahead applying gates to make something happen we need to add gates for example let's try the HAR market like the H gate is the heart of our gate and so that's supposed to give us an error yes because it's missing a required positional argument which is probably the QB that we want to apply to yeah to do so it can be individually the type on here addressed us Q R 0 Q 1 so because the cure is the point of resistance so you can basically say or you should probably do something like this and then say we want to apply to the cubit 0 is that what the tutorial says yeah okay so this is just an output that you have to ignore according to the book when the last line does doesn't have an equal sign or okay semicolon then it just outputs what's there we can also add a control now using the CX and then this requires two arguments okay so and then you do it this way so it basically do QC CX quite a lot of concepts introduced in a really short amount of lines so it's definitely gonna be tricky to remember a lot of this stuff so if you do that and then you do QC draw output equals MPL so thanks so breathing reading the chart as well as I can I'm not really good at multitasking I'll do my best thanks for showing the ASCII hack drawing for grownup circuit yeah it's I saw this randomly in one of the one of the video tutorials from sin tax which I found it I found it pretty cool because I mean I I I knew about Kiske before but I really had never played with it and I think it's just nice it's faster to to tie but I guess it can get quite complicated if you have a if you have a big circuit so let's see okay so and that's pretty it's pretty nice um the way this looks like cool now state vector simulator we're now at the stage that we can actually look at an output from the circuit specifically we will use the state vector simulator to see what is happening to the state vector of the two qubits to get this simulator ready to go we use the following line okay that's a more complicated line vector simulator I get back in and now we're gonna do state vector simulator so and so that gets uh that gets us the keys key we use back ends to refer to the things on which quantum programs actually run simulators or real quantum devices to get a job for back in we need to set up the corresponding back in object so the simulator once we want is defined in part of kiski known as our air i are not pronounced by giving the name of the simulator we want to get back in method we get the back in object that we need and so you can also list the possible back ends ok back ends yeah so chasm simulator unitary simulator very interesting all of the similar is our local meaning that they ran on the machine on which kiss kit is installed it's good they've accused using the ammonia machine can be done without signing up to the IBM I don't know if this is supposed to be the IBM kill you the IBM cue signing up to the ok the IBM key user agreement running this simulation is done by kiss Cleese execute command so you basically create a job like this execute QC vectors simulator and so that gives you the job and then you can get the state vector so I guess this is I guess where this is going because I didn't really when I went through this I didn't really go through the actual I didn't actually do the coding parts and I'm now that I'm doing this in a slower space at a slower pace vector and so for amplitude in cat print the amplitude I guess what this is doing yeah so so this is the vector for a Bell State which is what we expect given the circuit exactly that's the one of the simplest ways to create entanglement and I guess for those use to other graphical tools this is the equivalent of I mean those are the amplitudes that you get when you do something like this in quark for example those are those amplitudes so here you've got like 0.7 plus 0 i in this case quark uses i as the imaginary notation but the back whisk is using J I think that's a never-ending discussion between physicists and mathematicians but basically you've got like a 0.7 this is amplitude 0 and 0 and this is again plus 0.7 so yeah I don't know why it doesn't say 0 plus 0 J but I guess it's I think s it's fine so that's that's that's this ok so you can create also while we're having a nice defined state vector we can another feature of kiss Cleo is possible to initialize the circuit with an arbitrary pure state what's that so you create a new quantum circuit and then you initialize it with that state ok so you're basically doing new Q C equals quantum circuit Q are new Q C initialize kit so what's gonna happen in here ket Q R so cat is our cat is our state vector so actually need the state like they're not the amplitudes you need the actual state vector object and yeah because the amplitudes are just the amplitudes you're not having the phase information in there against new QC and sorry if there's someone who does not really have any basic knowledge of quantum computing in some of those comments make no sense then they'll make in the next and and I guess in the next hour or so and in the next sessions let's go let's go with this one casting complex values to real these two real discards the imaginary part what does this mean that's interesting is it initialize so complex warning I like that complex warning so casting complex values to real discuss the imaginary part yeah okay but this that this did happen when I initialized or so what if I say new QC to new QC - so what if I just okay quantum sir quick circuit QR and now new QC to initialize and I do get QR okay no actually this is but is this a warning I don't know it's a complex or since new QC to draw so okay now I get not no warning that's interesting new QC to draw output equals MPL I mean I'll take that I guess is something to take a look at later as well listen render super nicely all is not as nice as here maybe because of the the screen the viewport size are so if I do a new QC to draw output MPL MPL yay out put NPL yeah doesn't doesn't so okay anyway that was it that was an awkward there was an awkward complex warning um let's move on so I'll note that as question for later classical classical registers in and the chasm simulators and you're both simulation we got I would stay out of state vector that is now we get from a real quantum computer for that for that we need measurement and to handle measurement we need to define where the results will go so the reason this is because it's not maybe maybe it's not the the goal to explain it here but I I think it deserves a mention at least that the reason the reason you can't get the reason you can't get all these state vector data is because I mean you it's it's the ideas that you actually would have to sample that circuit to get the data right like you you can't and you can't simulate it because you can't simulate at some point if you've got like you know a hundred qubits it's just too much information that you can't in your kind of code because you need like two to the power of 100 to actually pieces of information you have to encode so that's that's why you can just take a look at this that's why simulators and little toy tools like this one allow you to take a look at these things and that probably helps you to design or test concepts for your circuits and your algorithms but then when it comes to really scaling it and this is where my my never-ending discussion internal discussion about how much math do you really need to understand quantum computing kicks in because from one side it's like you for toy examples you don't need you can go you probably can go quite I get quite far with just intuition but if you think about scaling an idea to you know 100 cubits or a thousand cubits then you probably need to do actually some some ninja math magic to make sure that that actually works right or a trial and error but it can be maybe not the most efficient thing to do but anyway okay so now we define classical registers this is where we're gonna put our measurements I guess so see R equals classical register to see right not qrok because that's a but that's again that's just a name right and so and then QC at register CR mmm so you got that and what if we now say QC draw so you've got now the to classical cubits here at the bottom classical beats not classical cubits obviously and now you can basically say measure so measure from the register zero to the classical radius zero cubed 0 and from the Kwan raise the one basically then do this the put the measurement in the classical one so let's take a look at this measure measure measure measure QR 0 2 CR 1 and again that might feel like I'm going really slow but it's like for me I'm that's helping me a lot to understand high Valley I see the Commons and Pawan Vinayak Thanks thanks for joining so that's definitely helping me what am i doing necessarily helping me sort of internalize the actual you know how kiss kit actually works because not how it actually works but how it can actually be used so yeah ok so now you've got those lines in here so this means this measurement is gonna go yeah perfect how can i endu that i yeah that doesn't work nice okay so I've messed it up that's an interesting idea so how can I talk I how could I revert that is it possible to revert that like if you add measures if anyone knows let me know because that's not that's now that's now basically messed up so mmm I don't know if I could well I can't just go here and then kind of reacts acute the whole thing right can I just do that run can I just run everything but not not the not where I messed up obviously so this is gonna be one no zero and this is gonna be yeah that's correct now okay now I got it right but I don't know if there's a way you can just maybe it doesn't make any sense from a usability perspective I mean you just rerun your program now because we're doing it interactive it's difficult to correct those things otherwise and what does it look like if I just say QC draw output equals MPL so yeah so now you have a nice diagram in here nice circuit that it looks like exactly like this one that's cool and basically now we can run this on a local simulator whose effect is to emulate a real quantum device for this we need to add another input to the execute function which is the shots and because basically every time we're gonna run the circular gonna get just one of the one of the results so you need to run it many times to get basically a sort of a the statistics of what your or the result would be if you don't provide any shots it gets a default value of 1024 so we're gonna do a mu later and get back hand get back end and this is gonna be the chasm simulator mm-hmm and we're gonna create a job execute QC the emulator and we're gonna emulator and we're gonna say shots 8192 you know I'll see if I can okay maybe cuz I don't know I feel I'm typing at the bottom end of the screen and that's probably not helpful for people we're watching so maybe that's gonna be better and I'm gonna put the quirk actually at the bottom of the screen that should make it easier and now I can get the histogram values okay so the counts job result get counts so again I don't know okay so worried because this is a beat a lot of stuff packed into just some lines so you're getting a back here you're getting a back end you're executing the job and you've got a bunch of things inside the result object so you can get the counts which I get is okay since this is basically a map with how many times you've got these output and how many times you've got these output right and of course you can use that to then create something nice like these but we've seen above you can also get the state vector but again I think you can only get the state vector if you use the state vectors emulator not the custom simulator I guess that's the idea what we can try so what if I say get state vector that's this work at all no that doesn't work so the simulator is not not set up to give you these the chasm simulator right because this this is simulating I think this is probably the idea it's simulating an actual device and so you in theory you wouldn't be able to get those things that type of this type of information in a device so that's you know okay so but if we instead of that we say get counts now we get so if I print OPA what we're doing here if I print these I'm getting that and note that it's slightly different than than what they what you get here so this model has some sort of maybe random resonate like noise model I don't know how you how to call it but it doesn't behave always in a deterministic or in a way that it looks like deterministic so that's that's nice and then so you can okay so you can you for you for you to use France to use plot histogram we need to import that from visualizations okay so from kiss gate import I mean I'll just import everything and then say plot histogram hist and that should give us that nice thing here perfect that's cool hmm okay so for compatible backends we can also ask for and get the ordered list of results so you get the get memory so what if I samples equals job result get memory I cannot get it here oh I have to activate memory true otherwise it doesn't save it okay so if I say shots here and I say memory equals true and I go through all that and now I do this and now I have it so if I print the why it keeps going back to the search if I print the samples that's gonna be a lot of samples though okay yeah that's interesting that's cool I mean I don't know exactly why would this be helpful right now but I'm guess it has its it has a usage at some point so not that the bits are labeled from right to left so the cr0 is the one that's the farthest right yeah I keep having problems with that also when I use query that keep it in here it's so that's q0 and that's basically the one on the rightmost yeah so here they follow the same convention so that's good I mean the reason the reason this is helpful is because you can directly use that as binary binary representations of numbers so this number exactly which is 2 to the power of 7 days yeah so it's it's 8,192 so none of the bits are clear as example of this here's an 8 cubed circuit with the poly X on only the cubed number 7 which has the output stored in the beat number 7 so yeah okay simplified notation so multiple quantum and classical registers can be added to a circuit however if we need no more than one of each then we can use okay so you don't have to specify because up here we're specifying a register then adding the register the quantum circuit and it's a bunch of stuff that it's kind of giving you overhead but if you want to quickly test some things then you can just go ahead and say okay Q C equals quantum circuit circuit 3 and that assumes probably that it's three that it's yeah three cubits and okay you can also do the harder parts like that so you can do it directly on the point on the circuit Harmar and then you specify the cubed and then if you draw it u QC QC draw then you get that okay default names and stuff yeah okay and then the second and here I'm guessing that's gonna be the classical register so so if I if you say QC all use the same QC to one okay so now you've got one classical register here good mmm to see this in action here's the stamp a simple circuit know that when making a measurement we also refer to the beats in the classical register by index yeah so if I now say QC okay let me create from scratch you see quantum circuit 2 1 and now QC h 0 that is the horror Mart then I control X that's what we're doing all the time between 0 controlled on 0 to the QB 1 and then we do a QC measure 1 to 0 so I guess that means to see the classical register and if I now draw it's definitely much easier to draw it like that you don't have to type the yeah so now you got that okay cool custom create custom gates that's interesting because this is one of the things that when I back then when I was using the the online tool the composer I was playing with custom gates and it was really difficult because you couldn't really create a lot of stuff in there it was kind of a lot of the things we're like you know pending or coming soon so but I'm and I'm guessing Kiske becomes a bit bit better equipped with that so as we've seen it is possible to combine different circuits to make bigger ones we can also use a more sophisticated version of these to make custom gates for example here's the circuit that implements a control X between cubed 0 & 2 using qubit want to mediate the process um so you've got that in here and then to instruction okay I think so let's give it a try sub circuit sub circle equals quantum circuit quantum circuit 3 while nicknamed it toggle X toggle CX and then I do sub circuit it's a bunch of control X between 0 and 100 come on between 1 and 2 I probably can just it's quite obvious I haven't been coding for a while so you can now do 0 1 I could have copied the whole thing and 1 2 and now we basically subcircuit we draw it and that should give us this and so now you can okay so you can turn that into a custom gate by by calling the two instruction okay so toggle CX equals sub circle circuit sub circuit circuit to instruction okay interesting and now basically you can append it so you can append it okay so you create a quantum register when register for a new Q's any quantum circuit with this one register in it and now you append it to the quantum circuit toggle CX and you basically have to okay so you've got actually tell tell what qubits from the register I used as inputs to that circuit and now new QC I'm gonna draw it with the MPL because I guess this is MPL mad math plot plot plot leap or something like that I guess that's why it comes from so ooh okay Nick you see a pen so what have I done here wrong what it says name you is not defined oh yeah it's new key see okay so that's all you get alright now it renders better than here cool perfect so accessing a real quantum hardware yeah so this is something that I'm I'm not going to cover now and I'll probably cover in the next session because I haven't been able to to go through these basically so I think the idea here is you can now actually use real quantum hardware so you you basically you have to sign up to the I be able to have an IBM cue account and I have one that is it's pretty pretty crappy and I wanted to kind of have a have a clean start so I'm gonna if you don't mind I'm gonna skip that here and we and I'll try to get this in this in the next session this one interesting thing here if I remember well which is about noise models that I decide oh no I I want to make sure that I don't don't skip but basically you can use real devices the other way was that you can construct a noise model to mimic that the iPhone is extremely cool like when I read that I was like oh I didn't know you could do that with kiss keys so you can basically take a device and kind of copy the properties and create a noise model that mimics that device and and then use it in your emulator so the idea here is that then you you know for testing purposes you can get as close to a real device as possible and that's actually I I think that's really cool because using a real machine it's you know sometimes it might take time cuz you're in the queue and I mean we give you for granted that IBM gives access to all those machines but you know I'm not sure for how long if there's gonna be always for free or and so that it's really helpful the fact that you can simulate the noise the noise in there so it's been already now we're like 40 minutes in so it's been a pretty step-by-step part now that I've actually gone through the coding I I feel it's definitely super intuitive to to build circuits it's so far the level we've been doing it right so you have registers you you make the you make the operations directly on the register on the cue on the registers on the qubits you can initialize stuff in here one thing maybe that I'd say confuse me a bit is I don't see for example I find extremely useful in quark that you can see the phases in this with this circle notation and so you can see this little bar here rotating and intuitively when you work with when you try understand circuits like for example the QFT which I guess we'll get to by session three or so or session four I know because this all the algorithms are parked in here I doubt we can cover all that session in one so I think we'll probably be doing one or two algorithms per session max but once we get to the quantum Fourier transform for example which basically gets into you know into a lot of those rotations I am curious how we're gonna do this with with with kiski because that's not it doesn't help me to build intuition in terms of how is the interference gonna play you know and it's not always about because I can't maybe it's just that I'm missing intuition in terms of mapping those things out to two particular rotations I don't know we'll see but that's one thing that I'm I'm kind of looking forward to see how we deal with it so if if no one else has any questions right now then I'll just quickly skim through the linear algebra part which I did go through us well in preparation for these it's the only this again is the only the the section zero is the only one that I went through in preparation for these and and now we can Chompy the quantum states and q its part as well so I'm not a big fan of mass and I think everyone who if any of you has been watching some of my videos you probably know these it's not that I'm bad at maths it's just I don't feel they are I feel it they bring some some overhead and try and understand some things which could be understood intuitively now you gotta take that with a pinch of salt because basically if what you're doing is proving stuff then you definitely should use mathematics as a formal way and formal language to proving things but the mass that you need master you need for quantum computing I think I think it's you know when you were it's different when you talk about small scale and big scale so for small scale and just the basics right you talk about vectors and vector spaces so I read through these again I'm not gonna read line by line now because I think that's gonna be really heavy and you can do that at your own pace as well maybe you know maybe will not be the full hour and a half we'll see so you have some time to go through these or we get you can do this through the week between now and the next session but I think I think I can maybe give some feedback based on what I remember by after reading these so in overall it's this is really well done so in terms of the other stuff that I've read other tutorials that I've gone through mmm and also what used to be in the IBM key experience before which was a thing a some sort of earlier version of these this is way more mature and I think it's focused to the point to the points that I really needed some vectors and vector spaces here here I think the section introduces the notion of a vector really from scratch for someone who has no idea what a vector is now I of course did some maths myself right I mean like everyone who has done some some formal training and dad or whatever are going to high school I mean you you know I don't know it depends on the country and the education system I don't know when people can introduce the vectors in mathematics but if you haven't seen that I I'd be interested to know what's the experience in trying to understand this but it's vectors vector spaces but you know how do you how do you add vectors how you multiply vectors by its color mattresses in matrix operations I think it's good that the the the section focuses on seeing matrices as sort of rotations or sort of transformations that's something that I first came across when you know back in high school got introduced to the notion of you know 2d and 3d transformations and then you're basically using matrices to encode those transformations and and that kind of made a lot of sense to me so I think this is a really good way way to explain that let me maybe just quickly scan these applying with resident vectors so we manipulate qubits in our quantum computer by applying sequences of quantum gates and it as it turns out it can be expressed as different mattresses that can be applied to a state vector just changing this date so the poly X gate is one example that's used in here I think you know introducing the the notation is also well done and there's some of this stuff in here later on let me see so conjugate transpose again I it's like I started getting into quantum computing about half a year ago and I think those I think notations and concepts like the conjugate transpose hermitian unitary and stuff like they there's a point in time in your learning journey that they they would come up as like maybe now I should really understand that but it's not it didn't feel like something you kind of need every day to get you know ramped up quickly on understanding quantum circuits but you definitely you might need that at some point so I'm not saying that you shouldn't care about this maths you should but it's it's not I don't it's my personal opinion I don't believe it's so critical and core unless you're planning to do some kind of formal research and then you want to prove certain things on papers so I think the session goes through the inverse matrix how to calculate stuff like that and cognitive as much as is really important in quantum computing since most of the mattresses deal with our with our unitary yeah so then you can calculate the inverse by PI by doing the what they was at the inverse okay the conjugate transpose yeah I found this also really interesting the the whole concept of spanning sense linear dependencies and bases but I again it's one it's one thing that I personally think and it's my personal opinion right so everyone who's following this at their own pace will probably see this differently you can yeah you can trust that that this has been well proven and just go on with it in terms of you know basically the whole point of these is how do you define a basis a computational basis and why is that important and what are the properties that that actually help us into you know exploiting the notion of compositional basis in quantum computing linear dependency I wanted to get the inner product that's so I think that it is one of the one of the things that I really liked from oh wait a second you can plot the Bloch vector like oh you can do that wait a second can you draw that's cool plot blah the vector oh nice okay and how can you plot an arrow into this just with a state vector wait a second so is the state vector I had this we had this at some point right get back and get state vector oh yeah but we we must have I think I know that's in ket so I think we didn't overwrite that so if I do plot blah vector let's see if that works no is it that you need some specific format like you just need the coordinates actually so what if I say I don't know zero one zero a yeah okay hmm that's cool that's cool the surface of it not sure for how long I was offline I hope that you guys didn't lose me oh my god yeah it seems like I'm I'm back back at being life I hope so you can plot by adding the values for X Y Zed such as plot blog vector yeah thank you I didn't see that for some reason the thing the whole thing went offline I don't know but I think you you must see me you must be able to see me now already so cool let's go ahead I mean this is something that I will that I'll try to play with as we get into the gates I have to note that I have to basically remember this I miss C so I just want to make sure this is really perfect so thank you for how long was i for how long was I offline I mean I'm sorry for that I didn't see that it didn't even warn me at all or anything so anyway um let's go back to let's go back to these so I can Vic this an eigen values so consider that this is this is also an interesting an interesting section but it doesn't a couple um there's no worries okay thank you cool so okay I feel I got a back up a little bit so we talked about these something to play with as well and then I convert this and eigen values so this is this is a notion this is a notion of because I just plotted blocks here okay so what I was saying just for the people who maybe maybe disconnected and now are back back online I was very I was I basically was on a tangent to you know trying to basically say that the points that are not in the surface of the Bloch sphere they are also somehow Valley States and they pop up when you they pop up when you basically have sort of entangled see entangled states so here you can see that that those points are not touching the surface it's probably difficult to see but that's what I was talking about and that's what I wanted to basically test but it would require me to go and use all the gates that we haven't introduced yet so I'm just I didn't want to do that for those who really because I'm not sure if there's anyone who's just getting into these so the one I didn't want to get too much into that I don't know myself how to do these kind of things in case gates so good I can vectors and eigen values consider relationship of this form now so just to make sure we use the rest of the time to move to to move past the section zero this is a notion that this is a part that it's well introduced in here but I feel that there is missing a bit of misc like a mid of a disconnection - it's missing a bit of the connection through the actual usage in in in thinking about circuits and stuff like that I found this comes in handy when you're doing simulations and stuff like that like chemistry simulations and things like this because basically it says that lambda is some number and these numbers are basically sort of characteristic - - to the matrix that they belong to and so if you multiply by vs. how to calculate that and then the editor so you've got that equation here and zero I don't know I feel this is a bead just kind of like a short introduction to that but it's not something that I felt it was helping me at all when I when I read through that and I'm still not feeling super-confident with with eigenvectors and I know it's probably pretty basic but I it just didn't feel like I don't know I didn't feel like a good part of the of this section the matrix exponential though I have to meet it was interesting to to go through these I also recommend you take a look at three house house he called a thing is in things in YouTube YouTube YouTube three things like three blue one Brown and he's got he's got and he's got a video and eigenvectors and eigenvalues which is really cool and he's got also a video on butter pop pop pop he's got a video on the euler equation which explains the concept of you know what what does it mean the e at all confine it now but yeah something like this here so and and this definitely helps you understand or what is e so definitely go through these videos this definitely this help understand a lot that even in mathematics and that was really eye-opening for me that even in mathematics different concepts can be interpreted differently right so and here I think I think there is one sentence let me see if I can find it yeah so it basically says matrix inside of an exponential seems super weird right and and but the whole point is you can you can interpret this in different ways you can interpret this as rotations you can interpret this in different forms and that's that's really helpful so I don't know I didn't find like like those two sections brought me anything as a newcomer if I would be a new comer to come quantum computing but they're definitely good to know that they are there to come back to if needed so this is my whole point in this section basically and I know some people might just like to go through the basics through the mathematical basics really well through but it's not it's not my style so that's and sure it might be probably bring some problems later on but that's basically it for I think for the the section zero Python and Jupiter notebooks so basically you know as I said basics of Python it works this one you know installing anaconda I had some issues with with the version of Python but I got it to run finally I think this has been the most useful introduction to kiss kid ever I mean it's the from you know the the fact that it's here in there in this section zero really helps it just gets good get you through the basic notation and functions and how you would build circuits and stuff like that and I'm hoping that we will be building on these in the next and the next and the next parts of the book so good so it's about 10 so we've got half an hour so then we also have 30 more minutes at the end to basically do a bit of discussion on the chat if you guys want to but we can just quickly go through looking cubic get started with the quantum states and qubits section section one I'm also want to take a look quickly at in the slack there hasn't been any questions in but if you if you feel like if you're going this on your own pace by anyway you're probably not listening to this if you're doing so you can also put the questions in there as well good I think I think for these I'm gonna make that a bit bigger so you can see this bed in the screen because I think there's not much coding in the first in the first part so let's go let's go through through these but I mean here's to my point I just I didn't even start reading these and again I haven't gone through these right so it's it's I'm a first timer as well so but if I'll I'd like to build that circuit like it feels like in it's gonna cost me a lot of time to do that in key scape but again again this is just maybe a lack of a lack of practice just for playing around with circuits I think a graphical editor as much comes in much more handy but I mean the IBM Q experience has the has also the house called the composer which maybe we can take a look at actually see if it's gonna be a bit dirty though because I have a bunch of so the I have it here book by so the idea of quantum experience so signing with Google I don't know I guess so I'll take that off the screen for a second because I don't know if there's gonna be anything here I know it's signed up ok perfect then there were then we're good to go how can I bring that back now okay sorry so okay so here we here we are I'm gonna maybe try to use that the composer in here to kind of do some of some of the things in here so wait as I say you can also build yeah exactly that's what I'm doing cool I just saw the just reading the comments now that's what I'll that's that's what I'll do because I I think it makes a lot of sense cos gonna have also a similar experience with what's in here so and a lot has changed since I first tried this composer and I see there's a bunch of stuff in here that you that you know was not here before see a new design for the gates and yeah what I liked a lot is that you can kind of also edit with open chasms so you can quickly say if you don't want five cubits and you want to just stay stick to four that's what we have here then you can usually tweak that and and then have it here updated so that's pretty cool as well okay so if you think one of the connection sounds challenging you're not alone all of our intuitions are based on day to day experiences and so are better at understanding the behavior of BAL of bulls and bananas than atoms and electrons though quantum objects can seem random and chaotic at first they just follow a different set of rules and so once we know these rules we can use them to create new and powerful technology that's nice so to get you started on your journey let's get let's test what you already know which is the follow which which are the following is the correct description of a beat it's a bit awkward that the circuit is in here though I feel like I would like to start building it but I don't know I guess that's a half adder or something like that I think it's adding stuff so what is wrong saying you can store open chasm code in a string variable like these oh you can do that then let's give it a quick try that's nice so if you do these I'm just just how do I build a control okay so control not like that control not like that can I that is okay so I should probably I think it was like that I don't know if that still works yes and then at ophélie gate and I should change that to q3 perfect so and now we've got two measurements measurements one goes in here and another one goes in here so you're saying you can actually so I can actually go here copy the whole thing open the Jupiter notebook maybe I'll do a new new notebook new notebook five four three so from kiss gear import everything and basically so what are you saying is saying that you can still open chasm code in a string variable like these chasm equals your chasm code okay so something like chasm equals and now I can just do that you're saying should probably scape this true than I or is it just or is it just this maybe it's just this let's give it a try maybe I think I think that should simply be all a string right that's what that's what we're saying here so Reba come on so I can import it as a string like that and now it's all a string but I'm not sure if I should get so let's see if that works and then you can save from these quantum circuits from kasim string to convert five circuits okay so I now say Q C equals quantum circuit and I guess you do this and then you say from but I have no idea I've never seen that before so I'm probably not doing it correctly but so from quantum string and now I pass it the chasm is that maybe I'm missing the this part included so but maybe I can replace that by single quotes or I can replace that by single quotes or I can just escape that probably can I just do that I think I messed up something you know in should say in so if okay that's worked cool and now if I do a QC draw hmm maybe I also got to add these you know it's empty hmm we'll see but maybe I should I can take a look at the documentation for that but that would be that's that's that'd be kind of a cool thing another say this looks like the right link so how does this work if I search for these quantum string cousin taking a chasm string and generate a condom circuit from chasm string how how to use it though okay it returns a quantum circuit ah so it returns a quantum circuit it's actually really acid the static method but then I don't know so is it is it just returning me a another it's just returning me another yeah cool it works nice okay interesting hmm nice if I say qcc draw output equals MP L yeah that's nice beautiful okay so okay that definitely is that's definitely helpful thanks for the tip that's definitely helpful because then you can play basically with this stuff in here and and then kind of you know quickly get that into your code okay that's nice perfect um but I again I guess it's my whole point here is why to have a language that allows you to build circuits right I mean is it because you want to build them programmatically I mean that's the idea right and so the way you would build them programmatically is because you're maybe doing something where you're testing different variations of the circuit especially when you do variational things where you want to test how certain you know different gates affect the output and stuff like that I guess that's how it becomes in handy but okay at least it's good to know you can build it here and then take it into keys keys like that so let's go ahead that was another tangent so to get you started and journey towards kind of competing let's see what you already know so which is the following one is a great description of beat a blade used by a carpenter the smallest unit of information either a 0 or a 1 something you put into a horse's mouth I'd say it's the second one although I have no idea if a bit if beat is also they are all correct it's a very multi-purpose form but if you chose the second one it shows that you are already thinking along along the right lines the idea is that first can be stored in processing a series of zoos and once it's a big conceptual quite a big conceptual hurdle but it's something most people today know without even thinking about it taking this as a starting point we can start to imagine beats that obey the rules of quantum mechanics this quantum bits or qubits will then allow us to process mission in new and different ways so the first section walling so the intent is for the broadest possible audience we you won't see any math that you didn't learn before you where h10 will look and how beats work in standard computers and then start to explore how can you do things in different ways with qubits after really easy should already be able to start thinking about interesting things to try out with qubits so we'll start diving deeper into this section now into the world of qubits for these we'll need some way of keeping track of what they are doing when we apply gates so that's the okay so that's basically the Bloch sphere this chapter will mostly be effective for readers who already familiar with vectors and matrices okay and then if not go to this section and we'll be using key skied so you can also get an introduction here okay that's good let's go ahead to the next section then the atoms are the atoms of computation so let's take a quick let's keep this quickly through first so you've got basically splitting information into beads so this seems to be an explanation about we'll just read that well we'll go ahead and read that in a second so this seems to be an explanation of numerical systems base ten and I guess it's an idea to introduce then base to competition as a diagram okay so you've got so that's the diagram for adding right a and B I think and here you've got the diagram that we build there so it's the quantum version of these so we're gonna build the first quantum circuit okay okay sounds cool looks looks interesting encoding an input okay and yeah did it to the encoding : code that's calling and course it can now what not that's nothing new okay so it's just telling you the qubits I thought you were encoding something special but remembering how to add okay so that's I guess this through this section seems like we're gonna be building a circuit to add qubits and step by step that's that seems that seems interesting cool and then we've got basically the the final circuit I think that's uh that's a that's a cool way to to get into these in sort of recap the stuff you know how we use it out with Kiske and how you build a circuit with Kiske let's see let's see but it's really from scratch right so it's but it's basically so programming chronic bit is now something that anyone can do from home but what to create is is you know what's the kind of program anyway in fact what is the quantum computer so these questions can be answered by making comparisons to standard digital computers which unfortunately many people don't actually understand how they work and in this article will look at the basic principles behind these devices to help us transition over the quantum computing later on we'll do it using the same tools for quantum so now we're gonna now I'm gonna do here okay so it's just okay I don't even need to copy that that's basically there's also an import off from Kiske visualization import everything so we're ready and then splitting information into bits the first thing we need to know about is the idea of beats they're designed to be the world's simplest alphabet with only two Carter zero and one we can't represent any piece of information one example is numbers in European languages numbers are usually represented using a string of ten of the ten digits from 0 to 9 and in this string each digit represents how many times the number contains a certain power of 10 for example when we write 9000 213 what we mean is 9000 plus 200 plus 10 plus 3 yeah that's a ok so that's something that I think it's it's a nice way to it's definitely really for a broad audience because that's something that I think most people that I can I don't know maybe it's a baby sister brought up in a statement to say most people who who have programmed anything in their lives are able or kind of to understand this notion where they know these but yeah so you can emphasize that as the powers of 10 so it's 9 9 times 10 to the power 3 2 times 10 to the power of 2 and I think that's the bay that's the I mean that's the way you can that's why you call it a base 10 because your base is 10 digits from 0 to 9 and so the binary in in the binary case your base is 2 digits 0 & 1 and then you you build a build up from there binary number system for example is based on number 2 this means using two characters here and want to express numbers as multiples of powers of two in which case 9200 13 becomes this huge string in here okay and see in terms of powers of tool the strings note known as binary strings can be used to represent more than just numbers for example there is a way to represent any text using beats yeah I think this is the what what happened so it seems I was again offline I'll definitely have to check my my connection they'll have a more stable connection for some reason that this didn't seem to work well okay now we're back online and I think that time was really short so apologies for this good good good let's see the unique properties of qubits that's where we were no that's not what we where we we're in the atoms of computation call some and this is a let me refresh now that doesn't seem to this table doesn't seem to either work or I don't know but I guess this is table of how to encode strings with so characters map to numbers and then and then you can have the corresponding binary representation of this so yeah I think wolf kind of skip through that now and then go by go like the competition as a diagram so whether we're using cubits or beads we need to manipulate them in order to turn the inputs we have into outputs we need for the very simplest programs for small number of it's useful to represent these processes in the diagram known as circuit diagram you have inputs on the Left output on the right and the operations in the middle so these operations are called gates mostly for historical reasons that's interesting actually why there are called gates I don't know here's an example of what a circuit looks like for standard bit based computers yeah okay and so foreign computers it looks like these the rest of the section will get explained how to build circuits and at the end we'll know how to create circuits about the circuit of both what does it do and why is it useful good let's go let's get started with this then see if I can again put myself sort of put this bit upper in the screen help everyone's seeing that yeah seems seems to be all fine lifestream is his is going on yeah perfect so yeah Mike Owen again had another small Network issue mmm so we've got like about 10 minutes left I'm gonna go maybe through through the first part in here and then we can have a quick a quick break and then think about whether there's any questions and discussions and you know if not I mean I can also use the rest of the time to go through some other things and ideas and then we'll leave it then you know you can complete the rest of the section during the week between now and session two but let's let's let's get started with you so so we've got basically n ok so first we'll focus on the last of these jobs we start by creating a circuit with 8 qubits and 8 outputs 8 qubits and 8 outputs n equals 8 n cubed Z equals 8 and n bits equals 8 and then QC output equals quantum circuit and Q an and B this is what we've seen in the first section basically if I now go through the exact reason I say is done by a person called measure ok so it feels a bit like this part feels a bit like you're repeating some of the stuff that you read there so if you've done this fairly consecutive consecutive way like we're doing now it feels a bit like of repeating stuff if I now draw the circuit I should get that part in here yeah that's cool qubits are always initialized to the to give the output 0 since we don't do anything to our cubes in the circuit evolve this is exactly the result we'll get when we measure them yeah so and now let's see if I can type that so counts equals execute the QC output then I get back in chasm simulator result get counts get counts and then plot histogram histogram counts okay so we get the same thing here so what we've done is we've executed that with the console simulator and get the results basically so that feels a bit of a repeat a bit repetitive if you've done if you've done that before right before the other chapter the reason for running many times and showing the result is a his room is because the chronic computers may have some randomness in their results in these cases we're doing anything quantum we get just this so um none of this result comes from a quantum simulator which is tired computer calculating what quantum computers would do so you can do these with a real device like that yeah it feels let's look at it feels a bit repetitive let's look at how to encode different binary string as in the input for this we need what is known as a not gate this is the most basic operation that you can do in the computer it simply flips the bit value 0 becomes 1 and 1 becomes 0 for qubits there's an operation called X that does the job of the not gate so okay so now we're creating another quantum circuit a separate one ok why are we doing it in a separate one oh I think I know where this is going quantum circuit I think maybe because now we're using n so that's the that's what we have here okay so maybe we're gonna then plug in these and kind of have that as a measurement circuit and then just plug it in and glue the two circuits together interesting um it could be could be encode QC encode X into the qubit seven and now we're gonna do QC encode draw we're definitely gonna use this output equaling MPL and see that we get that thing with the X with an X gate at the very end extracting the results can be done using the circuit we have before oh that's cool okay that's interesting you can do that I guess you create another circuit where we're just concatenating them okay encode + QC output that's cool QC draw what is justify why does it say just define know what if I say output output MPL whatever just say that and what's the difference if I just say now justify none that doesn't seem to be any difference to me will be interesting to know why okay now I can run the comment circle and look at the inputs so we'll just copy-paste not it feels like okay so now we get that which is okay which is correct yeah so okay so what have we really done now I mean we've basically okay so we're building we're building just again building circuit basic stuff it feels yeah okay so far it feels a bit repetitive I know I've said that already many times but so the bit we flipped which comes from cubed seven leaves on to the far left of the string this is because Kiska numbers and bit string from right to left and if this convention seems to ought to you don't worry it seems odd to a lot a lot of you people and some prefer the number there beats the other way around I don't know I think I preferred the way the way this is specified in here so flipping these an hour okay to the power of seven this is the number 128 now we try another number for yourself you could do your age for example just use a search engine to find your number looks like in binary and then add some zeros to the left side if you're younger than 64 okay but basically okay so this is a another now you see encode quantum circuit okay that's another example okay it's again it's 10:30 I I'm almost feel like I could spend 10 more minutes and skim through these quickly so we get at least done with this because I feels I mean at least to me it's kind of a really really basic introduction but if you definitely need to go through that in a slower pace just go through this because it's definitely helpful but I mean what else is in here it's how to add right so I think the way this is going is okay so the algorithm for adding is you add three plus four and then you you know you might carry something in this case in this case you you don't right so you keep you keep doing that for the for the rest of the digits but then when you have two plus eight you have ten so basically here you need to carry one the one forward to your next to your next step of the algorithm so that's simple addition and then this seems to go through through through through the same but for binary where it's like whenever you're gonna have one plus one you're always gonna carry something carry something with you so yeah one plus one is two but in binary is one zero so that one you need uh not one you need to carry and that's the reason you you build these in here [Music] so adding with Kiske let's make our own health other I'm just gonna go I'm gonna go ahead I'm gonna go for like ten more minutes and then we jump into discussion ten more minutes I'm just writing these in slack and then leave space for discussion just so we can close the current section yeah so packet okay so let's make our half adder using kiski this will include a part of the circuit that includes the input and the one that X gives the algorithm and a part that extracts the results I like I kind of like to approach this in this modular way where you're each of your circuits is actually a separate circuit object and then you can glue them together that's an interesting construct the two bits that we want to add are encoded in be in cubed 0 and 1 so in this case is 1 and 1 right the result will be a string of the two beats which we will read out from cubits 2 & 3 okay so here's the result and then you encode it you and then you extract it to the classical register the basic operations of computing are known as logic gates we've already used a not gate but this is not enough to make our half adder we could only use it to manually write out the answers but since we want to compare it to the actual computing stuff a computing France will need some more powerful gates so this is the result okay so that's that these are all the possible results then to get this part socially correct we need something to ensure whether the to keep its are different or not because that's what you if you want to know whether you need to carry then that only happens when you've got one one plus one so there's the xor gate in classical computing that does that since that's quite a long name control not Kiske this name is the CX which is even shorter so you've got that circuit for a QC with a control not yeah this is applied to a pair of qubits one one acts as a control and the other one is a target so if this keep it is one then the Q want gets flipped another way to explaining the controller is to say that it does and not on the target if the control is one and that's nothing otherwise yeah so try to control not after yourself by trying each possible input okay so you if you execute the circuit you'll find that the output is one one because you turn that into a one and then there's a control here and then that turns it into a one so the output is one so for a half adder we don't want to override one of our inputs instead we want to write the results on a different pair of qubits for this we can use two c-notes okay so now we get into explaining that that part of the algorithm that's okay so that's that's what you're doing is you're you're basically putting the output into into q2 right so if you're so if this is a 1 then you're gonna flip here because q2 starts off as 0 so if Q 0 is 1 then Q 2 is we kind of become 1 and then if Q 1 is 1 then you're then you're effectively flipping the flipping this back to 0 because you're adding it right says 1 plus 1 equals 1 0 and so the q 2 should be 0 but then what you're missing here is that in this case then you're gonna have to have the carry so how do you know that you need to carry you basically I guess you could do it this way to do it two ways one is basically having a control control not that's the tough legate I think it's introduced later here exactly but I was also wondering couldn't you just couldn't you just use the cubit tool wouldn't that work as well if it's it's if it's 0 so it's not a control anymore but I like a control on one it's a control on 0 then that signals that you need to carry as well well no that's not true because if you've got 0 plus 0 then this is 0 so that shouldn't that should not then trigger the carry yeah that would be a mistake you know what I mean so if you do if you do something like let me take that like that if you if instead of these if instead of these e'er you're doing something like these but that's not that's not helping you because if you've got 0 0 and here then you would trigger the carry cubed as well and that's not what you want definitely not what you want okay so but that was basically that's basically it back here okay so I put that make that small again so we are now half away to fully working half adder we just have the other bead or the output left to do the one that will live on cubed for if you look again for the four possible sums you'll notice that there's only one case where you have a carrier which is one plus one yeah so and this is technically this part we could just get our computer to look at whether both in the bits are one if they are and only if they are we need to do a not gate on cubed for that we'll flip it to the card value for this we need a new gate called a C naught but controlled on two qubits so C C naught or it's called toughly for those who you're familiar with boolean logic is an it's a NAND gate oh yeah actually okay so you've got the circuit in here and then you get the results yeah and that's the result 1 0 right because 1 plus 1 is 2 so the result is 1 0 which is the binary position of the number 2 yeah and that's that's it basically yeah ok cool so let's do the following I mean I've gone gone through this fairly quickly but we can now have a short Q&A of like 30 minutes or so maybe using the chat in life I'll just put it in slag now if you if anyone wants to join the Q&A slash discussion you can go to the Lives the livestream right now and now we can use the chat I know it's it's probably not the best it's definitely not it's not a the best format in comparison to an actual voice discussion but let's see how this works let's see if people have any questions or not and even if it's not related to that I can also we can also discuss all the quantum computing related stuff if if you guys feel like so we've basically managed to go until one point to and you know what I what I would suggest is that for those who want to join the next session on the following Sunday you can walk work through the rest of the of the chapters or the sections the subsections and then at the beginning of the next session we'll do a recap on these basically I'll go through my I'll go through it myself as well and then give my feedback and you know you can also ask questions if there was any problems in dark lane in the kids like channel and then any feedback in terms of the format is is also really welcome is for me both the first time that I broadcast there are live stream ever and so I had to do a bit of a technical set up in here that I didn't have but I think that's I think that's gone pretty well let's see ok cool but next I shall we focus on section 2 let's jump into Q&A a bit maybe let's see how many people were caught in this stream she says three concurrent viewers right now I don't know how much this is live I don't know is there anyone who has any questions that that you wanted to discuss if not if not we can definitely you know use the time and and take a look at some of the other stuff and we skimmed through all the sections we'll see so use the use the chat if if anyone has any questions yeah let me see too many things open definitely it was definitely for me for me was interesting to go through through the actual Kiski part but it felt as a feedback bit repetitive so going through the zero-point tool and and then going through the atoms of computation felt a bit almost like the same kind of building circuits there's definitely one thing in here that I haven't seen and I find useful into the notation that's the way you can add beats you can add portions of a circuit together exactly this year this was useful yeah so in terms of feedback that's basically from what we've covered that's that's it and maybe I can use the rest of the times like 15 minutes or so to just go through I'll skim the other sections let's see what we what we've got in here let me zoom that in but if you have any questions you know feel free to interrupt me I'm gonna take a look at chat in a more prominent way right now well let me zoom that in so in the first in this section we in this section we cover it basically the basics of building a half adder and and so a circuit that adds numbers and that's nothing really quantum ish quantum is I would say but it at least helps us understand the basics of how to build a circuitry and what those things mean so that's that's good then if we go to the one point through the unique properties of QV what are we talking about here Heisenberg's uncertainty principle okay at home with the Heisenberg's I can't find my key my car keys you probably know too much everyone into it that's a good talk that's a good joke so what else is in here so take a look at measurement okay circuit Composer looks like that and then there is the small Z so see here there's a measure underscore X Y okay so okay that's cool so this is going to be a give me a second I lost all my stuff in here right now yeah you probably feel you nothing change I hope so but I just lost the chart okay here it is so this is basically I think what what this is gonna be about is talking about the different measurements and the stuff that you can measure because this is just a Zed measurement but you can measure a qubit from different perspectives right based on your computational basis so you can measure it from you can measure the x observable you can measure the Y or or the set of the rule and I think the way they okay the way you do that is you know measuring X means you should apply a harm or gate to your qubit or to your set of qubits and then measure measure set so it's the equivalent here would be you take the whole of your circuit into the into I would say the X dimension and then and then you measure is that that's gonna give you that's gonna give you the measurement from that perspective and then there is okay here's measurements okay so that's what is okay that's cool I see it's a pretty nice way to introduce that but I wonder I wonder whether that's not confusing for a newcomer though to talk about this stuff that early measure X okay then you've got our eye rotation on the Y's the results were for a Y rotation okay and measure Z and then measure X so you can see that the the results are somehow inverted okay Einstein versus Bell and I guess here okay so here there's an explanation of of this bafta of the the the bell experiment right where Einstein try to prove that basically there must be a hidden variable or hidden information that we that kind of tells the qubits how to behave in terms of measurement or when they are measured and so you know I think what this experiment proves is that there is something that that's not true right okay that could be interesting so basically this is about measurement measurement X measurements that and and and this Bell experiment then one point four is about writing down qubit States so what do we what have we got here so the Z basis so this is about okay so here we go back a little bit into talking some notation and mathematics and I wonder again whether that cannot be well that's not gonna feel a bit repetitive if you've gone through the math part the egg space is part one interesting the born rule oh that's what I that's what I meant right so it's it's a it's a way you can express mathematically what it means to so what's the what it means to measure something right so the probability of getting zero of that particular kit and then mathematically you do the inner product and and that's what you get and the probability of this CAD measuring zero is zero because then that's when you get in here okay global and relative phases vectors are how we use math to represent the state of the state of qubits we then we can calculate the probabilities of all the possible things that could ever be measured this is equivalent to multiplying the states okay so if I have a relative phase in here I'm interest I think will be interesting to know to see how this concept is introduced the states plus and minus again I'm just doing I'm just quickly skipping through this because because we're not gonna have time to cover all that but you can you can do that on your own and then and then we can do a quick quick recap in the beginning of next of next session Oh [Music] complex numbers so they're funny interesting that they were not introduced in the math part in the math section in this section zero right but that's that's gonna be an interesting part as well so okay so if this seems to be this seems to be basically a an introduction to annotation get use bit more maybe more to notation and to the mathematics about how you write the states that are good and then you've got I think I think that's where some session ended I haven't seen the recording I don't know if it's up already but basically then you've got what the poly matrices in the Bloch sphere there's are two other things that maybe to stick consistent with this with the other sessions this is where we will take it from I think is that's that's the already scope for the next session to start here so I'm not gonna I'm not gonna touch I'm not gonna touch this I would say but I see some of the expectation value notation in here some interest will be interesting to know how this is how much this is covered and how does this whole thing look like also gotta blocks here again um okay yeah but basically okay so basically that's it so far I mean I don't know what you what you guys think doesn't seem like there is let me see anyone who is maybe not know it was completely new to to quantum computing but it's it's I would say if you think about section zero and one here my feedback would be it's a it's a pretty much I think it's a it's a good introduction up to what I've seen right now since we're repetitive in some points but it gets you up and running with kids kids fairly quickly now it's a hell lot of material without getting into any kind of you know quantum quantum stuff but I mean that's just I I'm probably biased and spoiled by the fact that I already know stuff and so yeah but I think that'll be it so but I see there's section three is where the the the I would say really big challenging stuff is in here we take a look at actual algorithms and we break those algorithms down how does this look like how do they how have they done this quantum teleportation ok so there's really Cody Cody nice okay now can be interesting and on a real machine as well so I probably should probably set this up this is really Cody Cody that's actually interesting because a lot of people approach it mathematically and well at least I thought that let's take a look at other stuff the Deutsch so there's a question do you find the belt the belt has particles I haven't gone through these I haven't gone through the particular text myself yet and we really didn't make it I think here so this was in one point for so long he's asking I'm sorry Kazakh I don't seem to be able to pronounce your first name correctly but he's asking in the chat whether the Bell part is understandable or not I guess I'll be able I'll give you feedback once we dose once we do the second the the second part the second session because I haven't gone through this this is this was here right so yeah I'm some versus val/val I mean but we can we can try to go through this maybe let's see we have now played with some of the features of cubits but we haven't done anything that couldn't be reproduced by a few beats and random number generator you can therefore be forgiven for thinking the current variables are just classical variables this is actually the claim made by einstein-podolsky-rosen back in 1935 they objected to the uncertainties seen in quantum mechanics they should always know what output is that's the thing I said about the hidden variable no one spoke of qubits back then and people hardly spoke of computers but if we translate the arguments in foreign language they essentially claim that qubits can only be described by some form of classical variable so it took until 1964 to show that they were wrong and J's Bell proved that quantum variables behaved in a way that was fundamentally fundamentally unique since then many new ways have been found to prove these and extensive experiments have been done to show that this is exactly the way the universe works will now consider a simple demonstration using a variety of Hardy's paradox okay so this I guess the part that you're asking what it's difficult to understand or not so let's take a look at these for this we need two qubits set up in such a way that their results are correlated specifically we want to set them up such that the following properties I guess are observed if Z measurements are made on both qubits they never both output zero okay so they never agree no they could agree on one one okay they never both output zero if an X measurement of one qubit outputs one as a measurement of the other will output zero [Music] so there is a correlation here between a next measurement and as a measurement this is okay this is a it seems like feels like it needs to be I will need to read this two or three more times to make sure I cross that but let's go ahead if we have qubits that satisfy these properties we can can we what can we infer about the remaining cases for example a next measurement of both okay so this is gonna be now running through through these and see if we get any contradiction or something like that probably for an example let's think about the case where both qubits output one for a next measurement by applying property to right we can deduce that the result would have been what what the result would have been if we had made that measurements instead this we would have gotten an output of zero for both okay let's let's back up for a second okay so let's think about the case where both qubits output one for a next measurement so and then we apply property two and say if both if both so if an X measurement of 1 cubed outputs 1 the set measurement of the other one outputs zero okay so here says both qubits have measured 1 for the X measurement this means that in this case this means that actually the other two it means that according to these rules what it means than the other two both should put zero in a set measurement because it's as if if one cubed if one cubed outputs one thus a measurement of the other will output zero so if both qubits output 1 in X it means that you know 4 cubed 1 it outputs once it means cubed 0 when you measure is that will output zero and cubed 1:1 measures that will also output zero which violates that statement because it says that both can't never measure zero okay so we would have gotten output of zero both yeah however this was not the impossible current property one correct that's what we though we just said now so we can therefore conclude that output for one of one for X measurements of both qubits must also be impossible correct the part of the district contains all the math in this section don't feel bad if you need to review a couple more times I mean you need to definitely read this carefully so now let's see what actually happens here's the circuit composed of gates you will learn about in latest sections it prepares a pair of qubits that will satisfy the above properties I mean it's okay so it prepares a bunch of rotations it's a bunch of rotations and control that gate so it's not there's no explanation on why this does it but then let's see okay so let's see in action the first is that measurement of both key weeds gives you yeah so that's so there's no zero zero I mean I'm assuming again I'm not gonna copy paste that now but if if that's correct then this is respecting the property 1 yeah let's see the results of a next measurement of 1 anisette measurement of the other so results for the 2x measurements on cubed 0n z measurement give it one so but what was again the what was again the if the x measure of one of of one okay this one on x is 0 on z if it's one on x here yeah so the only possible the only possibility that doesn't pop up here is the one one because I would invalidate the property too so the property of one one is zero so you'll see if you swap around the measurements this cube is therefore also say five property tool now let's look at a next measurement of both and okay and so we can see here that zero zero actually has got so we're isn't that given properties wanting to it would be possible to get the output one one yeah in both X and nevertheless is 0.9 0.9 0.09 probabilities of getting one one so that's definitely okay so what what did it go wrong our mistake was in the following piece of reasoning by applying property to we can deduce what the result would have been if we had made as that measurement instead we used our knowledge of the x outputs to work out what the Zen outputs where so once we've done that we assumed that there was we assume that we were certain about the value of both more certain than the uncertainty principle allows us to be okay I think that's the that's the bit that's a bit complicated to grasp so our logic would be completely valid if we weren't written about quantum objects if it was some some non quantum variable that would be both well-defined so I guess what this is saying is that you can't so what you're you can't infer like this type these types of properties don't hold like you you can't do that if the next measurement like is one as that measurement will output zero because what you're saying this property is a property that it's what you're saying in here is that your or in the other way around with that you're saying that both will measure one it's like here you're making yeah you're assuming you know stuff about both measurements and that's the that's again certainly principle so you're basically saying and then certain principle is telling you that you gotta have if you've got uncertain certainty somewhere you're gonna have uncertainty on the other side so if you--if you know exactly what you're gonna measure with the next measurement then you really don't know what you're gonna measure with the Zed measurement so there's uncertainty there and so despite the fact that you have a a well defined system so you know in terms of uncertainty at that level you have a well defined system but you you can't still infer a concrete measurement on the Z if you don't know is I think again I think that it's it's it's not too difficult to understand but I'm again might be biased because I've I've gone through a similar explanation or similar experiments in other you know blogs and articles and you just have to think about this twice and especially there's that bit of not being intuitive if the fact that you can't infer two certainties from two different dimensions that's like the eggs and the Zed one that's that's the bit that's a bit kind of I think awkward to understand it's a bit hand waving so to explain Hardy tests within certain principles a bit hand waving I prefer mortician or person explained with Bell inequality I don't remember how the Bell inequality is explained so I can definitely look that up but it's it's one of these things that you even if you don't understand that in the first in the first run and but you just assume it's true and then go ahead and then you come back to it after you know after a while then you're like oh and now I understand what it means right so but I can understand it for someone who really hasn't touched any of those concepts that might be really really really complicated so um but no I mean in terms of writing and in terms of the way this is explained I think it's a I think it's a pretty good job so on okay cool so the two hours are are gone really it's like 11:00 and I'm I think that you know was a bit I would say from my perspective I wanted to do that anyway at some point to read through that so I'm happy that I hopped on the opportunity to volunteer for these and I'm gonna keep running the next sessions as well based on the schedule but definitely any feedback on the format is welcome I haven't seen any questions in slack and I'll try to make sure that I have a better and more stable internet connection next time so I'd done or at least I'm I realize when things go offline and so I don't lose people but so far if I have to give summarize my experience with the first sections in section one they feel they feel good I would say they feel good I can be picky right you can always say ah this has been repetitive or here and there you could do better but it really feels overall a good introduction to the topic and at the same time you're learning key skied which is really helpful as well it comes in comes in handy as well so um I think the I think the the the tricky part will be when we start talking about quantum circuits and quantum algorithms this is when stuff gets complicated like when you you know move past the one cubed that's when things get complicated so I mean it seems like taking a look at the at least you go from really basic stuff and then suddenly quantum algorithms and then finally applications like that's like vqe simulating molecules that might be like like a big jump so we'll see we'll see thanks watching the session yeah I like to sort of drink one other but maybe discussion session should be zoom okay yeah I I agree I think the discussion could be put into a more into another medium where you can have a more one-to-one voice discussion or many-to-many voice discussion I think that's that's a cool format as well so we'll try to set it up for next time thanks for the feedback that's it's really welcome cool don't then I'll leave it here and thanks everyone for joining and you know again go through the other through the stuff that we haven't covered share feedback and you know happy to receive any feedback from from this session as well as I said so thank you very much and with each other on Sunday next week now it's time to close is bye saw
After 7 months, the qiskit textbook is updated and I don&#39;t know if the codes are still useful for me now lol, Quantum Intuition thanks a lot! I am looking forward to it😄, Yeah there&#39;s lots of value in going through the updated book from time to time. This was done as a series of liveatreams back then though :) ill be indexing these videos and others better so people get the context as well
Any chance you can move the livestream time? 9AM CET is midnight in California and even later in the rest of the US., Happy you like the content! :), ​@Uncertain Systems Yeah, I&#39;m in California :( Looking forward to watching the rest of the Textbook Reading streams!, I plan to do something similar (not just the textbook) for a US friendly timezone soon as well :), I&#39;d love to! Right now this is the only time I could really carve out of my current schedule but I&#39;m planning to make more time for that asap. Are u based in California?
so I kind of remembered that's where I came across the blog series and that's an answer from James on the quantum computing stack exchange what is surface code and I think I think that this is definitely going o explanations okay let me check that quickly cuz I'm I'm check I check all these other papers and this seems to go one level to deeper or two yeah far away from the interest right now so I might par the topic here but I see this to memory paper that's once the paper forty pages oh sorry you're not seeing that my bad cuz I'm just recording the tap so this is 40 pages that's the paper I was just just just cool I just stuff in here then we've got also these are the paper it's basically surface codes towards practical large-scale quantum computation seeing those quickly single community errors scratch evolution of measurement outcomes square to the array of data qubits with X boundaries on the left and right inside boundaries on the top and bottom okay doesn't the set boundaries and those are expound race and then there is cycling duck there is also this thing so basically that's the so that's what here James says surface cows cows we generalized two kids and that's been the asses from 2018 it's fairly recent so what do we have here this is kind of the generalization probably - wait for my go jabrai construction okay that's not different something let me take a look at the other answer and then maybe eventually check out one of the papers if Jane says those are good entry points and I believe I believe him what is this all answer saying success a little bit variable minor - hopeless a thing story code on different lattices might refer to planner code the specific Ryan on a square lattice lattice with open boundary conditions the Torah code or somewhere I saw the basic properties into our code imagine a square lattice with periodic boundary conditions for example top edge is joined to the bottom edge okay the top edge is to the bottom edge and the left I just joined to the right edge if you try this with a sheet of paper you'll find you get a doughnut shape or torus on this slide is we place a sari on this line is we place a cupid on each edge of a square this is a slightly different representation LG all set operations stabilizers next we we define a whole bunch of operators for every square on the lattice comprising four cubits in the middle of each edge we write V P X X X X X X X X acting a poly X of rotation and each of the four cubits the label P refers to placate okay so each of those squares is applicant acting a poly X rotation now we write these acting a Polly eggs operation on each of the four cubits the label P refers to placated is just an index so we can later count over the whole set of blackheads when every vertex of the lattice on every vertex of the lattice surrounded by four cubits we define a s Zed Zed Zed Zed so this would be e t--'s this for every square in the lattice it was a start s refers to the star shape and again who will let us sum over all such items we observe that all of these terms mature c'mere it's trivial for a as a pram it goes let me PB we practice here because father Paris Commune to themselves and identity more care is required with a SBP equal zero but no but not that these two terms I got zero two sides in common in person some powder prayers come here exact society to zero code spaces all this come first come here we can define a simultaneous eigen state of them all the state is such that this defines a good space of the code we should determine how large these for an N / n lollies they are and squared cubed Hilbert space I mention is n to the power of L to the power of two there are n square terms which refer to as stabilizes stabilizes each eigen values of plus 1 minus 1 how's the dimension of the Hilbert space so we would think that this uniquely defines the state the code can encode two qubits okay logical operators how do we encode a quantum state inventory code we need to know the logical operators but that's nice because here basically ok says there's a couple of different conventions for how to label different paraders we'll go with my favorite which is probably the less popular take a horizontal line on the lattice on every key reply set this is set one L in fact any horizontal line is just as good take a vertical line Malati's every community applies that so basically okay so here we have a couple of examples on how to apply how do the fans our operations on that so logical set operations okay any unpair basic excitation error detection correction whatever code as a keystone because they won't keep it there - correction each run of hair crushing first measurement value of every stabilizer each okay it's our errors in Java so now you depending on what model do you think applies uses to determine whether you think there's a non and they try to fix them Erik refresh threshold while the distance of the code is n it's not the case the planar code details are actually identical to the Torah code except and the boundary conditions of the lattice are open instead of periodic this means that the edges stabilizers can define slightly differently in this case there's only one logical qubit in the code instead of two okay so the planner code or the surface code is just a simplification or a simplified model for the Torah code in which the edges have different rules but that limits the amount of information you can encode okay but I think I think I'm fine enough of this so far I either I don't think I want to take a look at this I think from an introduction introductory perspectives that's probably good enough but it's definitely not details I really would like to I mean III don't think that I need to know more but I probably if I would want explore that topic farther I know to start now I mean definitely definitely one of the other papers topological this also there is also these on the paper that's also linked in there a two dimensional diffusion subscribe addition is fault-tolerant by its physical nature okay but that's the different way of building a quantum computer toward cause and the corresponding Italians Italian aliens yeah that's way too technical so I'm gonna live in here not interested in exploring this farther intuitively it's basically yeah it's basically you know that's that's how you would that's how you try to build the logical qubits by by putting them in an inn I mean there's different concepts that are being researched I guess and the idea is to try to find you know cool ones that allow you to both identify errors and correct them so I think that's those are the two challenges or you know someone figures out a way to engineer qubits in a way that the qubits themselves the physical qubits are less noisy but am I happy with this am I happy with these soft and is so far I think we haven't taken a look at they we start with with one what is good is quantum error correction I think we didn't start with restoring quantum information stirring information for information the program correction let me know the shape of Earth and then February I was harnessing continence because I think we started from five decoding without looking and the story so far yeah that's what we started directly facing the months of cubits stays our measurements okay I think this is the attempt explain a bit how the cubit works to give me marche the Torah code part one this is why this is why I gets serious this is what it or start to get into this concept anymore because I hear they find like that a great pattern you're the one with me has a string of ones passing through some of the squares when this stringent is square we add one to that square sound reliefs we had another one as long as it is every single square in enters we will add two to the samsu so is even the square say even the other way first relief cuz nothing confused me here I thought it was all the time about loops through the donut or a rounded on end and that's not neither when all squares are even the bit values look like loops of ones on a background of zeros don't be flip something doesn't change I'm trying to recover just like Kazama so shrine measuring loops quite a big difference between examples a B and C means in these loops around see any this though surrounded donut maybe there isn't is there a way we can quantify this more mathematically through the blue squares itself the white ones it also goes around the torus the other way through the donut what is the blue qubits to make measurements for this we need to pick some set of zeros and ones for the physical qubits as a small squares in datura code that we associate with that we associated with zeroes of the logical cubed for this we need a peak sub-sites offices and ones for the physical qubits there's more squares in the toric code that we associate with the zero so the logical qubit and some that we associate with one of the collage equipment for the repetition code which is big for the the physical chemists modules here on palter codes to be more complicated in the Torah code there is something we cannot measure just one physical first we need a measurement this is preferred if we want a our logical Q to be 0 this is a bunch of physical qubits with an even number of oops around the donít like from left to right or right or left so we decide the physical beats to the reserve in a or b YB p doesn't have anything around the Donna that's what's confusing me or does it maybe maybe anything that doesn't go through the donut it surrounded on it maybe that's what it means yeah whatever um cuz vertically through the donut one let's use an odd number of loops around okay and we have zero so that's why that's nothing this is just an example of a possible configuration but we're only taking a look at loops through the dollar then around the donut and in this case it's just it just around donut is enough okay yeah guy I think I got the gist of it so basically half that system and then with this rules I can easily detect errors because those loops get broken and you can configure our weddings aware where do they exactly break and then you can try to correct them but it's not always trivial I think I'm gonna I'm gonna leave there I'm gonna leave the introduction sort of man I just wanted to scratch the surface see see what was you know under the quantum error correction world and and I guess it's just like you know tens of different research areas and paths that people are trying to follow here but it's not definitely something that I'm curly interesting but it's it's good to know it's good to kind of you know a little bit so perfect
so uncertain systems.com mmm good so this is gonna be a short one actually um I basically want to show you guys now while you guys through a small modification that I did too quick and I'm testing right now I haven't really had time this week to work on this more I was more sort of something that I worked on last two weeks ago or something like that but I just wanted to go through these and explain a little bit more what do I have in mind and hopefully we're gonna see some code as well although your might probably you know just be horrified of how I did these the current thing is just a copy-paste Frankenstein of Craig's existing and really well-written code for the rest of quick right but basically so let me let me just give you a quick introduction to what I what I'm what I kind of had in my mind what I wanted to do right and it all goes back to the notion of you know kind of saw the problems that you have when you use the mathematical model that's that's used for quantum computing to reason about algorithms and I always kind of had that feeling that you're missing some stuff right for example when you um when you do a horror morgue aid right and then you go another Hannam arcade you kind of go back to zero right now if you if you basically go in apply the matrix operations for the harem arcade to that initial state that just kind of gives you that same outcome and that makes sense but I kind of realized that there is this is where interference is really happening right because you don't I have my drawing tools in here I suddenly don't have my drawing tools here but you turn that zero into a zero plus one right maybe can I just use the PD I think this is something called a deep inside we can just like randomly typing stuff right so let me said I can zoom in a little bit if you have the zero state as the yeren you'll state right and then you apply how to market do it then you're gonna get into the zero plus one state and I'm kind of a meeting here and purpose the normalization stuff and you know just for the sake of simplicity and so when you apply how to market again you can also think of these operation as you know you're applying it to each of those of those components of your super position and so if you've got a one and you're playing a harmonica when you would you kind of get oh let's let's use actual notation for these so I'm gonna use Harmar times eight right hh-how are times zero as in like the hammer gate being applied to that state I think that's the proper way of doing that so what you have is these right so now if you if you are at the state if you deploy a hardware at the state zero point one it's the same as applying how to mark to the state zero plus a plane economy to the state 1 and so and if we if we basically put all that together in here then you basically get to that to this expression where you kind of see there is a there's a plus 1 and a minus 1 that cancel out and and so this is you could think of you know this is being the this is the destructive interference taking place now you don't see that when you apply the the the matrix for the harm art for a two cubed system because that that part in here is hidden within the matrix multiplication because you're ready you're multiplying two different elements of different rows and columns and then the thing adds up and that's it right so and I always wonder that you know whether there would be a way to do that so you could see those patterns before they happen and that would help you understand algorithms like Grover's algorithm a bit better because at the end of the day what Grover's algorithm is is just a you know a tweak on on those faces right before you apply the second harmonic gate to this state so that instead of constructive interference you've got constructive interference right so right so I went ahead and I did that here so basically a crate is inspecting interference but me here we're just to give an example we'll work on a two qubit system and then you kind of see here that if you would apply to harm our gates again then we're back at zero zero right but if you are a canoe sort of a control setting here now you're not you're not going back to to that state anymore right but you're going back to that state in here so if we would like to I would like to take a look and and kind of have to a tool that allows me to see what is the interference pattern that's happening here because maybe I can tweak that to then you know kind of create certain effect without having to go kind of back to the math and trying to figure out in a more abstract level what I should do is so what this is what this is doing is this is kind of copying the same into things that you have when you click on negate so that part here just because I'm lazy and and so you can you can basically tell this guy you know show me show me what's going on between like right before this operation and right after this operation right so if you do these you get that kind of table here where you've got the initial States possible state of you know of what your superposition would be of all the possible states of the system of a two cubed system and then you kind of see greyed out all the states where it's you know the the coefficient is zero and it's just you know you're right before this gate everything it's all your probabilities all your amplitude is here and is you is your state so after you apply the 200 gates basically that gets transformed into into an equal superposition which kind of you know this is a new way to represent that it stems from from that state right not from any other thing now if I move to the next right the controls and can I click on these then you see that you know what we had in this column is now moved to this column but now it's really it's really interesting you see that the control set has basically spread out the it hasn't only that's what fascinates me it hasn't only it hasn't only changed the face of the one one element which is what you would expect mathematically but it's also shifted things around like it's also spread things around these other boxes and here instead of keeping them here right it hasn't changed the value but they are kind of spread in here and this is because this is because it's it's kind of coming from these elements so it how would you reason about this but let's move let's go ahead so what happens what happens now right is that if you take a look at the third operation which is another harm art layer so so you can see that if this is your starting point the first column is a starting point and now you're applying a Harmar gate to each of those boxes and so they each get feel tab and and so this is what I have I still have to do some work here because I'd like to color code this somehow so that so that you basically can see the interference effects better because it's all white now so you can't see this but pay attention that it kind of did a today so nothing is really canceling out right because you have like a plus plus sorry plus plus plus-minus so there's a bit of canceling here right and so you kind of you kind of see what else you see here the zero one case is plus minus plus plus you can see in the one one case that it's kind of it has a negative advantage it's minus minus minus plus and so the overall outcome is gonna have a minus and that's what you see here at the end you see that amplitude here is minus right now the interesting part is that when you apply this to Grover's algorithm you kind of really see you really see where you know how can you treat those different patterns in here so let me play with something what if I now say that I want to for example cancel out some stuff is there anything I can cancel out so if I if I'm here if I minus the zeros you know that's that will basically turn that around so if I apply Grover's algorithm right so let's let's say empal well that's almost it right so you're here and then and then you have the two Hannam arts the heart layer in here and now and now you basically want to do these right so you wanna you wanna you want to finish your amplification and you end up just with these case so let's analyze this state interference in this circuit right so how could we do it so if I do say if I take a look at these four five four six what do I see right so I see that part in here that's a sure that's working well though four five I'm not so sure it's working entirely well hmm anyway but you get the idea right some I gotta try to see if I can fix that though this is basically inspired was inspired by about one of my Grover videos where I was doing this by hand and I was kind of like saying well you know if you're so if you if you start here right that's what you have if you go all the way sorry here what you end up having is that a superposition with a minus in here and so when you when you apply the next heart layer right what you have is you have yeah so you have that that pointing here where basically this is the inverted it has a sign inverted in all the components because it's the one you - and so if you if you now manage to basically change the sign of the zero zero component then it's like minus minus minus sowhat's wait a second so what's canceling with what so this is this is not constant at all here we've got like plus minus plus and plus it's not constant either exactly now nothing is cancelling but if I - if I go all the way to - sing these staff oh yeah you have - the halls ears here exactly that's what you're - sing and so now it's when you yes that's the whole block that's changing here right so that's what the so you can kind of see that actually a TTS working so you can kind of see that you're you can within the range inspect what's going on so you basically the whole block has changed - - and so now you've got like a minus plus plus and minus right and so they are cancelling out exactly so you take a look they all cancel minus - plus plus they all cancel minus plus minus plus cancel but the one one doesn't cancel and exactly and so you could have I wonder whether this is something you could use - because yeah of course because like you'd wonder okay how can I manipulate that stay before it interferes right so that the things cancel out the way I want so this is one of one tool that I'm experimenting with maybe I don't know maybe this leads into something that's useful for developer development of algorithms or for the back debugging of algorithm software and better understanding algorithm that's what's happening so the the whole block between three and seven right what if I do this what does this tell me so I have to go I have to go for seven I think yeah so if you can come if you deep down if you compare that that's what the whole block is doing is just - saying that entire thing in here maybe there's a way I don't know maybe this is somehow useful like how do I get these so how do I get this let's take a look quickly at the code it's pretty ugly so basically a copy pasted stuff around I'm gonna spare you the part of how to get all the windows all the pop pops up and all this kind of it's all really I'm not ready to share this I'll open source it of course because it's part of its I now even submit it as a quick extension I think it once I'm confident that the court is not shitty but the only substantial change that I made aside from copying most of the stuff from other scripts is then I kind of made up this function called x without interference right so in the matrix here there's this function called x basically it's a function that kind of multiplying some addresses right so the the only thing that I did is times without is this x without interference what it does is it does the same it's a copy of this but I commended out some of the things and the only thing that it does is it does not add like it doesn't it doesn't add the the elements off of your multiplication so when you're let's see if I can find that in yes Zack yeah here you go so I I was playing with the as playing with these where I was you know kind of getting a state and this is sort of a matrix that corresponds to a gate matrix and so what I what I was doing is you're you know what you would do is you'd multiply element and then at the end you would add everything brand so that's kind of you would usually what you usually see but but what I'm doing with these times without interferences I'm keeping that matrix so I'm keeping those boxes and that's what you see in the in those different boxes in here so you know it's like if you add these and you would add these and you would add these and you would add this is what you would usually do internally within the matrix operation but it's basically what's happening here so yeah I think that's I mean this is just it that's it really that's all this function is doing and so I'm using it here to basically get the before interference results and then kind of return them and print them out in the interface it's really far away from being finished but I'll I don't know I'll probably give it another try whenever I have some spare time and see if I can bring it to a state where it's actually helpful I'm not so sure how this can be helpful so I'll probably start using it myself in some algorithms and then trying out some algorithms and seeing if I if that kind of helps me understand a bit more what's going on within a circuit and how could this be useful to take a look and inspect something before interference actually happens I don't know I like it it seems it's helped it's helped me understand Grover's algorithm because you can take a look at these and you can see okay that's the interference that's where things are being canceled out now I understand what that operator is doing and I don't have to think about rotations in the hilbert space and whatnot so that I don't know it felt like I was worth sharing so I hope I hope you guys liked it you can play with it as well I mean it's actually if you go to in certain systems.com and then you go to the kwikmart thing here so you get that that basically a hosted version of this again I don't guarantee the simulator hasn't been spoiled because I I mean I have really played with stuff that might interfere with other parts of the system but I don't know I'm not a professional programmer either so take that with a bit of care with a bit of you know with a grain of salt so I don't don't just expect to you be able to use that simulator for for something fancier than just playing around it's just for testing purposes you've been warned cool have you tried the video um again if you like the content subscribe that always helps me and support me as well in patran if you want if you kind of like it just a dollar a month it always makes me happy and kind of gives me more basically more time to do stuff and yes you in the next video see you in the next
inspect intereference option is not there on quirk, Also thanks for supporting the channel! I&#39;ll reach out separately wrt ur other questions ;), Hey! This is an extension had built myself but I abandoned a while ago as ill be building it differently on the new EHS project
Awsome! That was useful😃
like for real the instead of part of the road map the first part of the robot right i'm going to be spending in you know so the first quarter this year um really kind of trying to grind through um quantum mechanics exercises like i set out to um learn quantum mechanics from scratch uh i guess i guess the way that i started this was more like taking a look at stephen wolfram's model trying to understand how that plugs in uh but i think that needs a bit of a detour because that's what what i'll be focusing on rather in march april so i'll be i'll be more like trying to understand and this this is really what i've been trying to do in the past weeks and months sporadically because i haven't had a lot of time but i'm planning to do that a bit more um a bit more uh aggressively um from now on which is basically well i you know i've been taking a look at the postulates right so and there's a great resource for these which is also which is basically quantum country which it's it's great and then also been taking a look at the wikipedia quantum mechanics and i think i think i've got a good grasp in general of the whole thing right and also just because of the spending like over 300 hours on the quantum on quantum computing like for the past year and a half or so um but now like it almost feels like it almost feels like if you don't really if you don't really go ahead and and and you know try to solve exercises that you'll not really fully it's almost like you're fooling yourself right in terms of knowing or not knowing certain things and uh i've been taking a look at the schrodinger equation understanding what the schrodinger equation means and and i think that i've got a good grasp of these in general but it still feels like you kind of don't have that inside so i think and and i mean i think that's a well-proven self-study method just just you know jump in jump right into the um deep cold water and you know kind of start from exercises and see what are the things that you're um expected to kind of solve um with quantum mechanics in order to kind of then uncover everything else right because basically some some of these kind of concepts are just like at the theory level you understand like it's i understand all that stuff the bracketation with hamiltonian is and um i think most of the things i have like i'd say like a beginner grasp on um super position not everything right so tunneling for example like i did i i did the quantum um harmonic oscillator concept and the idea of you know how to solve the stronger equation but it's still yeah it still doesn't feel like i i wouldn't go and claim i know quantum mechanics is the point and i'm i really want to spend the next months um working hard on these and kind of trying to take a look at gradual undergraduate um exercises to be honest i really don't know i i found is the first this is the first thing that i found when i googled for exercises with solutions um they also claim in the intro of this book that um you can use that as a guide for cell study um i have absolutely no idea whether that's good source or not but i mean the table of contents seems to be fairly aligned with what i've been reading around um [Music] and here it says this collection of quantum mechanics problems has grown out of many years of teaching the subject to undergraduate and grad students it is addressed to both student teacher and it's intended to be used as an external tool in class in self-study um the emphasis is on stressing the principles physical concepts and methods rather than supplying information for immediate use so the problems have been designed primarily for the for their educational value but they're also used to point certain properties and concepts worthy of interest in additional an additional aim is to condition the student to the atmosphere of change that will be encountered in the course of a career they usually long and consist of a number of related questions around a central theme solutions are presented in sufficient detail which is all which is good right because i i just don't want to see the final solution once i get to something i want to compare um at least the line of thoughts to see if it's um if it if my line of thinking has been good um the degree of difficulty presented by the problems varies the approach requires an investment of time effort and concentration by the student and aims at making him or her fit to deal with analogous problems in different situations yeah small subjects that are traditionally covered in undergraduate courses in addition to these the collection includes the number of products corresponding to recent developments so i mean what is the year from this book i think okay so we start with wave functions that is 2005 i don't know in terms of quantum mechanics i don't think that a lot has changed in the past 15 years in terms of the basics of what is taught so i think um i think we should be good to go but we'll see at least you know at least we're gonna get our hands dirty and so i'll just literally go like one by one so we'll start with problem one and i'm i don't want to look at the solution and i'm not like to be honest i'm i'm totally unprepared i think that's the point of this whole thing and i'm not going to um i don't know how much i can dedicate to a session that's just that's just how life looks like currently um but i'll just i'll just go problem by problem i won't move to the next one until i solve a problem or attempt to solve a problem um and at least understand the solution and to be honest i really don't know what i'm going to need what i'm going to be doing these uh with pen and paper when i'm going to be trying to kind of risen that write something down um i'm literally unprepared so we'll see we'll adapt on the one sort of as we go um are we streaming here we're streaming i think we're live yeah i think we're live again laggy as usual but that's going to change soon because i'm getting a new laptop okay cool and uh because that's the goal so this is what i'm going to be working on then take a look at stock exchange quantum mechanics questions and then i'll see whether we can you know i can i can make any sense of the warframe's model um and basically because i i got to the conclusion that the wolfram's like the way they do this is sort of a very typical way of proving stuff right so you try to find a mapping of your model to an existing validated model and so the way wolfram does it is like they they map their model to the path integral model and which i don't know if it will cover in here to be honest is it in is it in the is any about path integrals in here and it doesn't look like doesn't look like that i don't know we'll see because that would be a cool thing to do as well which what we will have to do if we want to approach the the mapping um [Music] yeah and uh let's do that we'll have to build up a lot of mathematical knowledge for this as well because i guess that's a lot of a lot of the solutions will require that but let's start from problem 1.1 in wave functions consider a particle and two normalized energy eigenfunctions okay cool i already have no idea what that means eigenfunctions normalized energy eigenfunctions um corresponding to the eigenvalues i guess i guess these are just wave functions right um the wave function as in like solutions to the schrodinger equation and so they then correspond to specific eigenvalues which are then energy values uh what are eigenfunctions either one so mathematic is an eigenfunction of a linear operator defines the final sum function space is a non-zero function [Music] oh god yeah well it's like the concept of an eigenvalue and an eigenvector but it's an eigenfunction in general an eigenvector of a linear operator defined on some vector space is nonzero vector and then that is simply scaled by some scalar value and a special case where d is defined on a function space the eigenvectors are just like as eigenfunctions okay it's quite abstract but maybe there's some important properties that we need to know to solve the problem so assume that the eigen function vanish outside the two non-overlapping regions omega 1 and omega 2 respectively so so what is the problem so we have here show that if the particle is initially in region omega 1 then it will stay there forever b let's read all the prompt first if initially if initially the particle is in the state with the wave function uh i guess this is time zero and that's the wave function of position so the particle is in a state that it's a linear combination right of of this in that show that the probability density is independent of time the probability density now assume that the two regions omega 1 and omega 2 overlap partially starting with the initial wave function of case b show that the probability answer is a periodic function of time i guess these are regions as in like potential positions i don't know because it's an eigen function that they vanish it's it's not positions but it's like of this cut that's an awful first exercise um starting with the same initial wave function assuming that the two eigenfunctions are real and isotropic take the two partially overlapping regions to be two concentric spheres compute the probability current probability current that flows through what is the probability current oh god i love the german world version these guys probability flux the flow of probability probabilities heterogeneous fluid then the probability current is the rate of flow of this fluid mass currents hydrodynamic what the hell is this that's a quantum the probability current it's also used inside the quantum mechanics only probability density functions first of all what's the probability density function let's let's just clarify that because that's part of the problem as well and probability density function or density of a continuous run variable is a function whose value at any given sample point in the sample space is supposed to investigate whether a random variable can integrate as providing a relative likelihood that the value um okay so that is just like the it's just a function that basically tells you what is the probability distribution right probability density functions that's the normal distribution so you have the density uh so that kind of tells you the probability of of finding this specific value yeah cool um back to the problem let's just let's just focus on on a show that if a particle is initially in region but we're talking about like locating a particle so it's it's i guess i guess this is just nomenclature right but like an eigen function in this case it's like well we're talking about like a wave function i'm going to be assuming here and so it's the it's the it's the position wave function so um a function that tells you you know kind of where in that um so where are you gonna find the particle where can you find the particle right um so let's show with the information we have let's look at everything else so to show that if it's in in region under one it will stay forever there if it's initially there it will stay forever there so you have okay so what do we have so we have a particle in it in and two normalized energy eigen functions so we have two eigen functions that correspond to two different um i guess energy levels assume that the eigenfunctions vanish outside the two non-overlapping regions respectively well i mean these this like so how how do we prove this because this seems to be like maybe i'm getting that wrong right but it seems to be just trivially true like if you've got non-overlapping regions and and and the the eigen functions that i guess like i mean we're not told that but i don't know if if it's that one eigen function is referring to what this is referring to right um assume that the eigenfunctions vanish outside the two non-overlapping regions so this means i'm assuming that so what this means is that what about these eigenfunctions actually how do they relate to the particle right if they are just talking about the potential positions of the particle and they vanish outside of these regions and it means that you can't like it means that you can't find a particle outside the region so if you're in one region then and the two regions are non-overlapping then you will never be able to transition from one region to another right but i don't know how to mathematically how to mathematically prove that maybe maybe one way to do it would be [Music] is that you uh how would you even do that right because you have it what's confusing me is that this or i don't see anything that relates the eigen the the wave functions to the actual the particle and two normalized energy eigen functions um yeah i guess they they you know assume that the eigen functions vanish outside of the two non-overlapping regions respectively respectively so i mean again i'm not native english but i'm assuming and maybe i'd assume that that this eigenfunction refers to this region and that this eigenfunction refers to this region right um and so if they vanish like well what i try to do is i try to kind of say we have um let's say we have a given hamiltonian or something like that that basically um dictates how these wave function evolves um like if there are no overlap the thing is like if they are not overlapping you know you can't transition right because both both vanish that i just don't know how to mathematically to mathematically even approach that or define that and b says if the particle is in the state like that so basically i guess now assuming all that i've been now talking about i i'm assuming that the wave so here they're saying assume that the wave function um of position is a linear combination of of these and that so it's a linear combination of either probably being in one or the other right show that the probability density is independent of time is it just because it's independent of time because it's not gonna change like you you're either in one like you're either governed by one or the other right because the two regions are non-overlapping but i'm i'm missing and you know that is part of the that is part of like that my my lack of experience in here is like how to formalize these things um because now now here we're talking about like okay they are overlapping partially and and so uh and then we're getting into these okay more complicated stuff but how do i how how would i show that so i would i would say i have a wave function so i have a wave function right and i know the particle is either in one region uh so it's an omega one so i know that the wave function that um governs the particle location is is this one and because this vanishes outside of this region so there is some boundary conditions in here right uh wave function with boundary conditions maybe there's like how how do we mathematically approach these um periodic boundary conditions boundary conditions [Music] all clocking that's all we're doing here so what do we so what are we doing here so the solution includes a product in the box was relatively easy because the boundaries conditions imposed the zero values on the wave function at at the boundaries numbers and the normalized function of the same problem opposing just these priority boundaries conditions i guess this is a pretty minor um particle in the box let's just go to the particle in the box see how they do that uh [Music] i guess it's i guess it's kind of a similar concept right so i would approach it by kind of having like in a way it's like having two wells right it's kind of like having two wells and then saying the position wave function as the wave function gives them also another description of the other so the wave function can be found by solving describing a destroying equation so i guess one way to approach this problem would be to kind of find the wave function and see that this wave function only depends on on on these one and not on this one right so kind of say um you know i'm kind of starting to i think i'm starting to to get the mechanics of this so uh what what's what would be the best way to do that like pen paper paint like that's that's pretty bad though that i'm not ready for this well but and that this thing is just awfully slow so i kind of start off by writing a generic wave function and then i'll probably try to prove that it um you know it's got to stay it's going to be it it's going to stay governed by these that the wave function is actually these um no no no no no no because what they do here is they say the part of it of this system so you have free particle so it's a partial differential it's it's a differential equation right and then you have the uh uh the kinetic energy the potential energy right inside the box no forces act upon the particle which means that the part of the wave function inside the box oscillates through space and time with the same form as a free particle here we're talking about a particle just a particle i can assume that is a fair [Music] and there's a fair approximation so this is just kind of like how does the quantum free particle mathematically behave right quantum free particle so the free particle with mass m and don't worry it's going equation or at position r and time t the solution of the parameters y factor so if so it means so so the free particle like wave function has these form [Music] give a second guys um cool great that looks like i have just 15 minutes anyway i've just been talking too much but i think i think that's how okay let's at least try to think through how i would do that and let's then try to approach you tomorrow um or even later today so if a particle direction one so the way that i would approach this right is by kind of saying cool so if i have a value function that it's a linear combination of these two wave functions because that's all we have and then i try to prove that um you know then then by adding like this kind of boundary conditions right you would say well outside of these regions the potentials are zero and so it's either one or the other right it just seems kind of obvious but like i don't know then if initially the particle is in the state of you know this and that and show the probability and so it's independent of time why would that be so how would that be that the probability density function is independent of time this means that this means that the probability density function doesn't change with time but isn't that the same like isn't that the same like saying well my probability density function is going to be always kind of determined by whether i am um you know whether the particle is governed by by uh by wave uh by psi one or psi2 right and so it's not going to change with time because i can't move between regions because that that seems to be that seems to be obvious but then like we need to find a way to formalize it mathematically so now assume that the two regions overlap partially starting with the initial wave function of case b show that the probability is the periodic function of time and by these i guess they mean that it it just repeats right the way the the probability density because um i guess if we consider this particle free particle that then periodically moves between the regions one and two i guess that is you know then then it like then it's it's like it's like a it's like a harmonic oscillator quantum harmonics leader isn't it or like a no just like a particle in the box i don't know but it's it's like you the two regions now can can or are combined you can combine them and so you can either be [Music] so the free part the particle is just oscillating so it's always going to go from being just governed by these being governed by a linear combination of both or being governed by by psi2 and so there's a pretty periodic periodicity periodicity whatever um it periodically changes um because you're changing from you know these three different states then starting with the same diesel starting with the same initial wave function assuming that the two eigenfunctions are real and isotropic so what it mean isotropic um [Music] isotropy is a uniformity in all orientations it is derived from the greek isis okay so isotropic it means they have presentations and mathematics and physics when a spinless particle decays there is indicate distribution must be isotropic in the rest frame of the game particle because this follows from there uniformity in all orientations that it that is that's what it means so if you assume that the eigenfunctions are isotropic i guess this means they're uniform in all directions so take the two partially overlapping regions to be two concentric spheres okay so you kind of have like there are two concentric spheres right compute the probability current that flows through the original omega one for this i need to know what current probabilities and and this i need to and these i don't know i just almost want to take a sneak peek at the solution i shouldn't um show that if a particle is initially in region uh omega 1 then it will stay there forever uh like and i let's see does my finger look like i'll because i have a tight screen so i'll try to use my finger hopefully you don't see it here flying around and now yes but like if i do this you probably don't you don't see that's cool so if i um how would i even approach these right so uh so i have basically have you know whatever of x t right so and i assume that this is um some like kind of linear combination of of psi one and and psi two all right well and these are not these are not time dependent so i think i think these are not time dependent correct they're not time dependent so so that would be i don't know so this is my starting point and now what um uh like it just in a way it seems that i just i'm feeling stupid because it seems so trivial like because i i just say well if the two origins are no one overlapping and we know that we're in omega one and we know that psi two is the one that is related to to omega 2 then i i by definition right uh by definition better is zero right and and this is one and so so this means that the wave function is just basically psi one right and it doesn't even change with time um it's not a function of time so it will stay there forever forever right like because it doesn't change so like like for all these like it's always going to be these so it's always going to be i don't know i'm sorry but i i have to look at it because i i just i feel stupid right okay it's pretty short what does it say so clearly um so clearly psi xt equals these okay let's take a look at these and so it implies that the probability so that the density the the the probability density is the same like this one which vanishes outside of omega one at all times yeah okay like clearly that's what that's that's that's kind of what i said right so clearly that that is i think i'm overthinking this stuff okay but what the way they do it is they you see today today i was today i was diving into this exponential annotation here and and lo and re-watching some of the three blue one brown um episodes about like this notation right because that comes from the um schwerker equation um and and and the fact that uh so that's that's a way where's that where's the shorty equation so i want to know why like like is it incorrect to do it like these like i guess that a right like that that i i guess that a would be you know that's that you know i kind of like i used a and like or alpha and beta whatever or a and b um just generically but it's in general okay so the schrodinger equation is leading differential meaning that if two vectors are solutions then um then so is uh any linear combination [Music] of the base in states okay so this is the so this is the notation that puzzles me that keeps puzzling me a choice often employed as the basis is the basis of energy eigenstates which are solutions to the time independent triangle equation in this basis time a time dependent state vector can be written as the linear combination where a are complex numbers and are solutions to the time dependent equation and this is just what so units right so holding the hamiltonian h constant the shrinking equation has the solution that is that is what i'm interested okay so that is a solution why because what i so so the whole thing with the exponential here and and and h being sort of the handle to an operator right is that it satisfies the concept that it's the sort of the the it's a solution to the concept of like the the derivative of of the wave function being sort of the hamiltonian times the wave function itself right and so so an exponential function is a solution to these that is just like a mathematical fact right because the derivation of and this is what i was just checking the derivation of like e to the power of a times x so that the the the derivation here um whatever that's a notation with respect to x right so the the it's actually a times e to the power of a this is this thing times like the function itself which which means because because essentially that's what the what what the stronger question is telling you here is this right it's just saying let's just assume that's like you know you move that i times spline constant here and that's like it's the differential equation and so what you're doing is just finding that solution that's going to look like that like that's just a possible solution right the time evolution operator uh and it is unitary and that is also a matrix right that's that's an important thing to note that is an actual matrix [Music] this is this is something that i just kind of have to i i have to in a way burn in my head like that's a matrix it just it doesn't look like right because it's like e to the power of something and for like lay people like me that's just so confusing but like either part of metrics is an actual matrix and so it's just a solution but it's just by definition because of the i don't know if the policy is right word but like the way that the exponential function behaves it's a solution to this kind of like um differential equation right that basically says that the rate in which the wave function evolves or changes in time is basically these times itself but i i can't remember like i where is where is the shrinker equation coming from okay that's maybe for another day i'll take a look at it later i think i'll just have to go now but but yeah that makes sense so that that is basically kind of you're saying um that this the solution to the stronger equation is these and yeah we'll see i gotta go
Could you make a video explaining how do you learn with projects instead of being trapped with the tutorial after tutorial please?, Sure! Happy to that somewhen this week :) stay tuned!
when I was playing the hello quantum game there was an article to a medium there was a link to a medium medium article which was I think giving supposed to give an introduction to the IBM experience article but I found this article which is basically about the quantum game I think and and as I didn't really fully understand some of the concepts I think I believe I'm hoping that this is gonna help so let's see so basically if you if you want to start playing with chronic computers if best practice to experience okay the very basics the Wiccans we can just crawl over that forget on computers it is true for zeros and ones and Ono's so this is the introduction by the way this so dr. James Wood on I hope I'm pronouncing your name correctly I think he is one of the or the main brain and developer behind the hello condom game so I think that could that could the contents of this article could be good ok so asking give it cubits questions okay that was also explained and and it seems like the same it seems like the same images are being used so that was also I think part of the learn war guide within the game the process of getting a beat essentially asking questions you can ask and then turn 0 or 1 0 or 1 over the last few decades of studying cubits the possible questions have become our favorites done language about asking questions so not but I guess it might make it easy to maybe explain it's sort of an analogy right because talking about measurements can be confusing for people I guess why I mean I don't know so despite our infinite set of choices we usually just pick one of these one of the questions is to ask the bottom circle is it black or is it white and the other ones the question is to ask the same thing about the top one so I see you see I that's following the same style like we see in the game I the only problem that I have with that is that you're you're kind of sugarcoating something here right which is this is it's the same cubed right and then this is just what what do you see if you measure it in a certain way and if you measure it in another way so but let's go forward asking questions parents III have having played with that but I'm gonna definitely make an extensive set of videos about the quantum experience the IBM experience because I think it has one of the most and the best interesting tools to build up intuition about quantum computing the AMEX kind of poems is a collection of lines so this is you know and you're basically introducing the concept of a circuit here's one he's the one you need to you need to ask about a keep his bottom circle yeah so we see this is the so so here we have offs it's it's always zero this is wide and on so it's always 1 and here here we have like the the the uncertainty but what we know even Dada if I remember this well is that this is after playing a how to mark gain and it's it's off so it's a zero but but if you measure them this way you get equal probabilities zero and one yeah so that's the that's the okay so that's the next measurement that's how you measure the keep it at the top sort of saying okay so you've got the same examples right so it is some examples but in this case you've got now you measure that you measure that and here oh no it's not some examples but okay the same outcomes in this case 0 1 and here despite the fact that if we measure it in the previous way we know it's off then if it's both equal probabilities here and 1 I have you might have noticed something the images above on the top circle is certain yeah okay that's so that that thing here is an interesting concept so basically what they are saying is that when the top circle is certain of the answer the bottom circle is completely uncertain in vice-versa that is that is definitely helpful because it gives a v1 on what's the nature of a cubed right so you're playing with certainty and uncertainty and and and you move this certainty and uncertainty around this is because the qubit can only be certain of its answer to fundamental uncertainty in quantum systems ok ok but that's what I'm interested in now exactly so what happens with two two qubits and you see here we don't have here we here we don't have anything here in the middle and and in the game we did have a grid and I definitely want to know what this grid means I've got an idea but let's see let's play with two qubits at once so it's the same way but like exactly like that so this description isn't good enough good that's that's that's getting interesting so thanks to the constantly present randomness this description isn't good enough for example here's something we can do with a couple of qubits before they get measured ok so these this is creating a the Bell State so that's creating an entangled state that the constantly so you can only measure both zeros and or ones sort of say this we know from other examples this little corner program for - Cuba - okay we'll get around explaining all this components later yeah I mean okay it's letting saying forget about the gates for the moment so okay after we run this program let's ask both Q bits about your bottom circles so what's happening here okay so so we've got the circuit everywhere and then again we're asking all the questions so that's these two are we thought how the Martin these are with the harem art so here's so here you've got the question here you've got the question the measurements say right and then so in this case this qubit in here can be both 0 & 1 50% probability the same one with the second qubit in the system and if you do the same here you get the same so I see this is trying to say where is the certainty and where is the uncertainty and no matter how we measure that we see there's uncertainty everywhere here there's uncertainty this isn't certain here so they're all random so so according to that this means that the the way the the circles would look like would look like that so after so that's the starting point that's the starting point and then and then basically this is saying so so what we have that's where where is the certainty where has a certainty gone [Music] it's a Kawai of looking at things okay so and and that has probably moved in the grid in here okay and this is a that's a really neat way of showing that okay because here all we're doing is we're asking questions to independent qubits and and of course you see that there is each qubit is completely uncertain that's cool nice but when you ask the same when you ask both at the same time so you're you're measuring so you're measuring the system the the overall system then you see where this is 0 0 1 1 beautiful so this is where the information has gone right so though the bottom circle give both random and says the those answers are certain to agree nice that is definitely something so okay so what this is saying is they give you random answers but they're going to agree right once but measured together they will always agree so they're both zeros or both ones and that's the correlation right so that's that's entanglement and this is a pretty strange thing to happen to keep it really didn't know how they would answer these questions until we asked them but somehow they conspired to always agree accounting for effects like this is going to require some extra detail in our visualization for the qubit state so we need to keep track off whether the answers given by the two qubits agree or disagree that for all possible pairs of questions ok I see so so this is what we're adding now this guy here which I think I I think I think I when I was playing the game I got to a similar conclusion where I said that probably means this is probably encoding information about whether they the movie or not and and I was confusing because I was not sure whether the blacks are off means mm okay but if they say when the color is black then they're certain to agree that's the that's the that's the I guess the convention so and now if we try to ask both qubits about their top circle you'll find that they always disagree so so before it was before it was here and here and now they're both gone in the middle after applying a hierarchy I still have I still have so have that feeling comfortable with this concept of understanding this as a me as a measurement rather than saying no no I'm for me is I'm always gonna measure this way so I'm just gonna and consider those part of the algorithm right not part of the measurement um but I understand why you think about these in that other way okay interesting so we'll need not another circle to represent these okay so yes in this case because you have the the top circles and and those refer to to these whether they agree or disagree and and then you have the bottom circle which is whether those guys agree or disagree okay that's interesting so what about this what about these I'm guessing I'm guessing that probably might be whether these and these agree or disagree although that's a pretty yeah it's pretty it's a lot of stuff you can really encoding that's cool okay I get it it's more forward you could ask one qubit about its top circle and the other qubit about its bottom circle I know yeah okay of course yeah that's what I said that's that's basically that's that would be basically the the top and the bottom so and what happens when you do that is that you get so if you transfer measurements you will find that they are equally likely to agree or disagree okay so they're kind of random in that sense right okay random yeah so this is this super interesting okay super interesting given qubits answers the trick is a full description okay so good so we know that so this basically this thing in the middle in the gaming codes the time so how is the how the correlation between the qubits so this is one qubit this is a so this is one qubit this is another cubed and this is the correlations about those qubits but we have to remember that these dimensions here they are basically the same qubit but measured after a Hadamard interesting that can be complicated I guess I came that's it's going to be it's kind of be complicated to intuitively build algorithms at a higher level in terms of number and amount of qubits and stuff like that because this is tricky to represent and know what's going on so maybe there is a way you can maybe there's a better way to build intuition but I get those concepts that's really super useful give Cupid's answers zero this is so this is again the guide so that portion here right why is that not in the guy why is that not in the yeah maybe it's to of course maybe it's too it's too technical for the game maybe that's me they conceded too technical for the game like you don't want to show necessarily all that stuff but I mean it definitely helps if you're trying to build intuition and I guess people are gonna play the game to build up a bit of intuition and so two cubits at the beginning of their lives look like that okay so that's how they look at the beginning of their life this means yeah and again that tells you it's not that they're entangled or anything but it tells you they will always agree if you measure both of them when you look at zero you're probably wondering about this and this okay that's just a bracket notation for every corner so now introducing the notion of gates and here we have the XK to to basically basically flip that okay state one judging the bottom circle of acute also thinks how it relates to all the qubits of course and that's why that's why these changes as well right so now they disagree okay mm-hm disagree and the same here and then that is though that is an interesting way of seeing the Zed I of course if I take a look at yeah because if I think about the Bloch sphere that's what the Zed does is that it's basically going from the plus side to the minus state and if that's not like something you had no idea what I'm talking about which key see an introduction sometimes we might also flip the top circle but that's cool so that's a way to intuitively think about it is so what does - what does that does is it basically flips the it flips whatever information you would have in the whatever I don't know how to I don't know how to call that because it's like it's in another is its basis am I using the right termination the terminology like so I've read this somewhere so that's a measurement basis right the the one that's like the the harem art and then the measurement so that is flipping that as well okay so it flips done as well mm-hmm okay so what the hardware does is it it moves it moves this certainty around okay so those are Clifford operations yeah I'm probably going a bit too quick basically I've with that but I've those are things that we've seen that I've gone through already through cue sharps introduction and and yeah that's good okay I change the question to Cuba Sisters NASA - for example I can take the state zero then swap the black circle up to the top then a qubit that was certain towards a zero mmm it can't be zero because the name that name has been taken Plus okay so here introduce the plus side okay which is what we're saying yeah it's the plastic then in the - state is the equivalent but with with the once if we do first next gate and then we playa before the harm art or is that after you make it stop circle oh yeah of course so it's either X and age or age and set mm-hmm okay okay that was definitely helpful making qubits talk to each other as we've seen qubits only have a limited amount of certainty in their answers to questions when programming chronic computers our goal is to manage that certainty as best as we can we must guide it on in on a journey from input to output so far we haven't got many tools to help us do that in fact the educate is the only one that moved a certainty around okay great quantum hello quantum okay so here we talk about the control gates and we also talked a little bit about that and in the game there is a controls that gate which is introduced in level 3 I haven't gotten that far yet I'll probably play the game a little bit more I'm not a big fan of puzzles but uh but that maybe you will maybe we'll discover something interesting so there a few possible ways we can explain the effects of the control set oh that was also in the game so I'm gonna skip that so that was all so indeed if you check out the video if you check out the video where I play the game I basically go through the guide in the game and they explain that already so the two different types of how do you explain the controls at which was which was I think maybe you should do a refresher anyway but the idea was that it's you know you apply is that you apply said even only if the control qubit is one so obviously so let me go all the way up here just quickly I think that was I think that's exactly the same it looks at the bottom circle and if it's black that's a set to the right cubed or there's nothing to it it's white or black it's why the left cubed is therefore effectively acting like a switch yeah so in this case to see that because this is because this guy here is is on it's no no because cuz this guy here is on then this is flipped is that the thing because this guy is on this guy's flipped exactly exactly and there was another explanation but with the qubits reversed and then there is a third way of explaining that which is quite different it moves circles around two sub pairs of circles said subsidies it swaps these pairs of circles basically it's an interesting way to see it so because if now I understand that this is you know whether whether the qubits agree or disagree and in this case if it's off it means they agree so it means this and disagree because it's there they're a zero so basically it basically that's interesting way of seeing it from intuitive perspective so it basically says I'm I'm making a trade off and I'm switching the certainty of agreement I'm just okay so they are done what you're saying is they're not agreeing anymore anyway it's this is definitely the controls that is more complicated intuitively in that sense but it because the control legs understand you flip or you don't flip and the controls that is like you don't control sorry you don't don't control that so but in in that scenario here for example it seems like you could explain it as in you're switching so you're making them go from agreeing to disagreeing right so from agreeing to disagreeing that is something to prove this isn't to check whether this is what it means so you switch maybe maybe intuitively you could say that so basically you're switching the type of correlation maybe that's a way to say that controls that the controls I basically flips the type of correlation whether it's they agree or or disagree I don't know if that's correct expression now we have to travel some parts check what it does to the circle at the very top of the read so so when you have that we're both there there's full uncertainty but you see the correlations that day what okay so this is the this is a confusing point right so what's going on between here and here because in mine in my intuitive way of explaining that would be okay so the qubits you flip so you're saying they whether they agree or disagree but in this case how would you say that you actively explain that so I mean maybe that's the thing is you cannot because you need to take a look at what because I remember that they add another measurement exactly that's this measurement that's they were doing this in the guide as well so but in this case here's wide which means what that's confusing why would it be a one oh yeah because they disagree and here they agree right so it basically doesn't change okay I see so what this has done is a case it's not so they they basically trying to explain that and I cannot explain that so probably should just move on but it seems like here is it here there's like an agreement in a disagreement and then those agreements and disagreements they move to the actual cubed states yeah um and here the same right so so basically these these goes here and this goes here and this goes here and this goes here and then this thing just I mean by following the rules of whether they agree or disagree they obviously turn white and black accordingly with understanding this effect but if you want to become a programmer you probably like to know what's going on so we're okay so this is so let's make that a challenge let's make that a challenge and so understanding the controls that that's gonna definitely gonna definitely make a video out of that I think that that can really be a breakthrough in my building up intuition the creation of quite Bikaner the in circles and fully scrapped a pair of qubits for a complex for a complete description but as interesting is this really a complete description so okay so for a complete description we need to add another possible question the queue experience description can be done with the following gates as transpose Hannah Mart and measurement and that adds the circle yeah so that's basically that's basically that's what that's what the that's what also where the game finished where the the the thing finished the guide in the game finished so and now you have fully full description of a qubit it's an definitely interesting perspective that with this you can solve the mystery of the controls and okay okay challenge accepted yeah let's do a video on that later on soft demonstrated controls that you can check out the X Z and H gates effect these new circles and beyond cliff for it all the gates we discussed so far flipping circles black and white but there's much more you can do is apply for it gates there is way to move there's way to move information around in quantum computers they're also excellent at error correction bla bla bla for for chronic computation however we need something more we need to move beyond circles that are just black and white and we need ones that are mostly black pretty much random a bit biased towards wide and that's exactly what I meant I think that's beautiful to go through all these examples but really the true power comes when you mess up with this and then you probably it's then it's probably more complicated to stay at an intuitive level because gonna have different probabilities for each of the possible outcomes but okay so an here says if this okay the app version is just playing with those and if you want to see you're gonna play with with all these other gates and there's a command line version ah we'll do a video on that as well a command line version it has an extra gate called Q okay beyond two cubits the game hello quantum helps you build up intuition and knowledge with just two qubits once you have that you can being begin tackling larger numbers yeah three cubits okay so that basically tells you why why it's impossible I guess to simulate a I think I was in the game as well oh and that's D okay and that's the article that was linked in the app doesn't need to build them okay cool so definitely I've learned something I definitely learned something which is what does this create in the middle mean and that just has basically triggered more interest in trying understand where the controls at does think I have an intuitive understanding parem not there yet I would say perfect but it's definitely that's cool so this is basically the these encodes how much those keep it agree or disagree so the entanglement basically that's that's where I was going on I guess cool
Hey man, authorize your videos to be captioned. I want to translate it into Portuguese., I&#39;ve turned the community contributions on for all the videos and future uploads<br><br><a href="https://www.youtube.com/timedtext_cs_panel?c=UC-2knDbf4kzT3uzWo7iTJyw&amp;tab=2">https://www.youtube.com/timedtext_cs_panel?c=UC-2knDbf4kzT3uzWo7iTJyw&amp;tab=2</a><br><br>Thanks!, That&#39;s awesome! Will do asap!
welcome to strange works cool um I hope I'm able to share these video before they launch because I really would love to um but I'm not gonna show the platform I don't think it's fair I just wanted to play one of the introduction games that they they have in there which is called the it's called the how's it called the Ruby Rubik's think so it's a really nice puzzle that basically this is just some stuff for the company I won't go through this in the video but basically yeah the Rubik's fear exactly so the idea is and wait a second because I was told there's some spoilers in here and I don't wanna I don't wanna no no no no no no I don't I don't I don't look at the screen right now don't look at the screen right now don't look at the screen right now there are some things in here that I don't want to read but yeah that's that's the points on that a qubit is being basically span in all directions and then the idea is figure out without knowing where the qubit is pointing at or what's the current state figure out how can you make it to point 0 with a probability of 1 now I think this is more mistaken here 0 should be here right never mind but 1 so that's a boo here and that's the code so but we shouldn't be taking to look at these because you know it's trying to obscure where the QED is really and I'm gonna try to solve that in two different ways maybe there's gonna be just time for one in this video but I'm definitely gonna be another full of live with these doing this so first I'll just try okay so we'll just try it here's basically scramble to rotate so then I scramble it by rotating it we're here and there and everywhere don't cheat don't look too much how I scrambled it it's not obscured and then couldn't you're okay the Psalter ixia probably new to rotate the state so it reads zero with probability 1 and we run regularly for more than 10 iterations so to make it simpler now that we solution will be just combination of the following gates so you're giving a bit of here the gates you can use and then you can add them and just play with that let's go ahead so I kind of see two ways to approach these so one way to approach this would be with something I recently learned that's kind of something with got to do with something like tomography or whatever it's basically measure the qubit in from different angles and then try to so you kind of see where it is right and then if we would measure the qubit from the Z perspective the X perspective in the white perspective we would kind of know where these and we also know way it should go right because if we want this to point us here all the time it basically means that it has to measure 0 all the time by a measurement it's gonna measure probably one in 0 50% of the times with an X measurement and also with the Y but probably there's gonna be some kind of phase in there my guess is another thing we could do is we could also use we could also use bad but Penny Lane qml so penny a penny Lane has a really cool tutorial that I did the other day which is based a qubit rotation son well I'll do this next time so because they also integrate with Penny Lane so that's awesome and then basically what I would do is I would because in this tutorial they train a circuit to actually following the gradient descent technique to rotate from one place to another and so we could do this we could use the same technique basically I guess that could be cool that could be a cool integration example but let's get to it so what happens if I do that measurement I don't really need to do that I shouldn't really need to do that but because measuring without an operation already gives me their measurement on the set basis but let's just let's just do it or you know it's let's better not do this so can I get rid of these basically the faux pas so run the code I want to run it for ten iterations run this project see what happens so what's gonna happen now shots ten that's a circuit and okay so we get 80% of the time zero and 20% of the times one so that's not ideal we would like to kind of get a 1 here all the time so good now let's go back and now let's try to do a hotter Mart so we do a measurement from the X from the x-axis right Save Changes run ten iterations so what we have here ah look at this that's easy good that's nice so it's all the time one well this kind of means the state is in probably its then in the minus state really so if I just apply a if I just apply a next gate after that then we r cubed 0 it's a nice it's a it's a it could be I hope there's no trick to it though so ten iterations now should be always zero come on come on come on come on come on come on here we go it's 100 percent of times so we we solved it right yeah we solved a that's good maybe I mean we got some time so why not try the qml one the solution but that's that's cool that's actually cool ah like that it's a nice it's a nice game so did I what was the always the clues so or the clothes the clothes we're use at least 10 iterations you only need a combination of X Y Z and H gates the author forgets makes a difference and you can do it with just two gates oh we've done it with just two gates so we get like the wicked bonus right that's good
😃Nice, I get 👐excited👐.
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
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
okay let's get started i think um i'm ready so i've been doing a bit of preparations before jumping into doing this video it's gonna be a bit different than it's gonna be something different right so it's not i'm not i'm taking a step aside from the from the portfolio now for one video to just do um one one session on on this article from brian um who basically we've been there's been a bit of a bit of a back and forth between him and me uh in twitter um about like a series of articles that he's been uh they've been writing about like you know building classifiers with um with with like control swaps and basically uh sort of the swap test right um where to start just to make sure that you that i can give you the the the con the best context possible so what brian is claiming is that um well first of all so brian is claiming different things here that i don't find really good so he's he's claiming that he can basically map like a hundred thousand k data points into like four cubits or something like this like and and well he really um i hope it's gonna is it gonna let me uh come on i don't wanna have to pay for unlimited access um but in reality what it's doing like if you really let's just focus on this one the last one right so because i think at the end of like you know we've been exchanging some some some tweets and whatnot and basically what he just went ahead and and uh indeed like a version of his algorithm but for for the amnes data uh data set right and and so he keeps claiming the the same thing um was like he's incl he's he's encoding like hundreds of thousands of data uh points in just a bunch of cubits and in reality like if you go through these and basically what he does is he takes the csv data from like this like the references so this is really helpful brian like that you actually put all the references in here um it's basically helped me to to uh kind of try and reproduce the same uh so because what i did is and and this is the preparation that i that i've done for these is i took the same data set i basically um kind of worked on these i did this off camera because it's just too big i think brian took the test data set i took the train data set which is has more data but it just goes it just was going really slowly so it has data that looks like these where you have labels and then you have uh each column is like a pixel right and so what brian does right if you follow his algorithm in here is so is this four steps right so for each of the ten classes going from zero through nine calculate the normalized mean of each pixel by dividing the average value of each column by 255. so this is the first thing where it's like this is just like a really uh kind of native approach okay but what he's doing is he's doing what i did here which is basically staking the and i use this average if kind of function so i'm what i'm doing is and i'm taking 50k uh rows so for each pixel it's averaging all those that like belong to the level zero all the ones that belong to the level one uh and so on and so forth and then dividing them by 255 so what you do at the end of the day get is you get like a long so so if you get like an average picture like you can imagine um that pain right so if you have kind of you know one zero uh sorry brushes one zero is like these another's like that and it's like that others like that and it's like that so you know and you have like you have like maybe i don't know like 30k or whatever of these so at the end you get like a you know kind of a an average like a pitcher was like that's your average zero right this is and so first of all this is you know like if you're calculating averages right um like if you take like 10 000 numbers and you calculate the the average you get a number right if you put that number into a cubit then you're encoding one data point into one qubit you're not encoding hundreds of thousands of data points into one qubit you're calculating an average and you're encoding one data point into one qubit so this um this kind of claim in here it's it's it's already uh it's already be misleading but it's fine so let's just go ahead and see because what i want to do is i want to try to basically prove i have the intuition that that the way the brain is doing it like does not like you don't need a cpu for these uh okay i'm not saying the quant i'm not saying the overlap test or sorry i'm not saying the swap test is not something quantum i'm saying the way you're doing it it's it's just you don't need a quantum computing quantum computer for that um and yeah so basically what he's doing is these right and that's what i did here uh and then what he's doing is in the next step is for each of the 10 classes some the normalized means in a pattern inspired by a convolutional neural network so he selected a 4x4 grid of 49 pixels so um 4 times 4 times 49 it gives you 784 which is the amount of pixels that that the set has so what he's doing is and then he goes ahead and he explains here i don't really understand i think i don't understand much what what the columns here mean i guess they mean the columns of the data but i don't know where the 49 pixels are in here because if i count maybe the picture is just cropped or something but here you've got like a four by four right a four by four uh matrix or greed and then in each creed you have to imagine there are 49 pixels and and so he does is he averages these 49 so he says for the 16 squares for the 16 squares for each class um sum and divide by 49. um so basically what he does is you know the equivalent of if you have your you know like let's say you've averaged your zero so you kind of have something like that and i'm really bad at drawing right so what he now does is he says well let's just take like you know chunks like these right and kind of like you go you go so you basically reduce the dimensionality by by averaging all the pixels in here and saying okay that's that's my my one like my square one my square two right and so you kind of have your your values in here and what this will mean is you and that would have really blurred kind of zero i would say i don't know so you've got the same blurry image but like with less resolution so we're saying i i think so i think that's uh i think that's the right analogy uh that's the way i understand it okay so if uh what i did what i did here is i i basically what i did is i kind of did a trick with i hope this is right but it doesn't really matter the other day but i think it's correct so i did a basically um i put in here the columns where the sums should start and so this starts in column two because column one is column a and so this starts at column b plus 49 right so because b plus 48 is 49 pixels and then the the sum should start at column 51 and yeah and so basically what these what this is doing is what i'm telling you is i'm telling some you know add like i'm calculating the range that i want to add things right based on these i'm saying at the you know b2 and you know until b50 right so that's what this is saying so and then divide by 49. i'm doing exactly what he says but i i think the difference might be i don't know if he hand-picked those you know he could be that he hand-picked the these here but it shouldn't i think my proof i mean my proof does not depend on these i just wanted to show that uh because i know he's not gonna complain that i didn't do this so um so here it is i mean so you have like i have here basically uh these 16 for the for the label 0 i have 16 numbers for the label one i have 16 numbers so i have like you know all this kind of low resolution average right um and then and then at the end of the day i just do a bit of a bit of cosmetic in here so i can just take the string and copy paste it into into my notebook yes the same here i'm going to make the same note as brian said you don't need to do this in excel you can do this now you know with python numpy i just wanted to follow his process step by step so but what i did is i created the brian amnest notebook and i just copied the data in here and then i did sort of this this the same process for a value that i randomly selected uh randomly i mean what did i do so what brian does is he then tests these against zero right so um where is the where's the article so he goes and and he says now we're gonna get a zero um now we're gonna get a zero and uh and we're gonna test it against a zero right so a test number that is supposed to be zero and then he goes and and he's like those are the results so it's a 90 percent chance this is zero 91 chance is one eighty-four percent chances too like this shows you that like what you're getting is really an average result like what you're getting is really like um you're comparing gains on average like the fact that the fact that those numbers is so equal actually should tell you that there's not so much confidence in these but okay he still claims that that this is the selected value um which is zero fine um cool i think that's enough of background that's enough of a background because then what i did is i went here i just picked like a roll randomly i picked 110 where there's this zero so i pick this row and i kind of you know flush it through the same process so i created the test row in here i created the compressed like the low resolution um the low resolution version here uh and and sort of i uh i kind of had it here uh i added it here and what i did is i copied the code that i shared with him like a couple weeks ago i shared the code where i said you know look you can't just calculate the occluding distance between these two points like between this point like if you imagine that these are points in like a 16 dimensional space and you calculate the distances that's kind of effectively doing the same right like the let's let's let's think about what the what the swap test is doing so what the swap test is doing is just calculating you how uh it's calculating how like how much um overlap there is between two vectors or two states right and if you think about a state as a vector and you can just think about two-dimensional vectors like if if your vector a is just like you know these and then your vector b is just like these right and let's assume they're all unitary because it's current computing and all that stuff so it's just you know it's just assuming it's the same noise they're all like size one or length one so what this tells you is how much overlap kind of there is in here right and and what the swap test will tell you is if they are like if they are like fully overlapped then the probability of measuring zero is i think zero percent or something like that whereas if they are orthogonal it's going to be um 50 something like this if i'm if i'm not wrong so i think i have did i so sort this by the way i'm gonna close i'm gonna i'm gonna close the excel file because i it's just gonna burn i think i don't want this to burn too much cpu but i think i saved it so it's good if i just close this so i just don't want to i copied all the data uh in here so we're good to go and uh so subtest wikipedia that's probably another background and and now we're going to start to be improvising okay so i i don't know if i'm going to be able to prove it i i kind of think so i think my intuition is right so what the swap test is doing is basically um as here as they say here right so if the the two are orthogonal then the probability that zero is measured is one-half and if the states are equal then the probability that zero is measured is one it's 100 zero you have a quick query implementation that i was playing with earlier earlier today so you have two simple states and they are equal so this is zero right and i'm not going to get into y disease it's got to do with um with sort of the different branches that this is creating so my point is my point is that like my intuition so what what is my intuition uh my intuition is that if you if the states you're comparing are known like you know which states are they and you know how to generate them like you should be able to compare the the sort of the the the generator of the state with each other the generators of the two states and kind of by measuring how different they are like some sort of cost or some sort of distance you should be able to kind of already know whether they are the same or not because they basically if you have the same parameters and let's assume we're just you know for the sake of simplicity we're just using like a y gate that has like its exponent right so if the exponent is the same then it's obviously going to be the same state right if the exponent is different or even let's say that you know um for example what if i um what if i add like so these right so this is is uh it's different in the sense that like a block sphere here will show you that this is sort of halfway here and so it's not zero anymore right um the probability they're nevertheless really similar right the probability of measuring zero is the opposite of these it's like you know uh it's more than 99 so it's they're quite similar from that perspective if i take a this one right you get the they are orthogonal in the sense that i know they are not orthogonal in the block sphere but they are orthogonal um in the sense that they are completely opposite uh the plot sphere is falling here but then you get this 50 and kind of you have all the wrench in between so if if i leave it at the state zero you're going to have a 25 percent chances so like 75 percent of being uh zero so what what this tells you is like it's kind of half way of being the same between the orthogonality and uh right but it doesn't doesn't doesn't really matter you understand the point right so if you this is my intuition my intuition tells me that if you know you know and if you take a look at the way that that brian um does these it's actually i mean he's pre-computing he's pre-computing the parameters for the u3 gates okay and even if you go simpler and say because what he's doing right is he and this is actually an awkward thing to do and i don't think that's a correct thing to do to be honest i'm not so sure it's not so it's not so obvious to me that if you because i'm telling you i think he's encoding two so what he's doing is he's encoding uh like two of these values as two of the three parameters of the u3 gate so he's i think using these two parameters because the lambda is basically a set rotations which you uh you can ignore if you start with a zero state so i think he's encoding these um these two parameters in here rather than calculating the overlap of these but that might be correct i mean in the sense that as i said like if you have the same set of angles like if i have two u3 gates right i mean let's do this okay so let's let's start with a small example what i want to do is i want to try to understand so here we have the um let's let's even simplify this more because it's going to be easier to visualize let's imagine that we um that we just uh use like a uh an ry rotation or an rx let's use an rx i don't know or r y we can just whatever r y because i think he's mentioned this before um if you have an r y rotation this ry rotation has one parameter which is the angle right um so what you would do is you would kind of encode each of these elements like times pi probably right so you would say because this is a normalized value is between 0 and 1 so you would say that that proportion of pi um and so you would you know this would be 0 times pi this would be 0.001 times pi and so on and so forth and so you would encode these how can i approach these how can i how can i approach this in a more systematic way like you you are encoding this in ry rotations and then um what i want to know is i want to know what's the uh where's the wikipedia so let's assume even the simplest case where these are just this just one qubit and this is just another cubic right and let's do this so what we have to calculate is we have to calculate these um this i i want to express this function with sim pi right so you have um so how to do this how to do this with synpine so what we want to have is we want to have oh by the way if you do these like if you run this code where it just calculates your clearing distance like it it classifies my uh like also like i mean pretty well i don't know it's just that's the shortest distance is to the to the zero element it's similar to the two and the three point 29.28 but that's the shortest distance so it classifies this correctly and it does this like in a just matter of seconds uh or milliseconds so um not like four minutes which is i think what what brian circuit takes uh but i get it like this is a nuclear distance so it might not be quality-wise the same but what i'm trying to prove here is i'm trying to prove that that if we if we have this specific uh if we have this specific set of ah sorry it's messy if you have this concrete this concrete construction where you have single qubit rotations and all you're doing is parameterizing them with these values like you can just compare these values and and that should tell you the same the closer they are the more probable that element belongs to that class right um [Music] intuitively seems to make sense and thinking if there will be a for this there will be like a formal way to prove this though uh but okay let's see what do i what do i want to do i wanted to do a small example and plot this i want to take a look at this so this is the function that we're trying to have so it's a it's it's one half uh i'm going to be losing these quite often so just organize the tabs here and it's in pi i need to check that so i open because i know you can plot with scene pi but i'm like okay so basically we have an expression so this is the um the prop the probability of measuring zero it's basically one half plus one half uh times and now you kind of have okay so uh senpai absolute value complex absolute value just absolute value no apps if you find your symbol this will be actually real true then you will get correct expression for them with your simple symbols given as complex and absence not know the real inventory parts of these pieces instead of so the operative apps cannot give you what you expect uh that's going to be tricky to do how do i expand complex through how how can i do this so uh because this is a transpose of maybe i don't even need to use the complex numbers here if i just stick with uh if i just stick with the what is the ry matrix quantum roi metrics because the u3 gate has got some complex exponents and stuff like that so it's going to be it's just going to be funky too but i can try to do it by hand maybe it's not what i wanted all right gate like documentation oh there's actually of course yeah there has to be a complex component oh no actually it's just like that i can use the matrix like that okay um so i basically need this is where so i have the what i do what i what i want to do is i have the uh so i'm starting with the with the zero state and then i'm applying like uh a rotation on like unlike whatever angle here right so this is um for one qubit that would be like these times and then the ry matrix so i want to have i want to get that into sing pi uh same pie i i just used it for the for the portfolio stuff and i already forgot like simple mattresses so what i want to do is i want to have the uh so do i find a matrix like that okay so uh and how to simply cosign how do i define those things just just like that sp sp cos and then the symbol right so here we have just one symbol which is one angle but we have two symbols because we have two angles because i have two qubits so actually we should do like uh i'll just call it x and y it's like sb symbol x and y is sp symbol y and so we're now doing is sp matrix so we're doing now these right cosine minus sine plus sine cosine so we're doing like sp cosine of x divided by 2. minus 1 times sine of x over 2 right and then we're just getting the same down here but it's just sign in cosine i think right so this is the this is the the matrix uh oh that is probably this this is the norm squared not like that yeah this is the norm squared so what i want to do now is i want to multiply i want to multiply these by another matrix which is basically one zero so that's the kit to get zero right and i want to have everything transposed actually uh because can i not define this in a more modular way this is going to complain or not that's complaints symbol is not defined tuples at least in the system is mean they're just no slices let's get rid of these for a second okay or what is this oh no like oh wait a second no that's that's that's correctly fine that's correctly defined oops i just so complaining list indices oh how do i print things nicely i also forgot print nicely pretty output was imprinting was it like this sp in the printing and then i say print that's not nicely printing anything oh i think this was only working as long as i just uh was doing like like these i think that printed nicely yeah that printed nicely okay there we go so we have this matrix so this is the this is this is basically the air y matrix expression cool the transpose same pie what i'm trying to do what i'm what i'm really here trying to do is i'm trying to um basically make the function and plot the function so we can see that as those kind of variables get close together this is where we have like that maximum or minimum i don't know what we're going to see uh yeah that's the transpose right yeah that's the other one cool so the transpose will be like this okay perfect now what we need is we need kind of these times okay these times like sp matrix one zero what you have is just like just like these right because you just have the zero it it this is this is the ket this is like the cat zero so basically you know uh this would be something like the air y of x times uh the k zero kind of that's what we're trying to do here because that is basically it equals our like let's call it state a right or like yeah yeah this is cool um what we're now going to do is uh b is basically the same but with with with with y so this is another parameter right cool so this is basically y this is basically y cool so this is basically kit a and this is uh can't be we want to compare kaden could be okay b is it's base it's on y and x and y are the two angles right in this case the two data points and cool so we have these so now we have these these we can build these but now how do i say the the norm so um senpai matrix norm or it's the vector norm norm norm was it so slow what's going on i'm gonna close this same pie metric snore okay that's that's norm normality with norm no that's their normality yeah what's their norm exactly that's that's correct so what we now want to do is we want to have uh here's where i am so really what the express can i can i do like like can i do these like cat a plus kit b and then print a oh yeah okay that's nice that's neat cool so i can do is now i can basically say well i have like my prop zero is basically one and a half plus one half times and now i say well uh ket a transform times kept b and from these we want the norm and we want it squared and i want to know if this is going to work like i'll be surprised what do we have in here oh nice okay so we do have yeah so we do have something here we have something here now cool let's test this okay so if i like how is the how was the so how's the replacing thing so how is the same pie replace symbol substitute subs okay i can do something like that you can just do something like this okay so what if i say sorry i'll just call this prop zero that's all fine and now what if i just say prop zero substitute x for like does this have to be uh does this have to be like and like radiance i think so i think this is going to be in radians how do i know that though attributes label params theta doesn't tell me that's bad documentation but i'm i'm gonna assume it's pi don't kill me for this approximation so we're going to give it the same value and it gives me 1. so this means the probability of measuring zero is one it means these two vectors are the same if i replace these with like say one is zero and l1 rotates then we have 0.5 nice okay so it seems like it seems like this is working let's go let's see if we can plot these okay let's see if we can plot this um plot plot plot plot i lost it no plotting here okay so how do i plot this i have this thing okay so there's this plot function and then okay so i can just i can just say plot and give it the function right that's it i can that's pretty cool so i can just say plot prop zero well i obviously have to do it like this oh on universe expressions being plotted um very simple what does this mean um should i give it like should i give it uh so simply plot to a 3d right i think this might be different because it's probably a three-dimensional plot how do i do a 3d now so i can specify the ranges well plot3d okay so there's actual plot 3d that's that's neat would it just work out if i just do this no you got a half plot plot 3d it's plot 3d plot 3d come on you have it don't tell me you don't plot 3d once you tell me you don't have it module simply has no attribute plot 3d should i import it like this should i just oh that actually opens uh that's cool uh i just wanted to import these i should close some tabs okay it's plotting no but i want to see i want to see the plot it would be nice if i could see the plot um you know how do i how do i how do i plot the whole thing plot 3d so plot 3d scene pi doesn't show doesn't appear is it like a parameter that says show true or something like that will not display the plot it will not so by default essentially falls in the function will not display the plot also has actually something called show so if i if i probably has it as well so this is i'm going to show you or oh yeah oh cool oh nice okay so how do we interpret that yeah well basically so what are the variables so it's kind of like a wave right yeah basically but okay so what if i give it like can i give it the range between 0 and pi that's what i want to give the range so uh what it was what was the ranging thing expression one range one so plot 3d plot 3d arcs expression wrench x and range y so arguments okay something like this right so if i so now i can say x is between zero and three point fourteen and this is between y and this is y is between zero and three point fifteen okay cool can i rotate this so we can see we can see what i mean um i like to write to rotate or orient that somehow i see that i don't need to show it now it appears for some reason um but you can kind of see that the the diagonal right it's where you have the one is where it's the diagonal right so it's kind of where both x and y are the same so everything else kind of fades away right um [Music] and i i kind of i think i like the skills right now to see if i could formally prove that for any number of dimensions so it kind of feels like at that point right if i um if i just compare the [Music] if i just compare those angles right that should just that should just be right i can't things i can't play with visually with more variables because i'm not going to be able to display like a four or five or six dimensional plot but that should give you an idea of of where my intuition is going right so if you know the parameters if you know if you know the parameters that construct your state following that specific recipe you can just compare the parameters and that's it you don't need to do these like you don't need to do these things now the question is here like what is then you know because i can do this because i can do this formula because it's one it's comparing two qubits right obviously if i be comparing um more cubits then kind of like that's the way that i've done this here you know kind of doesn't make sense like you wouldn't be able to do this because you just basically would not be able to at some point compute the sizes like or hold the sizes of the matrix right like for for like you know 100 cubits then you'd had kind of have like um like those mattresses would be pretty big but i think actually with a tensioner you could do that maybe would they be that big because this here would still be like a 100 elements column vector the [Music] and these metrics to be honest it would just be like a huge identity so you don't really it's like a huge identity and then that little matrix you know and the place where that the the the specific cubic goes at this point i'm thinking what else could i do to prove this right uh like so what have i done here so what i've done is i just run a basic occluding distance and uh sorry uh yeah exactly here above and so what will be will be something that will be convincing enough for brian to uh understand this so if you compare you know my point is if you just calculate the distance between this test element right and any of these like and and that's what i meant by like i can i can do it in the calculator right like i i can actually like if your computation takes four minutes i can actually in four minutes really you know kind of calculate this distance i don't know i would be would it be doable i don't think actually maybe it would be too cumbersome to have i don't have no variables in the calculator uh so i'd have to do this by hand but i can calculate 10 distances would i be able to do this on the calculator i'll try okay but that's going to be the next video i think i'm going to have to have a smart with a smart way to do this but i don't know how else to i don't know how else to show this to you brian um or how else to kind of thinking they'll be like a formal way to prove these there'll be a formal way to prove this probably mathematically speaking you could um you could try and say well i have my like it's got it's got to be this is the shape of the function it's gotta be it's gonna i mean how can i generalize these how can internalize these for more dimensions in a way that brian can maybe understand the proof or that i can actually see whether the proof really scales to more dimensions that could be definitely an interesting exercise so what i'm what am i trying to prove what i'm trying to prove is i'm trying to prove that um if you encode like and here here you kind of have you're gonna have so here would be different right so what brian is doing is encoding like a pair of things so if if i if i want to be fair with him i would actually have to say you know i'll take half the cubiets like it's even if it's a bit more complicated because you you kind of have two [Music] two dimensions so uh what i would have to do that i would have to split these in two right so this is 16 uh so i have to have like two eight uh and then split those in two as well and kind of calculate two distances and and this would be where kind of the average distance is the smallest that would be the equivalent of the u3 gate when i i mean equivalent not equivalent but like something you could do so the closer the points if i'm but i think if i'm able to prove that regardless of regardless of the amount of variables you're always going to have a maximum where the two variables are equal right and everything else is going to be smaller than these then i think that's a good enough proof that like calculating then just running the distance between the between the the the points it's it's what you want to do because you kind of have okay so how far away are from each other if you think of those points of those vectors being points in one in you know whatever n dimensions um so the thing here is you have you have these right so what if what if kent a and can't be like would actually have like let's say a third like let's say these are let's say let's mention that this is a rotation on on y zero and then we want to have a rotation because essentially you would do it this way right on y1 so that would be like i'm say p right and so here you would have r y zero so i'm i'm what i'm doing now is i'm basically it's going to be q so i'm adding two more symbols okay maybe you know what i should just do this i should just do this properly and i should just do it in another cell so it this is p and this is q this is p and it's q and so that's what we have and so we have now is um now this matrix is only going to apply to cubic zero uh because now the matrix needs to grow so this is basically zero this is basically zero all right so these kind of grows like that and and what we have here now is that we want let's see how this how would this look like i would have to multiply because this essentially means one of these i'm looking at these here so this is actually means what this is these two elements are the one component the top the second point uh i i'm i think it's just like an identity like you just have to add it's just the first quadrant i think that's what you're if i'm not wrong so what you have is you have like something like a so the first tool the first two rows will just be the first two rows will just basically be you know no so it's going to be four it's gonna be four four rows okay so it's gonna have four rows and four columns and so the first are uh going to be one zero zero zero this is going to be zero zero one zero zero all right and then here you're gonna have zero zero and then these two and i think here have zero zero and then these two i think that's what you're gonna have if i'm not wrong and so here you should have the same basically or once more just copy the same but replace so this is kit a and now replace uh these by x but now you're gonna have a more complex so you have another multiplication so what does this give me okay b i wanted to just see these things yeah that's the shape that that i wanted to have but now you're gonna have to have another uh another product in here which is basically going to be the same right but just on not the same so similar so you're going to have these and you're going to have i think that's the way you would construct it i'm sorry if i'm wrong and adding a bit of dyslexia in here uh so here and now you would have like a zero zero one zero and like a zero zero uh zero zero one so i think that's what you would have basically have yeah if i copy these here but now this is basically p and this is basically q there's people faster than me typing these that's basically what you have i think that's what you have and so you know but i'm not going to be able to plot these obviously but at the end you have this they could be like that and so if you if you now take these um something's off in here i think get a transpose why is it only depending p and q i think i might have i don't know if it's right to be honest i think i might have these the other way around i think that is kind of like these but like doesn't matter uh why am i getting they should be a function of of x and y as well or is it that they cancel somehow but they shouldn't why would they like if i don't if we don't multiply them by these what do we get see if i if i if i comment this what do we get what are the x's they just disappear i think i'm doing something i think i must be i think i must be doing something wrong i think i must be doing something wrong um so how can i figure this out come on this is basic edition pretty basic i think i'm multiplying i'm just doing the wrong thing uh like if i take those things apart i should have done this better better like that so if i just take these and i call these uh rotation on the on y one and now i say well sorry y 0 position y 0 equals these now i take this part here y one constitution y one equals these and i'm going to comment on these for the moment and if i print y0 what am i going to get if i print arrow i1 i'm going to get these this is the right thing times all ri0 times so okay so k zero is basically base for everything so times get zero times k zero can you start expression here why not oh sorry oh yeah actually that kind of makes sense wait a second uh so it's only affecting the qubits it's only affecting two of the qubits because right makes sense yeah that actually makes sense because here we're just applying these to the kit zero we're just applying like uh no no no we should be we should see so we should see the ones with x in here somewhere so ah r y one cosine of p well actually they should be able to programmatically do these not just my hand right i need more coffee i'll go for coffee sorry actually forgot to restart i was here um yeah so basically so actually if i just google that um i just googled how to input two cubits into harmon gates and actually it's just the tensor product of the same gate like so you're doing the tensor prod the matrix product right uh another tensor product so in sim pi hence the product is the this will be one of the two gates that's a simply tensor product and then you get these is this the right thing to do i think so i think that's what you do because this is first qubit there's a second cube right i assume so it's a tensor product okay yeah maybe not because that's with a hormone layer uh oh yeah okay no but what's the saying is you can just distribute these things like that i'm not so sure that's a general way to do these um would you just do the tensor product and double it so here to say if you apply the harder mark on this cube and this and this qubit you can't generalize that i think how to turn one cubicle uh what i wanna what i wanna do is uh matrix applied to given cubit i just want to have the matrix off playing multiple quantity specific the specific qubits that's what i wanted to do expand the operations uh iso back controls are easier yeah controls are easier exactly so that's not that simple number of qubits being simulated log gk matrix of size 2 by n 2 by n um oh yeah that gets spread out like these it gets spread out like these um define the operation of a cube it must be on control to me okay that's but that's that's that's controls are easier okay the set of kiwis now that's that's even more generic i want to so i want to apply i want to apply for example these two this gate to only so this matrix right to only um like qubit zero for example right so how would i do this uh thinking about this maybe with paint so if i have if i have my like it's a two cubic system right and so i have um so i have like the a b c d thing and i and and this just applies to do you know kind of like one cubic right like x y and and i i won um but now the system that i have is uh is the tensor product of of uh of x y and and and x y right so you kind of have like all these like x x x x y y x y y uh and i want to apply so that's so basic that's so basic and i'm i'm stuck at these so i thought that would just be as easy as these but it's not it's i think somewhat spread but how how can i how could i build it so you have so i have the air like i have the air y matrix right which is basically like what i have here that's the ry matrix yeah i'm running out of time to be honest let's see the cry matrix and i want to apply this to the just to the second cubiet right so what i want is what i what i would like to have is that if i uh if i apply so if i apply you know i have this these bigger metrics which is going to be like four by four and i want to supply only to the second qubit so this means what does this mean i mean that's so basic that's just so basic it's just basic math should be basically your algebra um apply it to [Music] what specific qubit to do with two cubies multiple qubits oh here we go so this is uh okay so this is the harmony x so what to the okay so it is indeed the tensor product what you're doing okay it's the tensor product okay cool i need to i need to i need to understand this bit more uh but this means that what i'm gonna do is i'm gonna do so the air y on the x and the air y on key i'm going to basically kind of meaning the parameter x to primary p so so this is going to be like these and this is going to be like that and this is going to be like that and now what i just say is that what i want is i want the tensor product of those so i want the tensor product of those it's basically sp tensor product so the ry root the ry layer that i won is the tense product of r i let's say psp applies to the cubic zero so i think this means that i need to put in here r y x and r y p and i have this r layer and then if i do what does this look like if i print this that's a product simply to product thanks kiskeet for for the help out there let's think by tensor product i gotta import it this way so then we'll just call tensor product okay so this is the matrix beast and now uh what i want so i wanna well i kind of feel like to be honest i can just already do like y and q and so this is kind of you know y and q this is y and q this is y and q and this is y and q and so the rotation layer oh and now what i do is i just do just like this so can't be is just the tensor product it's just tensor part of air y y and air y q uh and the kit a is going to be x and p exactly cool y2 is not defined where have i made a mistake where have i made a mistake in here in here so this is what you have okay so it depends on q and k a okay that's right cool and so now if i do this what do i get so i get this beast um call as you can see this grows one two three four five ten eleven twelve 16 or so so it's like 16 and we've got like four parameters right um and yeah it's it's it's basically two part of uh four right i know that's what did i just say yeah 16. so it grows exponentially so so this will grow exponentially so it basically um okay it goes exponentially but we can see already a pattern look at these so it's always it's always a multiplication of sinuses and sinuses and cosinuses right um what you have in here and now if you if you remember well like what's the like when p and q [Music] and x and y this is all sinuses when it's then sinus sinus times cosine is cosine is so it's got four components but we can what this tells you is that if uh if they're all the same then you're gonna have like sine squared plus sine squared no sine squared plus yeah i think i think that that shape is what's gonna that shape is what's kind of basically what's important i think as we grow the parameters this becomes intractable but i think this is gonna tell you that this basically the these pattern that that that is like you're getting this product of the sinuses and the cosinus functions where i think that that really indicates that um the shape of this function is going to be like that where all the parameters are equal then this actually some this is really what you kind of want to have like this really sums up to to the right value i i'm gonna i'm gonna get these i'm gonna prove this okay i'm gonna stop here because it's really but i'm gonna do a four i'm gonna try to do a formal go ahead and do a formal proof um yeah i'm really gonna do a formal proof i i like to do a formal proof in these and then um basically show that that with these rotations like um this is the shape that it's gonna take and then we can also do this with a u3 so um i'm gonna i'm gonna save these and uh yeah i think that's about right i like it but it's obvious for a simple case right so that only when the parameters are equal is when you're going to have like the equal thing so i really want to actually uh to do the formal proof here um but yeah it basically classifies the staff it basically classifies the whole thing uh just quickly just with an equivalent distance right which is you know how close how closely how close they are from each other these points and and i i see that this is really growing this way so i'm gonna so basically it's the sinus and the the product of all of them and then the sinus and the cosine is in the program for them of all of them and then the sinus of x y and cosine s p q and sine is p q and cosine is x y yeah exactly so that already that really already tells you that it depends on these but but let's try to do a formal proof okay i've never done a formal proof cool
90 minutes?!?!? Executive summary, please. I&#39;m keying in on &quot;not always&quot; also meaning &quot;sometimes.&quot;, Actually with your algorithm as is, theres never an advantage I believe, The reason it&#39;s 90min is cause im showing u a the raw process im going through. As much as im able to, Second part and exec summary coming next ;)
when I was playing the hello quantum game there was an article to a medium there was a link to a medium medium article which was I think giving supposed to give an introduction to the IBM experience article but I found this article which is basically about the quantum game I think and and as I didn't really fully understand some of the concepts I think I believe I'm hoping that this is gonna help so let's see so basically if you if you want to start playing with chronic computers if best practice to experience okay the very basics the Wiccans we can just crawl over that forget on computers it is true for zeros and ones and Ono's so this is the introduction by the way this so dr. James Wood on I hope I'm pronouncing your name correctly I think he is one of the or the main brain and developer behind the hello condom game so I think that could that could the contents of this article could be good ok so asking give it cubits questions okay that was also explained and and it seems like the same it seems like the same images are being used so that was also I think part of the learn war guide within the game the process of getting a beat essentially asking questions you can ask and then turn 0 or 1 0 or 1 over the last few decades of studying cubits the possible questions have become our favorites done language about asking questions so not but I guess it might make it easy to maybe explain it's sort of an analogy right because talking about measurements can be confusing for people I guess why I mean I don't know so despite our infinite set of choices we usually just pick one of these one of the questions is to ask the bottom circle is it black or is it white and the other ones the question is to ask the same thing about the top one so I see you see I that's following the same style like we see in the game I the only problem that I have with that is that you're you're kind of sugarcoating something here right which is this is it's the same cubed right and then this is just what what do you see if you measure it in a certain way and if you measure it in another way so but let's go forward asking questions parents III have having played with that but I'm gonna definitely make an extensive set of videos about the quantum experience the IBM experience because I think it has one of the most and the best interesting tools to build up intuition about quantum computing the AMEX kind of poems is a collection of lines so this is you know and you're basically introducing the concept of a circuit here's one he's the one you need to you need to ask about a keep his bottom circle yeah so we see this is the so so here we have offs it's it's always zero this is wide and on so it's always 1 and here here we have like the the the uncertainty but what we know even Dada if I remember this well is that this is after playing a how to mark gain and it's it's off so it's a zero but but if you measure them this way you get equal probabilities zero and one yeah so that's the that's the okay so that's the next measurement that's how you measure the keep it at the top sort of saying okay so you've got the same examples right so it is some examples but in this case you've got now you measure that you measure that and here oh no it's not some examples but okay the same outcomes in this case 0 1 and here despite the fact that if we measure it in the previous way we know it's off then if it's both equal probabilities here and 1 I have you might have noticed something the images above on the top circle is certain yeah okay that's so that that thing here is an interesting concept so basically what they are saying is that when the top circle is certain of the answer the bottom circle is completely uncertain in vice-versa that is that is definitely helpful because it gives a v1 on what's the nature of a cubed right so you're playing with certainty and uncertainty and and and you move this certainty and uncertainty around this is because the qubit can only be certain of its answer to fundamental uncertainty in quantum systems ok ok but that's what I'm interested in now exactly so what happens with two two qubits and you see here we don't have here we here we don't have anything here in the middle and and in the game we did have a grid and I definitely want to know what this grid means I've got an idea but let's see let's play with two qubits at once so it's the same way but like exactly like that so this description isn't good enough good that's that's that's getting interesting so thanks to the constantly present randomness this description isn't good enough for example here's something we can do with a couple of qubits before they get measured ok so these this is creating a the Bell State so that's creating an entangled state that the constantly so you can only measure both zeros and or ones sort of say this we know from other examples this little corner program for - Cuba - okay we'll get around explaining all this components later yeah I mean okay it's letting saying forget about the gates for the moment so okay after we run this program let's ask both Q bits about your bottom circles so what's happening here okay so so we've got the circuit everywhere and then again we're asking all the questions so that's these two are we thought how the Martin these are with the harem art so here's so here you've got the question here you've got the question the measurements say right and then so in this case this qubit in here can be both 0 & 1 50% probability the same one with the second qubit in the system and if you do the same here you get the same so I see this is trying to say where is the certainty and where is the uncertainty and no matter how we measure that we see there's uncertainty everywhere here there's uncertainty this isn't certain here so they're all random so so according to that this means that the the way the the circles would look like would look like that so after so that's the starting point that's the starting point and then and then basically this is saying so so what we have that's where where is the certainty where has a certainty gone [Music] it's a Kawai of looking at things okay so and and that has probably moved in the grid in here okay and this is a that's a really neat way of showing that okay because here all we're doing is we're asking questions to independent qubits and and of course you see that there is each qubit is completely uncertain that's cool nice but when you ask the same when you ask both at the same time so you're you're measuring so you're measuring the system the the overall system then you see where this is 0 0 1 1 beautiful so this is where the information has gone right so though the bottom circle give both random and says the those answers are certain to agree nice that is definitely something so okay so what this is saying is they give you random answers but they're going to agree right once but measured together they will always agree so they're both zeros or both ones and that's the correlation right so that's that's entanglement and this is a pretty strange thing to happen to keep it really didn't know how they would answer these questions until we asked them but somehow they conspired to always agree accounting for effects like this is going to require some extra detail in our visualization for the qubit state so we need to keep track off whether the answers given by the two qubits agree or disagree that for all possible pairs of questions ok I see so so this is what we're adding now this guy here which I think I I think I think I when I was playing the game I got to a similar conclusion where I said that probably means this is probably encoding information about whether they the movie or not and and I was confusing because I was not sure whether the blacks are off means mm okay but if they say when the color is black then they're certain to agree that's the that's the that's the I guess the convention so and now if we try to ask both qubits about their top circle you'll find that they always disagree so so before it was before it was here and here and now they're both gone in the middle after applying a hierarchy I still have I still have so have that feeling comfortable with this concept of understanding this as a me as a measurement rather than saying no no I'm for me is I'm always gonna measure this way so I'm just gonna and consider those part of the algorithm right not part of the measurement um but I understand why you think about these in that other way okay interesting so we'll need not another circle to represent these okay so yes in this case because you have the the top circles and and those refer to to these whether they agree or disagree and and then you have the bottom circle which is whether those guys agree or disagree okay that's interesting so what about this what about these I'm guessing I'm guessing that probably might be whether these and these agree or disagree although that's a pretty yeah it's pretty it's a lot of stuff you can really encoding that's cool okay I get it it's more forward you could ask one qubit about its top circle and the other qubit about its bottom circle I know yeah okay of course yeah that's what I said that's that's basically that's that would be basically the the top and the bottom so and what happens when you do that is that you get so if you transfer measurements you will find that they are equally likely to agree or disagree okay so they're kind of random in that sense right okay random yeah so this is this super interesting okay super interesting given qubits answers the trick is a full description okay so good so we know that so this basically this thing in the middle in the gaming codes the time so how is the how the correlation between the qubits so this is one qubit this is a so this is one qubit this is another cubed and this is the correlations about those qubits but we have to remember that these dimensions here they are basically the same qubit but measured after a Hadamard interesting that can be complicated I guess I came that's it's going to be it's kind of be complicated to intuitively build algorithms at a higher level in terms of number and amount of qubits and stuff like that because this is tricky to represent and know what's going on so maybe there is a way you can maybe there's a better way to build intuition but I get those concepts that's really super useful give Cupid's answers zero this is so this is again the guide so that portion here right why is that not in the guy why is that not in the yeah maybe it's to of course maybe it's too it's too technical for the game maybe that's me they conceded too technical for the game like you don't want to show necessarily all that stuff but I mean it definitely helps if you're trying to build intuition and I guess people are gonna play the game to build up a bit of intuition and so two cubits at the beginning of their lives look like that okay so that's how they look at the beginning of their life this means yeah and again that tells you it's not that they're entangled or anything but it tells you they will always agree if you measure both of them when you look at zero you're probably wondering about this and this okay that's just a bracket notation for every corner so now introducing the notion of gates and here we have the XK to to basically basically flip that okay state one judging the bottom circle of acute also thinks how it relates to all the qubits of course and that's why that's why these changes as well right so now they disagree okay mm-hm disagree and the same here and then that is though that is an interesting way of seeing the Zed I of course if I take a look at yeah because if I think about the Bloch sphere that's what the Zed does is that it's basically going from the plus side to the minus state and if that's not like something you had no idea what I'm talking about which key see an introduction sometimes we might also flip the top circle but that's cool so that's a way to intuitively think about it is so what does - what does that does is it basically flips the it flips whatever information you would have in the whatever I don't know how to I don't know how to call that because it's like it's in another is its basis am I using the right termination the terminology like so I've read this somewhere so that's a measurement basis right the the one that's like the the harem art and then the measurement so that is flipping that as well okay so it flips done as well mm-hmm okay so what the hardware does is it it moves it moves this certainty around okay so those are Clifford operations yeah I'm probably going a bit too quick basically I've with that but I've those are things that we've seen that I've gone through already through cue sharps introduction and and yeah that's good okay I change the question to Cuba Sisters NASA - for example I can take the state zero then swap the black circle up to the top then a qubit that was certain towards a zero mmm it can't be zero because the name that name has been taken Plus okay so here introduce the plus side okay which is what we're saying yeah it's the plastic then in the - state is the equivalent but with with the once if we do first next gate and then we playa before the harm art or is that after you make it stop circle oh yeah of course so it's either X and age or age and set mm-hmm okay okay that was definitely helpful making qubits talk to each other as we've seen qubits only have a limited amount of certainty in their answers to questions when programming chronic computers our goal is to manage that certainty as best as we can we must guide it on in on a journey from input to output so far we haven't got many tools to help us do that in fact the educate is the only one that moved a certainty around okay great quantum hello quantum okay so here we talk about the control gates and we also talked a little bit about that and in the game there is a controls that gate which is introduced in level 3 I haven't gotten that far yet I'll probably play the game a little bit more I'm not a big fan of puzzles but uh but that maybe you will maybe we'll discover something interesting so there a few possible ways we can explain the effects of the control set oh that was also in the game so I'm gonna skip that so that was all so indeed if you check out the video if you check out the video where I play the game I basically go through the guide in the game and they explain that already so the two different types of how do you explain the controls at which was which was I think maybe you should do a refresher anyway but the idea was that it's you know you apply is that you apply said even only if the control qubit is one so obviously so let me go all the way up here just quickly I think that was I think that's exactly the same it looks at the bottom circle and if it's black that's a set to the right cubed or there's nothing to it it's white or black it's why the left cubed is therefore effectively acting like a switch yeah so in this case to see that because this is because this guy here is is on it's no no because cuz this guy here is on then this is flipped is that the thing because this guy is on this guy's flipped exactly exactly and there was another explanation but with the qubits reversed and then there is a third way of explaining that which is quite different it moves circles around two sub pairs of circles said subsidies it swaps these pairs of circles basically it's an interesting way to see it so because if now I understand that this is you know whether whether the qubits agree or disagree and in this case if it's off it means they agree so it means this and disagree because it's there they're a zero so basically it basically that's interesting way of seeing it from intuitive perspective so it basically says I'm I'm making a trade off and I'm switching the certainty of agreement I'm just okay so they are done what you're saying is they're not agreeing anymore anyway it's this is definitely the controls that is more complicated intuitively in that sense but it because the control legs understand you flip or you don't flip and the controls that is like you don't control sorry you don't don't control that so but in in that scenario here for example it seems like you could explain it as in you're switching so you're making them go from agreeing to disagreeing right so from agreeing to disagreeing that is something to prove this isn't to check whether this is what it means so you switch maybe maybe intuitively you could say that so basically you're switching the type of correlation maybe that's a way to say that controls that the controls I basically flips the type of correlation whether it's they agree or or disagree I don't know if that's correct expression now we have to travel some parts check what it does to the circle at the very top of the read so so when you have that we're both there there's full uncertainty but you see the correlations that day what okay so this is the this is a confusing point right so what's going on between here and here because in mine in my intuitive way of explaining that would be okay so the qubits you flip so you're saying they whether they agree or disagree but in this case how would you say that you actively explain that so I mean maybe that's the thing is you cannot because you need to take a look at what because I remember that they add another measurement exactly that's this measurement that's they were doing this in the guide as well so but in this case here's wide which means what that's confusing why would it be a one oh yeah because they disagree and here they agree right so it basically doesn't change okay I see so what this has done is a case it's not so they they basically trying to explain that and I cannot explain that so probably should just move on but it seems like here is it here there's like an agreement in a disagreement and then those agreements and disagreements they move to the actual cubed states yeah um and here the same right so so basically these these goes here and this goes here and this goes here and this goes here and then this thing just I mean by following the rules of whether they agree or disagree they obviously turn white and black accordingly with understanding this effect but if you want to become a programmer you probably like to know what's going on so we're okay so this is so let's make that a challenge let's make that a challenge and so understanding the controls that that's gonna definitely gonna definitely make a video out of that I think that that can really be a breakthrough in my building up intuition the creation of quite Bikaner the in circles and fully scrapped a pair of qubits for a complex for a complete description but as interesting is this really a complete description so okay so for a complete description we need to add another possible question the queue experience description can be done with the following gates as transpose Hannah Mart and measurement and that adds the circle yeah so that's basically that's basically that's what that's what the that's what also where the game finished where the the the thing finished the guide in the game finished so and now you have fully full description of a qubit it's an definitely interesting perspective that with this you can solve the mystery of the controls and okay okay challenge accepted yeah let's do a video on that later on soft demonstrated controls that you can check out the X Z and H gates effect these new circles and beyond cliff for it all the gates we discussed so far flipping circles black and white but there's much more you can do is apply for it gates there is way to move there's way to move information around in quantum computers they're also excellent at error correction bla bla bla for for chronic computation however we need something more we need to move beyond circles that are just black and white and we need ones that are mostly black pretty much random a bit biased towards wide and that's exactly what I meant I think that's beautiful to go through all these examples but really the true power comes when you mess up with this and then you probably it's then it's probably more complicated to stay at an intuitive level because gonna have different probabilities for each of the possible outcomes but okay so an here says if this okay the app version is just playing with those and if you want to see you're gonna play with with all these other gates and there's a command line version ah we'll do a video on that as well a command line version it has an extra gate called Q okay beyond two cubits the game hello quantum helps you build up intuition and knowledge with just two qubits once you have that you can being begin tackling larger numbers yeah three cubits okay so that basically tells you why why it's impossible I guess to simulate a I think I was in the game as well oh and that's D okay and that's the article that was linked in the app doesn't need to build them okay cool so definitely I've learned something I definitely learned something which is what does this create in the middle mean and that just has basically triggered more interest in trying understand where the controls at does think I have an intuitive understanding parem not there yet I would say perfect but it's definitely that's cool so this is basically the these encodes how much those keep it agree or disagree so the entanglement basically that's that's where I was going on I guess cool
Hey man, authorize your videos to be captioned. I want to translate it into Portuguese., I&#39;ve turned the community contributions on for all the videos and future uploads<br><br><a href="https://www.youtube.com/timedtext_cs_panel?c=UC-2knDbf4kzT3uzWo7iTJyw&amp;tab=2">https://www.youtube.com/timedtext_cs_panel?c=UC-2knDbf4kzT3uzWo7iTJyw&amp;tab=2</a><br><br>Thanks!, That&#39;s awesome! Will do asap!
cool so i think we are live yes let me just see i have it on the phone as well i think we're live yeah we're live perfect there's gonna be a bit of a delay anyways if you're um i usually have the stream on my phone as well just to see the chat in in in real time yeah um yeah but it's basically that's basically it so people are signing up and so on yeah i mean i kind of i kind of what i can see here is um it's sort of the the concurrent people that are watching hi everyone there's like four five six seven people joining um so yeah i can kind of see that but i don't i i don't like to watch it all the time because i get i get distracted too often yeah yeah yeah but it's cool so i hope everyone can see i can see the game i think the music stopped because uh yeah but there is there is the sound and caesar i'm sorry that you can't see the sound the sound in this game is actually really good the the atmosphere that it creates is really um it really chill it's really nice it really kind of uh mysterious and i think it really kind of puts you into the like puzzle solving um puzzle solving mode so it's a pity but you'll be able to see the stuff afterwards and for for um everyone who is joining now and uh doesn't know caesar uh i mean uh you should know him probably uh so this is uh strange works and uh he's got a really nice hat and you should show me before the stream some other thing yeah nice yeah you're putting me you're putting me to shame because i have nothing prepared exactly yes it's a holiday it's a holiday season and there's there's actually a reason behind caesar being the first person in uh in this holiday special which is that this whole idea of the puzzles and everything that i've been doing in the past with quirk and and and other puzzle related stuff it really it was everything inspired by uh one of his was it like an introduction introductory workshop to quantum computing right and to your platform uh yes that's right that's right i i i i've done a lot of things and among them is sort of using our platform to introduce people to to quantum computer getting the first experience from knowing nothing but being on a fr being not been the important thing is that you're not afraid of quantum or coding but you don't have to know either and then to get them get introduce the basics qubits gates superpositions entanglement and an algorithm so daniel here he and yeah and you you gave you gave me this exercise where it was called the rubik's sphere uh we're not just chatting about this before the the before going live and uh it was really for me that was really eye-opening because i think it was and actually i think it was fairly simple to be honest the the the the puzzle itself because it was a you kind of try to office obfuscate the the state with um was it with what was it written was it written in um in kazam i think and yeah and then you had kind of had try i think the goal was different when you try to you had to put it in the one state i think or something like that that's right that's right it was um the idea was after i introduced the uh simple one qb gates to people i um i then assign them a simple task which is i give them a very obfuscated rotation on one cubit give them a set of uh limited gates and ask them to please put it in the ground state yeah exactly yeah it can be done by trial and error but for that people learn a lot of important concepts that they get some commute and so on so so it's a it's a good first task it's completely useless but such as the rubik's cube it's inspired from it's completely useless but one there's a lot about rotations and how complicated it is and that one and the other is not the same as the other way around so it's a good one it's a really awesome analogy but really that is what inspired the whole thing of you know hey you can make puzzles out of these right you can um and actually you can you can do puzzles that help you learn a lot of the stuff intuitively uh about quantum computing and stuff like these and when you think about like relative phases and interference and things like these um which interference is a is a concept that i always talk about because in most uh in most quantum computing editors that you see uh sort of circuit editors that you can see out there um you know you kind of have the the typical you've got the circuit you've got your state vector that tells you what the state is all the time um but you don't see because you don't see the calculations in between you don't see the interference happening right i mean you see after sort of you see the result and you see that maybe some states are not there or they have like a lower amplitude or not but you don't really see where is this actually happening and this is one of the things that quantum quantum odyssey really does well which you will see now in a second um and now i apologize because it can take it can take like a couple of seconds to um to load the puzzle just because i have my machine is not you know it's not a really awesome machine and it's got like obs it's got a bunch of things open but basically by the way the game actually um let me just put the code in the chat so if you want to buy the game the game is actually free to download and i pin the message with the link you can go there and download the game um you can play the uh the introductory material for free but then you've got like three different chapters that are behind like a paywall so you have to pay buy the game within the game so you can buy it in-game but then you can put this code that i'm typing in right now and you're gonna get 50 off uh we'll get the code we'll we'll keep the code um up and running i think we set it up for the first hundred people or something like that um but then we'll have another discount for after the stream as well if you guys want uh want to still buy the game and if you're buying this game sort of you're doing many many things so you're gonna be of course supporting the quantum odyssey team to develop the game farther because this game is really at its early stages you're going to be supporting the unitary fund as well because we'll donate part of the revenue to the unitary fund to be used as microgrants for for their projects and you will also of course be supporting my channel which is uh which is a huge thing uh for me so let me just pin these oh i can only pin one message yeah anyway it's it's you you should mention that what the uk phone does yeah yeah friends of mine so i think we should yeah so the unitary fine for those who don't uh who don't know it i mean i myself don't know absolutely everything that everything they're doing but it's uh it's sort of an entity that they uh just you know go around and fun uh fun projects which are uh you know open source and they are you know projects which would rather not get funding um and and they helped them with their micro grants to you know to kickstart and i think they funded already quite a lot of projects i mean uh the webpage is unitary.fund i think uh go check them out and you can also donate directly there if you want if you feel like donating more money uh they have like a donation button you can donate from you know as less as 10 50 euros dollars whatever to like as much as you want so and also right they they're doing they're donating for people that have ideas for open source projects in quantum computing exactly it's uh there's a lot of need for open source tools so if you're excited about to get started that's a very good place to do it you can apply if you have a good idea you think you should do what's missing you can you can write to them and apply for one of your friends as well and contribute to the open source community exactly yeah so it's always a good thing to do that's why i thought um that would be a nice thing to do in this kind of you know holiday season uh it's kind of the theme and i like to close the year with with some good uh some some good actions um let's maybe let me try to see if i can show you just quickly that's the main menu of the game um i tuned it down a bit in terms of the resolution and stuff so i hope that the quality still comes out good because otherwise my streaming setup was not working at all but you kind of you can actually uh so you have different things so you have the play the play which is basically it takes you to the actual main uh main area of the game um can you see that caesar on on the shares yeah so the stuff here in the bottom the introduction is what you get for free um and if you if you you know if you go here oh i think i shouldn't have done this now i have to wait a little bit because it probably loads the the chop there but we'll see so what this does is this um uh kind of takes you through a very basic introduction uh about quantum computing so like really the very basics assuming you have absolutely no idea um and it does so by walking you through uh small puzzles that kind of build up with time right so you're kind of building piece by piece yeah let's see if that if that loads yeah i couldn't i couldn't get it i couldn't get it better set up so but it should load in a minute and then we'll just go back to that yeah there you go so it's loading so you know this is what you what you will see for free i'll just i will be your guide as you familiarize yourself with how i'll just stop that you don't you cannot hear probably but uh caesar but it's just the voice that's like you know talking you through uh through the main puzzle um and everything else that was there uh in the main in the main menu so the three uh these three balls right which i am again like a physics noob but i think they're supposed to symbolize a quark or something like that um i really don't know uh so these these things in here they are chapter one the fundamental laws chapter two applied algorithms and chapter three thought experiments and so they all have like you know different degrees of complexity puzzles and stuff like that but you can only unlock them uh by paying so but let's go back to the mini and what you can do also with the free version which is really awesome is that you actually have access to an editor that allows you to create puzzles and to play around with the quantum circuit as well and so i've prepared some puzzles today for caesar here to try to solve life on the stream and see if we can put him to shame that uh that maybe he you know uh he's not as good as he thinks challenge challenge accepted i mean i'll give you first of all so um i'll start with with a really basic puzzle just so you get used to the interface okay and that should load faster because it's small it's a small uh example it's just because it's not the common it's not your typical um uh quantum circuit editor right so it's not that you have like the wires and you know you can just place the gates like that uh you see a bit of a different visualization so and it should load in a second it's a video you can't hear the music it's really i mean i'm using zoom so probably i should somehow share the audio as well but okay i prefer not to mess up with the setup you know yeah but as we as we as we wait for this to load uh how how is it maybe you can reveal a little bit of what's ahead for strange works at least in the coming in the coming months yeah so the trench resolution is to humanize quantum and for that what we means is build the tools needed for for developers um to to start contributing to quantum and quantum right now is thermal science and we're trying to make it easier for for it to become more engineering by building software tools for people that want to program quantum computers and we're going to have uh we have a community version that you can go try right now which is really awesome and uh that allows you to live in the browser without an installation to try um to try a different uh programming language programming languages and run your first circuits and whatnot and just tinker around create and share code and content and we're going to be having some big announcements next year that i cannot reveal yet i mean i've been i've been in touch with you guys for a while and and i i played with these with your platform myself and it's it's really promising so i can i can i can i can't wait to see what you have uh you know uh what you have planned for next year um but maybe once you're maybe once you're you know once you're like fully live and you've made the announcements and whatnot we should definitely have another chat i i i think there's so much to talk about in the platform that but anyway so can you see the puzzle i i see something cool so yeah it's funky so what you see here is what the game uh calls a computational map right so on the top it's like your input and um your your sort of your initial state right and these balls that are traveling kind of represent um somehow sort of this somewhat the state you're in right so and and as they move down they are evolving through the circuit and then at the end you have the final state so in in here you have a state where and we have two qubits i can open the circuit actually here so you can see that i have two qubits and they're all like here vertical right and then there's a gate which is kind of a secret gate which you're not supposed to know what it what what what's it called or whatever you kind of see some some colors in here in terms of what it's doing right um the colors basically what they do is they codify the face so actually they have a really cool encyclopedia so if you open this up you kind of have access to um a lot of this information in here about the computational map and and all this kind of stuff uh the color legend here there you go so so you have the colors right and you can also see sort of what's the interference patterns right so blue um blue and red i think they are the equivalent of like uh you know no no relative phase or like a relative phase of like 180 degrees and so they interfere right when you when when they clash so yeah so it's kind of like we won't be needing this for the game but uh for these puzzles but it's just nevertheless good to uh good to know that it's in here so and this is your circuit and the puzzle that we're gonna solve the real puzzle because this is just a test one you have the slots in here and you can you know pick an available gate and then place it whatever you want and the goal is that you need to kind of reach the state that you have that you see here at the end you see that it's a yellow one for the zero zero state and the green one for the one zero state um and also by the way the gates here the the icons for the gates are really cool because they try to visually show you what the effect of that gate is right so a z gate for example has a blue stripe and a red stripe indicating that it it adds a red face to the one component right and it leaves the other one untouched the y gate is a is a crossed it's got crossed lines because it actually also flips the amplitude um uh but it also it's got these lines colored because it also changes the phases of of those elements yeah so and the way that we're going to do this is yeah that's the puzzle and um you can tell me what are the moves that you want to do and i'll make them and then we'll see if you'll solve the puzzles i'm trying to understand the the notation what does the sk does like can you put it in just to try it between if you want i just want to know what it does so you wanted to keep it two or keep it one i'll put it on oh i see i see we'll put it here uh let's see if i can yes let's put it in one i just wanna i think i wanna i just wanna understand what's the effect of this okay all right so it's it's added these yeah i'm trying to understand what the colors mean yes okay you can take it back i think um it changes the one zero you change the one i see i change the color of it the goal the goal is you need to um so this is a given this this mesh in here it's something that it's we can attach and you have a green and a yellow and you have to get a yellow and a green right yes yes that that that i get and then um i see the quantum circuit there's a question mark and a blue box can you tell me what those are a bit i mean i know someone is hitting when it's not i just want to know what they represent a again a question mark oh yeah yeah i'm sorry this is the easiest one that's the puzzle that's the puzzle gate it's just it means you don't know what it is so that's what i've prepared for you they why why are they different is that they're the same no i think they're different because it's a two cubic gate and so it kind of pieces the two qubits um and so this square it just means that this is block it's i think it's just a way to indicate that uh that you you that the gate is a two cubic gate so it means it means nothing else it's just it's a two cubic game all right so let's try to put in uh the y gate on the first one so if we put the y gate on the first one let's see what it does ah that's fine so almost now you get now you've got the so now you've got the balls in the right uh so you've got balls in the right order but right before that like this gate is also changing their face right yeah i see i understand how it's done yeah yeah that's cool all right so um then exchange that i i'm trying i'm trying to know something i change the y for the x take it out and put the x on just see what it does [Music] yeah i want to see what faces are after this you got it you got it you got it that's good all right you got it so so basically the first thing i noticed was that the second digit doesn't doesn't change at all you see yeah i think we're training with zero zero and one zero only yeah so you have to get one qb get on the first one yeah it was just a matter of trying to hurt until we figured it out exactly yeah yeah um it has the game has some additional cues when you um i think when you hover one of the cubes you see some of the the numbers highlighted so it tells you what numbers you're affecting from the state whether it's the sort of the left most or the right most and stuff like that cool so okay so this is the um now now let's do something a bit more educational and i don't do the puzzles like i could just do something random right i could just yeah that's that's that's the serious mode now so i don't i don't just you know do random puzzles um that you just kind of have to somehow on computer something because that's also it's okay but it's maybe not as fun because you're not really learning something if you just do something random so the puzzle that i've prepared now is a puzzle that is supposed to teach you about interference and i know that you're an expert but nevertheless um i'm i picked this puzzle because i really want to show to the people watching that that this is one of the strengths of these visualizations of this game which is that you you can actually see the interference happening when the balls just uh crash and uh and they have like incompatible faces and stuff like that okay so and again like just as a reminder for everyone watching you have the uh the code in the chat if you want to go get the game you get 50 off and we are donating um a part of the revenue uh to the unitary fund which basically seeing a whole lot of black on this on the stream yeah uh it's it's just because i'm just reading some comments it's it's because the loading of the um the loading of the game takes a bit longer than i would like to and this is just because i have um i have not such a good computer um maybe maybe santa will will bring me some some stream streaming capable computer um okay so you should see the puzzle now in the stream as well because i see it in my in my phone so um okay here the situation is the following we've got two we've got a circuit that has two gates already fixed and you cannot move them right but we we see what gates are these so this is a um oh okay it's not available but this is a hadamard gate yeah so i i removed it from the available gate set so you cannot use a haramar gate to solve this puzzle um and you can only place operations in between the hotomars right so what we're seeing now is that we start at zero zero and by the way you can also slow down the the weight the the speed of the ball so it kind of lets you also uh you know take a look at what's happening and we can see is that what we can see is that when it goes through the second hallmark and i'll i'll do something now so you can see this so let me just zoom in for a second i'll stop this oh so there you go let me just speed things up again and you can see here that's what i meant by i chose interference right so the balls are splitting right and then um and you can see that when the red and the blue clash they they just interfere and they explode right so this is something that i usually don't see um in other circuit editors which i think makes these puzzles fun destructive interference yeah so that's destructive interference example exactly so the goal of the puzzle is to get the ball to be on the zero one state and totally blue yeah okay so i'm going to pay attention to it again just to see exactly where to do something here it's and if you if you can reason outlaw i know it's i know it's complicated but it's one of the things that i like to do with the audience here is that kind of show now it seems to be both zero and one the first cubit is the first thing to note and now it's coming together into four and i don't understand what the red does it's a little fast can you slow it down is there a way to slow it down and that the top part but the main thing is that it's going it's uh it's the zeros zero uh ball is going to zero on one so uh since this is one key it's a hard time this is quite standard it's a it's a superposition of 001 you see how that might get very often at the beginning of a quantum circuit because you want to create something quantum so you create a superposition now here it's on doing the hadamard game like i know this videos you mention it i'm trying to understand what the notation is so uh yes so i see i see so i think i guess the blue i guess the blue is one face and the red is a different face so the blue yeah the blue the blue means the blue means no phase exactly the blue is like zero degrees and the red is the is the one that interferes destructively with the blue so it's it's the uh 180 degrees uh-huh got it got it yeah so it's like up and down yeah so so here it's um yeah okay i see i see so let's see so we of course we want it we want to get it to the middle one and we need to change it so this means we have to do an operation between do we have do we we this means we have we need to do an operation between two qubits so we have to give it operations so so you know you have so we have only one qubit operations and the ones that you see here the z the y dx the z and the identity uh and then you have two slots only uh so you can only put two operations in a row max in terms of depth uh or just you know uh yeah you have basically these four slots where you can put stuff okay i'm trying to see all right let's let's put an x on the first q just to see what it does i want to see exactly so we'll put we'll put a next here also i'm unclear what the crossings happen ah okay so that didn't do anything yeah that the the the trick here is that doesn't it still doesn't put the balls where you want them at least not even one of them right right right [Music] i want to find an operation that changes the second there let me see zero all right so why don't instead of the x why don't you just put us that guy to change in which keeping i'll put in the first one first just to see i want to see i want to see on the side edition but i think i want to i'm going to go and i want after let's see this one on this annotation [Music] all right try to put it on the second one again sorry to put it in the second one okay cool uh sorry i'm sure we need more but i'm trying to understand yeah i'm trying to understand uh what all this stuff is doing so this is doing this one is doing nothing here yeah let's see that ah okay all right so let's let's uh i would like you to try the uh xk and then the z gauge yes the x gate in what in in in what key and after in the first qubit let's try that in the first given let's see how do i change this one didn't try the z-gate now mm-hmm after after the x it's funny because it's uh it we are so not used to this type of visualization that i like i had i had such a hard time understanding it's very strange uh huh yeah but but when you once they get used to it like once you get used to it it you know it really opens up uh your eyes all right change the set for the swap gate for the s it's it's the sd it's it's the sk8 is here yeah yeah what is that i guess i don't know it's not it's not ah i'm still struggling understanding what this uh yeah yeah so it's i i can i can give you a hint here so what's happening here right is the the s gate is uh it's changing the phase to green now when when the green hits the uh the next harmonic it will uh it basically splits its placed into a green and a yellow one so the inte the destructive interference that you you used to have before is not happening anymore because blue and green don't interfere destructively right yeah so so that's why you get this mixture of blues and greens and blues and yellows yeah yeah yeah so that's what's that's that's what's happening all right all right all right so and do we what are the gates we have at this one the five years we have so we have the z gate the y gate the x-gate the s-gate all right so let's try first s and then a y and q-bit one yeah first s yeah i know i need to change to give it too but i'm i'm trying to see yeah i mean i mean between you have to i think i think you're what the the problem you're having is these what the so these rays going down are not cubits right no that i understand that i understand yeah yeah but the the at the bottom there yes okay i see that's a face okay all right try let's try this let's try uh leave that there okay sorry uh it wasn't okay it was an escape right yeah i want to see if i can change a lot of things at the same time and then put a parameter s on the qb2 parallel to that one i just want to see when i i'm i'm i'm doing tomography to understand that's yeah that's the best approach i mean so the sk to put it to qb2 and and put it also on one and also so now this one adds up and it becomes red right okay all right i see so change the second one for an x the one the the here you have the key right so the cube qb2 and uh to be an x yeah i wanna see what it does let's see if it's okay so at least you get one ball going in the right direction [Music] yeah yeah okay so you get so you get you get you got at least one ball to hit the zero one state which is definitely what you want to but but they are not interfering correctly that's correct that's exactly right that's exactly right okay take out the swap take out the sk8 i just want to see what it does now but i see that this is uh sort of going one way i see what i'm changing now so now if they're interfering correctly but the end result it doesn't have the face that you want to have because you want the green phase um why don't why don't we try on y again instead of the x exactly where the x is just put that why don't we see again did we try that one already uh no i think you tried it in the first cube that's right let's try that yeah there you go yeah there you go right you got it you got it that's good there's a way you you could even solve it with two gates i think if you have the first the next gate and then you apply a thing an sk8 or something um you have to flip the face but it's but but the um the white gate is the sort of the most efficient way to solve that that's really cool perfect all right good good well done so now i have another puzzle that is um based on this one right so it's the same scheme but it's a bit different so let's let's give it a try as well let's see it's going back to the mini and uh again i apologize for those seeing the stream uh that might might be seeing a bit more black screens that they would like to i know that it's slow i know i'll get better at this um so this was interference one and now i have another puzzle called interference two and by the way the so they're gonna be adding a lot of new cool stuff to this game on the on the fly as well so they'll make this puzzle creation a bit more social as far as i know i hope i'm not saying anything wrong but the idea is that you can then challenge your friends and you know send puzzles to your friends um and stuff like that which um not only i think it's not only just for a competitive uh from a competitive perspective but also from an uh teaching perspective is a great tool now it's one of the things that and and if you go and buy the game with a 50 discount code by the way that it's on the chat you will have access to all the other content that also has um a really cool grover's module so it has a module that explains grover's algorithm and this is one of these unique explanations that it's nothing to do with the uh geometrical interpretation the typical one that you have where you have a vector that's approaching the solution but you have a an interpretation that is completely based on interference so you you kind of see and can explore how the interference patterns really play a role in grover's algorithm so anyway now um as you can see it's it's a similar scheme so we have two harmonar gates on the first qubit but now the target stat is different so we have instead of having a green bowl we have a bowl that is uh a bowl that is uh like it's a mixture of blue and green and another one here it's blue and yellow so it's a state that has a two faces it's on the second second one all right let's let's uh put on the qv2 position two let's try with the x xk so that's a good strategy because at least we know that it gets you it gets the balls in the place where they have to be right right and i remember that there was some uh some face to them so i just want to see what it was so now again go ahead let's see let me look at it again uh-huh so then we have the complete destructive interference there and before we try the ykk there which was the solution we had before like make it all green so i think the next day let's let me try and s after the x just right below that just also just below the x that this will change the face and we're going to let's see that so that changes the phase right before the hot mark right which then it's not exactly what you want because that's not good that's another solution to you that's another solution to the previous puzzle yeah i see that's cool okay so that one doesn't do it check it out and um give it as a z give it a set just to see what it does so this is that will switch we'll switch two things there and i want to see exactly what it's mentioning exactly so they both become red and they get split into these but then you're gonna have yeah um right all right okay i see so i i maybe maybe a little hint here and by the way the game has a really cool hidden mechanism which i haven't used for this but you can actually you can actually hold control and and i can type in like i can type in a uh like a hint in here for people solving the puzzle so um yeah okay but what you so what you're getting is now you're getting also destructive interference here and you don't want to now the the uh here is like what i really like about this visualization is that usually and actually let me see i have never tried that but there's a math overlay so this is still i think oh now you're talking earlier in your language so because the thing is that what would you um what you can see here right that sometimes is not obvious with the math unless you have a lot of practice with this is that you can see what what is this target face made of right you see it's made of blue and a green like because usually you just kind of have your amplitude your complex amplitude which kind of encodes both both things and you don't really you know you kind of see you can maybe think about that you see the angle of the phase but this visualization makes it easy to makes it easy to understand what are the ingredients you need to create the right interference right so if i drop if i drop the if i drop this gate we have i think that's a good starting that's a good move so here we have two blue faces right then we that that one was the one that they was just just when they're all blue yeah so you see the the there's a blue with blue that make a bigger blue and there's a blue with red which just destroys the whole thing so you got to try probably to make sure that this blue somehow splits into a green because the green will mix with the blue right right that would be an idea but i i don't know why don't we try a y gate right after the x i don't remember the way that i started yeah yeah let's try y get right after the x let's see what it does right also b2 yeah give it two okay let's see what happens oh why is it called kiwi too until because they put it there but it changes huh i see the problem i think with the y-gate is that it also flips the amplitudes of this year and the one which we don't want to because because we already had the balls in the right place okay so then and we try already yes which changes things um let's see instead of [Music] we tried x s yeah but we've only played with qb2 so i don't know maybe that is very true why don't we put a uh that's what the sk8 on the on the second part i mean just on the first qubit i don't think it's here you know let's see where it windows there all right i want to maybe zoom out a bit so i can see the whole thing yeah uh yeah but i think yeah i think you got it yeah there we go oh that's so you're you're because you're so the the thing is the the green face gets um gets split into a green and a yellow right um and this is i mean this is the i think isn't that the equivalent to the uh the complex phase right i think that's i think i i'm that's what i was trying to figure out at the beginning so what does the color means and yeah yeah exactly i think i think i think that's the idea so that's why they just then um add up and then you get these things here yep cool perfect puzzle solved so i have one last puzzle i don't know if you've got some time we can try one last more which is different than these ones um all right but this can be it can be complicated i think uh i did it i i did it myself trying to play with the game as well and it's uh let's see i think i think that is the puzzle tool i hope so but what do you think so far so what do you what do you think about the the visualization and the game and be be honest really be totally honest it's really unconventional so that's foreign i think it's fun what i will do is is do topography on all the things and take notes and then map the math of course you show me that you can just click on the thing and figure it out and then just because that's the easiest way yeah exactly i mean they have a really good encyclopedia as i said like that has a lot of this documentation as well in there and actually if you play the game like you follow the actual um the actual uh progress of uh you know from the easy to the heart levels you build up a lot of the knowledge already and so you get a lot of the intuition even if you're like a quantum if you're really like really well versed with quantum computing it's good to start from the very beginning because you get used to the game mechanics and the colors yeah which basically um help a lot there okay so there's there's the game loading okay so no that's not the one that i wanted uh but we can no that's not the one that i wanted that's easy come on sorry i'll just open the other one because that's too easy that's too easy the the other one is puzzle three which is the one that i uh that i wanted to play to play with which is uh let's see oh there we go it's already there solve puzzle three there you go the thing is you kind of see you see it's what i find really nice is that you see for example for the harder mark gate you're going to see how these balls split right which is what happens when you apply two harder mark gates in a row is that your superposition splits farther and you kind of you know you kind of see the state before because i think i think one oh wait a second i've got a question for you in the chat from uh amir says can cesar share more about what he means when he says perform tomography because you're saying you're you're doing demography yeah so so so so they so uh the the main the the interesting thing about a qubit is of course everybody is familiar with bits which is zeros on one and in quantum computing you basically you do not use imagine that zeros and ones are like this north poles on the south pole of of a sphere planet earth in quantum computing you you compete with the whole sphere essentially and one of the first thing you do and but uh because authenticity of quantum computing you cannot actually see the whole sphere you're gonna only see probabilities of north pole and south pole so for that so that means that once you have an unknown state um you cannot just look at it you know you actually have to do a lot of experiments to to try out what it is and uh and this is that's very similar to computerized tomography like when you go to the doctor like you look at it from different angles and you see what comes out so a very standard thing is like if you don't know a cubit you measure it and then you rotate it and you try again and you measure it and you do this many many times in all possible combinations and you build up statistics and then you're like oh then you gotta you get a you're pretty sure what it is after that so so it is just saying that you try a bunch of things and then figure out what what it really is yeah exactly i think that was it you know what the puzzle is that's that's the way you were trying to apply it it was more like i'm just it's just like trial trial and error and see and see what i but demographic is a systematic way you'll find out what it is so then you know exactly which gate you have to use so you spend a lot of time figuring out what exactly is happening and then they then you're gonna with math lesson clay after that all right let's look at this one huh yeah so this is really zoomed out so what we will see here is a puzzle where the target state is the the ground state so you want to go back to the zero zero let's see if i can zoom a bit um now as you can see what you get after this magic fancy gate in here is that you kind of get a really nice rainbow of faces yeah right so you're gonna have to and here i gave you plenty of space so um you have a lot of slots and here you also have the harmar gate to to use and you also can use control operations so um so you have a control gate here uh yeah and uh cool so it's gonna be let's start let's let let's start trying it seems like there's a lot of degrees of freedom here to work with all right let's try it so please cross there okay change let's say again everything splits up can you scroll up yes you see i have i think that's something that all right can we go to the control operations just put a nice one there yes so and you want to put a controller what is the control the first one what is the hc what's hc mean uh yeah so this is a so i this is not needed for this puzzle i think um it's a classical it's a classical coin toss uh i think based on one of the videos that the quantum odyssey team put up there it's a hadamard you think can think of it as a haramar that doesn't add uh the minus phase when the original state is a one state um and it just it's just a thing to show they use it in the game to show the difference between like a classical coin toss and a quantum coin toss that preserves information but i can't forget about this here it's not like i forgot to remove it so let's put the control and can you say what kind of control yes you can all right uh-huh that's funky i can i can't boost the speed up if you want see that again you can speed it up and uh maybe zoom out fully yeah okay oh i can pause it i didn't know that with space i can pause it so so now it's paused but i can i can put it yeah let it leave it running but show me the whole screen because i only see like the very top yeah oh you want to see what do you want to see you want to see that i want to see the bottom again just to remember what i want to say you need to get a big blue ball on the first laser all right okay all right can you swap the control on the y i just i want to see it yes yes yes it's really cool i think the way the controls uh are visualized here it's really cool because you can see you can see these the visual effects of you know which are the states that are uh swapping and whatnot so here you have [Music] between the zero one and the one one right because the control is so you see if i hover over the control you see that the there's some numbers that are blinking red yeah so that tells you what is the qubit uh effect on the the binary representation of the states oh so you got now a yellow and like all green yeah i don't know maybe it's not bad i to be honest i don't know i forgot totally like how how i did that so i don't even know the solution myself [Music] alright what are you thinking um open up open up your mind yeah yeah yeah can you can you leave it full because it helps me think if you leave it so so what i'm thinking is that so now i have yes i want to see the whole the the whole like uh chain all the way down that's the thing this year yeah like it's a trace again exactly yeah so you want to get all the you go we want to get a big blue ball in the first and the first sort of laser right so i'm assuming you're going to have to play with some you know you have to engineer some sort of interference so that you get you know you you kind of kill the the colors that you don't want right right right right right so if i if you want if you put up you can put a y and the at the very bottom of cuban one i want to see what that does at the very bottom like why one yes oh flower cube with one keep it on the one yeah or just i mean or just be low i can i can put it i can put it below so you can have more space and see yeah i just wanna get some type of thing oh this is my point is i wanna i i this is gonna swap of course this too and i wanna see exactly what it what the face of this is yeah ah hold on do you get no did you you we lost the control oh sorry you wanted the control gate yeah i wonder what we were having i mean let's let's leave it like what we're having and the the the previous the previous setup okay let's see what let's just leave it like that let's see what yeah all right this is what we have before and now i just want a single y gate below let's below all that do not delete what we have uh and keep it too yes at the bottom there somewhere let's just see what it does yeah uh-huh that's good okay so what do we what what do you think so what i'm trying to we're trying to see here is like because i want i need two things i need the i want to start uh okay so you want to start killing things right right i want to start killing things so i want to see i want to see what happens with the green ones as they go through them i mean these ones they they will never interfere right because they are like for interference you'll probably need a hammer gate but now you get a really good color scheme so yeah yeah i i i would almost say that now actually if you manage to interfere these with these like you almost have the puzzle solved yeah all right let's um let's bring the arms let's bring the weapons yeah okay so put a hadamard in a second let's see why so below everything like you know everything uh second cube in second cubicle uh oh that now you might get you now you might man if you saw if you solve the pencil just with these three moves like hat off let's see what happens oh okay not quite that point yeah not bad i mean so what's what's happened is it's turned but wait a second why is it let me pause the second before this okay so so we have like it's this just the one one state has a negative phase right so it makes sense that the first these two after the harm are willing will have negative interfe will have destructive interference and turn into a zero oh yeah and this will turn into locally a one i don't know sorry i i'm stepping in the thing is i have i forgot myself i forgot completely there okay but let me just slow this down you see that's that's what i like a lot about the game that you can see this ball splitting and that's where the pluses and the minuses go and so you're going to have so that's what you get to close okay okay this is uh and uh i i can just zoom out i like i like seeing the the the digits uh to remember exactly what everything is doing all right so i want i want to bring those two together that's zero zero one one all right can you put an x x k below what we just did on the right one so right here let's see i want to see what it does yeah let's speed it up that's not going to do it can now put a well we wait for that so let's put them closer together but it has not you you need constructive interference somehow yeah yeah some why don't you move the x to the first cubit i want to see i'm trying i'm still trying to understand oh sorry i uh i lost the gate so that's not gonna do it but i think that will that will just move balls around yeah yeah just that shifts the other ones okay instead of the the x there what happens if we put a mark there i think that can be interesting so let's put her on here i'll put it a bit lower so we can see the balls traveling yeah yeah yeah that makes me okay so now you okay so now let's zoom in let me zoom in because i'm this is not gonna do it but i wanna see it okay so wait a second uh oh yeah but it's not bad right because now i think you're almost there because i can make i need to find a way to make the blue and the red interfere yeah and and then remember the two blues that you have on the left side like on the the zero zero and zero one they gotta become both zeros you're like they're going to become a zero zero right right right right why don't you just put the highlight mark no no i when the element to the right i just want to see just move the one the bottom one let's move to the right yeah just now [Music] [Music] happens you saw oh oh almost yeah we're back to that one huh yeah it's because we aren't doing the the all the things with the alarm so the um delete oh sorry i deleted this one you can you can delete the bottom down the bottom one yeah delete the bottom one okay let's let me remember what this was doing [Music] okay so put put an s below everything now an answer why below middle and the second qubit instead of giving me though so here and something important for everybody to remember is that the quantum quantum mechanics don't commute so the order matters that's why i'm being given definitely did i pause the game or i know it's just long i don't like that i don't like that uh besides this there's some more comments in the chat loud i think uh he's the creator of the game hi loud he says zero zero and one one reminds me of the eprb paradox the state that's impossible to create without entanglement i don't know if he's trying to give you a clue but yep yeah yeah he's saying i mean for that so for that of course we have the control gate at the beginning this is 2k thing so let's have a control y at the beginning [Music] so why don't we do this since it's giving me a hint why don't you put a holla margaret before the control x on the left cubit before the column yeah just move and delete everything along his gave me a good hint there so to delete so what do you mean above that one they're right there yes put them put a hadamard there yeah how to mark the just here yes just there and delete stuff and delete the stuff below no no no the x the control you leave sorry the control i leave yeah i can leave the control roll scroll down let's let's look at it let's look at it down for now yeah no i know so uh can you put the x just an x gate here right all right let's let's wait for it to see what it does okay so we go for the same [Music] thing you still have yeah yeah i think i think that's not gonna that's not gonna cut it yet but i mean if i can oh now that's even weird that you have a lot of you have a lot of mixtures of faces i think you had a good you gotta you had a good shot there now let's go scroll down on the circuit and i want to start deleting stuff below and i want to see what it does yeah let's delete this the last the very last one [Music] and it won't be above it just about to get the right things [Music] don't you have the what are you trying to do with the hana mart here and the con because i think the control x if you if you wanted to do some sort of uh entanglement like wouldn't you put the hard mark on the on the on the kiwi that's going to be control you're totally right can you move it for me please yes you're absolutely right i don't know what you're trying to achieve yeah solaris yeah the thing is they come the comments come a bit uh [Laughter] and now we're back to scotland yeah they take out the hazard from a mother control it could be we need yeah let's look at it again so what is it what is now happening so now you have a mixture of weird stuff i liked it more before when you didn't have a mixture of faces so we have a face between zero we just have to change the second one i'm looking at it to see what was the effect just above the the those case we are okay let me follow them this is now we go to the control and we go to the x those are y gates and there and now you're doing the harmonics for the interference and you're getting a mixture i think these these y gates bother you here yeah let's take it out the y gate i think because now because they were avoiding the interference and now at least you're gonna get i think something [Music] also not no sorry let's see [Music] i'm just going to put them a bit more closer together so uh so they're easier for me to manage so here you have before i mean if you don't mind uh just like because i'm i'm curious about this as well so you had this before and i don't i think that was not that bad all right let's try the because now now you have at least you have a really clean face [Music] now did we try some wise below that i thought we didn't i think we didn't all right let's write what let's try a wire describe everything in qubit one first and then qv2 just to see what happens before the hadamard or after that after the harmonic okay so that's not bad like really i think that's and now you have a now you have an entire oh and now you have the epr like thing right don't you like zero zero one one yeah so now you just gotta undo that all right so one way will be can i change [Music] okay so uh what below everything that we have do uh x and a control next to each other the control being which keep it on the second one let's say so i'll try and then we try backwards yeah yeah we have we have this entangled state i'm trying to find what the correct circuit is yeah to to uh to undo the entanglement essentially following the creators uh yeah okay so now that's not bad at all all right so now you're in the z zero plus zero one mm-hmm then they put a hadamard just below the x hana mark just below the x and i no that was not good but it's not bad either i mean you have an equal superposition mm-hmm right so but i have the opposition between all things with all with all like positive faces yeah can you move the hadamard to the others to the second qubit yes and i think that's gonna make it i think that should make it alright let's see what it does yeah yeah yeah there you go you got it yeah you got it now you now the glasses gave you the power awesome man cool nice yeah it's uh yeah that was a bit i think i mean you know it's i think this one was maybe a little bit less uh educational i'm trying to think about what can you take out of these but it's it's definitely like the techniques that you develop to solve these puzzles that um kind of help you gain intuition in terms of you know the one thing that i do think the game is missing uh but i think that they're gonna add soon as well it's a way to see individual qubits um sort of i think it's going to be a view that will definitely add a lot of value to the puzzle solving because sometimes you want to take a look at the system right and sometimes just but when i found of the challenge was that i i i i think i think it'll be useful to do the very basic to like beginner examples just to get used to invitation yeah because i was still i'm like oh what was the red one there like it so yeah i think that very useful and then then you understand it and it's inner logic for for the for it and then the puzzles make more sense exactly you have to i think i think going through the basics of the game um i mean and the good thing is it's for free right so that part you can uh you know you can you can always download and play with and then uh i'll just say one more time before we finish the stream because i think we're done we're about like an hour in now so thanks for everyone who's been watching we've got like a lot of people watching so uh at least for my for my standards i'm really happy um you can download the game there's a link pinned in the chat in the video on youtube and there's also the the code below at the beginning of the chat that is going to give you 50 off and peter sure peter sure wishing you merry christmas merry christmas yeah so thank you very much everyone for watching and thanks caesar really for uh for being the for me it's been an honor really because as i said you were the inspiration for the whole thing you know the first time that we had the call and that you showed me the rubik's sphere um it really you know it really woke up all these interest in the puzzle uh puzzles world from that perspective and since then i've done a lot of other stuff as well with quirk but this is when i saw the game here as like that's the perfect thing to play with and build these puzzles this is great and keep up the good work on your channel cool man uh anything else you want to say about strange works no you want to keep it low-key and secret as you've always been which i really like you can go to quantum computer.com and create an account and start playing with circuits and programming languages if that picks your interest exactly quantum computing.com and create an account there uh so there is a comment in the chat just before we go someone's asking whether there's something even more complicated yeah you can make a lot of more complicated a lot louder the creator of the game just said in the chat that he once created the puzzle himself that it took himself six hours to solve so uh yeah so there's uh there's definitely a lot you can do with these now um this is the first episode of the holiday special with caesar i'm going to have more episodes coming up um i can already reveal that one episode is going to be with olivia lanes another episode is going to be with the eigenpros as well i don't know if you guys follow them in youtube uh definitely recommend that as well and uh yeah so uh looking forward they'll probably be in january we still have to fix the dates it's just because we're too close to the you know christmas stuff and so i think everyone should take a rest from you know youtube and uh all this stuff and just spend time with your friends and family uh and yeah uh cesar thanks a lot again for joining thanks thanks very much thank you enjoy the enjoy the conference what is it that you're talking to now afterwards uh um i am doing another um introduction to uh where does the power of quantum computer comes from tom before but is it like a public conference or something like okay cool thank then this team is lucky to have you there with the introduction and good luck uh yeah and we we stay in touch see you everyone and thanks for joining stopping the stream now
Get the Game: <a href="https://link.xsolla.com/GO9BYp3T">https://link.xsolla.com/GO9BYp3T</a><br>50% off with code UNSYS50
The background music is distracting, but this sure looks like a fun way to analyze circuits., lol I think the background music adds a lot of atmosphere! ;)
okay so we're gonna be doing some of the exercises here I've been just browsing around the least now for a couple minutes and I think that I'm gonna go for I'm gonna try to do some and there's a lot of exercises I'm not gonna have time to do everything I'm quite sure of it so I'll just gotta go and and try to basically play with some of them and see what I can what I can get out of these I'll try to kind of change these things on video perfect like one exercise per video easy to digest as well and easy for me to do because I really can't spend a lot of like time pack together in one in one long session so we'll all see um and we'll start first with this one should probably therapy is code and we've got here to distinguish between the direction of is the direction of a scene on so we're given an operation that implements to keep it unitary transformation and a scene on Kate with first Cuba's control and the second was target or ascending gate with the second is control in the first and story so I guess sort of one thing like these right and then the other one so I'm gonna see if I can the other one I don't know if I can use the same probably want to use the same can probably use the same yeah something like this alright and so what you want to do is you want to see whether we can distinguish which one we have right so and separation measurement so Mr prettiman there 0 if it's one two and we're one of its two two two one and you're allowed to apply the gun operation and it's exactly one so this is actually a learning from the this is actually learning from the oh sorry I still have this is the project that I want to have solution program one program exactly so why not one of the the learnings from from the last session was that I can't just run like a thousand times because the model is a bit different right so with Q sharp with Q sharp you basically have you're kind of a bit distracted away from from the concept of a circuit right so you just use qubits as resources and apply operations to them and and basically kind of if you are doing something like a thousand times it counts as if you would be running an operation a thousand times and that's what kind of the to be dark that's kind of what the what this this for beads that it says exactly once and I I think that like in my mindset was like exactly once in a circuit and then I just run the circuit thousand times it just doesn't count but it actually you know it actually counts okay so we've got these signature for the solve solving operation so we're gonna have it so this is the solution okay so and I'm gonna kind of copy the same coding here or just you know what what I will just do is can this why is it not moving just now so let's see if I can basically I will just copy this and replace this one here and I kind of I love my main so I just to try to play with this but yeah I'm we're just gonna keep it like running in one iteration and what I'm guessing we need to do is we need to explore so if I do easier this same result okay so here so if I play those gates with these already with these set up right we know it's easier to know because okay because basically turns these turns the second qubit on and and in this case the second qubit is off 100% of the times so we can distinguish not so if we apply the gate to the 1 0 state then we should be able to know in which direction we're going so if we are saying okay we need we need two qubits right so how do we do this so Q sharp allocating cubits cubits that that that that borrowing am I going happiest in America no it's fine I'm lost I want to see I want to find I guess I can just using cupid cupid can I just a Claire an array of qubits something like this right I probably can separate into something like qubits equals and and then it's like an array of qubits so I don't know if it's gonna work but yeah like it doesn't like the syntax QE give it give it give it topples patents or it's just annotation thing against can this just be then I like these qubits and qubits okay so east and it's just gonna be just cool and we're gonna have I'm not gonna loop so I'm gonna get okay do it cuz I don't think I'm gonna look a lot in the next exercises so I'm just gonna clean that up and I'm just gonna generalize these because I don't want to keep changing it all the time so we're counting something and so or doing here is the so what I would say is that we apply so we say Q cubics 0 equals it's a unitary no no whoa whoa whoa whoa what am i doing this even I just forgot healthy or just a plain thing is to keep its and then measure them okay yeah so yeah I would apply the unitary to see one you give you 0 and Q 1 right so I'm applying the unitary and then what I want to do is I want to measure the second qubit this is qubits it's and I wanna measure the second right mr. right how do you access give it what I doing wrong cubed per uniform was the preparer uniform applied to each cubed why isn't this an expect argument topple how do you apply okay so the unitary has oh okay I think it just eats cubics so I think it just goes like these it takes it it applies it applies yeah okay so that's either this and now and now what we should do is we should measure qubits one right there's a correct cube it's one because that's what critics is the qubit one is the one that's gonna save it on it means it's in the direction one cool right so we won't the opposite okay so so we what we want to do is if result is 0 so if result is 0 I don't just call this return like a result of count because count is confusing and I just return inside in here and that's really bad but um I guess I can return inside right so I can just return the inside just say if the result is 0 return what do we want them if the result is 0 we are in the case so we wanted to return 1 else okay what is this autist oh we do have a main I what is this I know sorry this is something else this is a so this is yo close this so how do we have a how can I test this how can I test this I need the entry point okay so I need is the entry point [Music] yes I can just like test right then not expecting anything in here and so I will just what I will just do is I'll run salt I have to put a semi come against my mother's not what is the problem with operation return the value so return salt and I'm gonna give it like a so how do I call the sea not in ink you sharp C sharp C not dirt okay I just just seen on right such as you know I guess I can just do this the argument hike what is the argument what's the problem with the argument type because this the see not has a so I guess I gotta make an operation called my see not that basically takes nothing in here it takes the same it takes it takes a unitary as it doesn't try to see what think what I would need in order to so I meet these don't incarnate and I need these to do basically I see not oh sorry see not control target III really don't know if that's no cubits zero and cubits one and so it's just returns but just has cubits as an array of qubits okay so this takes these and so this should satisfy what am i it's a problem here SPECT annotation which is I don't know what these all means I'm gonna just use it so oh it expects the result or something over um item access how do I test that how do i how can I just test that so I cannot solve for the C not because I because I see not doesn't it's not provide item access item access I guess what I came to is just just pretend so yes look I don't have time for this so I will just do it the dirty way and do like a test operation that's the same but it doesn't have anything in here and it just has a hard-coded this has a hard-coded S all4 call it has salt and then it just has a hard-coded unitary which is basically a C not then keep 0 and keep its 1 so and so these with these I should expect how was how was I how was I how did I need to run this how cause the was it like on the run so in here I'm expecting I'm doing so I'm expecting a what I'm expecting here I did is zero to one so I'm expecting to see a 1 to C on so I'm expecting to see a 0 at the end yeah it doesn't it's not should be fairly straightforward okay was it doing now no one gives a one barrel account is assigned but it's never you values never used I have a counselor here and yeah okay cool so that seems to work and we just comment everything out or how do you do that in what I should have is I should have a copy file save as program or I'll just call it submit so me and then in submit I just should have so I should work and program to test stuff and then I should just copy the operation and submit and that's probably gonna be more efficient exactly I missed a solution stuff and I should submit submit so I should go in here and say baby please give me some submit submit and submit and so happens so happens should work though doo-doo-doo-doo what is the next come on come on come on rogue answer are you kidding me why should give me some clue I mean or was there anything in here so did I do something that result cutes one submission cute Swan [Music] no drink I missing anything me here saw int mmm you're given an operation if my still cute Natori I'm only using the unitary exactly ones right here on keep it on two qubits and I am then measuring and then if the result measure q1 if the result is zero Oh stupid the one qubit must be initialized oh come on so I was I need to do I need to do X on qubits zero Freddie's to work sorry sorry that should work that should work submit submit yeah because basically of course it works when I was what I was showing but I mean it doesn't work for the case for all the cases right like that should really work so it I should apply an X to the first kid before I mean I can't instance yeah in the meantime for this particular case that we do for example like if it's the zero zero I'm gonna measure zero definitely saw runtime error okay so let me try run these first okay so we're we're we're gonna try to run this first cube it's zero so what is what is it that it's not running well so what is the runtime error here and we're doing tests off and we're doing it next to keep its zero and then we're doing C naught to keep its ear and Q it's okay was doing submit 715 in fact in Falak kabul declaration of function and what exists what what what is it going on here oh okay I mean this is [Music] so another Bishop called it solve actually actually I shouldn't have this year at all it's whatever time itself come on you shouldn't lose time on this it's a problem long cycles losing more time with getting these little things right then doing the actual exercise um because I should yeah that's the okay so now actually something broke let's see and how it's an exception released qubits are not in zero state so I got a release so I gotta turn the qubits often before releasing them or you sharp mmm reset it turns out I need to release the qubit calling reset windows whatever said does the following ok so I never reset kids ok so I before releasing them I shoot them do something test solve and basically ok but inside the inside the using or body using qubits blah blah blah music if it's returned inside the using recite cubed one ok so I should basically here I should just say qubits you're said it's one thing that should do it correct reason may be inside if that's the reason then call and solve I'll be the reason then that would not be that bad somebody selling the keys maybe there's a way can reset often just with one we said call but who knows come on come on come on come on come on come on come on okay so warning count and zero so means measure one yeah that makes sense this count is also emitted here okay but so this now should this now could work so I'm gonna submit I'm gonna submit the I'm gonna submit submit and so happens how I should have I done this correctly it submit it here says solve and I recited to keep it's after measurement okay let's see running on test one except that good then end of the video and I'm gonna just rather I shoot the next one perfect
so I wanted to take a look at why is this like okay so this is f of X and I want to take a look at I'm just I just copy pasted this stuff in Wikipedia and I basically want to take a look at so remember assignments so we're basically and so I left it where basically I said you know you're you're kind of measuring the circuit and at the end what you're getting is a every time you say every time you measure your getting a superposition of like all the strings are containing like one particular result of the function because you measure f of X so you get one of those and and so you get and then on the input side you get a superposition of the possible inputs right so for example if you if you measure 101 then you would get super position of so then you would get like see you didn't get something like like this and then this is basically this is basically what you what you what you would get right and you can I can spread that with dot whatever so so so this is something then we can get rid off because we don't do anything with it and that's what we end up with right and then what happens is we're playing harem arts we're plotting like harem ours to the I would cite the three cubits right it's not x 3 notation to use but we apply Harmar to all the three cubits and remember that what we get at the end is a string that so at the end at the end we get a string Y that if x s bitwise modulo 2 equals 0 and so I said in the last video that just try to recap for myself so basically that the harem art is helping us to uncover that relationship because at the end they really what you're getting is you're getting exactly those numbers those inputs that have the same output and so you want to see what relationship they have and so I was wondering I was wondering you know I wanted to basically just do one video where is zooming into that step and then and then we do by hand harem art then try to understand try understand how that interference leads leads to that to finding that number that string why so so we can stay with it we can stay with this example right so we got zero zero zero and we've got one zero so so we've got these things right so what happens when you apply a Hanuman I will do this bit by bit so we'll do this we'll start with this with this bead this bead on the rightmost side just to just saw so here we end up with zero zero zero plus zero one all right so these pit kits basically this this cubed kids basically duplicated with the face of like plus now this is our state so now we we apply that to the second to the second the Harmar to the second period and so that becomes so is it what I'm saying here is this the one pattern that you see is that like you've got the same term you started with right it's always in urine it's always in your new stain so you're always gonna keep adding I was gonna keep adding that but then you have and then you have a zero zero zero again but you have a minus Z 0 1 so this is the turd this is the two terms added oh no wrong what am I saying let's go back I just forget what I said so we're applying it to the second qubit so this term turns into obviously this term Plus this term and this term turns obviously into this term Plus this term good so now you've got this these guys and so now we gotta apply this to the to our first qubit so and I probably should do this in a second in the second place I'm gonna a new line so gonna keep that here I'm just gonna expand on top so this turns into it this Plus this this turns into of course itself Plus this this turns of course into itself Plus this and this turns into itself plus these so far so good so there's no you know here there's no interference interference happening basically why I mean you end up with all the possible combinations in this case I was a trivial one but I mean you you is basically that specifically to end up with and now and now we're now we're gonna do this one so it's with a combination of both that then there's some interference happening and that leaves you with that stream that kind of has a relationship with ass but it's funny because it's sorry because it seems to nevertheless this relation with s be independent it seems to be native to put the hardware does because because it's independent of the fact that the outcome is equal the fact that the outcome is equally only used to actually get those two particular states so what you want to see is you want to see how do they have they interfere so what this basically might be telling me is that that is that that's basically the kind of interference you get when you apply a harm arcade to a superposition of two separate states that you kasich aliyou basically get I wonder if that holds if that holds true let's see so we start from the from the rightmost keep it and you get the same term but then I get this now this term turns to itself - because we're doing the second qubit now and it doesn't turn it to itself and turns into this exactly it's easier I just fall this part by saying this term turns into minus itself plus this and this term turns into minus itself stop - so we already see that the are some of the numbers here right that they cancel let's let's go through let's go through all the harm arts so so I'm gonna do then last one here and so this term turns into itself - so so it's gonna be a plus because the sign changes this this term turns into itself - and Plus this this this term turns into itself - which is going to be a plus and this term turns into itself - plus these so what have we got basically what what do we what do we get that cancels out that doesn't cancel out so I'm gonna put the the outcome here for the term 0 + 0 + 0 + 0 simple places so that stays 0 0 that's like we got it 2 times let's start with it and then just do 1 0 0 minus 1 0 0 so they cancel out I'm gonna I'm gonna I'm gonna I'm gonna just gonna mark those ones with little little asterisks so I know that I fused them already good saw this year 1 0 and 0 1 0 they actually are both positive so I also get 2 times 0 on 0 1 1 0 & 1 1 0 R so basically I mean I say I can I can get rid of those two times because they those things when you normalized it just 1 1 0 1 1 0 is there zu 0 1 is there 0 0 1 is there 101 101 get cancelled and then 0 1 1 2 0 1 1 here so I canceled in this one already and I did I already also used I just say but I said they only repeated themselves once and then 1 1 1 is 1 or 1 so it's the only two that - really were these ones here I mean basically when I play in our Mars I'm getting accommodation of all possible values but I'm just getting different patterns off of those phases right so in this case I get a negative I get a negative phase for 1 0 0 and for 1 0 1 when your seat stay on your starting point is 1 1 0 say guess basically get this one this this thing interesting and so today all of them fulfil van that obviously das is rather remember that s in our case s was s was equal to 1 1 0 all right so so this works so equals your for this it also works 1 times 1 this is work have I done something something let me take a look at song let me just save that for a second aside try to open quark in my bookmarks put my bookmarks bookmarks these basically here I have I've got these so if I take a look at the amplitudes here after the harm RZR something is wrong I must have done something wrong because this is not like so I'm just getting how can I know that I think there was a way to do that what it's like not doing technical measurement but indicate based basically exactly sampling samples that just click when the target security Swanton controls are satisfying because I basically want to I basically want to see yeah but I wanna I want to parse La Paz selection I should do a pasta Latian so if I if I'm playing if I am assuming that I measure 101 right 101 and I should do that pot selection post selection probably 101 so here I'm measuring 101 and then that's what's a but it's still after that harem art myself done something wrong because here it says 0 0 0 1 1 0 that's correct that's what I that's what that was my starting point but then I must have I must have missed somewhere by hand I should have used quirk directly but I as you can see by hand it make mistakes so you got 0 0 0 and in 1 1 0 so and after that it's clear so and after that we get to 0 0 0 0 1 and 1 0 1 1 and I mean it's basically this of course what I was expecting something something wrong so if I keep that aside for a second I go back to to this I mean I'll just trash that so can i edit so just where where did I get it wrong I'll try to redo it but so I mean no that's the first point I was supposed to be by hand so I kinda kind of could understand what's how's that interference what is that relationship right and how does this relate to ass that's the whole point of doing this by hand let me try to quickly do that again without thinking out loud quickly does these two basically turns into these plus plus these writing this that's for the first cubed for the second qubit you can and so for the for for the physical circuit you can basically Plus for the fourth this third one you can and for the last one okay you should have here is a present of the possible values positive zero zero zero zero one two three that's correct four four one one zero basically start just start from say basically get zero [Music] the second qubit one zero zero minus plus one zero one - here you basically get 0 0 0 minus 1 0 0 minus R here so I went wrong because I didn't I didn't keep that - exactly - 0 1 0 plus I'm bad at this here we got like 0 0 1 we're doing and we've got minus 0 1 plus so yeah so basically you cancel out all the minuses so the only thing you get with at the end of the whole thing is 0 0 0 + 1 0 Plus this is 0 1 + 1 so I've just done that by hand fine good the same result finally but then what's the and they all for fulfill these so that's the point I feel that video was useless so what's the relationship between the Haram art and in this this statement right because to understand that maybe I should understand how what is the heart of my relationship with the minuses where all this minus is in the gap right because it seems to me so your your source your your starting point in this case right is one one zero to the starting point and this gives you a negative negative sign this gives a negative sign for the following 1 0 0 0 1 0 1 o 1 0 1 1 and a positive sign so negative sign and a positive sign for 0 0 0 0 one that's a starting point because basically if you do if you do the X or in those cases if you did a multiplication in all those cases you get zero in all those cases you get something that's not zero interesting so what I what I could what I could do is see if that holds for but this is if you do if that's in relation to zero because that's then easy to see that right so okay I'll probably I'll probably have to do another video on this and because I got something there let me put mark that as well so I can take it from here so I'll call it Simoes problem Edie because basically that's it right see here so it seems like the harem or in this case the harem art is kind of then discarding you the ones that of course they don't I feel I'm getting I might be getting a bit too lost with that maybe maybe reread try to reread that but it has to do with it has to do with the signs and has to do with the the action of the harem art so basically could be any tool right and there could be many answers in here so that it's not just 1s and so the idea is that this tower relationship just our relationship so this one is it's there that's exactly the feel that's exactly what the harem are is doing so the whole problem is trying to I mean this is give me some some braces on how on what's the essence of the Harmar but it's probably useless to just dive into this but I probably wanted to one or two more videos and this and then I'll just move on essentially what would the algorithm is showing you is how to manipulate this for positions so then you find things like that right because you can basically while measuring the output then kind of select a subset of your super position for the first register so and that's kind of something you wouldn't be able to do classically just with one round right so okay okay not sure where this is taking me though let's see
let's see um what am i missing so what am i missing in here let's try to maybe um let's try to maybe reverse engineer the answer right so we have uh like i don't know what i have like alpha cube this is this is this is the interesting this is an interesting thing what if we just google normalization factor of exponential decay maybe this is a thing oh okay okay okay look at this look at this okay okay there actually this is something um i have an exponential decay function okay so that is actually where t is time is normalization constant for that time window once they finally satisfy the constant okay whatever i don't know what nt would be here exponential decay okay so maybe there's some interesting thing here solutions derivation of the mean lifetime it it didn't occur to me that that was actually a thing because the rate very proportional to its current value symbolically this process can be represented for expression equation expression decay the quantity at time t and the initial quantity that is the quantity of time t zero and constant is called the decay constant the distribution constant okay half-life cheese something with quantum mechanics here normalizing constant okay okay that's not this exponential decay okay that's this thing literally that's the stuff that is in the wikipedia man okay it is actually seems like there is i found maybe a more detailed explanation the given wave function can be normalized to total probability equal to one so uh yeah okay but this is for like one dimensional stuff right here there's a pie in the solution so so i'm sure i'm sure this has got to do with a polar so what where did we get finally python python x21a what did i do here so what is it here so this is the we're doing with uh we're doing the polar stuff are we um because we're doing our things that or know the um cylindrical coordinates right hmm oh uh so i like this one that's r d theta dr to become a length yeah the r correct hmm so maybe i'm getting the boundaries not correctly again right but essentially it's uh so we do z first from zero zero to n we're saying uh the radius can be zero and infinite kennedy or if we just put some some value does this change the results drastically oh god that makes it complicated no i think i think this is definitely infinite with something really big well that's not really but okay yeah you still get some funky stuff so mean yeah the radius can definitely be infinite right so uh it's just the question of uh okay why what happened have i messed up with something or what what have i done oh now it works okay so ah steel steel steel steel still like uh i'm missing something you know i'm definitely missing something i mean here s3 then you already get a squared and then here's where you get the pi and the end being like this kind of makes sense because at the end at the end we're getting so if we're getting the if we're getting the uh again so so so so what are we doing um i mean so this is uh so powerful this is this is square of x right so if i uh so so 3 divided by 2 is basically square root of like x to the power 3 right essentially and so we get so what we get here really is um instead of the square square root of uh alpha to the power of three divided by pi and really all these to the power three this is what's quite crazy but still you know what this tells me this tells me somehow that n had to be two the it had n had to have a power of two for these to be like turned into a square root of things so again that is something i don't like because here i do get an n3 and s4 what if we what if we say that a z can go to infinite does this change the result that can't go to infinite if you say that can go to one it's also not great the current challenge now is that i don't know what is the assumption if it's three-dimensional uh or not uh [Music] and again the fact that uh the fact that basically we're doing three times you know say exponential of minus x and then times the radius right say 2 so yeah okay this could be i mean you know in theory this could be negative right could it not even talk about complex i mean this could be negative so in which case in which case you know this would go from minus n to n i don't know if that would make sense oh no no two this is should be three divided by two and not two divided by three that's what bothers me because i mean if this can't be real then things go nasty i guess right actually no things don't change so much interesting because i mean you know n can be complex right but then oh god then it's like uh then what is that really oh and you know what i think the problem yeah the yet another problem here is that so this is the function but we're looking for the square of that okay so so maybe so maybe this is a thing or is this too much because it's square there's no negative maybe what the heck what piston x2 1a two fourths ah i don't know i i i think it's i don't know i don't know if you can do that but that that just looks pretty nasty why zero why even zero i mean yeah it's still i'm surprised that it's almost something um bro i don't know bro i really don't know i really don't know this is death by not knowing we have n we have this stuff right n could be anything really it could be a complex number but it doesn't have to because if it's an exponential decay then it looks like you know it's probably not out factor okay oh equation radial schrodinger equation uh this is just going too much like i i'm just i'm i'm stumbling i'm like just going one way the other without really thinking i'm i'm not thinking i'm not i'm really not thinking i feel these i feel that i'm not thinking we have this function here this function here let's say this is real i don't know i can make that assumption though but you know just i have this function here and i want to show the integral of it is equal to one but the integral without this r okay and so that is the thing right so if it's uh if it's say like 2 2 squared right and then it's twice the the thing and so this is you know so this is basically the radius right oh i can do this ah hey hey nice okay oh that's nice so this is alpha and you know this is a n n squared basically oh i didn't know you can do that that's pretty cool n squared look at these four negative big ends to go like this goes like that for negative zero goes like that and then oh that's pretty cool actually you can do that so this is this is the value that i'm getting from this expression right and so the point is i'm just not thinking the point is if i'm assuming we're into 2d space i feel like this is exactly what i was doing last time i'm sorry but like i really have to release like this means that if you give me a point whatever it is with these radius in here and because we're in 2d space then all will give you the same as that so this means you're going to have like a cylindrical symmetry here and you know this one can be maybe another value and so it can go up it can go down doesn't matter i mean what this is telling you is that as the radio increases the value goes lower so you indeed kind of have a like a bit of a cone shape like these right the question is whether [Music] this really goes all the way down yes because you know uh this point this point they have the same radius right so i mean it's fine that is that is kind of uh that is that is fine yeah yeah so they go you go all the way around um [Music] but then the radius is zero to infinite right so in the z is like you were never going to get um the result won't ever get negative so it's really capped at zero and it's really capped at like uh you you won't ever get values higher than this because otherwise your input the radius would have to be negative for this to happen so so it's always n squared in this case i'm pretty sure i'm pretty sure that this is correct 0 to n squared then you integrate on the radius which can be zero to infinite then you integrate on the angle which is basically um which is you know it's basically two pi i should really be these you know it should really be these i don't see 0 to 2 pi for b the z is uh real positive real positive uh yeah i don't know about these but i can just tell it it's radiance symbols so um senpai i don't think it matters i really don't think it matters to be honest i don't think it matters because it's just it's a real number uh between 0 and 2 pi i'm not so sure though there might be here something uh let's see again and and what if we so this could be i'm i'm quite sure i get it now i'm really sure that i've gotten it right the problem is i don't get that answer let's see i'm all up um i've got that function that is squared and then i add the radius in there do i have to add the radius squared or not here that is the problem because that are i don't know this is this is what i don't know how do i really find this uni like the the the stuff right because makes no sense it just makes no sense this just makes absolutely no sense this makes absolutely no sense because what i'm integrating what i want to integrate is the is the the probability the probability density function the probability density function is what i'm trying to integrate you know what i mean right so what i'm trying to integrate is ah this makes no sense at all so um yeah but yeah uh let me just i feel i'm not i feel i got the boundaries correct but i'm not so sure about the squares or the not squares um because the function that we're integrating over is is the square the the the the square version of of ma of of the original function um and then so i don't know if you have to translate then the ends and the squares you know what i mean like the uh you know you know what i mean like i don't know i really don't know i don't know if that makes a difference or not i don't know if that makes a difference that's the problem that's the problem what if i would just what if i would just integrate and then square like does this make a difference like what if i just do i want to try whatever just do this whatever just do these these does this make a difference i integrate this thing and then my vi maybe no no so not these but then when i'm here i do like that it probably doesn't oh god it probably definitely doesn't work like this yeah that definitely doesn't work no okay there's something that kind of bothers me as well a bit so getting the getting the mechanics right but that just that's the details man anyway we keep hitting at this we keep hitting on this problem see you next time
Jack Jack Jack Jack Jack Jack so it was faster than expected you know the fact that you released that so but um I was in the middle of I was in the middle of playing around with your code yesterday on the on your blog so I'm gonna put that aside for a second I still want to go and go through that again you know charter then replicate the graft so the the grass that you build in there as well from from the Strawberry Fields interactive interface but I think that deserves a at least a sort of read through see if that brings any new knowledge to the thing quick part one theory that looks like a lot of stuff that's cool v QE QA or a and then continues very also has a bit of theory that's not that can be nice because it might it might help me to connect the dots between all those though all those three different things and I don't know what to expect I don't know if to expect anything in here in terms of a continuous variable I don't think that I should expect a continuous variable quantum computing introduction in here at all because I have to keep remembering my I'm coming from the Yellow Submarine project from me how and I wouldn't go back there eventually and I've done and at some point go back to this creat variable quantum computing as well and I think I've done some interesting I've come across some interesting analogies in terms of the beam splitting and how does the how is the entanglement working they're at an intuitive level and then also I think when I stacking at the taking a look at the details of some of the gates I don't know if it wants the P the P gate or the said K no um there was one of those gates where I was like it's similar to what the harm arc is doing right because of bringing moving uncertainty around what in continuous variable you call quadratures so the position of the momentum and in this script I will compute this could very well competing you you have your your different computational Bay like computational basis which sure you can have arbitrary ones but you usually stick to the set the X and the y and I see sort of a connection in there but anyway let's let's get to this fret along Peter Maass okay I can hopefully I don't hopefully have to go through each of the details or can kind of get an intuitive grasp of what those things are telling a second ah similar in canoes variable Q a way for a simple problem okay so that's that's the actual function of your blog post of Jax blog post and some that might be embedded in here which is cool maybe rewritten maybe yeah look at this the parabolic minimum function optimize the cost Hamiltonian which is an SK Dan ap Caid was there an arcade I think that was why is not variable quantum computing it's no shopper a lot of these Google searches I maybe there's a documentation anyway I just wanted to have that open on side attractive so still but I wanted to the competition algorithms settings software ducks hi Alice NC distance animations um it's funny because this some other thing feels like it's a hybrid it's something in between annealing like the choir manually from the wave and and you actually screed variable quantum computing but it's not I mean it's not really it's closer to this critic on a variable competing gates why does these dogs API introduction here you've got stuff city-states squeezing skates and all that stuff for geometric operations can be associated with a generating hamiltonian castle gates non-gaussian gates yeah anyway I think I I think come on Jack where's your worship block this is you exactly that's not this is the post here yeah there's an arcade okay so it is it is a bit different interesting okay that's what I want to check so the constant meltonian is a bit different in the sense that there are only it's only the Zed gate and a P gate and there's no an arcade because the our gates those are these sorry this is the yeah this is the mixer exactly here you've got the arcade yeah but then here's a bit so here's even more so here the mixer lay layer is an arcade a P a P gate in an arcade against it so this is what so this is a bit more a bit more developed okay okay but it seems wait a second why is it why is it not Gaussian and so the Piguet that's interesting I thought that was supposed to be Gaussian because aren't those all cows in gates the non Gaussian our beam splitter and cubic phase the V and the BS gates a lot let's call BS engine engine fog so like Google search for that execution engine this model implements the base engine that's just the specification I think that's not what I'm interested in anyways let me just go quickly through that but that's the thing to note so the engine and here it was if I search for engine and the page a1 but I I don't know what one is maybe maybe if it's maybe it's fog anyway all the way I don't know for some reason I thought it was Garcia um which I don't know exactly the the thing with the engine or the gas an engine I don't know exactly the difference in here I don't know if the the engine is not basically to allow you to execute non-gaussian gates alt circuit transected alt circuit is called sorry okay but it seems to be a version of that post here okay and then you've got like the cost and stuff okay you've got you've got okay some of those things and oh cool so that's it that's seen from the top I guess here's a full code I guess or quadratic function with two local minimums okay so there's quite a lot of stuff but I mean I'm guessing I'm guessing that it's worth going through I guess it's going it's worth going through the theory part if I can and then I wonder what else just should go ahead with part two or I should go back to the blog post because I was basically trying to play with these and and try to recreate those plots which was not working really well for me and then go here something like that but I mean that sounds like a good a good idea so and there was not surrender read it with the concluding standing of qru I know what continues very well to understand the physics are a lot of the algorithms to work properly and to an explanation thanks that's good what is a cutie what is a cutie I'll help alpine quantum technologies I don't think that's a freebies ok with rational principle quantum mechanics may be what was I here working out with theory behind cvq Rui then in part to launching an actual conclusion simulations the first is this is the first version it's not book because it's still a so long I'm almost done percent sure there were mistakes okay the original quantum I'd it's always so Before we jump into QA away I'm gonna I'm gonna I'm probably gonna try to kind of I'm I'm gonna read through this bit quick and stop where I see that I'm not really getting the detail it's gonna require more general process so okay okay it is good to require a more general process door of the version of karma resolve EQ is the process that allows us to find the ground I can value of some specific Hamiltonian by repeatedly guessing some quantum state that is parameterize by some parameters calculating the expectation value of the Hamiltonian then using a classical optimizer to update the parameters as this process is repeated until the algorithm converges on the program so pick some set of parameters generate some parameters quantum state that's your answers I guess using parameters column guides calculate these which this is the expectation value I think yeah which is nothing else than the the average right seat this value into a classical optimizer which then generates a new set of parameters then go back to step to repeat the process until we have found the optimal state I guess ground state correspond to the optimal energy there is significant the Kiwi works is because of an idea with quantum mechanics called the variational principle which states that if I have a if I have some some Hamiltonian describing a quantum system and I choose some state vector then then these would I think what this means is the expectation value this is always going to be bigger or equal than the ground state it seems trivial in the sense that the ground state is the lost energy so you shouldn't be able to find something that's lower than that but where is the ground state energy the proof is fairly straightforward any vector can be expressed as a linear combination of energy eigenstates here you lost me for a second I think I mean okay let's just go ahead um see expand that then you end up this also follows that the minimum possible energy for this Sam it's when this equals one and the rest of the coefficients equals zero because of the normalization condition this is the ground state energy so follows that okay doesn't simple but I'm not as you already know I'm not entirely I'm not entirely you know I'm just reading those three things through I really don't check whether this is something that makes sense but intuitively it's just I'm not super familiar with all the unit all the notation especially the the little star here and in this kind of assumption here or assumption or this this expression and energy eigenstates I guess I did states of the Hamiltonian but the fact that you can express it this way it's not entirely entirely clear to me but I'm not not interested either I think this is a per call the basic basically means that if I have a Hamilton I can pick any kind of state I want the expectation value of the Hamiltonian corresponding to this state will always be greater than or equal to ground state energy now let's say that I have some transition problem which I must solve by minimizing some cost function well if I can write this cost function as a meal plan interact some quantum states then I can create a process which I guess an initial wave function calculate the expectation value passwords are throwing it across all to myself and continue to vary parameters of the initial wave function until I find the lowest energy state corresponding to e0 the variational principle tells me that I can never wrongly guess the wave function that ok so that's what I said like you can't use the wave function at the corresponds to an external energy below the ground state it is throwing off my transition process so you can't you can't get it wrong you can't get it that wrong you can still be far off the energies like you know far off the the actual optimal or the ground state but you cannot get it wrong like past that ground state the approximation algorithm okay so this bait give me a second I need to let that sink in for a second so so this has just been a quick quick everyone from unanswered with the quantum mechanical background for these which is this variational principle thing it basically tells you you're allowed to that works in principle that works now I guess the trick here is how you you know what is the state that you what is the answers if you choose so that you actually do get to some kind of minimum or as close to easier as possible approximate optimization algorithm I like to think of QA as a sort of a subclass of vqe I'm lost with that already people call it Vicky's subclass of QA or whatever no actually I think that was the last thing that I read was was this like you I always say specifically I think kee-yai cqe but with the particular answered strategy okay yeah that draws inference on quantum mechanics when I say ananza strategy I'm simply referring to the method used to prepare the parameter estate which gates are used for QA will repeatedly apply our initial qubit state for Qi we repeatedly apply to our initial qubit state the parameter icescape given by okay see I thought I am I thought I haven't really written the read the original I haven't really read the original QA paper in detail but I thought when I read that introduction paper I kind of got it wrong for some reason I don't know in the very beginning when I was thinking oh yeah that's how you do this for the maxcut problem because I was like yeah you actually design the the circuit in a way that it represents your problem but that might have been the wrong thing to go through because I probably the maxilla problem doesn't need to follow specifically that but okay Qi is sort of like it follows that that specific pattern for for the anzats HC is the cost Hamiltonian that we're trying to minimize an H M is a non-competing mix a Hamiltonian so this is why you first just so you first apply set against that that basically are your your cost function and then the mixer which we choose to expand our search space an interesting way to see it I think I have mentioned something similar in the past but I'm not so sure that straightforward to understand that's the intuitive explanation we'll see what the mixer Jota actually means soon okay okay by using the gate sequence this gate sequence the quantum studies recursively evolved to some stay correspond to the optimal state for some Hamiltonian the total evolution of the state Rukia Qi is given us is because to the unitary applied to the state s which equals to the product of a cave a set of unitary gates applied to us with its own parameters and so these are values of your parameter set and these are values of your alpha parameter set okay okay where these are sets of parameters it's actually used for our run for the algorithm able to set the value it's really I wanna go here sorry I'm still kinda coffee we set the value of K with K approaching infinite theoretically leading to I guess to the grass okay to zero however type of here this is not the case in reality as increasing circuit depth increases error okay say this up to the individual utilizing the algorithm to turn the knobs to set K to a value that gives error below a desired Thresh threshold while also keeping in mind quantum hardware limitations and noise this algorithm a classical atomizer will optimize our angles our parameters such as properties over repeated runs of the circuit until we converge on parameters so I see I remain this kind of I kind of had a bit of a flashback when I first read the when I would first check the Yellow Submarine project and I was like what the hell what are those angles why are you know what are those angles I was like what is that is the concept of parameterize in this circuit was it be weird now I now I feel it feels just natural after we converge on parameters that yield a state which when measured yields the lowest value of the COS function you may wonder maybe wondering now why QA actually makes sense as a ranted strategy basically well actually it's good that you say that I'm basically we have some cost function that we want to minimize which we express is Hamiltonian acting on a quantum state vector vectors called HC well there's no guarantee that our Hamiltonian is the unitary and can this represent the quantum gate operation however it is true that an operator of the form like that is unitary unitary in fact we call from quantum mechanics the time-dependent schrodinger equation where we also have these expanding expanding in these bases yields and capital differential equations describing the components which we then solve to get the general time dependence of energy eigenstates but we also have these putting all this together we have these I'm just skipping through that I so since the es States from a complete basis we have these I might come back to that Siva see if that's understandable what I wanna I want to skip that for now um we can exploit this but we have first have to deal with the exponential turns out blahblah which we can easily show so we have an inter occult U which we can call a time evolution operator as it performs its transformation from time 0 to time T well this looks awful similar to the parameterize unit race that we use for QA Oh a this is no kind since the idea with Qi is that we evolve our state in time to the ground state of our cost Hamiltonian okay in order for the enough is that eautifully makes sense we need to discuss quantum at quantum adiabatic evolution consider Hamiltonian that evolves in time to do some continuously applied perturbation the idea is that if we have some quantum system that starts at T 0 T equals zero and the ground state of some miksa Hamiltonian in the ground state of some Hamiltonian Y is the Bissell time coming in here and now and we slowly evolved the Hamiltonian over time then the evolution of our quantum say will tend towards the ground state of the new cost Hamiltonian this is formally known as the quantum adiabatic theorem ok the parameter T allows us to control that's why these are the americana competing but that's why they say Q is inspired inspired an adiabatic quantum computing actually because I saw this I've read this somewhere where I was like how okay this is formally known as the quantum adiabatic theory and the primality allows us to control how quickly we evolve from HM to HC theoretically as T approaches infinity our state approaches the ground state it was popular to one for QA were basically utilizing this crude version of this process so we start with the Calvinist in the ground state which call em zero nothing's gonna get hairy time evolution according to s time dependent Hamiltonian is different than time independent one we must use something called the Dyson series which I won't go into this article in go into in this article to arrive at the fact that between t1 and t2 the time evolution operator is this thing here let's compute this integral and see what happens mm-hmm we're evolving our quantum system from teacher to TT C's we're not dealing with and that realizes are pretty kind of stupid Oh again this world I think I once attempted to understand what this means but let's realize this operator in a quantum circle we have the Trotter eyes it when I say turn eyes I mean we have to perform a Trotter Suzuki the composition which says that ok what is it with your persuasion gets better and she increases this equates to an increased number of steps in our algorithm the applications of you of the parameter is unitary from this we have oh man that is heavy now we have not we have a nice answer that should solve our quantum state to the ground state of HC however where do the parameters alpha and this come into play since the composition is not exact the exact form of the expansion of the I mean it's not that I understand that but it intuitively makes sense because you're so at some point you're making some sort of like you know that's not me that's not an equality it's not equal but it's roughly equal so so I think the parameters allows you to kind of play with that okay the exact form of the expansion of the exponential is given by the Baker Campbell house-door formula which is an an infinite product of commutators of the operators in the exponential and we're limited to a finite value of G actually just to be pretty small to keep circuit depth law in addition we can't always initialize a system they're gonna stay with mix Hamiltonian as often strategies are utilized what it makes its purpose is to search the space of feasible solutions or encode hard constraints in these cases the initial state in this case is the initial state is often said to overlap many possible states exactly so like a superposition right that they obey the hard constraints this means that we needed through this another degree or degrees of freedom to our state preparation circuit and there's a good acceptable results thus we permit rise our exponential operators with this it's an it's that's that's interesting that's actually an yeah that's actually an interesting it's it's it's good to know that's you kind of think about it like without all the detail you're like you more or less know that you're doing that explore a beat this space but the actual reason is really it's really kind of connected to the mathematics behind this the final evolution of our state after planky or QA or a is given by these so if we've done everything correct we should get a state that is approximately the ground state of our constable Tony which is exactly the problem was attempting to solve and then we got cvq Aoi okay but before we dive into this let's just think let's let that sink in for a bit I mean I'm not done yet so now consider what happens when we take a measurement of the quantum state we have prepared which you should recall it denoted this now we have prepared our quantum state as one does in virginal today we must do this we sample the circuit repeatedly measuring the basis of energy eigenstates in most cases for discrete Qi right we express our cost function we express our cost function with with poly set operators so this ends up being the standard computational basis in cv q io a we will soon show that our cost functions are expressed in terms of of X operations so off the position operations so we take an X on my measurement for measurement we obtain a result K and then we seek the value associated with K which we'll call K into our classical cost function and if so many samples detected the average of the sum of all outputs of the cost function it's a simple circuit n times then we get the quantity yeah they're half times is measured so we have proven that our method of calculating the cost function is valid as the quantity that calculates by sampling our circuit is equivalent to these the same kind of logic applies to continuous spectra of energy but we approximately we are approximating the integral over all possible values within mansome whatever that means okay let me let that sink in because there's a lot of useful information in here and I have to meet that I haven't it's a nice it's it's pretty nice way to put it it's sort of another angle and that it definitely helps a lot to read this because you know you read bits and pieces from different places and it kind of helps you give the full picture and that's something you will never get if you just you know go through one course or you just read one to Courreges that's super helpful ok let's recap a bit so let's recap a bit vq e huh so that we write here the QA way right so the idea here is that you so that what Jack is saying here is basically Korea is vqe but following that particular strategy and so the rest of that great chapter goes ahead trying to prove try to explain where does this come from right and so still still how then this gets translated into a into a discrete quantum computing circuit it's another story right but because here when Jack talks about how to transform that into a Seabee quantum computing circuit he just goes and he's like oh yeah you know we've got those operations which basically actually can be expressed in a really similar way so you just you know that's it right um mathematically straightforward but intuitively just know you know there's something I feel there's something that it's missing for me at least um but isn't the discrete version I think it's like basically what you're saying is you've got your cost function you've got the mixer mixer part so you apply first the cost at the mixer right that's the concept but all this is telling you is you know it's just making it so that it's forcing for this to be unitary because it has to be something you can put into a cross circuit but then that doesn't tell you like how do you know what kind of gates to use and how to use them so that really depends on your on your Hamiltonian that's just something that from in a compact way it just allows you to run the maths because basically would then Jack goes ahead and and shows here is dad the reason these is this is derived from the fact that there is this adiabatic principle or whatever that says that if you've got the Hamiltonian and you let it evolve through time it will eventually get to the ground state it seems to be served at that you know the same as in classical physics is this kind of is it is it called the principle of the conservation of energy or something like that I don't know exactly what it is but it's like this idea that everything tends to like if this if there's no sort of active influence or external influence all physical systems tend to go from an excited state to like a ground state where they you know well there's no energy going around it seems to be something along the same lines but at the quantum level and so Jack goes ahead said because I hadn't asked here is a a proof that I really can't follow it I really have not able to follow it right not sure what it's really you know so key but I mean to understand that but it's like basically and he's just mixing it the Schrodinger's equation at some point the time-dependent schrodinger equation and out of the and out of all these you get to the point where so he's trying to okay so he's trying to okay basically I was trying to figure out it's okay so how do we how do we mathematically represent the needed steps to get you from the--from like a kind of don't know time zero and then I don't know another time T right in theory if that T approaches infinity then this means you're kind of waiting forever then it means that that is that takes you ideally to the ground ground pure ground state but you don't need to get you know you don't need to approach infinity to get close enough to to the ground state and so he's plugging in all those equations to basically try to find out what's what are the things that need to happen in between and done that basically it's you somehow to that so I think that's not that's just here just Jack is he's just talking about like the just proving that that sampling works the the the expectation value the average thing then tells Inc you see the right approximation this is it so explains why the were the per the parameters are coming from and why there are parameters which is intuitively because of you won't explore the space but it's it but brilliant the technical at a technical level this is because in order to get there you're making you're doing the structure ization in here which is not a concrete thing so you want to bathe you and allow some do you want to introduce some degrees of freedom in here yeah I think I think I think I'm not as I'm not I'm not sure I fully get its I might I might really kind of go through that again but I I think I get the gist of it I mean definitely I'm not gonna understand I'm gonna spend time trying to distend the math I detect a super technical level but it's that's I think what Jack is trying to do here is it's basically trying to prove where is this coming from and why is it correct so to say okay but now the question of how you translate that into a circuit it's something that is not definitely covered in here right and then but the concept of you've got a cost function and then you've got in the mix of function and now let's see it's gotta be a pretty long video I think but let me see if I can because this continuous variable Q are you in that Q&A okay and then we're ready go get into the simulation stuff like creating quadrature plots and then simulating things I'll I don't want to rush it either but let me see let me scan it through see if there's anything new in here for me that is important and so this is got to be the coolest section of the notebook in my opinion because it's piping Chouard we'll get some more intuition as to why the continuous variable analog actually works of course the method that we outlined in the previous section generalizes well to the continuous or discrete cute-cute model however the the introduction in the paper provides an even more even more intuition as to why this method works in order to create a queue a way over continuous variables we follow the same process of creating a mixer in a cost Hamiltonian for the co-signatory we will initialize our cost Hamiltonian the unit rate is given by the imaginary exponential by including a function with respect to the position quadrature which is just the observable operator that corresponds to position well not actually position a chemo doesn't actually move around like a particle and some potential but it behaves pretty much identical to how the position operator behaves when acted upon by operators of the buhbuh buhbuh in reality the two quadrature that we use in photonic quantum computing represent in phase and out of phase components of an electric field anyways if we have some scalar function we will transform it as okay for example where FX is the actual cost function that we will try to minimize okay so you're basically transforming the eggs into the meaning that's the quadrant the position quadrature quadrature no diplomat continuous variable column Q a way we follow the same general process choose a cosmic circle Tanya and which we then trigger eyes and recursively act upon our photonic modes the imagery for a mixer we're required to define our mixer meltonian let's first go to mixer which we will call the kinetic mixer defined by the Hamiltonian and first a unitary kinetic mixer well the sum over all modes is implied in the exponential consider how an application of this gate transforms our X our position operator ya know I'm feel I'm gonna I feel I'm gonna rush this I don't want to rush this what is he trying to prove here though then there's another mixer the number mixer all those mixes coming from for diabetics earring Sarah so after an overall phase our number makes a response to the time evolution of a state in the quantum harmonic oscillator potential which again helps to expand our search space what is he trying to Jack what are you trying to explain here this is a stock really elegant interpretation of the QA answers over continuous variables that classical optimizer we have to find the amount of time which we must evolve our system which we can then visualize as the particle traveling around in a potential landscape such that it ends up in position with that minimizes potential energy it's the same procedure as gradient descent we're choosing parameter such a particle ends up at the bottom of the tail of a potential landscape what it falls in the direction of the negative gradient from the physical perspective it is being acted upon by some force and this tends towards the position where the force is pointing point of equilibrium now let's consider another mixer so but this is just okay so I okay first I think I'm rushing this too much so I'm gonna stop here and do another video and it's definitely second I'm not entirely sure what's the goal of that section other than saying okay with with see with with cbq aoa we basically use the position quadrature but I'm not so sure why we can't why can't we use the why can't we use the momentum quadrature the P quadrature I mean maybe that's what he's trying to prove here by talking through different mixers and proving that those mixers actually do what they're supposed to do which is take us to the actual ground stae okay then creating credit reports with Strawberry Fields linga function which is 3d graph facespace each point out looks the quantum-mechanical probability density tells us the probability of measuring a particles X and P quadrature values between X and um okay so this is ready then getting the hands-on with the actual simulation and this is the same thing as the blog post so maybe I'll try to let that sink in for a bit so I'll do the following so this in my next video I'll probably come back to the blog post try to figure out those those plots then I'll go here and maybe do a quick reread off of the CV qio a part again but it I wouldn't give it the right attention side um I don't want to rush it and I'm as I'm running out of time for today's video yeah it's it's not it's not good but I I think I got I got some fairly big amount of connections here and there different things that I had read before for the theory part that's nice there's a bunch of simulations ok simple a simple product part of the problem here's what the heart of the problem is like a question involving two variables okay interesting so you got it sensor things in here okay well yeah pretty helpful it's really cool that this Aldus material is available and as I said so once I get that straight then the plots and it back to these that maybe go through that but I've really eventually want to go back to the yellow summary project and I didn't I think I'm gonna end up I don't know if I'm um because those are two different projects of kind of going from one place to another mixing things up and I don't know if I'm gonna then organize the videos in a bit of a different way and inside but I mean it's fine yeah I think I'll have to spend enough time on these and then I'll feel I'll probably after the whole Yellow Submarine thing it's will be then time to actually go and pick another project that it's more on the discrete side of corner computing which just next time I'm use as well perfect cool good stuff good stuff
epr faster then light comunication!, @Uncertain Systems I am curenlty at this mommment crunching the numbers for quantum teleportation!, <a href="https://youtu.be/AGZiLMGdCE0">https://youtu.be/AGZiLMGdCE0</a>, Call it renewable energy!!, Faster than light communication is not possible with EPR Teleportation. You need a classical channel for it to work ;) Or what r u talking about?
A black Hole!
In my proof i use what i call the invers of time to make calculations on diffrent “energy states” i think these called energy states are probaboistic science and can be exacting!, In fact its called photo sythosis is how we convert the “sun” into processed foods!, “Movies” “Images” will become an exact science!, “Digital” is gonna take off in a big way! for example i think u will be able to program a computer wrote direcrt and star in its own movie!
Do you think i can a link to a copy of this notebook? it reminds alot of what im working on and would enjoy reading it my self! Thanks., Thank you my friend!, This is work done by Jack Ceroni (<a href="https://twitter.com/jack_ceroni)">https://twitter.com/jack_ceroni)</a> and the notebook is publicly available here: <a href="https://nbviewer.jupyter.org/github/Lucaman99/Quantum-Computing/blob/master/xanadu/cvqaoa.ipynb">https://nbviewer.jupyter.org/github/Lucaman99/Quantum-Computing/blob/master/xanadu/cvqaoa.ipynb</a> Enjoy!
This is exciting! remonds me of my own work!
what I want to try to do in this video is I I want to try to get a bit deeper into what the haram arcade really does and whether and and what would a similar gate look like but that you know a gate that brings us from from certainty towards complex a complex of proposition complex uncertainty in this case because basically with the heart of my heart gave us in here's really well-written it maps on to on + off and off - on - off what it kind of what's kind of surprising to me a little bit is that I think here there's one of my misconceptions that I maybe I maybe should try to solve actually which is so here I can see that there is the rotate 180 degrees around the X plus z axis and then it says hidden face 90 and that's what's that's what's good it also has a hidden face why is it called hidden face so what is it because I always thought I always thought that the rotations around the z axis was so this was literally mapping - that's it so whenever you're whenever year off whenever year of Z equals zero know whenever you're off the y equals zero space then you're facing that's always what I saw but it's not and that's I think one of the reasons why I made a mistake using the IBM cue experience and Antonia's rotations that instead of the control control control rotation that instead of the control u1 which is the one that I was really just applying a face because the zenki assessed us an effect zero and faces 1 by minus 1 but clearly that's more than just rotating hundred degrees it here's this hidden face and I really don't know what it is so let's see if I can basically go ahead and say guess what the Hana market does right it's it takes it takes you it to that like super position and if you're I think one one it's like so the amplifies here is zero and the face here is 180 degrees because what I find confusing is that often the sign is referred last a phase but I'm not so sure if it this is something that's true or you can have a face value but that's basically what it's what it's doing and so it's - it's doing a rotation and ok so and so it takes the 1 it takes the 1 2 to the - state and then if you apply another one it goes back to 1 and when it's 0 and that's the same what happens when it's yeah when it's a plus it goes back to 0 when it's a - it goes back to 1 what happens when it's I it goes to - I think so think so yeah now when it's - I goes to lie so the Harmar would negate that okay interesting some I'm this is basically one way that we do you basically you know kind of generate uncertainty right by using the harmonic gate but what you're what you're doing is you're generating if your seed is is just on the cell axis you're generating real uncertainty and how would a harem art look like so if I just I mean can I create make a gate so if I say X plus said and I say I find this really cool that you can actually visualize down here and they could say I'm eighty degrees and you see it's not like what's the difference between that and hot Amarth right so let's let's call it like test one so let's just uh because what this is doing is it also adds a certain phase indeed so it takes zero but look it takes zero - it takes zero to plus as well but the face is minus 90 and if I apply the test again you see what I mean it's like how is that different than than a harem art and what happens with one it takes one two - but the face of zero zero is minus 90 so in the face of 0 1 is plus 90 whereas if I use a hotter more gain we have phase zero in the face of 180 but like in the Bloch sphere it's the same it's the same spot right so you've got X minus 1 R plus 1 in 180 degrees and that set is plus 90 and here it's absolutely the same nevertheless diff God they've got different phases I mean I mean the relative face seems to still be on degrees it's just it's just when I use the Hanuman so is it is this does this meaning just that it doesn't matter but it should matter right because I can do these different things I mean what happens if I apply a test okay but the face is minus 90 no we're here the phase is zero so definitely that hidden phase please plays a role but I don't really know why or this is kind of this is one of those areas where I just don't feel really confident yet I kind of I can manipulate circuits and reason it was a staff event but that thing with the phase it just tries to me nuts because I I would expect that you see that in the Bloch sphere but apparently you don't so so we've got our test gate here we can call it the h/h test one so it's kind of our first test to build build hammer which is obviously not a hard wire if we would do if we would do that then this is the same as this is the same as harmonicas - so this literally has the same same effect this tomorrow same effect as to homework can I do I'm curious if I can plate like this with stool where it's like I do these I put an amplitude display and then I say mistress universe notes Kairi said keeps offstage describes who tries on the states doesn't think Syrian discards one is this boss electing is it kind of filtering parcel acting is this filtering and then kind of yeah that feels like that right so now it kind of resets that so now I can I'm interesting it's interesting to know why would this why is why is this useful at all I can control a post select crazy okay now because I was just like instead of instead of you know each test no but it doesn't seem like okay yeah sure and then I can apply to each test now I think I'm not using that correctly I just want to see what I can just you know just for just to keep that easy so I don't have to keep removing so I could see the effects of each gates with each gate we've seen the same wire but I don't think that's how it works oh maybe that okay yeah no no of course oh maybe apostle like keeps onstage discards of course because when I use the post because when I use the post one I kind of didn't realize that of course the one states have a negative like a face 180 degrees and so actually that's what it looks like yeah yeah and that's why this thing looks like that's why this thing looks like that instead of like that so I would kind of have to apply it yeah just whatever I'll just clean that up I was just curious what I couldn't use something like that they see the compare the effect of different gates okay where was Iook I now feel and getting getting lost so we've got our H test tube which is basically the same like a harem art well I sillim sin with a hidden face thing is so I have to kind of go back to the basics of thing a little bit to fully understand that because it seems like the rotation is really also adding a face but then this hidden phase is something on top of that because when really what I wanted to do is I wanted to basically I wanted to build sort of all I don't know how to call it not like harem art because the harem art takes you from zero to the plus date and from 1 to the minus states I wanted to get I want to build a gate that would take you from zero to the zero to the I stayed and from 1 to the minus I stayed and kind of kind of basically inspired by these which is a rotation around X X plus Z and I would assume that I would need a rotation around the X plus y and that's X plus y axis and and I would also not X plus y but Y plus that sorry exactly and I would also then have it 180 degrees and I don't know if that face is needed so but this is the Y more don't call it or the h hy like for homework but I guess that's what is this correct so if I played the high Gate on 0 yeah it takes me there but I don't know if that's the face I don't know how much how much of a role that plays I mean here if I applies to consecutives it goes back to 0 if it's a 1 it goes to minus I but then there's a face of 180 degrees here in the face of minus 90 degrees in here so from that perspective I don't know I don't know if this is really what I need because what beauty of the harem art is that it adds effaced the beauty of the harem art is that it adds a phase of 180 degrees to the one's day right and and so if I would like the same what the question is what I like the same and why because at the end of the day I think the the beauty of having that face being like 80 degrees is that it allows to play with interference whereas if I use this new gate there's just a there's here there is of a part if I'm using the crack words like a goal there's a relative it's a relative phase off of 90 degrees really or 40 and I went a half ideally I would like to have the phase ideally I would like to have the face the same so if I go to make a gate and I and I say it's y plus Z and it's a hundred but then I need to correct that 45 degrees face then I'm having if I put 45 degrees then I'm having rotate only 90 degrees then with the amplitude just know what I want to do so the angle okay so the angle isn't good because the angle basically makes sure you're not missing out with the amplitudes okay so the angle of his bizarre rotation from the perspective if the angle make sure that yeah but that that gives you was that gives you with a certain set of phases and I would like to have a also sort of a hundred eighty Greek like I might like a grease face as a result because if I take a look at the Hana more that's what it does is that it has a okay now I mean no it hasn't hidden face of ninety that's a minus there and so what I will need to do stupid I can't correct that face because if if I'm just doing the X blasts sad thing you've already got that thing where like no matter so no matter how you set up the face it rotates all the faces because that's okay is it is it does this have to do with a global face in the sense that the angle already specifies you the angle gives you a certain face and this is just your so you're rotating every single phase okay it's not close its relative but I don't really know I feel that I feel really confused right now with this if it's y plus Zed right and you did 180 degrees then you get by definition you get that constellation here and so no matter how I would rotate that I would always end up with I can't okay but let's say that I had the same 90 degrees phase of mine does I don't know why HIV version 2 so these basically yeah okay but now yeah this takes me to - I applied it again it takes me into one device if it's if it's zero if it's zero it goes back to zero or or I and if I add hotter more interesting this way that also has the effect of negating it seems it seems like it what also what this version one do the same as well yeah but then at that point I'm confused with I'm just confused with what's the face it's this human face but basically basically so what I've built is a gate that kind of does the same with the hardware does but it takes you into a complex so it helps you feel too complex and see but what is this hidden face I've been it's it's really I have I have come across this before while while reading here through like the tooltips and all that stuff and I really did a bit of a quick research and I can't I can't just figured it out it was pretty stupid because in my in the harem art so no harm or test one where I didn't add that hidden face the thing is that it transforms zero into - and - OH - but it's still but it still takes you into the plastid because then that confuses me a lot because I always thought that the states in the surface of the Bloch sphere were unique but they're obviously not because here you've got a phase of - 90 - 90 and obviously the value is different the value you can see as - minus 0.7 I and - 0 7 I right whereas if you apply Hana Mart the value is plus 0.7 real and plus 0.7 so this is so does this mean that does this mean that the points of the boss here do not represent unique quantum states because I assumed that all talks about when when there's the word Phase II that all we're talking about relative face all the time but maybe I'm maybe I'm but if you apply first and remember the first case what I did here it doesn't have that ninety degrees he didn't face so it basically just rotates right and and when doing so you end up with the same velocity representation literally the same but the amplitude but the the the stain is different custom the face is minus ninety and minus ninety and basically the value is different because it's in the complex part because when we talk about relative phases we document relative phases it's just the fact that there's the relative phase here is zero maybe don't say maybe that's the thing so they are literally the same but then so let me let me just save that for a second another tab and let me so how can I so maybe maybe if I just clear all and it can take a look at Punta tutorial here there's anything explained about the face so each amplitude displays so the hombre displays like the chance is playing several shows amplitudes instead of probabilities it's also the quanta monthly cue it tells you the quantum amplitude of each computational phase stayed on the cube it's covered by the display each square section in an amplitude display represents one of the amplitudes the radius of varieties of the radius of the light blue circle is the applet is magnitude and the angle of the black line that indicator is the amplitudes face the head of the dark blue feeling is the squared magnitude of the amplitude its probability because the global face okay so because the global thing because the global phase of a subsystem is not well-defined quirk will arbitrarily pick one of the amplitudes to use as a phase reference but I don't get that fixed always so query cooperate or pick one of them after amplitudes to use as a phase reference this is indicated by the red fixed text mmm finally because some kids are often very small there's a light gray circle radius which it's proportional to the logarithm of the Makani analogy when the cube it's covered by the display are entangled with Q it's not covered by the display the amplitude display is not able to show phase information because there is no well-defined phase information in the situation when there's a core of course the amplitude display will show red warning taxing coherent and not show any phase indicator lines for convenience reason Square will also show phase information in a player displays an arc over covering measured qubits the version is always according to what the state would have been if the measure where the third okay yeah Bosse display what vector representation especially the one let's see let's just say you can view the exact coordinates by hovering you know the person well here here there's no fix so the amplitude this place like the chin says play except they show some pictures instead of probabilities it tells you the quantum amplitude of each rotational basis because the GABAA phase of a subsystem okay so this fix will only appear this fix will only appear when you've got like when you're doing a subsystem right so if okay thing it kind of makes sense so if I'm just doing something like these and I'm just doing that then I'll get it fixed because then then we're talking about this subsystem okay but still yeah but still it's essentially different face zero I mean but that's what I'm saying so my my age test one right dozen are a hidden face nevertheless the relative face - your - your increase okay so now yeah so that adds a 180 degrees phase and if I add a harem arcade it's the same but here it's a minus 0.7 on the real side of the value and with my age test one we are at minus 0.7 as well if I take a look locally locally it it seems to make this it seems to be exactly the same despite the fact that here I haven't added the hidden face whereas if sorry it's because how is it how is this affecting the face here okay so now I missed again okay so in here with God minus minus zero point seven on the real side in the face of 180 degrees here for the one and here with God is the relative face is still the same but then we've got like a complex the values in the complex side of things so it's kind of essentially different but the boss here is the same and that's what I when I that's why what I don't I definitely need to take a look at this more in detail so maybe I should so let me go back here take a second I'll just um because I'm just recording a tap playing with the different settings with a screen sky screencastify is there anything about the hidden face face no but as it just then my wife would this 90 why would this 90 mother so why would this 90 mother can I not just use these the relative faces hundred eighty degrees and that that's that's kind of what matters right so why does the harem are in half sad sad face that he's in the face of ninety degrees could inspire so crazy actually let me try one thing if I can I do this can I also create entanglement like that so I guess I do this and I now do a control nod yeah so it's also Bell State but each of the phases is like minus 90 whereas if I would use a Hana Morgaine that will be zero but the relative phase is the same but if it's so if it's done this way why does this matter at all why does the Hana Mart have that hidden face it isn't it is it just and it just makes the the state vector easier or like the the the yeah the state the state equation easier like cuz it's it's kind of cleaner you see like a plus square root of 1/2 and this is 1/2 square root 2 and then it's just mine ism it's just aesthetics because because my hardware that's the same people it's also yeah I mean kind of right because really the values on the complex side but it's really the same so yeah I have to sleep on this I am I'll see if I can because the Bloch sphere hey blocks here unique states there's an apprentice boss Aaron is not only Pierce takes picnic States for our systems Tiki so this is because this is the so this is what I'm kind of thinking that this theta is the angle we're inputting in there and then this e to the power of I and and this angle this is the Phaethon face that's my I think that's my suspicion because I seen that before but then so the representation is unique except in the case this is one of the can factor 0 or 1 the parameters uniquely specify a point in the unit sphere of a cleared in space actually namely the point whose coordinates x y&z are in some presentations just not to 0 1 and 1 is not receive 0 minus 1 the interior the boss here the open block ball-ball presents the mixed eights of a single cubed the coordinates are stay represent expectation values of generalization neither one and all the generalization I'm just I don't understand why I don't understand why the Honda Hana Martin has a wife this hidden face face is relevant in here
The hidden phase of an operation is only relevant if you control it. When not controlled, it is just a global phase and global phase has no observable consequences (it can&#39;t ever change what a chance display says). When controlled, the operation&#39;s hidden phase acts analogously to a Z rotation on the control qubit. This is also known as phase kickback., But actually it seems like it does make a difference even if I do not control it. Check out this example: <a href="http://tiny.cc/9sc9bz">http://tiny.cc/9sc9bz</a> where I create a custom gate H_0 which does the same Hadamard rotation but has a hidden phase of 0 deg (instead of 90). In this case I need to apply 4 H_0 gates to come back to my original state vs. only 2 standard H gates. In other words, H_0 is different from H in that it&#39;s not its own inverse but, interestingly, every other property of the Hadamard gate seems to be preserved in the H_0, Never thought of it this way... 🤔 Need to read this twice and let it sink for a while and play with it in Quirk! Thanks!!!
hello quantum hello quantum this is a game this is a game from IBM and I have have sort of mixed feelings about this game so the I played it a little bit but I really didn't understand absolutely everything the way this is displayed and how is this supposed to help you understand better quantum concepts I thought you know the idea of a game might be it might be interesting to build quantum intuition so I don't know let's see I didn't go through the how to play guide so we can take a look at this first and see if we get anything out of this before we start is it just your typical puzzle game but so we have States why this off black you know white is on black is off and random is the outline so I guess that would be the equivalent of 1 0 and then the random it's probably whatever superposition so then you have the controls of the game are gates so the X Z H and the C's at gate why just this once yeah maybe just for the purpose of the games of the game let's see see this is what I don't really get the way this is outlined so ok the target of the game is to match the board to the target fine that's just a simple game goal and that's all what they explained you but this is little learn more here which takes it to a suddenly what is quantum computing guy very basics ziran ones measuring qubits so getting the writing getting the right information from a qubit depends on measuring it in the right way despite many different possible ways of measuring qubits two types have become our favorites ok so those two slots indicate the two different measurements and my intuition tells me that the one at the bottom is the traditional zet measurement and then the other one is after applying a hat amarte so ya know next IBM q this doesn't seem to be needed this image so that's the measure that's a measurement gate and here you have okay so what what does this mean is okay so black is 0 this means hundred percent possibility a hundred percent chance of just getting 0 white is 1 and in this case okay thing is in this case and the last one you can see here in the and the right side because there's an outline it means it's in a superposition okay so but this is defined as a as the 50-50 superposition so after applying Hana market basically hmm okay okay but then what this is telling us is that the hidden the the real or the previous value or the real state of that cubed is a natural zero okay that's it's just weird it's weird to think of this as a way to learn quantum computing or to gain some intuition because it's hard to understand these things enough if you haven't really gone through certain certain details and now suddenly you know it's just yeah me it's a game right yeah so the harm our end the measurement okay when the top circle is certain yeah those are just nuances okay yeah now that's okay so it's get interesting here keep it all start of their life in the same way so zero so two qubits at the beginning of their lives will look like this so what what is the thing in the middle so what are these four squares in the middle the four slots because I understand that the the light colored slots are the qubits so on the bottom left and bottom right when you look at the zero you're probably wondering about the signs okay this is just a direct notation the Dirac notation they're basically labels blah blah blah quantum gates say see just like that's it and and you know like why why it's why there is a black circle here in the middle quantum gates the X turns that into that so it's 0 into 1 mm-hmm and then a zero so you see and that's where why would the extern both forget it I mean if I don't care about that I just play the game and that's it but I I there has to there has to be some logic behind the way it is been this has been chosen in terms of the design right in the image above and the X scale is placed on the bottom line since this corresponds to the qubit on the left to do an X on to the other qubit and we do it like that okay and then the same thing happens and another thing we had even weirder with zip so we've got to talk you bits that they are not in the in the initial state here and as you can see in the in the middle of the screen so they are both in a superposition but then when you suddenly apply is that gate then you're also flipping that other stuff at the top these operations axons that are examples of clifford operations this fancy name just tells us their operations of the relatively straightforward effect on circles in fact if his logicians come the decision comes precisely the way will we like to think about Clifford operations and their effects so and then the and then they go then what the harm our gate and then that flips the entire row you see it's tough to grasp because try to abstract away some things to make that easier to understand in terms of what are the rules the game but yes I get it I mean if you just want to play with the rule by the rules then you have the rules but what that what is this related chronic computing so this so my intuition tells me that this four squares might have to do with the fact that this is a two two qubit system so this is sort of information this is sort of state information because because what it's already obvious is that two qubits a two qubit system is not the same as two separate qubit to separate one qubit systems put together because you have you have that all continents they're like the entanglement and and and all this kind of stuff that this means there's there is information that's part of the system but it's not necessary part of each of the qubits so my intuition tells me that's that but I don't really get why so it's not really obvious to me what does it mean that it's black thing or or or a wide thing a white circle okay let's see next maybe there's something else here making qubits talk to each others we've seen a little bit amount of certainty in measurement results when programming quantum computers our goal is to manage a certainty as best as we can we must guide it to we must get it on a journey from input to output so far I mean I like the way this is phrased and I think that's an interesting way to phrase intuitively what quantum computing is about which is basically playing with certainty and uncertainty and then tweaking it in a way that you put certainty in your your advantage so that when you measure the result you get the result that you want with higher probability still feels a bit a bit doesn't doesn't feel enough I have an impression this more to it but so far we haven't got many tools to help us do that the educate is the only one most certainly around at all mmm to really get things moving we need a new kind of gate the gaiter act more than okay more than you thank you it it's one of the most important controlled operations in is the control set also known as the season this is one the one who introduced in level three unfortunately this is not yet available on the IBM Q experienced as a negative as a native gate but if it were it would look like this really I thought that was a symbol for swap so that few possible ways we can explain the effects of the season okay let's see okay maybe here you know I hadn't I didn't read that before so when I play with this game so maybe that helps you the story seemed to be saying something quite different but somehow they are all equally true that sounds dangerous I mean why people play so much with analogies sometimes it's just it just makes it worse hmm and and the danger with things that are heavy heavily mathematical is that then you try to make some kind of weird analogy geometrical analogy I mean the let's see it's for example the Bloch sphere I like it but it's just really limited in what it tells you right so it really helps you understand the basics of you know what a would on when an actual quantum state looks like and what can you do with gates and stuff but it's it really mmm it really doesn't you know it doesn't tell you everything about entanglement and all that stuff which is really what quantum computing is about so one is to say that there's a look so one is to say that the seas at first looks at the bottom circle of the left qubit depending of whether this circle is white or black the see that either does is set to the right cubed or that's nothing to it okay so the control is the bottom circle off the left mmm so the left is the control and the right is the okay so so you have an example basically so the example is dad on the Left cubed you have a zero so nothing happens to the right cubed and here you have a one okay but that's okay so how mean what is what does is that do right at the end of the day so as that is the it shifts the face so in this example if we ignore this course in the middle we have on the so they're taking a look at the right cubed which is in a superposition and so it's a nice super position so this means that it's either it's either in the plus state or the - state but I tend to think that because I know that it's a zero because I can see here that there's a black circle this means that this was a zero before which meters in a plastic so what does that does is it turns the plastic into the - state which is basically also had like a superposition 50:50 bad buddy but if then you apply another how the mark you're actually going to one so it changes it's an interesting way to see that okay so that's actually cool because I had the Bloch sphere in mind now while I was reasoning about this but everything about is that being that when you have a cubed that's an uncertain or what it does is it flips the certainty around I don't know if that's something you can say certainty in that it's probably not something you can always say because you can have qubits in in really messed up states but if we stick to the pure superpositions with a 50/50 percent chances right so those those super positions are special in the sense that if you apply harm or gate and then measure them so if you apply to higher gate then you're going back to the z axis I might be going a bit too far but what it does in this particular case and that just might be a way to describe that particular example is that the Z Gate flips the certainty behind a behind a state that is uncertain so what I don't quite get is why now the wide circle that's in the mutant in the four squares in the middle it's turned black why why why has it turned black absolutely no idea it's frustrating maybe some coffee it's frustrating I mean why why why why if that is the if that is the information the state information this means no let's see another explanation of the Caesar gate maybe they'll explain that later there's still another chapter so another explanation of the season is exactly the same as these but with the roles of the two qubits reversed why okay in these examples the right give it acts like a switch and the left might be is that I get it okay but why is that another explanation it's the same just you so this is the exact same season it can be interpreted in completely in the completely opposite way okay so okay it's maybe not the same what they're saying is so in this case what they're saying is that so they stick to the other one being the control but here the control is a hammer I'd say it's a stay dienes proposition and the other one is a known stain maybe that's maybe that's why they painted like that wears like they seem to be both control so it's like they affect each other so you could intuitively say that when you do a control that when you do a control that and one of the qubits is in a in a certain state as in like you know that it's a 0 or a 1 it flips the other certainty maybe it's it's complicated man why was I another explanation of this is exactly the same reversed in these examples the right qubit acts like a switch and the left one working the third way of explaining the season is quite different we can think of it as simply something that moves circles around perfect specifically it swaps two pairs of circles one pair on the left and another pair of light oh okay now you've messed it up even more though the interpretation is fundamentally different from the other tool the soup completely captures the effects of the season okay but that would be interesting because some seeing the controls that in this way would mean that if I'm right and I'm and I'm saying that the four squares in the middle are sort of this sort of encoding state information whereas the lighted the lighted slots are the actual qubits like there there there can create information their particular information so you're basically here is switching right so you're saying no no that's so you're physically shifting information from the qubit to the state and right ah that is an interesting that is an interesting idea I'm not so sure if that's correct but it's an interesting idea nevertheless so you're basically the okay still the game is a bit simplistic right and I still that's dangerous to make intuition my cap intuition based on this game because this definitely is reducing the the actual possibly actual amount of possibilities because we're just reducing it to three types of circles right so an in certain circle a an in certain circle a white circle in a black circle but the truth is this much they're much more complex um there are much more complex states so I'm not so sure if those if those moves would be the same in those cases this explanation is not without its troublesome parts check out what it does to the circle at the very top of the grid oh great oh great this is just it's it's really it's really complex to grasp what's going on here with this four squares in the middle it's like I could play the game and I'm gonna play the game now a couple levels but what this really does is just so I'm not you know it's not that I have to get the the the actual the actual rules or whatever but it's a first example in the first example the circle at the very top was turned from outline to white and the second it turn from outline to black now what is the logic behind this it's possible to solve all the puzzles in this game without understanding this effect okay but if you were if you want to says like like just play the game um but if you wanna just shut up and play the game but if you want to become a quantum programmer you would probably like to know what is going on definitely so we're going to give you the opportunity to find out nice the only reason this effect doesn't seem to make my sense is that the grid is not quite big enough perfect awesome the eight circles don't fully describe a pair qubits all so you see so I was kind of right in terms of thinking that so directional right thinking that those are supposed to describe the state so the actual system of two qubits to do this we need to add another possible question so another measurement on the discussion can be done with the following gates perfect s transpose Harmar and to keep track of what results it will give we need to add another circle to our description of each qubit here the new circle is in the middle and has been colored in a different differently to highlight it to describe the possible outcomes of the middle circle and all the possible agreements okay so we're talking about agreements in these agreements to describe the possible outcomes of the middle circle and all the possible agreements in this agreement with each other and the other questions who need agreed with 15 circles okay with these you can solve the mystery of the cz and you can also check out how the X Z and H gates affect these new circles as well as trying out new gates like s just get playing with the new measurements on the IBM Q experience and use your results to understand the bigger grid Thank You IBM that actually that's actually making me feel really curious about that I think good so we know cool that's nice I'm happy that I've read through that or still another okay because it basically means that there is a way to represent the state of a qubit that is not graphical and that it actually or there is graphical or visual in that sense that you can maybe have an intuitive idea or a sense of where information is and and and how it moves around and I think that's I think that's the perfect tool size for building quantum intuition and there's a link to a medium article which I will saw so oh yeah I actually don't have internet right now but we can take a little later we can take a look later okay perfect no it's nice nice next and beyond cliff for it all the gates we discuss a cliff or gates each coming to predator zone just swapping circles or flipping them there's just there is much we can do it's cliff or gate so I keep doing with information on the quantum computers they're also excellent at error correction if we're gonna compete in whoever and need something more we need to move beyond circles that are just black white or outline awesome that's what I was saying we need to get ones that are mostly black pretty much random but a bit bias towards white we need to spread out the certainty rather than keeping on little eye keeping it on little little islands then after swishing it around the grid for a bit we can recombine it in new and expected ways that is that's a beautiful way to describe that sir lady to do these things we need to the unimaginative the name of nan clay for gates though there are none of these in this game the key experience has a whole host of non-fifa gate so you can try beyond two qubits the puzzles help you build in built up intuition and knowledge with just two qubits once you have that you can begin tackling larger numbers to fully describe these qubits will again need to keep track of each of how it would answer the three questions and we need to keep track of how answers to questions on one qubit agree or disagree with others agree or disagree so that's a bit that's that's it's a confusing we'll talk when they talk about agreeing and disagreeing Oh in a second maybe that is a reference tool and angleman in the sense of they are correlated so that they always agree versus correlated in a way that they don't agree maybe that's what they mean huh extend these two for qubits and you need a hypercube of a cube of 63 of them for three cubes and a hypercube of 250 circles for it okay for four cubits and then and then yeah and that's and that's probably why you can't that's really why you can't simulate quantum computers and beyond a certain amount of qubits Oh number of qubits after all we could visualize what's going on in a large kind of computer easily it wouldn't mean that we could easily simulate it ah but there is a need to build them by getting information through the massive space of possibilities we can find roots from input to output that would be impossible in a standard computer sometimes these will be a lot faster some programs that would take a planet-sized supercomputer to it the age of the universe to solve all the Deauville but to solve will be doable with much more reasonable size quantum computers nice IBM cubes means it's like I feel I don't even need to play the game you could you said you could have just shared the guide that's awesome so I have learned I have learned that okay so there is a way I have to export the cube I have to play with the IQ experience a bit more but there is then a way the you so this is a good smart way to represent the state information and and here they say it represents intuitively agreements in this agreement which I suspected means the types of entanglement right so an agreement would be that if I measure qubits to be 0 then the other one is always going to be 0 and if I measure it to be 1 and the other one is gonna be 1 always and that's an agreement because they agree and then the opposite will be a disagreement but can you do more can you do other types of entanglement I guess so I guess so I guess so um I don't know maybe I'll just let's just play maybe see if we can get to at least unlock the sees that so whoa that scared me okay so uh huh so see that the cset gate has been here from a from a using the phase perspective designed as in like we swap those two we swap those circles okay so now I got that next a bit too loud next still it feels a bit um it's it's a bit so just plain to plays a bit on strike right because what do you learn with that I mean what am i what are we learning here for example this is the puzzle 3 so we have I'm gonna I'm gonna try to read it from an intuitive intuitive perspective so we have two qubits the one on the left and the one on the right the ones that are highlighted and they are both white which means they're both in a state one and I don't know how to read the four squares in the middle but I would say that because there's a black thing it means those qubits are entangled in a way that they it's a black such as yours I would assume so I will assume zero means they disagree but again I don't know what's the convention so I so this is a state right it doesn't matter how we got here but it's a state array I can read as in we have two qubits which are we have two qubits which are in state one and they are entangled so correlated in a way that they did agree this means that if we measure one to be zero we know the other one is going to be measured to be one in that system I don't know if that's correct and then what we're trying to do is I'm liking that or what we're trying to do is the target is how can we how can we turn them into how can we make them agree right so how can we make them agree regardless off because I see the target it turns them blank so it means it turns them to zero but oh no sorry no they're still disagreeing you're just whatever that's it I got too excited okay so that's just the same yeah but let me just retry that it means once I buy one one grade now we have zero and one and now so we have sorry one and zero but then there's a white thing which means they three that's weird maybe they are entangled in a way today I mean it doesn't make snide about what I mean that would mean they are entangled in are they entangled I don't know I mean I like I'd like to think is another way to read that would be that why it means white means they disagree which is would we obviously see here right so one cubed easier and it honors one the other one is one the other way round one and zero so I'd by applying an ex-gay to one of the qubits and basically and basically you know making a material disagree again maybe I don't know I don't know next oh so now we've unlocked the edge gate the harm our gate play okay okay so now what we have is so you see right so the I'm curious and really curious about how to read the actual four squares in the middle like does it matter where the color is does it matter where the color is just like because here I would really the same right so there is there is one cubed 1 cubed which is in the zero state and another one which is in a superposition right because it's an outline circle but we know that in reality it's at the zero right because we wouldn't know already the measurement after the Alomar gate and actually if we do that move that and we're done with the game but we were done with the puzzle but here we haven't really changed it since whether they agree or disagree I just done hmm okay [Music] here well what do we have here is so you see why in this case the black thing is on the top the black circle is the very top and not where it was before it seems like because the black circles are it seems it's in the intersection of of where the colored circles are that seems to be this way but it still left to see if there's any other configurations late in the game where that is not the case so I mean yeah but you want to solve right businesses yeah you see this is exactly those the colored things seem to be the colored circles seem to be in the intersection they seem to be in the intersection and I mean the puzzle is symbology we're switching that now and now that also changed as in like it's off but if it's off I don't know if it means again they agree or disagree maybe I've missed that somewhere no that's just ok Oh learn more where was that agreement agreement blah blah blah it seems to me you like because good okay so I can I think I can maybe deduct it from here because it seems like always when there's a wide circle in the middle there are two different ones in the measurement so it might mean that might mean that they disagree that might mean that they disagree and when it's black here and both wines are blind both black so it means they agree but this does does the steel mill there does this still mean they're entangled I don't know III don't know if so I don't know if that means they're entangled oh and that's oh and that's a weird one okay so here we have see here in a state where both circles are outlined so this means there's no certainty at all but then we have two circles of different colors inside that's weird one that's so weird one so I don't I don't really I think I don't really understand yet everything but I'm think I'm getting somewhere with that and I like it so I'm I I think I'll play again I think I'll keep playing later and see if if we can find all the things that help us build intuition with that but I take away one really good thing here which is that it's not just about qubits especially when you have more than one qubit or in this case two but the information about the state can also be described in that way so there's a way to describe that's the information off of the system of the the the you know the set of two qubits there's more information than just in each qubit and that's really a at the end of the day intuitively what entanglement tells us that you can't just you can't just take apart the system and then know everything by by measuring each of them separately it's if you have to take a look at the whole system okay sounds good then looking forward to play again that has been indeed helpful but it also means I had to read through all the learn more to really understand a bit more the the thought behind the way this game is designed yeah and I'll read the medium article and I will also go play with the cue experience
this is gonna be or basically kft under 10 minutes and 10-15 minutes I hope and without basically any maths or what's going on with the gate so don't send EFT and intuitive way you have to understand what inputs and outputs is designed for this is really important and you've got class play like you've got typically two different ways to see right so you've got this way of seeing it where you start like this version of the Clifty is designed to take in as an input a frequency right like so you could think of these as frequency number one right you could also have in here multiple frequencies right for example here's a combination of frequency one and frequency three and the output you see here it's basically a phase encoded or it's it's sort of facing coded signal data so let's imagine that we just say what cuz it's easy to see right so will you this is telling you on the output side is that you're gonna have if you take a look at the and the the angle of the of the face how's it moving forward across your superb across your different states it's actually doing a full cycle right since using all your like starting from zero zero zero it's the first point where your halt data until the very one the last one if you'd have another one then you would can see kind of kind of basically go back to that to face zero so that's the idea right phase one through busy one so if you go back to zero and say now I want to code two as an example you see that it's gonna give two cycles right so that's see that's that's the way this circuit is designed um you've got also this other version which is basically so the inverse of that right and here just to make it clear this is the input preparation and if I go up and here the input preparation is basically here's I'm using yeah I'm just using the QFT building hefty gate to prepare um basically that box is that entire circuit so what I'm just doing here is I'm just using that to prepare just you see to prepare the like a valid input state eval it's something that it's easy to do then kind of and then you can see an outcome that makes sense so you've got here--oh basically a 1 right it's the same that we I show you in the other circuit and so what this circuit is designed for is designed to actually tell you which frequencies these signal data is included from kind of Francis forgot a one it matches one if you've got a superposition as I said for example just to show you the display here here so if all we do is something like this so we get like 1 & 3 basically that's your input data and then at the end you get 1 & 3 that's yeah so again and you get it into a superposition right so you actually have to basically do several runs so you can actually get those numbers but let's see that's the idea okay so once once this is clear let's go ahead and try to unpack these two circuits because they're really similar and actually if you if you as it's one curious fact about these algorithm is if you basically concatenate three times the key of T you it's kind of circular because as you can see in the circuit we're basically doing rotations it's all the time rotations so what's really happening here is that you're basically the way you encode that right it's not cubed that makes your number in binary to have a particular influence on how this is being rotated so technically you've got those harem arts here that build you the basis superposition and then you've got the control occasions that so just to show you and the easiest way to see that at that point in time here so if you will go back to the example of one right if I show you in this case basically all what we want to do here with one is we want to have a superposition that that's done right so that entire in this day so if you pay attention there's some some cycles in here that repeat of course so this portion of our output it's basically the opposite is sort of like me a mirrored version of this one because yeah you're trying to give a full cycle so you're kind of half those two steps right those two house so this is something that you're gonna that you're gonna have with a heart of mine right so the heart itself is a gate that is gonna ready it's gonna basically expend the the states also gonna rotate because you have the one in here right so that's already what the hardware that's what the one is it creates done that's right the - state which already has that facing here all the way here but what's interesting to see it's basically how how is this set of rotations affecting the whole thing so and maybe it's gonna be easier if I decompose them so if we do this because at the end of day that's just a compressed way of saying you know that's what we're that's what we're doing so it's gonna it's gonna be then system by step so what what's happening here so it's happening is that this first rotation is telling you okay so from our state in here all the states that have a 1 1 so all the ones in here rotate them like by 90 degrees right and when you sew and when you basically move forward to the next to the next one what's actually happening here is you're you're basically now saying the ones that have the 1 0 1 pattern so this is this is this here rotate them by 45 degrees and so pay attention that in those two cases you're kind of its kind of accumulated and then you end up with the latest one being exactly these where you're now saying the ones for the permanent 1 0 0 1 because that's what those control is that the gates are are doing right like if you take a look at the system level that's one of the ways to interpret the controls that it's it's then for the for for this part here exactly for this part here is oh wait a second I think it's gonna be easier if I show you this in the way give me a second it's gonna be way easier if Ida composes differently help I'll be able to stick with the timing and the ten minutes so that's definitely gonna be easier I think it's gonna be yes so basically because now you can see it's easier to see if you start if you start basically at the lowest value give it so this is everywhere we've got like a 1 in and in this cubed in here we're rotating so those were - so basically you can see here that it's it's rotating those elements by 22.5 degrees and so what we're doing a step by step is we're adding we're taking because the next cubed is has more weight in the you're basically then taking that and also and kind of like adding here right and here you're adding those 45 degrees so in the cases you've already rotated before because there's a 1 as well that basically sums up and save got 65 65 degrees you're kind of creating that slope step by step and then when you're and then in the varial for the next level then you are actually adding you know this this extra 90 degrees and so you're kind of all the all the bottom part here so that becomes it goes from 20 to 212 right and and this one it's a five in this 257 so your each keep it coming gives you that extra weight in there because of the enolate that's a binary number and and then the last kind of you know the last the cherry on top of the cake is basically the harmonic which basically doubles you you know fills up the rest of this preposition and it adds like 180 degrees shift to that part here so everything goes this is because because we've got a 1 in here so that's the essence of this of this version of the circuit basically rotating as a function function of the importance and the way that a particular kid might have and the same and that extends linearly to super positions right I mean there's nothing nothing here that changes the reasoning is the same if you've got something like that the this qubit in here is gonna be both 0 and 1 so you're gonna have those two different situations being developed within your so this is basically that version of it the this part of the gifties maybe a bit less intuitive and I really recommend that you take a look at the in-depth series or the giftie so you can see what I went through trying to understand that but um the idea here is that you're kind of doing the opposite instead of instead of setting up starting from scratch and setting up like including the data in your position would you want to do here is you want to figure out where how does this like you know what worse how do we come here to that data encoding right and the way is the way you want to do that is to when isn't that by in a similar way you wanna identify okay in what was the value of the qubit that led to these particular set of rotations and one way to do this is you you're basically trying to identify cycles because we say here that basically what you're doing at the end is you're if you have a 1 in here when I have a full cycle so this means that the two halves have to be me have to be mirrored this is an indication that there is going to be a wine here and so that's useful for this case because if the first thing that we do is we start doing a harder mark here right that's hope that's what the heart is gonna do for us so the heart is gonna basically detect exactly that pattern so it's gonna see it's gonna see okay here I've got basically a mirrored pattern so I'm gonna I'm gonna get rid of that and pack it all into the portion of my of my amplitudes that that have a 1/4 that cubed because that's that's how the Harmar compresses things and and so basically what this is telling you right is already that here you know that they keep it up here is gonna be a 1 because this pattern indicates you that it's an odd number like what you have in here if this cycle would be if this cycle would be basically the same so because a repetition for example in the case of 2 right so you basically now have two cycles so this means that this is they are not mirrored anymore they are the same because you're doing two circles two cycles now the horror mark is gonna basically do the opposite is gonna get rid of these right and then pack it all into the into the half that starts with a zero so what this what the cubed value here is telling you is that well this this number that we're looking right now we didn't know about because this is theory something you don't know it's gonna have to be an even number right because only even numbers will kind of generate that kind of pattern in the input and so basically what this is telling you is that that essentially you can summarize like the value of this cubed it's literally telling you the actual value of of that what you should have as the lowest cubed in your final right and and so that and then you can extend an idea to explain the rest of the algorithm so the so basically what you then do from here is you applied the inverse rotation so we seen here because you're that's what you're assuming is that if if this is a 1 right if this is 1 we basically have to kind of correct for the the wave rotations that that that you experiencing on this I rather you're rotating as a function of the values in here so you want to go back it's sort of here you want to go back to one step right and and so you're gonna play hotter Martin then identify the next pattern that's probably maybe it sounds to play less intuitive but if you if you go through these and you think about that part of the algorithm as the inverse of this it kind of makes more sense but intuitively you're basically rotating counterclockwise based on the the weight of and then basically as you get down here that's what you so you're basically each qubit you're recovering it's the value that that the cubed you know this one was the value that this qubit is gonna have this one is here is one that so you have the swabs in here at the end of the day it's just that there might seem a bit confusing it because they are at the very end of the circuit but this is this is what you're gonna this is what you what you're doing basically you're you're identifying the cycles and and that type of that outcome after that after each Harmar is telling you what is the value of the key bead that you should have but not the same key where you apply the armor but the one that's kind of opposite into your registry register yeah so that's basically the specific EST it's nothing nothing more than that nothing one that the key points I think this is this this circle is easy to understand you might have sometimes a different arrangement of the control of rotations but at the end of the day it all sums up to the same thing this is bit tricky to understand especially because you're operating your input is for position so that might be a bit a bit less it's bit more complicated to understand intuitively I would say for someone who's approaching these from scratch the two points two key points to understand is why do we have swaps in here and what are those rotations doing why they are backwards why they are like minus minus 1 right so why they're in the inverse of the other rotations and the explanation is again simple right once you've had when do you write compress half of the cycle then what you're trying to do at the end of a is your turn cuz you're trying to back engineer like reverse engineer what you know it's the wrong word but you're trying to basically find what were they what are the values of the qubits that that could lead to that type of cycle and so that basically implies that each of these key beats as we said in the video has undoing that you're literally undoing that here you're kind of applying an inverse rotation based on the based on the actual value or based on the actual position and wave data cubed would particularly have and remember that you're operating across the entire superposition so if you if I managed to move these so say for now I I show you what those things look like that's basically basically nothing happens here house yeah because basically there's no that's that's that's the gist of it is that nothing happens here because basically that's we've got we've basically got a zero here right so that that's telling you and I know cuz if we put is here here but so the fact that nothing is happening is because there's no there's no influence of that particular K bit and that means that it's a zero so that's why nothing is happening so the harbor is able to pick up already the the the pattern right so this is sorry it's telling you that the influence is here so that's number one so and that's why you've got like a day in first part of me here anyway it does those things in a clean way so yeah this is basically this is basically the bunch of rotations and just making sure that the slopes here makes sense because the cycle is telling you about the value of the opposite cubed opposite as in opposite within your cubed bitwise R cubed y z-- representation of the frequencies and that extends linearly to superpositions as well you're gonna have you know you're basically and a half like if here you've got like hereafter you don't have a clean a clean that clean up here where it's empty it means that it's not just zero one it means that it's a combination of both so it means that you know you can then go ahead and do the calculation for both possibilities that's where the circuit is doing within your superposition and then you're gonna end up with one one with more than one amplitude in here that's cool I hope that it was clear how there was not confusing it's a bit long bit of a long executive summary but I think that pretty much summarizes everything that I've learned about the QFT in the past days and weeks
Thumbs up for the shoutout on Twitter, but a few minutes in I still don&#39;t understand why you&#39;re using swaps. You&#39;re adding unnecessary circuit depth to a circuit that already has an awful lot of circuit depth., This cycling that you get btw is exactly what&#39;s used in shor&#39;s algorithm, The swaps are needed to get the right output. For example if you input phase encoded signal data (mapping values to equivalent phase rotations) the (inv)QFT will give you how many time the data is cycling. But in order to do that you might need to use swaps depending on your implementation.
Good job😉👏👍.
Wow! Cool! Thanks!
my goal with this video today is to try to approach than this paper and see if the actual thing that I was doing the other day with Kasana do is anyhow close to grubber actually see if that will if the paper will allow me to figure this out that's something that I don't know so just you know remember this is the this stuff that I was doing where I was basically doing a preparation then this is the then these three gates are sort of the Oracle then this is the mixer then the can Oracle or cost function in the mixer but it seems like one was good enough right but at the end of the day that's also what one iteration was kind of good enough but like I don't know Grover's algorithm also when you use a small amount of qubits you just need one iteration and it's kind of done but I wonder whether this is sort of equivalent here let's see so what have we got in here so we've got a this is how many pages is like four pages with references in color it's it's also really compact okay that's quickly so fast consciousness for convenience versus presented the result is a continuous variable analog of Korra's algorithm a continuous variable and a lock of the harem art the Fritz's form operation is used in conjunction with inversion about the average of quantum states to allow the approximate identification of an unknown quantum state in a way that gives a square-root speed-up over such algorithms using classical continuous variables also we know that these quantum search algorithm is robust for generalized Fourier transform on continuous variables so the one difference that I note here is that we're talking about approximating a quantum state so we're not talking this is we maybe be more generic personal invasion of an unknown quantum state quantum systems can register and process information in ways that classical systems cannot as a result it is possible for Congress to perform certain tasks this is a bit of an introduction here again these algorithms are easily implement consciousness whose observables have discrete spectrum so just collect enough to level up Adams house I think I was reading this what recently is an manipular continuous information in tulip with the recent advances in our ability to manipulate continues quantum information interpretation error correcting codes inability of implementation using linear devices okay so this is just okay can we do the same right that's the question decide will propose a fast quantum search algorithm with continuous variables here continuous variable can be anything position momentum energy I feel like I went through this I think actually I wanted either quick want to do that or not I don't know it feels like it feels like we I went through this so I guess um okay Brian is in my screen here yeah I feel like I've read through that introduction quickly here we discuss how to perform quantum surge algorithm with continuous variables first we need a map of conventional this critter's problem into a continuous variable context suppose we have a function I was reading through in that let me check our task is to score the value KF okay two inputs and given no further information on the function f K in order to implement this encoding in a quantum computer with continuous variables we require a collection of n units yeah I was - I I was really done but is it then that I just stopped somewhere so this is basically if what exploits the power of con observe position and entanglement have a few of function calls are required our approach is discussed below collection of n continuous variables for silver space is panama-based States sorry sign the orthogonality condition for example one can consider compact region of the state space divided into n equals volumes each with measure of n variables whose Hilbert space is spanned by a basis of states in the context of this continuous variable embedding executing the function f response to it adjoining an extra state to the system clearly if one samples the region of random by applying the operator to a series of random points it will take F powerful connoisseur position and entangling scores I record I speak initial stated position bases such as this for a chronic computer with continuous spectrum random we needed suitable unitary operator which can take the initial state to the final state okay just as we have the Harmar to submission in this creep computation one of the basic operations with continuous variables is the Fourier transform it in position and momentum variables in phase space by defining the Fourier transformation as an active operator on nq9 States we can write it as like this where X y equals and both x and y are in the position basis this has been used by one of the present authors in developing an error correction code for continuous variables this friggin song can be straightforwardly applied in physical situations suppose we apply the unitary operator F to a basis state X sub I then the relative amplitude of finding system in the target state X F okay so now probably finances in the final Kuan Yew net states were given by the next operator so whatever that whatever that means all I write is that the free response is used the next operator we need is the unitary operator which can invert the sign of a basis date we can define Y we can define the selective inversion operator for a continuous basis it's a projection operator for a continuous variables unlike the discrete case we cannot define the projection or prayer for the basis X as this because the operator X is an ill-defined and it will not satisfy the correct projection operator the reason for this definition is that we cannot project an arbitrary state which is represented in terms of continuous basis states into a point to get the exact eigen value there will be always a spread within any interval we can only project a state around X 0 to selectivity it's not possible to design a device to make a perfectly selective measurement of a continuous variable the interval X 1 X 2 cannot be narrowed down because it will always contain an infinite number of eigen values does this mean that you cannot squeeze to the extent that is just going to be like like just like a spike at that point maybe that's what maybe that's what it means I don't know this if we have a wave packet the effect of projection is to truncate it around X 0 within an interval these are pretty satisfies this with the help of the above inversion operator we can construct a compound search operator okay so here we've got like this is the identity for years from the universe of the future for you transform where am I it may be remarked that the selective inversion of the target state can be achieved by attaching an insular Kuna selective inversion oh no this is inversion this is not no identity I don't know can be achieved by attaching an insular Kuna and considering the quantum X or a circuit for continuous variables in a quantum circuit exists that transforms X into the okay then by choosing the ancillary state I'm here oh we can selectively invert the state X for which F x equals 1 first we show that this section is either too early right now or or that's really dense let us define the state we can show that the operator C can preserve the two dimensional subspace spanned by states first we show the action C on there again this can be expressed as using these new facts we can simplify the above equation similarly we can evaluate the action C this the operator C creates superpositions of to qnet states justice growers operator crates for positions of two qubit States once we understand the action of Seon CUNA's we can can obtain the num Toro number of steps required in reaching the target state here we use geometric structures of a projective turret space of a courtesan to obtain the number of steps but no interested in obtaining our steps and I want to see generally what's generally the during the quantum searching with continues very also we want to we want to reach state XF from initial state X I this means we have to travel a shortest distance between these states which is given okay so here they just go ahead and they trying to find the number of steps that it that you need blah blah blah video based on kinetic and take applications and see not interested in knowing how many steps this can take me right now now we know that the quantum surge occurs in what we consider is robust to some extent instead of the Fourier transform if we replace it by a generalized Fourier transform and the surge barrier see still the algorithm works we to get a square root reduction gft with a flexible angle is the physical change of the basis explaining desired amount here it should be mentioned that that's probably that the rotation operation excited alright so the search operator with this gft takes the following form freezes form something Fourier transform - something we can then we can see that the action of the generalized search operator on the initial state so so this is it so this is basically the you see here what the paper says with the exercises you've done like youyou don't have it can generalize it to like a parameterize rotation um I guess that's what they say I think this thing is what are those operations is I XF and I X I this I didn't catch that's why I'm kind of missing similarly the action of the generalized search operator can be calculated like this now we can calculate the for binney's study this system these types second conclusion we have for the first time provided an efficient algorithm such as quantum searching to be implemented on a quantum computer with continuous variables the key elements of the generalization are free transformation and inversion operators so those are inversion operators ok so now I knew I knew understand what those translate to and and see if that somehow is close to what I got here and will this make sense at all because you saw it if so it gives me a neat explanation of or gives me some interesting insight about Kwan about Kerberos algorithm which is that it's not about it's it's really not about where the the way that I approach the previous my original breakdown of the of the algorithm was like you know look so you're applying to harm our gates first then your doing something and then you're trying to go back to your original state but you cannot because I've changed something in between but really I think what's happening in here it's it's it's the fact that you using the two different dimensions right like the two different observables I don't want to use I don't wanna call it that using the two different observables you're using yeah you're kind of using two different dimensions to do the calculation um just because of the way those I mentioned behave at a quantum at a quantum level which is this kind of thing when you know when you've got certain in one place you've gotten certain in the other place so that's the the the idea here is that if you're a if you it's you know Grover's is then in this case it just means it's it's the mechanism to move information around to dimensions that's all it means that that's all it is and I'm talking about computational dimensions I'm talking about the in the discrete quantum computing the X and this end and the Zed observe all dimensions here I'm talking about X and P position and momentum because that's all what's happening here really that's all that's happening here settings the black post doesn't matter you know that's my point the implementation of the backups of the black box doesn't matter and then the thing is it's it's funny here because you don't have the you don't you have to deal with the different amplitudes of the possible outcomes you just deal with the with that function right so the inversion amount about the mean geometrical explanation is a bit more it's a bit trickier and I think here they use integrals for that but that's what I think but so I need to understand a bit more what do they mean by this if these are these inversion operators they talked about so the homogenous form indicator and suitably suitably generalized inversion operator okay the inversion inversion operator requires the projection of the inversion of prayer is that the entire C or s the prod the projection operator for continuous basis tastes which we'll discuss I know that's the that's the nasty okay so that's the inversion operator the next operator we need is a unitary operator that we can invert the sign of a base state X we can define that selective inversion operator for continuous basis like okay that's then just mathematical definition of it Egyptian operator for continuous variables unlike okay and this is a projection of a Israel's unlike this Creek case we cannot define the projection operator for the basis X s PX because the operator isn't so this is an integral yeah this this is just the mathematical definition then so they can go ahead with a calculations later on to make the reasoning which is kind of make sense but I'm not sure what this does really at the practical level so how would that translate actually into into search operator and so and is this compound Serge operator operator the actual whole thing or is it then is this something that's using conjunction in a combination with the who the Frisians formal that's this already include the phrase and some that's all that's what's not clear not clear either here that's what's not clear because basically this says apply the Frisians form to this inverse apply another Fraser's format change sign right which we what we kind of do is we kind of do is like squeeze this place and that is I mean that the freezes form because the the estrus was in the F I'm assuming are the same thing are equal okay let's let's now I need a slip on this I need oh I need to read I never read I need to go through maybe it's condition of kind of DS again maybe maybe what I can do the next videos I can try to compare that to Grover's algorithms mathematical description a little bit roughly see where the similarities are see what this takes me but I I'm not sure that's the right thing which bothers me a bit but I I really want to go through this and it's not clear to me whether that's the whole thing whether that this search operator sees the whole thing is the actual algorithm and then you just repeat that operator many times or is it something you have to use in conjunction with the with the Fourier transform or something like that steel I don't know we'll see
The First Quantum Laptop completing its first task! <a href="https://youtu.be/CJzcY0r0PqU">https://youtu.be/CJzcY0r0PqU</a>
Is this a problem or solution?, I was hoping to be able to check whether my solution was somehow good based on the paper but it&#39;s not fully clear yet as I feel don&#39;t fully grasp the Ix operator
i use to think that grovers was the beginning and ending but have come to realize that its just the begining and in the end it all comes down to maybe the, double slit experament! <br>1. you start with a random number <br><a href="http://2.you/">2.you</a> run it throuigh the epr effect <br>3 you perform a reflection about the mean <br>4 you arrive at an observibke value which you use to begin again <br>based on that which is observivble. DONE<br><br>And your not correct in saying that is all there is to it! &quot;Parallell computation” is a pandoras box and<br>this basic formula will be the foundation for millions of hours of research and experimentation!<br><br>I am sorry if i am vauge but if you have any quastions feel free to ask!, Theres definitely tons of hours of research ahead :)
so we're back we're back we're back uh uh portfolio multiverse yeah yeah so we're back um still gotta rename so i'll call these uh portfolio chicago good um where did we leave yesterday so basically what we want to do is we want to kind of kind of you know we're building this thing with senpai right uh diverse computing the paper this one so i guess i've i've downloaded it so many times that i probably yeah so we're we're basically building this part in here exactly good let's zoom it in so um and and and and so what i was trying to do last time was basically uh to kind of um build that programmatically as a so build the actual um equation uh using symbols like with senpai right um and i think the issue that i was encountering was that uh sorry i run this and the issue that i was encountering is that i cannot like it didn't seem like i could use symbols like these um so r is not defined symbol r as not defined what is not defined this is not defined i was giving it a try like if whether i could just like substitute this thing like that but it's not defined or substitute r can i just like can i concatenate strings so i think uh i think i'm doing this wrong so how how do i how would i build that like how does this work like i i so senpai uh build expression like can i just not construct an express an expression like these so i get the symbols uh what is this expression nice wrap expression x symbols x maybe i just have to okay maybe just have to use these like that i'm just like using the wrong it still complains again can under concatenate strings not not the insta strings um but that seems like i should be able to build things like these shouldn't it like if i so let me just let's just let's just saw i'll just comment the whole thing so this is the symbol r like can i just make an expression like can i just say like print printies right yeah and now i say print these plus two yeah so that works so uh can i use a variable maybe i can't use a variable that's the point or no that that works okay um okay that works um it's using floating po floats but it shouldn't be a problem now if i have an expression so this is expression right and now i do um expression equals expression plus i don't know another symbol right say p and now it's going to complain didn't complain and so i can now print these p plus r so if that works why why doesn't it work this day this way so i have these so i have these and i create these w a w n t which is basically 1k 1 divided by k plus the symbol r and then what i do is i i tell it like just one divided by k maybe so maybe that's what doesn't work let me just go back for a second so if i just go and say tool that works i mean come on what am i doing so so that works so why does doesn't this work so whenever the k plus sp symbols are not plus not we're not passing here any symbol so this is what we have and then uh w and t equals value and t plus uh plus or times sorry and then basically you have like ah okay now what i should do is i should basically have um sort of a uh the temporal expression uh okay okay okay okay what i should have in here is i should have basically uh so the uh the qubit expression it's basically can i just do like cubic expression equals zero all right and then secured expression it is a bit hacky but like cubed expression is equal skip refreshing plus and then i do with the symbol xntq plus 2 to the power of q right times this is what i'm going to have to implement now exactly that's what we're doing so two to fq times the symbol x ntq and so we're adding these and then we have this q expression at the end and what we do is w and t equals uh yeah well i don't have to actually define it here so i can just say um 1 over k times q expression there you go that should work and so this is w and t and i can actually go and print w and t now and let's see what we have why can i concatenate string not into a string where is this happening though ah ah this is the problem probably uh oh come on like how do i python concat string i thought you i thought you just could do that like that yeah just just using the string function string y okay maybe there's a way to just evaluate these things in there there you go invalid syntax invalid syntax is it the name of the variable oh no or why is it invalid syntax why is it invalid syntax i'm going to put a light or something or what is the or here i'm missing oh sorry there you go yay finally finally finally finally maybe maybe i just like maybe i will i want oh i should add this because if we have numbers bigger than bigger than nine like we're gonna get into trouble otherwise okay now we have it so now we have all these things right um for yeah basically the six qubits those are the six cubits that we that we want to have and if i would say and q is two then we're gonna have is yeah this basically nice so each row like it represents like each two qubits represent than one asset so six six because i have three assets and two time steps okay i like it now um so now we have these right now the question is uh how can we use senpai with arrays can can you just like can you do that like can you can you do for example because now we have these right so this is basically uh equation 25. um is it yeah this is question 25 and so uh w-n-t excursion 25. i mean for each yeah so equation 25 is without so it's not this it's d it's equation 25 right the thing what we're doing here is now we have to so now we're in the loop here where we iterate over t so we have w uh wnd and so what we need to construct in here is uh yeah okay so maybe what we should do is we should do it differently so no wait a second wait a second do we want to have everything in one array or not we don't so there's no no well there is actually t in here that's what's that's what that's what makes it that's what makes it confusing that here is per time step so once we're in once yeah we're in one time step but then we need to have uh for all the assets that's n so what we need to have now is what do we need to do so now i would put this into a vector right and that would be then wt so i would just basically say so we've got wt and like wt append wnt and now i will just print these let me know laundry depend numpy here numpy potion array a pen ray yeah you don't do it like that of course append uh double it is wt equals wt there we go okay um empty array like how how do you do that so okay i can just do that can you just do that yeah i didn't know what this is though here like like if i printed in here every time we okay these these these yeah um okay cool so we have this array like what is the print what is the length of this array for y we want and q to be one we want this to be like that and so still four uh it's an empty array and we should be we also have wnt then we should append this to wt wto wt that's wrong it's wt [Music] uh yeah i don't know what i'm doing four and four s it's two times um but like yeah so we have so we have these wt that we've built now uh now now this wt right like it's uh it's for all the assets so so now we have it and so we have to do here is we start building the actual equation so we have to do this minus mu right transpose of minus these so actually if i go and uh we'll just speak these things right so forecaster return is these and then we'll just um you know prepare data here so forecaster return is these uh we're only gonna basically uh what we're gonna do is we're gonna like what i want to try to do now is say okay so i'm wt and what i do is i do [Music] so the h is basically an expression that it's like zero right so that's that that's the hamiltonian and so we're now gonna do is we're gonna do uh what we wanna do is now i'm i have wt defined it's tier defined that's the thing that's what i'm doing wrong so wt is defined here and so uh it's an empty array i know no that's correct it's not defined we're filling it up here so now we are here and so we have the array with the the wt which is like an array so now what we have to do is we have to do like np transpose of -1 times the f return right because we're going to have this minus in here times wt and this is basically what the heart up with the what the hamiltonian is going to look like so exactly and then we're going to define the next wt yeah yeah that makes sense and so if i print h what do i have [Music] prints cannot be broadcast together with shapes 3 2 okay so i think that that's complaining about these so so what what this is is basically oh yeah sorry it's time it's like t what i should do is uh yeah yeah you're right so i should actually it should actually be like these uh yeah exactly so what we do is we actually have to uh it's the return for that time t what we're looking for i'm going to print h still not working so now we have i'm gonna broadcast together with shapes three for three acids so we have three acids but then wt wt uh how many assets it's got like how many it's got four elements and that's what i don't understand you have three elements right um always have four elements so you're going in here quick q expression zero so you're adding the symbols you know it's just one then you're doing one over k times the key expression uh and you are appending it yeah well because we have three assets right so we have three assets so [Music] so if we have three assets wt should have yeah three i don't know why i was with the empty i was creating sort of okay maybe that was the problem that makes more sense and now this should work okay and now i'm happy because i think it works as i expect it to work so it's really multiplying all the coefficients and all this stuff as they should be multiplied that's good um good so forty supreme for like printy right print so for t0 you have these 51 you have these why you have more stuff d1 i don't know uh to be honest t1 i know you don't have more no you you have three elements and you also have three elements it's just these elements have it's interesting is this correct oh it's got to have yeah it's kind of six elements because well because you you're you're adding like yeah you're adding three more exactly so if i was not if i was not doing these then yeah yeah makes sense okay so the final h is what we care about uh i like it cool so the final h is what we care about here exactly so that's that's h okay cool so now we've done with this component here yeah i think that's easier to do it this way now now the next thing you do right is uh this constant in here like we'll call it the risk so we'll have the we'll have the uh the risk which will be like um whatever right like i'll just i'll just define like one one over like just half um this is basically uh this here and so then we kind of have so we need the covariance matrix of the assets and this is kind of the coherences that we have in here so this is these metrics uh covariances those are the returns those are the covariances of you know we'll call it co for short uh it's random stuff and so what we now need is i like it because now it allows me to actually build that step by step so i do h plus um and i'm doing this part in here so uh it's your uh it's a risk times uh np transpose of wt right times the covariance matrix times wt nice yeah oh yeah look at this baby cool cool what did it printed two times though what did this print it two times because h is just uh do i have a print statement here somewhere that i can see no oh it's not two times it's one time i think it's one array just or i don't know but you you see you you see this like there's square components like do we have so far like quadratic components i don't see any quadratic component like i don't see any quadratic component i see squares but i didn't see quadratic components like that that doesn't count as quadratic that's that's the point okay um good and now we're gonna have to uh basically uh do this last part because the last one we'll leave for the next episode like for the next episode because basically what we'll have to do with these is we'll actually have to do some kind of like ranch stuff with senpai can you do the grange multiplier with senpai probably you can hmm the crunches method oh that does something else or it's uh oh there you go the crunch multiply examples with senpai it's perfect perfect and i guess we'll just uh yeah we'll just get that done uh but we're here now so we have the lambda which we also we're gonna make up lambda i'll just call it lambda l it's uh basically going to be uh np random uh rand can i just like is is it just um print l does this print just a single number random yeah okay cool so this is uh l and then and then okay so now we have we've got this difference now how do we do this so this is uh if this is wt plus one right this is wt plus one minus t that's the point that's it's it's uh so this part in here i was not quite sure about like the approximation here they approximate these by these parabolas so um or the transaction costs there but still they square it so this is the optimal purple coefficients for the transaction costs as discussed above finally let us mark that into setting the percentile profits that's the percentage of return minus the percentile cost um okay yeah sure but like so this means i i have to calculate um that kind of that basically sucks because because i'm a t now right and what i should do is now uh how do i build this because i'm looking for i'm looking within d uh the the different time things right and i'm adding these to the overall age doing for t equals zero and then i'm gonna do this to t equals one um but here i kind of have to take a look at one step ahead right see see this is confusing me a bit because there's no definition so it seems to be useless to me right now because i really want this to correlate the d plus one and so that part here um so what i gotta do now is actually gotta probably do a nested loop in here or i i should get out of the loop now actually over t already right so i'm i'm i'm here now and actually i should um simply i should do i should do it uh what it's written here right uh so t plus one so i should i should basically iterate over t right so i should iterate with t then i should trade over uh like um zero one what should i do i should eat trade uh i should just have t plus one yeah basically i should actually do like these because you should you trade always um for you know the one t uh what i essentially what i want to do right is i want to copy these which i should probably which i should prob probably encapsulate into something that returns uh an expression generate so generate wt and then we give it a t right and so what this is uh we're really doing here is the f general generate and it has parameter t and it's kind of doing these and then it's uh return wt so this is what it's doing generate wt so we're generating this expression uh okay it needs to have it needs to have and needs to have nq and an enqueue only okay okay so it needs to have n and q okay so it generates it generates that expression and so we now need to do is i need to kind of take these and basically uh basically say well we're now gonna have the so the tx expression equals zero and so we're going to have to do is the x expression equals the x expression plus and we're gonna want to generate we want to generate how how does it look like for what is going how is how can this size is going to look like four t's this is in between each consecutive step like what if t is bigger than two right what are we gonna what are we gonna get uh so um how long do we have 40 minutes okay cool so uh if this is gonna have so we're gonna generate wt and then we're gonna have and we're gonna do like so tt plus one right and we're gonna generate then t so this is kind of what the expression is going to be doing so it's going to be doing all these squared is it yeah because essentially what this will mean is that like for one for step t we take a look at the difference between t plus one and t so for step t plus i will take a look at the difference between t plus two and t plus one so if you have like bigger t's right so i think that it's uh and each of those should be actually multiplied by this lambda and this lambda this l right so this actually will be l times these and then and so now i will have the expression for all like across all the t's and so what i can do is i can just say h equals h plus the dx expression i think i think that's about right and now i have basically this component here and maybe i shouldn't maybe i should really go one step forward not square it but like because i really want to see that that i really want to see the the actual um quadratic terms let's see let's see what we get here if i do these valid syntax that's not possible um well it is possible [Music] okay okay okay cool yeah i don't we we don't see the we don't see the quadratic terms because it's just not unpacking these whereas if i if i take the whole thing and kind of kind of multiply it by itself then what do i get do i get i also don't get a quadratic terms just get that multiplied like that i actually would like yeah okay but if now for example i ask for the let's say coefficient of the term like i could ask the coefficient of the term x0 guys so how was that again uh to get uh i'm sorry expression coeff why is it an array numpy oh because it's uh hmm see it's not like if i'm if i work with uh if i work with arrays like me a second something's just bothering me right now ah what is this going on yeah whatever so um someone calling um so i'm not getting i'm not getting what i want i'm getting the array multiplication right and i would like to expand this am i getting the array multiplication uh if i was now printing print h right yeah that's the problem i'm getting the array multiplication right like what is this that's not that's not what i expected so i'm getting like a long array it's like um why am i getting a raise like that that's the point is like i don't know i'm getting a raise i want to multiply a raise and then uh actually just get the uh senpai you know what i mean uh expressions with a race of symbols in a symbolic expression that's not what i want to do so a matrix symbol that will have a convincing pie to use one-dimensional arrays using only one index matrix so is the answer since you you're at least access numeric you don't need a symbolic sound to handle it just some the least no that's not i think i don't think that's what i want so senpai uh spread equations with with vectors for example vector vector math okay so that's what we vectors in scholars that's what we probably needed okay see by a vector assets so it's actually i have to probably create this not with a numpy array but like with a vector any examples though simple vectors because then it's not a pen what we have to do is physics sector module so uh-huh okay so i'm mixing numpy and it's the wrong thing to do okay let's do something like this okay i don't know matrix transpose print this column vector is all row vectors okay so so what what this is telling me is that what i should be doing is not appending here anything but like um i have wt and then i should return maybe i can return it as a sp matrix what if i of like one row so so if i just go ahead and do these and say print w underscore key it prints the metrics okay nice okay that seems to work actually that's nice okay so and then and then it's not transposed what i have to do here is i have to do sp transpose that's confusing of minus one times so the minus the minuses i should add in here basically what i should be what i should do is i should do -1 times these so i should just generate it like that and then um i don't like that though no no i don't like that so i should do it like these stuff i use like these and then what we're doing is is minus one times the transpose of the returns times wt hmm transpose of these returns but then the thing here is i should declare that as a matrix as well right because i want to use it as part of my as part of my expression so i should also declare these it's complicated times of t and then i should change this as sp transpose of wt times the covariance which is actually a matrix so i should also define it as sp matrix of these covariances and then times w t which is already a matrix class nice i i i knew that would break cannot add class immutable dance metrics and class whereas it's happening here maybe maybe i don't have to declare these metrics that'll be they'll be quite magic and so i would i would actually i would actually do these and p transpose maybe just don't have to and in this case i do have to because that's but i don't have to do these okay i'm transposing the returns okay good i'm gonna leave it here because i'm running out of time actually but um i've moved quite quite forward now so i've basically um i think i got it almost right i just need to figure out the right way to build the expression and then once i have the expression done uh basically i'll be able to just query you know um each of the different terms and because i know where they go in the metrics and because i know where they go in the matrix i can say hey okay expression give me the coefficient of that particular uh you know component and then that's it and then we're done and then we're done with the matrix but it's uh it's a tricky thing to do to build that up i mean we'll have to do the step in between here where we actually calculate this lagrange thing um yeah okay cool but it's it's tricky to actually otherwise i wouldn't know how to do that like it's almost impossible to do this in a i would say more or less programmatic way to then kind of scale it to all the different comparisons that you want to have you're going to have to create it this way i mean it's uh yep cool i hope you enjoyed this i'm learning a lot so uh senpai numpy and all this other kind of stuff and uh that's definitely that's definitely helpful cool
okay so where where was i uh whether i leave last time um hadamard so it's doing the merge edges okay so what happens with the amplitude but i ended up doing something else what did i end up doing apply gate clean up original nodes cleanup originals blah blah blah global phase factors thing i was working on what else i was working on oh i was working on the apply to keep it to kbk being applied to actual to actual sets of nodes because yeah because i i wanted to um i wanted these to be like you can apply it to a set of nodes not to the whole system because if the system is gonna have branches then we're gonna have to go branch by branch and apply the two qubit operation in each branch if that's yeah because i think at the end of the day that's that's really what makes a difference i mean it's not that it makes a difference we're not just just saying stupid things it just each branch represents a whole a whole state in which the system can be right if if all the qubits in your system are part of a branch i mean you got to go through all the branches let's leave this the case where we have qubits in the system as well but they are not entangled with other ones so let's just focus on on on these if we've got two qubits that are entangled these two qubits are going to naturally have are going to naturally have like um like branches they're just both going to be part of branches and and then um if a third kiwi comes in and gets entangled with one of those this third qubit will then be part of these hyper edges as well so at the end of the day and that's why i'm using hyperedges because they're going to end up having like you know multi-cube edges like not just with two qubits but like multiple cube with more than two cubics now i'm trying to have i'm trying to think whether i'm missing an edge case or not there but let's let's try to get let's try to get this to work because now i don't know why why is this complaining now print node node is not defined uh print n so what is it doing now the problem is it's not printing the thing and i don't know why and i still don't know what to do with the amplitudes that's still a problem so so what are we doing here so we're taking a system initializing a system then applying a gain to q0 harmony gate and then we are applying a and again that's kind of hard-coded steel so so this is hard-coded and needs to be generalized for two cubits operate to give it operations and i'm applying a control knot to with these control nodes to these target nodes and it's wrong i think to call why am i why am i why am i doing that why am i calling these control null nodes that's wrong that is actually really wrong because it's two cubic operation it doesn't necessarily have to be a control why am i doing that that's definitely wrong where is this function cues your notes q1 nodes what am i why am i doing these that makes no sense at all it just should be it just should be one oh i'm stupid it's because it's qubit one and qb yeah yeah it's cubit one cubic zero and q b one yeah okay i just uh that's not wrong i just shouldn't call this control i mean in this case i can't right because i'm applying the cx with these sets of nodes yeah yeah that makes sense but it's it's qubit one think about the fact that these are it's one nodes of one qubit it just the cubic can have multiple nodes that's why this needs to be generalized and we need to put the cube here not the nodes here that's that's okay but just trying to get this to work now so so i get the nodes and then i apply the two cubic gate right and this gives me the system now and now i i need to clean up the system right so this is like it's not reduced but like merge branches right merge hyper edges so i get the entanglement hyper edges then i get the edge right so for each edge control nodes empty target nodes empty print edge and then i do for each node in in that belongs to those edges right for the node if the node belongs to q0 then pack it here just give me a second yeah and i'm back and you didn't even notice that's the magic of recording and being able to pause despite the fact that i don't pause usually okay so so what i'm doing is and this should be in the function right inside is that for each um for each edge for each edge in the system yeah there's something no there's something wrong so i take an edge and i oh yeah no ah i i have to step one i have to take one step back and just kind of like i literally did this a couple days ago and i forgot so yeah so it goes through each edge and then for each edge what it does is uh yeah and so i'm gonna assume if there's no edges then this is just the system edge right maybe i like if no edges there should be the system edge or or just the whole system right which is just neat way to generalize that system edge maybe it's not i'm not going to make an unnecessary edge but like that should be considered this way and then i have the control nodes the target nodes within that edge and then i applied to cubic gate within that edge now why is this what is this what is it happening here so and i i fear that i be that there's something messed up here happening because of the way the nodes are being handled so we have edge 21 and there's a node 21 there's a node 22. and i think that's that's actually the note that causes a problem isn't it note 22 because for some reason in this case this is just the note 22 there's no other note it says end of edge i don't know why like i guess what i should be careful here is so i should print these things i should print these things here to be honest yeah i think i think that's the because i'm getting confused and i think that's the reason h36 this one node there's another node and then you have this is the control this is the target and end of edge right um then h39 and this is no there's not it's not yeah so i i actually can i actually can remove these because not just it's two verbose and now i'm just getting the uh the two edges 51 and 54. um and then the 52 and 53 notes 56 50 55 56 notes which are kind of correct because there are two are zero and the two are one in here right and so what i want to know now is what what happened when this was applied why isn't that because what this is doing right what this operation is doing is it's messing up with something because then i cannot um i think i can get rid of these edge edge blah blah blah virtual edges oh no no that's that's the thing about merging edges which yeah which is actually solved but i don't know it's commended here because i that's gonna interfere with yeah whatever so okay what's happening what's happening what's happening why why isn't these printing stuff remember what i want to do is i i want to see that i just kind of get the same system that i used to get before i was running the merge right because i'm just i'm i'm i really what i did is i really changed the the two qubit operations it can operate on two sets of no of qubit notes instead of the whole system which you know i should probably generalize the no i don't need to generalize the one qubit operation because that's already give you the qubit and it just does everything through the nodes but here i should just do it like that so um but for some reason something's not working well so what happens when i do these let's go back to this function so we get the qubit and so we get the the labels you know the qubits because we will need this later on for you know edge addition and and stuff like that so what we do is for all the nodes for all the nodes in q0 and all the nodes in q1 right what we're doing is we're doing the chronic product because essentially what this function is doing is it's kind of getting the system representation of these two qubits right and within a branch like i think it's a precondition here that qubits are not entangled because the thing is that's why we're doing it from a within a branch right like if the two qubits would be entangled like that the way that way of operating wouldn't work um that's why i need to go edge by edge and then and then this will expand each of these edges into their own edges and then when we kind of take a look back like take one step back after this operation and take a look at the branch merging part this will actually solve all the entanglement that might be might have gotten disentangled uh already right so that's that that's why this needs to be at the at the hyper edge level applicable at the higher edge level so cubes are not entangled we operate at the hyper edge level exactly um [Music] so this yeah so these this okay so this actually makes these to do irrelevant because now it's like we know there's no edges in between right um so we get the two qubit state the local two qubit state vector by local i might be over using this what i mean is we expand these as a chronic product so we get the actual state of uh of that subsystem okay um we're gonna we're gonna get rid of some of these things we apply the gate and we get the new state vector and now what we do is we yeah this i i do this as a to do i can definitely make that a loop to make it more general and better and not like that i have like four ifs in here i get these and i expand these into branches so what i'm doing is i create new edges right for each of the wave function components i give them their um their amplit their amplitude goes to the edge we'll have to do this later then we add the edge to the system right we add these so we create so we're creating new nodes in this case yeah we're creating new nodes okay and then um we add the nodes to the edge and the nodes to the cubic edges and this already gives the notes the right the right so i'm thinking i'm thinking literally to just get rid of the key of the of the cubit edges i think that is just i'm really i i i think i'm going to get rid of these yeah think i think i might it just might simplify debugging i don't want this to be so it's going to make the visualization easier so i don't want to add things to remove node clean up the original nodes i don't know if this needs to be yeah this needs to be done but like so what i need to do is in these functions helper functions here you create the effect the cube sorry let me let me pre let me let me make sure that um in the node labels we print the state and we also print we also print the cupid maybe it has something like these that prints the qubit so i i want to know what is the cubid and then i when when you create the node you can get no labels block create keep it edge create node what is cubit yeah this is exactly so creating the note so i don't need to do that i don't want these and i don't want these so we we're just literally creating the hyper graph and these notes are in no edge i hope that works though i think so that that's gonna that should make it easier come on that should really make it easier because a note really should the thing is a note a note should really just belong to one edge and i think that's gonna make it that's gonna make it more uh that's gonna make it easier um so let's see if that works though let me just let me just comment these out for a second and we apply these and then maybe we apply yeah whatever we just apply the harmonic date and then we print it just just want to make sure that this works and it doesn't break yeah no okay but we still got the edges that's not that's not what we want why why apply gate oh okay so because we applied the gate and we add the node to the system edges with the qubit and that's not what we want to do state clone okay so what is the clone doing so clones the node okay so what i need to do is i need to actually add a little line here that says node cubid equals oh the cloning should clone that already and we don't want this to be added to any cubit edge because i think that is oh then we got two notes no one note what the what the heck is going on here so um so first of all what if we don't apply let's say we're not applying any operation okay but they're still being added that's not what we want where is the function oh there's an error that's that's why this did not i think i cannot do this in python can i because of the indenting that is definitely redundant they break that didn't break so no prince nothing awesome on really ah dude it's just notes no edges i just want to show notes no edges print system notes it's empty it's an empty hypograph what am i doing uh from state vector oh well [Laughter] yeah kind of i guess um system add node node 0 system at node node 1. i guess that is a must are you kidding me hnx documentation uh i'm lost i'm lost i'm lost from state vector here at node at node edge at node i mean hyper graph without edges should still be a hyper graph right like i mean you should still be valid it just notes add a yellow notes from okay add node to edge at nodes from what is this though from by be part time oh what is this eye edge node edge at notes from well where where oh he's a graph add edge at the edge from but note to edge collapse edges like system not name blah blah so i do have to add one at least okay but it's not it seems like it's not about it it's it's fine we'll give it a so we'll call we'll just call this system right and then can i have node 0 node 1. i guess that's fine let's answer the amplitude okay create not keep it but i'll have like a ah come on can i give it the properties i think i can give you the properties like that hypergraph entity set elements a b so i can do it like these from an entity can i just do it like so can i just do it like system edge right and this is like a entity which has an entity called system that has elements that has elements node 0 node 1 and it has amplitude 1 right can i do like this and then i'll call this s and then does this work it's nice to keep it i don't get it because it thinks it's a note it thinks it's a note i want to create so what about system out of edge s now there you go system one so we got node zero node one cubic zero keep it one okay cool um so that's that's our system i don't know i i wouldn't i don't like the fact that i have to have an edge but like whatever um okay so that's gonna make that's gonna make things easier now um let's see what i can operate operating this no okay oh yeah because now it goes through now i have to change the way now i have to change the way these works so i need to go through through nodes system nodes right and then i get i need to get that and node equals node and it's like if node dot qubit equals give it then do the actual operation if not ignore this and i don't need to do this now right like i'm cloning it up and now i guess clean up clean app so um clean up and that what i should do is if the operation is applied clean up n equals node and then i should just go through all the cleanup and not through the nodes to clean this up oh that's not what we want to happen we won so so apply apply gate so we take a look at the notes of the system we clone the node and then question is do i have to clone it now can i just change it i think i should be able to change it come on because but that that change won't propagate that's the problem i should propagate to be honest if i don't clone these and if i just say just say node equals nodes n and if the qubit is equal qubit then node state is equals equals these and then we're not gonna clean up and then we're not gonna do any of these and then we'll return the system it's as simple as that please okay that works i'm just gonna leave it like that that's cleaner no cloning no crap ideally i wouldn't like to just have to clone things just because i'm changing their state that's like i when creating new branches i'll have to do that now i think that that kind of iterative um uh refactoring is important so and i can you know even even try to just apply next gate here for example right yeah so and the system's got two nodes and we're all fine system two nodes and we're all yeah we're all fine cool um okay perfect now uh or even like you know like q0 and a harmon gate we should go back to zero zero that's good that's cool should build test at some point um okay now we have and let's bring the system that makes sense so we kind of yeah see how this is evolving cool now to the hard stuff so we we've done this now now we want to do again the control not gate okay perfect so so we have these and then i'm collecting the control nodes okay but now this is not um you know what i should do is i should have helped a function that says give me the notes for qubit 1 or something like that right how am i getting them am i getting them as in just the elements it's just a dictionary right so i should actually have a function that says get so what is this where's my where's my apply one gate function so it will look really similar um it'll just be a function that says you know given the keyword give me all the notes so get qubit notes so system and qubit right it's the only thing that i want and i want all the system nodes qubit notes and so all i do is it trade and if it's if it's if this is what we want then keep it nodes and equals equals node so i'm adding this to the collection and at the end i just return qubit nodes cool so get cubits now keep node system so now i need to go here and say your your code please you know okay keep it notes from q0 notes from q0 that's that feels much cleaner actually i like it and gives me the ones from q q1 let me see let's just print i'll call these keys your notes keyword notes let's just make sure this goes here this goes here so let's just print this thing first okay make sure that it's okay and then we apply the gate and then we do all the other stuff so happens okay error keep it okay keep it no skate keep it notes what is it missing oh hmm well system system oh okay but it's printing stuff that's not bad that's not that that's good actually that's really good um hyper graph it's pretty hot graph and then um and then what it's picking the right things okay cool i think i don't need to print these here so what is it what is it really doing this is the hypograph so we we still have two notes which is not good why am i printing these though i'm stupid of course it's good let's print it after after these first of all let's just comment that for a second so what is what what what's what has these okay so now we have yeah i see the system one is just left like that that's the problem so okay because i now i need to add everything to system one so i need to add all the new qubits to to the system edge right so i do need to do basically um let's leave it like that for a second i want to see if i can fee if i if this works without like i i i'm afraid adding having cubits that belong to multiple edges right now just to be problematic because of some something wrong going on with the h and x behind the scenes but but that makes sense right so it created two edges and this is qubit zero and one both in the one state and zero state in both in the one state so that actually makes sense and we have the amplitudes set up correct it's just the whole thing should be wrapped up by assist by the system edge but that's kind of correct so that's not that's not bad so this means this has worked out well um if i take a look at the hypercraft i'm gonna have to find yeah so it's the system edge and there's the h32 and h35 right um call so this is this is all and i think i'm gonna i'm gonna really just wrap it up soon uh now let's merge the branches so what's what's this what's this supposed to do so this is supposed to go through you know give me all the entanglement and tangoman edges which at the end they now this is just all the edges that are not the system edge so i'm going to keep it like that just because i don't want to get the empty edge um but that should be um just replaced by get edges or something like that right and then i go through you know collect the control nodes the target nodes um for that particular thing i'm i should change the naming but like whatever i print the edge and then uh the name and then i say okay within the edge i'm getting so if the if the node is from belongs to cubit 0 then it's control node if not belongs to the target node so i do that and i apply the 2 cubic gate okay so sorry i i gotta command that because that's that's not all what i want now i want to be able to oh no that's correct now i have edges so now i want to do that i want to see if this takes me back to the initial state right because that shouldn't compute the control knob and i i should write this down somewhere this is what i'm what i'm actually testing um they should you know they should per the problem is this should really [Music] also at some point clean up the edges right okay at least we're printing staff so that's not bad it's just that now we have those two empty i like that it's basically it's basically it's worked i think it worked yeah because yeah it worked nice it worked because the zero zero states zero zero but but the the one one right it actually went one zero it actually applied the not gate to the to the qubit that it needed to apply to now here my question is can i not just uh do i have to i'd love to not create the notes here but i think i have to create these notes then it just cleans them up that's kind of okay but i don't like it i think but i think i have to right because i'm creating new note new branches and then they have new nodes in there yeah i think i cannot i think i cannot get rid of these so yeah okay but it's worked so it's worked just for the branch that i want it to work and now i and now i should just go ahead with the uh with merging the branches which i am not so sure it works that's probably not gonna work let's see what happens i get the entanglement edges and then it's like flight new edge let's see what happens okay what's going on here i think it worked you know wait a second what is this yeah i think it worked i think that's the new edge right and i think it really just merged it it's just we don't see the i don't see the label properly is it gonna lay it out differently yeah look at this it worked that's the edge it worked actually oh wow it merged it okay that's cool it actually merged it but i i i still don't know how to handle the amplitude but like it actually merged it so we're back at one edge with these now that should be the system edge again right uh i guess or i don't know that would be you okay but it worked i just left a lot of trash along the way but it worked uh we have back qubit zero is in the plus state and qubit one is in the zero state so that that worked nice okay perfect so now now we get at least so we did actually build a bit of a refactoring here so we we we now have the two qubit operation that kind of works at the edge level so just with sets of nodes um i haven't tested it well or not though so i would have to abstract these away and into the proper two cubic gate function where i just give it the cubic labels and then it should just it should just do these this thing as part of the function itself and i need to so that's that's gonna be next video and i need to actually clean up because i like the fact that i'm not cloning in here but here i masked clone and i must be careful with the um with the whole cleaning app and i'm i'm really thinking about i should clean up the whole system every time just to avoid problems and kind of have a new system edge if need be but i don't know that's also not the right thing to do probably um i am so what this is doing right is uh it's applying these so this actually will generate two new edges but out of one edge and so that one edge should disappear we should clean up both the edge and the qubits in it um [Music] if the edge is system then we should clean up the edge system and kind of have a new edge system maybe i shouldn't call it your system you know yeah i think i shouldn't call it system i think it shouldn't be it shouldn't be it shouldn't be anyhow special it should just be an edge it's like it's just one edge right and and that splits into edges so i think i think that here we should definitely clean up the edge that these notes belong to to do clean up edge and don't make system edge special it should just be one entanglement edge is this just one right like we've got a system and this system is sort of it's not that it's entangled but it's just one system and so the system can branch out in multiple edges but then yeah but then no no no but then uh the problem is once you have qubits in the system that are not entangled you need that no no no you need that that's the problem is that the problem is going to be when we have more than two key bits it's like they have qubits which are not part of any edge and they still need to be part of the system edge um yeah so we need to keep the system edge special somehow cleanup edge how do we keep the system edge so yeah that's gonna be the next that's gonna be the next stuff the next task definitely perfect perfect perfect perfect but at least it works so it kind of leaves a bit of trash behind but it works it gets these and then you know i need to clean up these notes and and need to clean up these edges which are when when i'm oh maybe that works now what if i do this oh there you go what is it done yeah okay so it work it works in the sense that it's cleaned up the nodes of the edges remove edge but it kept the edges that's a bit stupid isn't it i want to remove these edges it cleaned up the notes but it just kept the edges and that's a bit awkward i don't know and i don't see nice rubber bands anymore so okay yeah i got to figure out how to do this but it's going the right way so i i get i i get it to operate at the edge level i get the merging the merging right now i need to i need to clean up the two cubic uh operation that's gonna be next task and then i need to finalize the merging because the merchant needs to be iterative as well so it needs to work until you cannot merge anymore right until you have either just one edge or you cannot just merge anymore so this is what needs to happen and i think then we'll be almost done we'll we will be really almost done it's just i'll i'll need to move to three qubits and see what happens if the whole thing works at all anyway thank you very much for watching have a good day
is this is finally here quantum approximate optimization algorithm explained i've been waiting for these like four months so me how i'm super happy you got it done um because i i i one i wanted to keep uh i wanted to kind of go back to these um since it's been a while now and as i really liked the vqe one that you did before i thought that would be a good one as well so there's a lot of stuff in here i'm not going to try because i barely have 30 minutes today for this sorry guys um but i want to try to get through this as quickly as possible that's my style and then go to queer try to play with it and then i mean we'll see how how this goes um ideally go to strange works and and get some some of the stuff coded in there playing with the concept we'll see um there's a fair bit of introduction in here so i'm gonna have quite some fun um yeah it looks like it's like half of this is introduction anyway let's get started uh so this is the second pause the qb1 is here by the way for those who don't know there's a really good one here i don't know if this being revisited because i see the um so the layout the some of the the the way this is render has changed so it looks much nicer now with the gray box and all this stuff but that was a really good article um it helped me really uh sort of crystallize some of the things around measurements which i think i mean i was really thankful for um so what's the motivation behind this how it works before so go pretty deep into details motivation accurate childhood understand something don't worry you came for some different problems for two years and only recently started to really appreciate the math and the physics behind it you can always come back and visit this blog post exactly um combinatorial optimization problems evil aims sending notes in the classroom so imagine classroom with students is sending notes between each other it uses annoying and things knows exactly how many notes pass between each pair of students the class is moving to a new room with a huge gap in the middle preventing students from sending notes to the other side how should the teacher divide the class into two groups in order to minimize the number of notes so this is graph coloring right i guess um or another example in a far away kingdom okay kingdom merchants trading blah blah blah um should be which faction to maximize the losses so what do both institutions have in common they both can be described as a max the max cat sorry another coloring but actually i think they are both somehow related the max cut problem it's a it's the way you divide a graph into two groups such as the edges going between the two groups have the biggest possible weight um e uh two groups yeah so in the first example the notes of the graph represent the students and the connection represents so many notes and giving percentage the second example the merchants are not connecting to cats or talents they're not mutual trade is worth so this is the graph this is the solution yeah you see coloring so you kind of it's just graph coloring with two colors i guess uh why max kind of small a small digression integration here if you've seen a portion of the graph and a different problem it might not be the most obvious example however for a few reasons max's problem that the author is using the original paper it's the most well-suited example of qi application in the literature probably because of one uh solution is a binary string so just a string of zeros and ones there's no problem with encoding the results yeah it's nice as far as i can tell it has some neat mathematical properties especially 4k regular graphs which make it easier to analyze if you're interested you can find more answers the original paper as well as others there's some talks in here are those europe things oh yeah so what do we have here so i'm going to talk about a quantum approach sorry for the volume okay so this is now done [Music] sorry for the volume guys uh and so this is a and um i'm actually your results okay those those might be worth checking later on um why combinatorial optimization guesses choose cost problems where you want to find the best solution from a finite set of solutions um it usually yeah that's kind of why also i've it's also the one that's used uh sometimes to uh to kind of play with grove or sound everything because you can search just over all the different possible solutions ordering a similar examples traveling assessment problems like knapsack problem yeah this is the stuff where you put things in your on your backpack and try to maximize something right um the first problem is that is welcome tutorial this usually means that the number of possible solutions goes extremely fast exponential growth remember dimensional means yeah that's not a problem itself uh in the case of continuous optimization we have to deal with an infinite number of possible solutions since we use real numbers and somehow we have efficient methods of doing that the fact that we need to deal with these screen values actually makes things harder and it's interesting well at least different many continuous functions we have to deal with in transition are smooth if we change x just a little also f f of x changes a little and that's okay that's kind of useful yeah okay so you can play with derivatives and integrals i guess and this would be easier we change only one bit of the solution from zero one but can dramatically it's also worth noting that many such problems are np-hard uh since was actually able to solve why we what we bought because they're applicable there's so many places that we're going to try to use them here just listing out where you can apply really industrial because i'm going to authenticate interesting um qaoa introduction qaoa is an algorithm which draws from various concepts we'll start with a description of qaoa and then we'll go one by one through all the pieces needed to actually understand how it why why it works let's say a cross hamiltonian represents our problem we'll see how to create one in the section about rising models cos hamiltonian so we can also construct an operator okay we start with notation um until i construct another operator hb where this is a pali x matrix and corresponding to it an operator okay so this is uh okay in carrier way we'll construct the state uh this is this this is this is this where p is they usually call the number of steps and it knows just how many times do we repeat we uh repeat applying these uh s's initial state usually these are these so zeros or plus if we call beta and gamma angles so if i remember well this is going to be something along the lines of kind of rotations in order to find what would the values of angles which produce a reasonable state we'll do exactly the same thing as within vqe we start from some initial parameters measure the state and update the angles to get a stay closer so i look at this equation i was like oh okay let's implement it and see how it works but the more i've been learning the more i've started ask questions what do we need hb for why does hp have this exact form why do we use these funny uh operators and predominantly why should it even work at all let's find out dances in the following paragraphs okay so um okay so this goes pretty straightforward to hamiltonian's you know there's no introduction to this but i guess this is something that is explained in here as well hamiltonians right yeah as a matter of fact energy is a physical system so okay so that article kind of builds on top of that one just because this is pretty uh if you're kind of coming new to these you're like what then what what the exact and then those things are rotations i guess right so this is the x-men this is the poly x matrix it's a sum of the power x of poly x matrices sort of a these are not these are not so straight understand why this makes sense or not let's go ahead so adiabatic quantum computation so that's the background see that's interesting because i remember i i don't remember any of these things being put together somehow when i first started um time revolution touch trautorization okay i remember searching for these and not knowing what what what is it and um so let's say we have a quantization with a simple hamiltonian with a known ground state we also have another hamiltonian hc whose ground state we want to learn we can now construct a new hamiltonian because we have a simple hamiltonian hs with a known ground state and we have another one that we want to learn the ground state so we now we can now construct a new hamiltonian in the form of a okay hs plus hc so it's the sum of both hamiltonians um for okay so it's a weight okay so when alpha is zero then it's just hs when the office one is just hc so this is a linear combination of those the then the adiabatic adiabatic theorem states that if we start in the ground state and very slowly start to increase alpha up to one then throughout the process the system will always stay in the ground state of h which means that at the end it will be in the ground state of hc yeah it's also worth mentioning that alpha could be okay so that's some sort of something that we gotta have to take as uh as a given so it's also worth mentioning that alpha could be an actual physical quantity of course that's not an easy thing to do and certain conditions apply but in principle if the evolution is slow enough we are able to find a solution to any problem if we can encode it encode its solution in the ground state of hc we use the word evolution for the process of changing the quantum system by changing alpha also we often use alpha equals t divided by where t is the current time it is total or n time so what this is saying is you think so you try to encode the solution so you try to build a hamiltonian whose ground state is going to be a solution of your problem but of course you don't know the solution of the problem so what you do is you um you then combine these with you build a hamiltonian to sort of combining these with another hamiltonian you know the ground state off and then you just let the system evolve but it that's pretty up that's pretty abstract actually uh since there's a prospect also we often use some of the z-screen thing which means at the end will be current state hc at the end of this whole evolution yes but why does [Music] so why does it matter that we evolve that step by step ah so it's a physical quantity so what is alpha increase and what does it matter that we know h sub s let's see so there is one big assumption in the brief part of which is over any potentially small as a method if we can encode its solution in branch that is c um well if we don't know how to encode the problem and then akc won't help us fortunately we know such encodings for many combinatorial optimization problems are uh and we use ising models to do that imagine a chain of particles each particle has a spin which is either up or down plus or minus one and it wants to have a different speed that its neighbors we can write down the hamiltonian of such system like these here this is this so this thing whatever it is sub is the spin of the east ice particle and and the last piece uh minus minus plus plus minus a string of all the speeds okay j is the strength of the interaction between the particles this methodical description usually works equally well with lattices instead of chains also we can change the behavior of the system by changing the design the the sign of if it's negative it behaves as describe if if it's negative it behaves as described but if it's positive then the particles will try to behave to have the same speed direction this model maps very well on quantum computers we just need to change those things to set operators acting on the ice cube it turns out that we can quote many different cops coming through opposition problems using as a model suite i won't describe how to do that but i can find many examples in this paper for descriptions if i know that it's doable and i can do this okay i feel a beat uh lost at the moment i kind of feel like i understand but i don't really see the sense of this or how this disconnect or what is this going so far but i i mean i've played with this before right i've played with the the notion of the icing models uh just i'm trying to make i'm trying to make sure that it just i'm just missing something but it's me it's not not about the article it's it's really uh just an increase it's things kind of make sense but i guess because they're kept at an intuitive level i mean i don't know i'm happy so far but i'm like let's move on um [Music] problems with aqc so we can encode most problems of interest in the hamiltonians and we have a method which basically guarantees that we find a proper solution so what's the catch not to for aqc require uh in order to work against your quest to be very well isolated from the outside world which is really hard to only practice america a long time to run you know to run it in the gate based kind of you won't be able to run it on a gate based quantum computer well while it it is possible in principle it will require much better hardware than we have today so this is incredible in the foreseeable future basically the harder your problem is the more isolated your quantum system must be the longer it has to run okay so this may be the reason that doesn't kind of like catch or i'm not kind of like feeling really attached to this is because this is a diabetic quantum computation so that's nothing to do with the game model and that's um um i i think i'm just approaching it with the wrong mindset at the right for that particular section so we're talking about setting up a hamiltonian so we're talking about setting up as some sort of a system and we know how to prepare the ground state of these hs thingy here and really that's actually what these alpha zero is is the ground state of the of these so we know how to prepare that um and if we know how to prepare a hamiltonian but we don't know the ground state if we then make this combination and evolve this thing step by step then we're gonna get to that that's kind of what the adiabatic theorem states that if we start the ground state of hs and very slowly start to increase this alpha further processing will always stay in the ground state of these okay but what does it mean to prepare hc that's why it's kind of a bit abstract so the the the whole adiabatic thing here maybe that's uh because this is the d wave people right like isn't that what they're doing um okay so i'll i'll have to revisit that a bit it just it just feels a bit fraying to me right now um problems with aqc okay relation to relation to quantum annealing so this seems like a good place to mention quantum annealing the paradigm that okay duff is fine the amenity behind qa is the same as uh for aqc start from a ground state of an easy hamiltonian and slowly evolve your state towards the ground state of an interesting hamiltonian what's the difference because an imperfect implementation of aqc which trades some agencies some of it is powerful for easy easier implementation although not everybody might agree on these scenes the line between what the community call iqc versus care is very blurry uh we can say that qa is a heuristic algorithm which can be more flexible when it comes to the rate of change between the two handled onions finite practical time which is on the microseconds and current devices and operates at a finite finite temperature okay so there's a bunch of comparisons in here and some stuff like that quantum mechanics background and this is like the question mechanics evolution of consistent venturization there's an operator which is quite common in quantum computing taking opera there's an operation which is quite common in quantitative operating and creating another one of the form but why would we do that um it comes from the schrodinger equation what it says is that the change in time of the state of a quantum system described by the time independent hamiltonian age depends solely on the form of this hamiltonian nice i'll have to reread this twice i guess and if we solve this equation we see the dependencies but i'm liking this uh so this is the so so this is the okay so that's the solution to the equation for t0 okay oh no no no okay that's okay okay so why what is that if we take some state it's not easier this is just this is just the differential right like the derivative what does this tell us that if we take some state and acting it evolve it with the handle turn in h for a period of time we will then get a state that is okay that is the state if there's something mentioned in an election orbiting the proton i don't know the system is defined solely by the interaction between these two particles and their initial states and we know how to scan the interaction right so we find the scenario equation we are able to get a formula describing the state of a system after time t and if we do the math we know it will look like these the key point to remember whenever you see an operator which looks like these you can understand it as an evolution of the quantum system described by hamiltonian h but what does this hamiltonian mean in terms of uh of actual programming of the actual okay this is something that you can implement with a gate model this time evolution or this is just something that happens naturally like you prepare the state and you just let the time pass and then you just measure after a certain amount of time maybe that's it that's what it means so would these mean just prepare that and let it go and then let it run for a while see what happens is that what it means i don't know because it's the evolution with time right so until this point we've made one silent assumption we assume that the hamiltonian we wanted to solve was the time in the was time independent but when we take a look at hamiltonian we use for aqc and change off of a t cannot pretend it's time dependent depending on how complicated this time dependency is this might complicate the solution which presented a little bit or a lot in the later case there are possible to solve okay so uh and probably yeah about the half let's just try to get here so what about trutherization not another concept important for understanding qao is structuralization most of the time we want to find the ground state of hamiltonian which is too complicated for us to deal with directly and it might be useful to approximate it um an example can be surprised a time dependent hamiltonian to help us graph the idea we'll get back to the classical world imagine a curve let's say this curve is described as some function you can approximate it by a piecewise linear function the yeah okay the more pieces we use the better approximation we get yeah cool nice we can do the same with the time evolution of a quantum system for an operator yeah okay it's actually shorthand for an operator um we can write these okay as a sort of a combination of those the bigger n we use the better approximation we can get keep in mind that time okay so this is going to take probably an approximation particular particularly useful in quantum mechanics is called the suzuki trouter expansion a characterization yeah or characterization is somewhat similar to another 12 expansions we use in mathematics like taylor series expansion if you're not familiar with this concept recommend watching the video it's three blue one brown um if our hamiltonian has the following form a e to the a plus b we can use the following relation we can look at it approximately approximating time evolution by a plane alternatively a b for time intervals ah so this is maybe gonna okay so this is so this is now going to how can we simulate the effect of a hamiltonian with time is it or is it not this is what the angles are for i guess they simulate the changes i don't know they simulate no maybe because that's not gradient we're not talking about gradient descending here we're talking about these angles which are probably the trick so there are some contexts of here again creates a state so that's the approximation where this has this form and this is this form uh crystal evolving this so these states correspond to evolving the state with the hamiltonian hp and hc for time data and uh [Music] and they are just happen to be translated to angles probably because that's the way you you can parametrize gates uh so layers looks like a lighterization so those are gates that simulate the evolution of the system okay i get it you simulate the evolution of the system and [Music] you expect to get to that point where you expect to get to that point where instead of i don't know what do you expect out of these what do you expect out of these i think what i okay so this is the reverse is it looks like a territorialization recommended to previous points let's see okay somewhat mimics adiabatic evolution from ground state to ground state hc which encodes our solution on the isa models so answering this the question in the previous paragraph could be given right choice of parameters viewed as an approximation of a qc okay so the relation what is the important circuit look like okay cool cool cool cool oh so that's kind of like okay i thought the circuit i thought this be there'd be more into the actual but this is really well put together after me i'm i like it so far so kind of it kind of i think confused me a little bit um sort of right here in the middle uh but i think i think those things start to make sense i want to read it until the end probably really twice uh what i want to do is i want to go through my previous videos about qaua see what i was thinking and doing by then uh because i was a bit more like jumping right away with the circuit um see if i can answer the questions maybe we can do this so let's let's see if we can answer this question in the next video i'll try to answer these questions right so so basically me house questions why why does this work at all and all this kind of stuff see if i can make sense of these from my perspective and then read what's mihawk's take on this but i really like the way this looks like at that point yeah okay um no not enough time for for these today um it's a pd but i'll i'll definitely go through these tomorrow or wednesday what does the circuit look like okay cool i would have expected a bit more details on the actual circuit but let's see cool thank you
The EVIL IMPS reminds me of the Byzantine General&#39;s Problem in Blockchain. Thanks again for all you do. I get a lot from you blogs., I&#39;m happy they are useful!
the first time what that means really is i mean okay so what why did i leave you last time i took a look at the quantum quantum harmonic oscillator right and then i got to the point where was it this one kind of realized that what was the most interesting for me was really not covered in here which is how is the schrodinger equation solved right like how how how this energy solution is found and you know that kind of means you've got to solve the schrodinger equation which is a differential equation and i've never done that anywhere so just for background i did like sort of my highest degree is uh what i did is i did a master's in computer science and you know guess what somewhat we never you know even had to touch this topic even in like the advanced math class and stuff like that um which is kind of surprising to think about it um we did we didn't do a lot of physics either i mean we just i just had like an introductory course at the very beginning of my bachelor's but there was really not much more to it and then in high school obviously i mean i say obviously because at least that's the system in spain like you get to derivation and and integration and you you know that's it if you get there like you can consider yourself lucky um so yeah so that's where i am at and i you know to be honest when i say it from the front from the first time it's not that i haven't heard or seen differential equations before i have but i've never like really fully dived into these um yet actually even just done any of them so i remember watching some videos from three blue one brown where he does touch some of the topics and then i did watch um yesterday as well a couple of the khan academy introductory videos they're really really good um so in in the khan academy videos the introduction the stuff that i watched was the you know sort of the basic concept introduction and then the the one about um how to solve so there was one thing that actually helped me a lot which i think this is what i'm going to try to do or investigate today a little bit more which is you know different techniques of solving them right so and the videos touched upon two techniques one was the um how do they call that they call the um gradient field or something like that the slope field something like this is that i think so the slope field technique yeah exactly where you kind of draw these you know you draw these things um yeah i think that is probably this is the video that i watched yesterday um slope fields and then prior to that there was another video about um solving differential equations um assuming that like a linear linear function is is a potential solution um so basically assume the solution has a generic shape like a times x plus m right like of a um a basic linear function uh where you just have like an x that's a variable then a multiplicative constant and then like a an added component like a plus m whatever other constant in there and then you try to solve for these so you turn this the differential equation problem into a uh into an um normal equation i'd say right so so if you have you know just as a as a dummy example if i remember this well right so if you have say something that looks like these right the the derivative of y with respect to derivative x that's awful i gotta calibrate this better you know equals oh god equals um i don't know i'm just going to make it up right but like whatever y divided by x i don't know right if i tell you that that this has a y as a function right y is a function of x this has a a solution that looks like these a times x plus m then then you kind of can plug these in here right you can also do the derivative of these which is then obviously just a right and and and you kind of you know plug it in here so you say a equals and then you can have a x plus m equals x and you kind of try and then you kind of try to solve for a um yeah something like this i don't know so so kind of like you know you turn that problem into a a small a simpler one so that was the other technique which i think maybe maybe this is what essentially you can do to solve the schrodinger equation because you know and what i am what i think is so the schrodinger equation right you solve for the wave function um now a wave function i think has i think the wave function has to like has a representation that is um has a representation that is with you know as a function of cosine of cosine and sine right wave function i think so wave function sine cosine i think there's like a sine wave formula sine wave so wave function the trigonometic wave function maybe this is something like that determining wave functions with trigonometric expansions that that's uh okay because that would be that would be a trick that you could use like after seeing that video that kind of clicked right i said like look if you can if you can but i'm missing the i'm missing the okay that's classical waves though that's classical waves quite a wave function um trigonometric expansion like if you could if you could make that assumption they could solve for something in quantum mechanics is there a relationship between the amplitude of the wave function and trigonometric sine function maybe you know maybe in some small examples you can do that this is an expansion of two previous questions i had before um i'm now encountering a problem with an integral we we want a general expression for the probability of finding e we have the expression for the wave function for the particle in the box okay so there is so in the case of particle in the box which is a specific example which might be simpler than the quantum harmonic oscillator and maybe i should just do this instead of the other one so you have this form right so you can you could use that identity to solve the schrodinger equation i don't know if that's what's done but yeah so that that's an idea but today i want to kind of put that aside and and really focus on just the pure mathematical concept of um of the differential equations and kind of explore a bit more the different the different techniques that there is to solve i wanted to explore you know how can i use things like senpai and maybe mathematica or something else to kind of like you know do this maybe numerically or with a computer or something like that um because at the end of the day it's good to it's good to know of course how to do these by hand and and all that stuff but it's um i think that that kind of high level techniques are interesting but then at the end they it wouldn't be realistic why not use the computer right um so i think it just helps you to understand the the core concepts definitely it's helpful but i want to move to the same pi and the python stuff or maybe i don't know maybe with qt but i don't know i've never used qtv there anyway so so that's a bit of the background um and then i found these yesterday mathisfon.com which seems to the bass doesn't look like this be weird but so there's some techniques i don't know if these are all but we can go through some of these and i'd love to do one i'd love to try to attempt to do one today like i don't know one exercise uh the thing is i'm not well set up i don't have this well configured to work with my two screens so i will see how i will get that done with paint but anyway so um something to do we need to solve it so we know the answers are uh functions or sets of functions that satisfy the equation there's no magic way to solve but over the millennial great minds have been building on each other's work and have discovered different methods possibly long and complicated methods of solving some types of differential equations um good so separation of variables so i think each of these expand to a separate chapter right yeah here's the method oh and an example rabbits more examples other exercises that would be cool okay but i actually i could okay so i could just take one pick one and then see and look at these right and then and then kind of don't look at the solution we could also do that so i will not go through all the examples but first i want to just go through some of the methods and then we'll pick one and try to do it so when can we use the separation of variables so can be used when all the y terms including d y can be moved in one side and the x terms including dx to the other side okay step move all the y terms including d y to one side the x terms to the other side integrate one side with respect to y and the other side with respect to x what why oh yeah sorry yeah obviously because you have one you have the variables in each side so you just do the integration don't forget the plus c the constant of integration oh yeah so when you're integrating say 5 with respect to x right the the the if you integrate that you should get you should get 5x plus c right because there could be a constant that obviously could be zero but it doesn't have to be and then simplify let's take a look at an example so um the the derivative of y is the derivative of y with respect to x is k times y so we separate the things and so we um you know get uh y down here x there integrate both sides so we do the integral of i guess is one divided by y and this is k oh yeah the plus c is always there so that the constant has to always be there so that's the the natural logarithm of y i don't remember the r i i really don't remember is there chi chi integrals uh in girls chi-chi properties common integrals something like this on do i have to click so much to get somewhere i hope it's not going to ask me for my email okay cool so why is that slow oh screw you i just want like it i just want like it like an image can we just have an image can we just have a normal image oh there you go derivatives and integrals common integral so k is k x plus c yeah yeah so so 1 divided by x is the logarithm of x plus c okay so these are common integrals and then trigonometric substitutions what i don't know this means by substitution approximating definite integrals common derivatives okay cool anyway um i yeah this is one of the things where you know you you gotta you've got to just memorize the school and then you forget if you don't use these um but you integrate that and you get these and so you um yeah so you get that expression c is the constant of integration and d we use and we use d for the other as if it's different a different constant of course um and then simplify so we have okay so we can roll the two constants into one yeah so d minus c and then you have the logarithm of y is k times x plus a um oh i'm so rusty with this kind of stuff that like i would never have guessed that you can do that um but yeah i mean you want to get the y out from the logarithm right because because you want this to be expressed as a function so of y it's a y as a function of x so you take exponents on both sides so the so e to the power of logarithm of e the natural logarithm this is ln the logarithm and base e oh yeah there you have the natural version oh okay cool um so you simplify and then you um yeah okay so these i know you can do the the these times these right and then well that is another con no that is another constant right and yeah that's it so that's the function you have and so you've solved the differential equation okay cool so just basically if you can separate these things and i guess that works also for like higher degrees right so it doesn't have to be just the the one degree uh sort of the first differential i could just be also the second derivative of y okay that may be yeah okay but i get that so that's and and i'll i will not do i will not do examples now um we'll we'll go through examples like that first or the linear first order linear differential equations so of this type derivative y over x plus p x okay so this is these are functions so this p x and q x are functions of x uh functions of x okay they they are first order when there's only yeah okay so it's only the first derivative it's not the second or the third a non-linear so this is really a non-linear differential equation is often hard to solve but we can sometimes approximate it with a linear differential equation to find an easy solution okay but how do we solve these so so this we red okay so to solve it there's a special method we invent two new functions of x call them u and v and say that and say that y equals u times v okay we then solve to find u and then find v and tidy up and then we're done but why you do that and we also use the derivative of of y see the product rule oh because the derivative of these is because the the product rule is that the derivative of these is the sum of right derivation rules product rule yeah so the function f times g is uh the derivative is the derivative is f times the derivative of g of of of g plus after the derivative of f times g so you okay so you use the product rule to say yeah because because it's linear right or because it's because if you've got these functions of x right as expressed as a sum then you can imagine that there was but but why why this is why not sure i understand this completely but let's see step method so substitute y equals u times v right into these factor the parts involving v put the term v equal to zero this gives a differential equation in u and x which can be solved in the next step solve using separation of variables um [Music] find u substitute u back into the equations of then b and then you got the solution so maybe let's just look at an example okay but couldn't we couldn't we just use suppression of variables here couldn't we just use supreme no we cannot use separation couldn't we just use separation of values directly here like you move you move this term here one plus y divided by x yeah okay you know but i get it you can never yeah you cannot you cannot separate those you you want because of the constant you won't be able to move y back here or yeah okay so then you then you make up so then you kind of make cap that yeah you say okay so um so that's the form so key of x is constant and then here p of x is minus 1 divided by x of course times y so so how do how do you do this so you substitute y and two into these right so you say so these becomes these so you replace this part here for this one here and then the parts involving v uh i see what i see so wait sql why do we do this term v term equal to zero so solve with the dispersion values and solve to find v separate variables and then substitute y equals uv to find the solution to the original [Music] so there's a few steps that i don't understand here i understand how to identify this understand the form i understand i think so why can you say that y equals u times v right so u u is what between your functions of x column u and v and say that y equals u times v why can't we why can't we do that though why can't i don't know why we can do that so how do we know the whys of this form let's see if we can find it somewhere else is fun again i'm not gonna watch videos because i haven't yet figure out how to route the the sound correctly i will do though um the mod channel first order equation can be written as these oh that's like i think that's two dimensions um or two variables it doesn't matter right but yeah okay so this is what we have a a of x and f of x are continuous functions of x two methods using an integrating factor and method of variation of a constant so i think this comes later i think this is this is what we've been doing if a linear differential equation is really in the standard form the integration factor is defined by the formula no that's not that's not the technique um good um okay so there's a bunch of methods actually integrating factors oh but maybe this is it really no i can't let so that's another technique okay separable ah foreign so what the is this method called i cannot seem to find so why why like i i don't understand why you can do that in the first place why can't you do that in the first place this is the integrated integration okay this is the seems to be so this problem is given in the gf simon's book on differential equations page now i'm confused here you and i are supposed to be dependent x so how am i supposed to differentiate these and replace derivatives of y and get only differential equation in v [Music] so you and v are functions of x you're factoring y as a product of two functions these are there are a lot of such pairs then you're free to move through the space of such pairs until you find a pair that happens to make all the v's cancel in the equation what okay so you're just making it up it can be that it doesn't it can be that it doesn't work right if if y cannot be factored it could be right so here you're just kind of giving it a try so you're saying okay so y is a factor of two new functions u and v so you replace okay so let's let's assume that you know this doesn't have to always work but it so you you so you replace u y by u v by uh here right so so you get these first of all and into render here right so you get you get this chunk in here and then you get u times v here well let's do it again with the example right so you have this function then you just you define um uv it turns into so this is the this is the stuff there and then okay and then you replace y by uv divided by x and then this is one okay so i get that how we get here now we factor the parts involving v so we factor v v out how oh yeah because it's here and it's here so we factor this v cool so now we have so now we have u times the derivative of v with respects to 2x and v [Music] and these are functions right yeah because that that's the change that's that's the product rule okay put the v term equal to zero why do we do this why do we do this then suppose so back to your equation so then the derivative is this okay now that's too complicated because that's the second order but then it says okay so so you know okay so they do these right and then you have the u terms then suppose why am i doing these am i just also doing it just as a just as an attempt to find so u and v are functions of x you're factoring wise product of functions a lot of such pairs then you are free to move through the space of such pairs until you find a pair that happens to make all the the vs the derivatives of v cancel in the equation so making the substitution you obtain these um so all we need to find is a pair of v and v such that two times the derivative of so such that these plus this equals zero why so i don't quite get why why that i mean okay so that is that is just it seems to be just just as uh like again like an attempt to do that right so it says here in the general method it says put the v term i know it says put the term v equal to zero this gives the differential equation of u and x which can be solved in the next step so i guess what if this doesn't work um i don't i don't understand this so i understand that you can make it up but i don't understand why you've got to factor the parts involving v and why you put the v term equal to zero um but okay so this is the so here i don't understand that part let's just go ahead maybe maybe we'll become clearer later homogeneous equations what's the timing um the homogeneous differential equations look like these we can solve them by using a change of variables v equals y divided by x okay so what this says is um a new variable v equals y divided by x so you also have the derivative so you can also simplify okay so you yeah yeah so you see you you simplify so you put these on one side a function of y and x okay so this is um yeah so that's an example and then you have can we get it in y divided by x style so start with these separated terms simplify reciprocals of first term what okay yeah yeah so now you have of y divided by x do you okay so it's got to be in this form why you cannot generalize that though uh oh because then we know we can apply the product rule that's why right because the derivative of y with respect to x in this case is this so that's why we can solve it okay that looks all super complicated okay so so you replace so all these these methods they feel so random so for you to apply this you need to [Music] make sure you can express that and d style a function of y divided by x and only in this case we can do so we we we do that and so we say okay so that's the same like saying y equals v times x uh okay so all what this means is you got to make sure that you can express y as a um sort of x times what okay so here i'm not sure i understand why this form must be why you cannot just do this with any form let's see what else we have here um bernoulli equation so of this general form and is a real number but not zero okay so this these techniques are pretty sick man so what is the form so the derivative y respect to x then function of x times y and function of x times y to a power yeah okay so if it's zero or one it can be solved with the as a first order linear equation um a separation of values okay what it consists of by by having a substitution u equals y to the power of one minus n um turning it into a linear differential equation and then solve that oh yeah because then you have like u times y so you so so you have these right and then yeah p of p p is x to the power of five q is x to the power of five and then we have these so you so you replace that uh wait what so u equals y to the power of 1 minus n so u equals to y minus to the power of minus 6. in terms of y that is y equals u to the power of minus one sixth [Music] yeah we differentiate y with respect to x so you've got these okay so essentially i see that what you're trying to do a lot of times is just find an expression with just substitutions that allows you to do the differentiation so you get rid of this term because that's what's bothering in the equation so you have that and then substitute this in the direction equation multiply all terms by these what yeah this is way i'm almost thinking i i almost kind of have to do uh just like one dedicated sessions for each of them i mean i won't bother you with a lot of these but i definitely want to do some practice sensation work so when i have an equation we can hopefully solve separation of valuable of variables why why weren't we able to do that before because we couldn't separate the variables okay but how did that make it easier to separate any variables i don't understand that so so now we have this form okay so these so so what this is doing is this is turning it into an expression that you can use separate separation of variables with so this separation of variables turns out to be always sort of the core method you try to simplify it down to that point because basically here you can factor things out and so now you have that like these you cannot just well in theory you could right why not why cannot why can't you solve these with suppressions of varia or variables directly let's try maybe let's use that as an example probably failed but so um yeah but that just works the sheet so i don't know what to do we'll get pain so we'll get these here we'll get this here right so we have these here so we have i'm almost thinking oh god so we have um so we have these right so we have so i could move that to the other side right and we have v y divided by d x equals x to the power of 5 times y to the power of 7 minus x x to the power of 5 times y and i can factor the the x by just saying um you know uh that these part is equivalent to like x to the power of five times uh y to the power of seven minus y right and that equals to you know these and then i can just uh and then i can just say d y divided dot by y to the power 7 minus y equals x no what was so 1 divided by x to the power 5 no what wow what sorry what am i doing no so so i have the x to the power of five that's it's just uh i confuse that i i'm stupid i confuse that with a division line times dx right is that like just separation of values then i can just integrate each side right and so this side is obviously uh uh i think that is if i remember well so well that would have been something along the lines of these right because the derivation is you put that exponent down and you minus this one right i think that i think that is the i think that is correct where do i have my cheat sheet uh what i cannot see the whole thing oh yeah look at these so this is this thing here so extra part of n and so here is one divided by n plus one times x plus uh what oh crap what does it mean plus c times n doesn't equal minus one what the is that so integrate um x to the power of n something like this it's a basic one but i think that that's can that render well or can i i think oh yeah yeah okay but there's no constant then there's there must be the constant right yeah but that's correct so okay so so that that seems to be correct now how do i integrate this guy here well i could do so i could i could split because so this is obviously 1 divided by y times 1 divided by y 6. uh minus one right because i can factor one y out and so if i if i have this and i can integrate these can i integrate these easily um so what does the cheat sheet say integration of well is there any kind of product rule here that we could use properties now that's a constant integration of yeah well but i could always redefine i could always redefine no can i redefine i probably cannot really find no i cannot really find i think because no a squared plus u squared or i can integrate by parts can i um so u times v minus the integral of would that work but in this case so what this is telling me is that i could just uh degrade yeah maybe that might as well just work right so what was that integration by parts so so that is if we take this right this form uh so u times v minus the integral of v d u hmm or i don't know can i use that can i just can i just use that minus so you can see minus integral v d u so what so so you'd say u times v right so u so u is so u times me that don't just basically say you know take that whole thing out and then it's like what do we say minus the integral of what y the yeah that's weird nah that that's that doesn't make sense rusty at this stuff how do you solve this integral man i don't know it's none of the common ones none of the common ones maybe that's why it doesn't work can i cheat and ask mathematic math well from alpha i think you have a integral calculator so i integrate so what do you have to give it just the okay in integrate um 1 divided by uh y 7 right minus y that's this does this work yeah oh jesus that's complicated but it could be okay so they so so it's a complex valid logarithm what what the is that something y is positive series expansion okay so you would have these but then you want to take the log the logarithm yeah that's complicated okay i see then you want to take the y's out of that logarithm and that's just if if it's possible this is going to be complicated so but maybe it's doable i don't know so so that method so that that's why what was the one that i was doing this one so that's why this method is better why because you get a so these are easier to integrate okay but wouldn't i cheat cheat sheet okay ax plus b it's going to be it's going to be of this form so then you can actually replace it with a logarithm yep okay what am i doing sorry um okay so these are okay so i don't yeah understanding the different methods is not that simple right or why do they work but there's a bunch of methods so so you've got this here so in specific cases the substitution that it just makes the separation of variables easier because you could attempt that directly but as you've seen then you end up in a mess and yeah but that's so when you have these because i guess with this car i guess what you're trying to do is you're trying to um so you're trying to get to a point where one of the components doesn't have like doesn't have that exponent right if if y wouldn't have that that's why they say that if n is one then you can just do separation of values of variables because that's what's bothering right is this is what's bothering is that you're going to have when you try to separate the variables you're going to have that high exponent exponential in there um which if you if you try to redefine and and invent that you like these that is that is that is that is going to [Music] um [Music] that's gonna allow you to do this replacement here and this replacement here where your plus seven all right not plus it's times seven so you have like minus seven sixths yeah so you get rid of these because the derivative has the same term okay that's pretty smart i get it because yeah okay so you do that so that you can have an exponent on the on replace these with the derivative obviously which kind of has that exponent right um and because you then have that exponent in both ends you can actually by doing these multiple this multiplication all the sides you basically yeah you just basically kill that exponent you couldn't do that before because you just have d y d d y of the x what you know you just don't know what that is and so okay so so that's the goal here is to kind of kill that exponent by doing that and it does not always work probably right um and then you have an easier way to solve okay so this i understood that that's that's a good technique these i still don't understand why this why the equal thing to zero maybe i can try to understand that a bit more because i mean this i get i get why this works okay this is also not completely um but yeah so the different techniques and then what else is there second order equations we'll leave that for another day um but i guess a lot of the tricks is going to be to try to approximate it with the first order because they're easier to solve and uh and determine coefficients against a variation of parameters that seems to be start with the general solution okay nuts that looks like nuts the wrong the wrong skin the wrong skin what the oh vronsky that's like a polish name okay jesus yeah but are these all like i don't think that these are all right so this is just some okay so there's ordinary different equations versus partial french equations separate methods to solve them okay so but i guess so i guess all these techniques are doing is they are it's always try to always reduce this to something simpler maybe maybe with the exception of this one but something you can solve with separation of variables and stuff like that because techniques to solve pdes so there's some numerical methods the method of lines the jesus christ that looks like crazy and suffers okay so there's a then you're getting into software land numerical techniques numerical techniques right are just basically okay so so you just approximate that by just trying solutions i think right creating discretization finite volume method spectral method measuring method this is complicated stuff man but okay so this goes this get gets quite nuts um i i okay so next next session also hi i just saw another message the message in the chat um you can solve linear differential equations from any order with an exponential function uh yeah i see i saw i think i was now i was but i know it's funny that it's not here in this page but i saw the um i saw i just i came across this method maybe we can just focus on this next time uh so uh where was that that that's that's that's what you mean right i think you can do that there's there's there's a method that is not in here for some reason that is for for differential equations so solving differentials it's a linear differential linear equations and i think that the [Music] um second order case that's probably what you mean right i guess okay so we'll try that next time i think i've got a fairly good idea of this topic just having enough time today to dig more into these but so if there's so this i'll just look for these so there's as you can see from any order with an exponential function so i just i just really want to find something so i don't have to spend time looking for this next week or next time try to get get something done before so [Music] so i think i think that's probably what you mean it's pdf yeah that's that's probably for constant coefficient linear ode in the case of this form um solutions can be easily con obtained without working backwards from the solutions the first step is to compute the roots of the characteristic polynomial no maybe that's not what you mean damn it i just i just came across these i think like literally like 10 minutes ago why is it so hard to find this stuff so soft linear uh [Music] access denied serve isn't available in the eu region go yourself oh i think it was this one maybe oh yeah i think that is yeah yeah there you go there you go i think that's what you mean right so with these so it says differential equation of this type continuous functions to do using integrative factor so if a linear differential equation is written in the standard form then you can integrate then the integrating factor is defined by these formulas so you you really you define a u a a new function u that is the x it's it's e to the power of the integral of a so this part here so if you multiply the left side of the equation by the integrating factor it converts the left side into the derivative of the product and so you multiply the left side of the equation by the integrating factor you mean why would you do that though uh the general solution of the differential question is expressed as okay i'll i'll get to these but i guess that's what you mean i guess that's the solution but that's what you mean with the integrative factor with this exponential and there's also the variation of a constant okay cool but these are these are these are hard things these are these are complicated this is complicated stuff um and now so but what i take out of these is that it seems like uh it seems to me right that at least a type of a version of the schrodinger equation should be solvable just by the fact that we know what form a wave function has and so that could allow us to replace maybe that in the air and then try to solve it for solve for this maybe that is at least for the at least for the quantum harmonic oscillator case we could try that but i want to spend some more time i want to dig some more into differential equations and kind of feel more comfortable with them in general and then try to do some examples i just have to set that up correctly good that's hard but we'll get there stay safe and have a good day
Thanks for your videos.
this is the recording yeah it just broke so I had to start again but it's time to approach the continued cerebral quantum neural networks paper that basically me how is basing the Yellow Submarine project on so let's take a look I'm still quite surprised how how recent this paper is really and I yeah let's see let's let's go through the through the abstract first bit in detail and then we'll just scan the paper so wheat reduce is a general method for building networks and computers and now I based on the stuff that I've read before from me and other people involved in some and all the stuff this is supposed to be a source understand a highly inspired by traditional neural networks so the quantum Darrell network is a variational quantum circuit built in the continual see the architecture which encodes quantum information in continues degrees of freedom such as the amplitudes of this circuit contains a layered structure of continuously parameterize gates which is universal for silicon a configuration fin transformations and nonlinear activation functions two key elements in neural network and I'm not expert in our network so I might have to kind of double check some stuff are enacted in the quantum network using Gaussian and non Gaussian respectively that's a name that seems to be key so first of all let's check what are F in because III done I'm not familiar with the within with sort of the terminology for now around crystal I know roughly what you know what the concept but I I have never actually even implemented one myself so a classical ones enough a fin fin that preserves collinearity all points Lyman align initially still ion and riches of distances the midpoint of a line segment remains the midpoint after deformation okay so it's a special type of transformation maybe maybe this is maybe this has something to do with reducing dimensionality of problem nonlinear activation I guess an activation function this is what I sent it if Lee makes one of the neurons in the in the neural network to activate it and that nonlinear probably means it's a it kind of encodes a nonlinear function right so a faction that is nonlinear yeah they allow back propagation because they have a derivative function which is related to the inputs they allow stacking of multiple layers of neurons to create a deep neural network multiple hidden layers of neurons are needed to learn complex datasets with high levels of accuracy okay so you've got a bunch of times okay but it's interesting so the F in transformations are basically implementable using Gaussian and nonlinear activation functions in non Gaussian gates respectively okay the non Gaussian gates provide both an non-linearity and the universality of the model yeah because I remember in the strawberry field works and I do this documentation I just can't believe myself how how I ended up I still remember the first video and I I'm circus looks like they've changed that condition or its again another one measurements corporations give reparations but this is qubit operations I didn't know though that cousin of the wall also has a penis of a wide variety of quantum operations is gates temperature measurement system version if exclusive kind of functions like phase shift unitary rotation swap T because any of continued survival okc negates beam splitter controlled efficient control phase crosshair cubic phase displacement interferometer to mold squeezing squeezing rotation stay preparation state gaussian stain I did they have updated data lot or I didn't know that they also steals to support this creates very well chronic appearing operations like all these stuff right so the Hatem are demon interferometer displacement what is squeezing see if got in here I mean at the end of the day is like I you could probably argue that the discrete subset of of the continued several computing quantum computing but I don't want to say something that is inaccurate nevertheless I'm missing maybe it's not Penny Lane I get confused with the products but this is everything continuous I don't know IIIi was trying to trying to find that documentation where they talk a little bit or Gosselin and Gaussian gates because there's definitely something about linearity in there but whatever here to this structure of the CV model the city economy neural network can encode highly nonlinear transformations while remaining completely unitary we show how a classical network can be embedded into the quantum formalism and proposed quantum versions of various specialized models such as a convolutional a recurrent and residual networks I've heard about a fertile echo volitional networks before but I really didn't know what it'd be for what the differences aren't convolutional so those are specific designs apparently right in deep learning curve little narrow nose is a class of deep neural networks mostly commonly applied to analyze the visual imagery okay they also known as shifting very inner space and very efficient networks based on their shared weights architecture and translation invariance okay so that kind of gets to okay um I don't want to get I don't want to dive too much into the into into the details right for now I mean I just want to want to understand roughly what's the architecture that me how has taken for the paper I mean I'm not planning to dive deep to deep dive into this in this video nor you know in the near future finally finally will present numerous modeling experiments build with the strawberry fields suffer library these experiments build including a classifier for fraud detection and network which generates Tetris images and hyper classical quantum auto-encoder so I'm interested to I might come back to these if I see the papers to detail but I'm interested to understand at the high level the roughly the architecture because me how is basically they are basically using that concept right so that's why after many years that's why I want its knife into this quickly so there's an introduction here first then there's an overview in this section we give higher levels and synopsis of both deep learning and a city model to make this work more accessible to practitioners from diverse backgrounds will defer to more technical points to later sections both deep learning and silicon and computing condition are rich fields files can be fun and that's really nice they're not probably redone it's really nice no networks and deep learning I mean later but so they'll notice the deep learning quantum computing at the CG model okay that's interesting so the paper actually comes with with a an introduction as well to the to the CD model that's interesting alright what else we have suddenly universality continuous renewal quantum network now in my works this is where the thing starts and these is he I remember the stuff that that I was using and me house paper yeah yeah exactly and this is the paper and so they basically say they used they use dot so this is taken from another paper where they prepare this is how they prepare the how they instantiate the problem I think it's like the adjacency matrix exactly that's what they do and then and that's all yeah so this part so this first two columns are the adjacency matrix and then you've got that so this operation and a bunch of squeezing gates this operation and then there's a displacement and then non-gaussian and that's basically taken directly from here this place is quizzing displacement non-gaussian the circuit I just want to try to get the gist out of it right because there has to be reasons why there's a non-gaussian here and that's this maybe has to do with the non-linearity and the fact that I already see that that's one layer and there's actually multiple layers applied in here and for some reason I see that the it seems like those layers are basically getting smaller and smaller that's interesting whereas in me house case I don't know I didn't think that happened so that's an interesting thing okay so the circuit structure for a single layer of a silicon in our network and interferometer local squeeze gates second interferometer local displacements and finally local long us engaged the first four components carry out an fin transformation followed by a final monthly its information exactly so here they called it just unitary because they are just I think but it's not supposed to be the same I think quantum circuits which have recently become the predominant way of thinking about algorithms our near-term crisis the main idea is the following the follicular network architecture provides powerful intuitive enzymes for designing aberrational circusy okay so this is sort of then following the vqe there's a variational thing and treating enzymes will first introduce the most because I smell the fact that this part here might have to do with the mixer which I'm still not exactly familiar with but it's somewhere in this direction so we all first interest most general form of the connemara network which is the analog or the classically classical silicon and network we then show how a classical neural network can be embedded into the quantum formalism in a special case where no superposition or integral is created and discussing result well as modern deep learning has moved beyond the basic feed-forward architecture considering every more specialized models we'll also discuss how to extend was our network okay it's so far pretty perfectly pretty well explained I mean it's written in words just good and bad fully connected kind of layers so a general Civic wander narrow narrow is built up a sequence of layers which each layer containing every gate from the universal gate set okay specifically a layer L consists of the successive gate sequence shown in Figure 1 the same applies here that's where you start and squeezing then this and the displacement and calcium general import linear optical interferometers containing beam splitter and rotation gates as an inter formalism beams where n and rotation gates okay D and as our collective displacements and squeezing operators acting independently on each mode and this is some non Gaussian via the cubic phase or Gergely the collective gate variables form the three parameters of the network the ax lambda can be optionally kept fixed an example multi-layer continued survival corner now in this example the later layers are progressively the Christine size Q modes can be moved either by explicitly measuring them can be removed by measuring them or by tracing them how the network input can be classical by displacing HQ more according to the data so now a network input can be classical excited for example by displacing each key more according to data or quantum the network quemo work emotes the sequence of Kazan transformations is sufficient to parameterize every possible unitary of a half inch resolution and commodes really so that's why is that's why that was in the phase space picture the chorus disk response remission of equations s7 the sequence this has the role of a fully connected matrix information interestingly adding normally non-linearity uses the same component that adds universality and I'm guessing gate we can write oh sorry equation seven on seventeen much like us information so the reason this sequence this specific sequence is chosen is because it allows us to basically it shapes the space that you can explore which is basically any kind of Gaussian transformations or any kind of it's basically it allows for maximal exploration so okay I'm satisfied with the answer I guess and the the non-gaussian gate I got to probably go back to read that mathematically for an input vector X single layer L performs the transformation the fundamental concern may be let me read that first part so the fundamental construct in deep learning is the feed-forward now network also known as the multi-layer perceptron over time this Kalman has been augmented with additional structure such as convolutional future maps recurrent connection statute mechanisms or external memory for more specialized or advanced use cases yet the basic recipe remains largely the same all a multi-layer structure where each layer consists of a linear transformation followed by a nonlinear activation function mathematically for an input vector X a single layer or whatever that letter is L performs the transformation yeah it's a summation okay where W it's a matrix B is a real number as a vector of real numbers the objects W and B called the weight matrix and the bias vector respectively are made up of three parameters typically the activation function contains no filter our is an ax element wise on its inputs the deep in deep learning comes from stacking multiple layers of this time together so that the output of one layer is used as an input for the next layer in general each layer will have its own independent weight and bias parameter summarizing all model parameters by so it goes back by the parameter is given by and moms an input f2 a final output Y any pull any put thanks building machine learning models with multi-layer now and I was well motivated because of various universality theorems theorems this there is guarantee that provided enough free parameters feed for nine hours can approximate and that's the key so feed forward neural networks can approximate any continuous function on a closed and bounded subset to an arbitrary degree of accuracy while the original theorems showed that two layers were sufficient for universal function approximation deeper networks can be more powerful and more efficient than shallow and networks with the same number of parameters okay yeah so that's basically it's basically the same concept apply so based on based on on these universality theorems which they're probably you know networks so that's probably that those are probably some of the first papers sort of presenting the concept work now of neural networks colleges from 1989 this is available yeah that's the guy was that's the yeah I was bored that's that's you once before I was born crazy don't be interesting to read though discussion concluding remarks and this is more okay this is another one from 993 that's probably building under for that anyway well this basically but what is basically saying is that's the car so that's the we're building something that's supposed to approximate to be able to participate any function that's that's this and that's the reason also that this is put this way you're applying its informations and then you apply a non nonlinear activation function or a nonlinear operation so it's that particular combination and there's the theory the theory behind it says that particular construct allows you to explore and to participate any any kind of function it's pretty it's pretty nuts if you think about it it's really crazy and okay now without getting into details really so thanks to thanks to CV encoding we get a non linear functional transformation while still keeping the quantum circuit unit re yeah the question is does this mean that it's thanks to the fact that it's something specific from continuous variable quantum computing that you can apply nonlinear operations because I don't know if you can do something similar in that quite discrete variable quantum computing nevertheless there are some neural network concepts in there as well anyway thanks to the similar to the classical set up we can stack multiple layers of this type and 2n from a deeper network the quantum state output from one layer is used as input for the next different layers can be made to have different widths by adding what's the advantage so by adding or removing key modes between layers what can be accomplished by measuring or tracing in fact and conditioning or on measurements of the removed key modes is another method for for performing non-gaussian transformations yeah interesting this architecture can also accept classical inputs we can use my fix in some of the gate arguments to be set by classical data rather than free parameters for example I applying a displacement DX to the vacuum state to prepare the state DX so our from like zero then applied the X this scheme can be and then this X is basically based on the run on the real on real data that's what it's saying this scheme can be thought of as an embedding of classical data into a corner feature space the output of network can be obtained by performing measurements and computing expect em n or computing expectation values expectation values I'm still I'm gonna do a couple of short videos on this soon because I'm still having I'm sort of in the middle of a bit struggling with the expectation values the choice of measurement operators is flexible different choices Hamelin heterodyne photon counting etcetera may be better suited for different situations this is pretty general and very classical narrow networks but III think I get the gist of it so the power of CV now our networks then there's beyond the fully connected architecture so what are the other things you can do a convolutional recurrent residual credit card data classical layers so those things so they're mapping those things into properties I guess interesting it's cool because they actually some examples but in classical era they both came from it's quite flexible general in fact it includes classical dog is a special case where we don't create in a superposition or entanglement we now present a mathematical recipe for embedding a classical Network into the quantum city formalism single fee for okay so this part will represent n-dimensional real value vectors accessing and mold quantum optical states built from the eigenstates X 1 X sub I yes mapping a classical X 2 1 X to the quantum equivalent so first we create the input X by applying displacement operator to the stade based on that input subsequent layers will use the output of the layer to read out the output from the final layer we can use homodyne detection in the energy mode which projects into the states we would like to enact a fully connected layer completely with the encoding this see everything will happen within the x coordinates so we're not touching the momentum with us want to restrict our quantum network to never mix between x and pieces because this is how you create them the entanglement right that's what the beam splitting is doing is conditioning the position with with the momentum and vice versa and what we're doing with the paper is kind of going through here right now is the embedding of a classical neural network to proceed will break the overall competition to separate pieces specifically we split up the weight matrix using a single value decomposition positive to simplicity we assume that we'll use a full rank what criminal matrix the first step in equation 16 is to apply an interferometer which corresponds to the rightmost of circle matrix K 1 in equation 9 you know not to mix XMP we must restrict the block tag to block there ll k 1 with respect to equations 10 and 12 this means that C is a matrix which contains faceless beamsplitters with this restriction we have so what we are saying is this is just a face okay so it's a beam splitter that doesn't mess up with that stuff so you know just a classical we can't entangle that's what it's that's what this is basically saying I I get a didn't to the flyball what this is so I think I don't need to go deeper into these for the purpose of for the purpose of basically closing up the algebra project but I might go back to this at some point we'll see actually reading this paper is smoother than expected so beyond so sorry the power of CD now and I was not in the positions or entanglement a distinguishing feature of quantum physics is that we can act not only a suffix basis States but also superposition studies linear combinations the general savino now provides greatest freedom in the allow the pressures by leveraging the power of universal gravitation indeed the quantum gates in a single layer from which applies that's all the capabilities of universal quantum computer to see this consider which are chronic reputation is composition a circuit so I bring too fast but basically that's what it's saying that the power is that you can actually go up one since in the corners are capable of universal competition the statement so a capable of Universal silicon competition in general we do not expect that they can be efficiently similar than a classical computer the statement can be put on FEMA ground by considering a simple modification to the classical narrow library building from section 3b specifically we carry out a Fourier transform on all modes at the beginning and end of the network the result is that in the input States X are replaced by momentum eigenstates P and the position homodyne measurements are replaced with measurement a migrant state is an equal superposition overall position eigen States and this the circuit that's a neat way to see this it matches my intuition that when you do this when you do a squeezing gate you're doing a hardwired kind of so you're moving in certain place to another to the mental or vice versa I went to back instead it's equal superposition overall position eigenstates and the circuit can be interpreted as acting on it classically it was interesting I haven't thought about this this way it's just different naming than the x y&z but then I wonder so we within silicon are competing you've got the momentum and the position at the position in this grid corner computing you actually have oh yeah that's the face of course because you have the basically yeah you've got the face of your third dimension the resulting circuit consists of input momentum eigenstates a unitary transformation that is diagonal in the position it was proven okay [Music] be under fully connected architecture where am i steal a bunch of stuff ahead of me because I'm trying to I'm thinking how deep I want to go before I just jump to the Yellow Submarine project first sorry and then I might come back to this actually beyond the flicker so more modern detergent deep learning techniques have expanded beyond the client of the basic fully connected architecture powerful deep learning packages have allowed researchers to explore more specialized networks more complicated architectures so the sea monkeys for example can use the phase space picture for example we can use the phase space picture the wave function picture the Hilbert space picture or some hybrid of these we can also encode information in coherent States squeeze States fog States or super positions of these states furthermore by choosing the gates and parameters to have particular structure we can specialize our network transits to more closely match a particular class of problems this kind of leads to more efficient use of properties and their overall modifications machine learning problems and architectures exported this work cur feeling a is curve fitting of functions chief through multi-layer network with X encoded through a position displacement on the vacuum the credit card fraud detection using a hybrid classical qualifier with a classical network controlling the parameters of an input layer see image and region of the Tetris they said from input displacements to the vacuum with output image encouraging foreign number measurements at the auto mode the hybrid classical or encoder for finding a new phase space encoding for the first three Fock States whatever that means okay numerical experiments showcase a part of the facility versed in versatility of CD quantum neural networks name I'm playing them in a range of tasks okay we studied several tasks about Supervisors right settings writing degrees of hype realization that's a really neat study and honestly training quite a narrow neural networks quantum device imperfections that's really me so I think but I think I got the gist of it for I just wanted to understand where the me.how take the idea from generating images reliable data but it's definitely really interesting so I'll definitely come back to these but I I want to keep I want to stop getting into tangents I really stopped getting into tangents and each paper that I opened up is so interesting that oh my god I would just spend here time I'm just playing with this stuff okay cool but I'll leave it here for them for now so but this is this is basically why why this is how I understand where's this coming from and how is this vs. inspired so to say now I understand why the squeezing it sorry okay so I probably need to recap the encoding part but maybe it's enough if I quickly read that in the next video but it's squeezing so what I and this you Krita distance matrix a risk l dimetric said all eigenvalues so all the eigen values are between minus 1 1 excluding these values after this procedure we'll get a matrix a put the guy composition take the elements of each much exact response the matrix is coming in the formula applied to this quiz emotes probably solution and mistake response matrix P so that's how I'll double check that but basically that's the basically that's the idea and so what I wanted to what I wanted to do and next two is I wanted to go through I wanted to go through the experience with a different the different you know experiments that me how has been going through now that I kind of understand where this is coming from and why this is layer the way this is layer but I have to stop getting into tangents really finish this and we're gonna keep going to I can go I have to keep you training of these but um I mean so far so good it just really seems to me that the CBE model is really well suited for machine learning although you can definitely do all the other stuff right I mean I saw the slides there has to be growers Grover's algorithm cv g'v QC unconventional competition okay continuous variable and Grover's algorithm is there something like that supremacy yeah that's not like relevant there are I saw this in so there has to be a way to do that definitely that is that paradigm but I mean interesting okay so no no I mean it was a good read a good really Roth high level rates I definitely didn't didn't go deep enough but enough to be able to then go back to to me house project actually miss babe good perfect
You are awesome dude. Respect. <br>Keep up the good work, Thanks for kind words!
Really helpful kindly make a video on how to run the code of this project
so it seems like we're life I'm getting all set up because I'm not in my usual place right now this is gonna just give me give me a couple minutes and I think I think the connection should be a little bit worse but I I hope it's gonna be all good so let me go to stream health let's go to Twitter and say I'm life this year and yeah also if it's like would open so it seems since it's a big slow and we'll open basically the textbook as well so-called life I'm life in a good life I know I got a life I'm life already so yep we'll also actually go to Facebook and probably an end to that as well so quantum intuition good what are we doing today kft QFT I hope whoever's watching that I'm there's no quality issues the voice might break but I think the the final recording should be fine so I'm life it's good it's the gift that's the key ft today okay so I think we got everything here and just let me close this stuff I got one screen holy that's why I'm just you know trying to set this whole thing up here and we are gonna go to the QFT now I don't know if we're gonna have time to the key ft and qpe I thought EFT is a worth diving in because it's got quite some nuances I spent in the past some time some considerable enough time to eat into these some curious how the textbook deals with it and it's highly related to quantum phase estimation but I think quantum phase estimation it's peaking out as well that it deserves another video so but I'll be checking back and forth I'm sorry the basically the YouTube livestream page because it helps me see if this any and I don't have a secondary screen okay but let's get started I mean that's really it's really good get on with this first I'll open actually okay let's let's let's go directly to the key ft let's not let's not lose time so in this tutorial we are going to introduce the quantum Fourier transform derive this circuit and implement it using kiske I'm curious about the deriving the circuit we show how to run kft on a simulator in a 5k device now a word of advice here so i qft is i think this is a an algorithm that basically can be explained in a really confusing with a lot of mathematics involved that is just fancy with fancy notation for rotations so let's see oh yeah let's give it a quick so we've got quite some quite some condom in here introduction example one one qubit example to three cubits but I like it that at least I like that at least seems to it seems to go from small scale to you know bigger scale and then hopefully some sort of general concept introduction one key be the Quan free transform the circuit that implements the QFT okay so as you can see it's pretty heavy pretty heavy in the math here but all those although just you should not be if all the stuff that you see it like X this is e ^ all that stuff this is just notation for rotations so this is just a and all this is saying is a face rotation on the one component so it seems heavy but it's not that heavy the three cubed example okay the gisquette implementation um okay let's see and there's some problems in here okay to do references as usual I think that's that's feedback every time that we go through these yeah so let's start from the from the top introduction the Fourier transform occurs in many different versions throughout classical computing in areas ranging from signal processing to data compression to complexity theory the quantum Fourier transform is the quantum implementation of discrete Fourier transform as a conical additional discrete discrete Fourier transform so this is worth this is worth googling ok so the discrete Fourier transform so this is basically a as far as I know a way to turn a wave a transform Oh a signal the signal of a way for sort of a wave into its frequencies or there's the set of frequencies that it's made of and vice versa so from the set of frequencies you can then construct the wave I think that's the whole point the over the amplitudes of voice function it is part of many amplitudes it is part of many quantum algorithms most notably Shor's factoring algorithm and quantum phase estimation well yeah I mean quantum phase estimation is faster saturating algorithm I think that's the that's kind of the only quantum part I think in I think that's the only quantum part in the algorithm the discrete Fourier transform acts on a vector and mapped it to the vector mm-hmm according to the formula it's okay so we're W so again those are it's just a way to express a rotation again similarly the quantum Fourier transform acts in a quantum state of this shape and maps it to the quantum state of these shape according to this or the formula it's like that doesn't it doesn't encourage me much to go for have fun no the only amplitudes of the state were affected by note that only the amplitudes of the state are affected by this transformation this can also be expressed as the map why the amplicon of the amplitudes of the state what do you mean right this is it just the amplitudes okay um a bit confused right now but let's move on so I know that the 1qv i've read that somewhere that the one cubic ft is the Hana market actually because because the point is work so if you apply a hotter market if let's say 0 is your input and you apply harm arcade then you get that state which you could think of I think I think the way this was the way this goes is your implementing your encoding your wave in the face right so here the two elements have both phase zero now here if I put in 1 then if the face here is like between this state and this state there's a rotation of hundred eighty degrees and so it does have a does kind of have a circle around half a circle around the full face like the full 360 degrees and so within your sample it's done one-one cycle right because the next the next element in that pattern would be again an element with phaser so that would be I think that's that's the way this is that's the way this goes but let's go I'm just confusing probably you more than than anything right now so did it do it says here the quality is good is not excellent but I can't really I can't really do better with the connection that I have here right now consider how to Kiev the operator as defined above act on single qubit state okay so basically I guess what this is gonna go is this is gonna go and use that to prove what I just said that that it's a Haram art okay obtain this state notice that our market perform two discrete for it was phone for N equals two on the amplitudes of the state the QFT so it's my point here is I think that would benefit its it to be if you know coming from the other algorithms that are really practically it's not that they are practical is that they're I mean the the explanation is approach from a practical perspective so you start with an example and there's a bit of math in there but here it's this seems to me like it's pure top down right I see like that's the formula and here's the proof and the kana free transform so what does the conference room look like for a larger n let's derive a circuit for N equals two to the power of n qf TN okay so then it just goes boo boo boo boo boo boo boo having fun and that's it the circuit that implements the key ft so the circuit that implements a giftie makes use of two gates the first one is a single qubit Harburg a that you already know from the discussion and example one above you have already sent seeing that the action of Hana mark the action of karma and the single qubit is the following the second is a two cubed controlled rotation do you given in block diagonal form as the following so basically it's it's a controlled rotation that applies the same rotation that the harem art would on the one component the action of C rot K on the two cubed state and the second is the following yeah given these two gates a circuit can be implemented I guess where they're going is that if this is the final form it's just a matter of of concatenating these these control rotations right now this is to to this circuit operates as follows we start with an N cubed input state after the first Hana market the state is too far from the input state so we apply Hana mark and then this is the state that we have then we applied 0 2 and this is the state that we have and so on right so after the tradition of the last C rot okay on one cube controlled by cubed and the state becomes like these and then it's like note that this whole thing here can be written like that yeah it's okay which is exactly the key ft of the input state as their eye off the ball through the caveat but the order of the qubit is reversed in the output state that's complicated to follow that's great suggestion warning all good in example 2 3 cubed EFT but why why should I even do that if it's ok so now now there's the actual play harm our gates you keep in mind the reverse order of the output state relative to the desired gift either for measure the beats in reverse order ok I'm already in point 6 and I know about the form of the key ft what I'm lacking here is I'm lacking a bit of context right I'm lacking a bit of I don't know a bit of context of maybe that maybe the discrete Fourier transform and and sort of how is this applied I don't know and it feels like it's a really steep learning curve it's not a learning curve it's like if it was the first time I would read that and I'm like what the hell is this 3 cubic ft keys get a permutation let's get that let's get let's get going then it gets get the position of the sea rocky used in the discussion of always is a controlled phase rotation gate in this gate is defined in open chasm as as this is a Cu Cu 1 okay um hence I'm upping from 0 cabe's specialist c1 gate is found from the equation it is instructed it is instructive to write out the relevant code for this weekend's before generalize into the N cubed case okay so we've got these in here so let's just copy I don't know why this is not I said that's a generic case let me let me see if I can so I've got the prompt I just forgot to open notebook so so just go and basically go to the keys get reading group and I think this I should basically make a session five and then go to session five and say you put a notebook and just okay cool and just get that get started with this I'll import all the stuff anyway so let's create a new let's create a new notebook buh-buh-buh-buh-buh and that's that's not here where I want to go wanted to copy these I wanted to couple these what's wrong now math okay it's probably not math but NP or I can just use pi I see reports spine so I'm just by Q or s QQ is not defined hah tomorrow yeah that's uh I think there's some typos in here so there should be there should be just one if we're using the notation without registers so there should be one and if I do 53 draw output equals MPL okay that's what we have so let's take a look and build a link weird I've got a harem art in here then we've got so those are just phase rotations right that's what the that's what they sent here those are just controlled phase rotations so those are just control pi divided by 2 PI over 4 but these I can implement by 2 saying 1/2 and 1/4 and then control them on these two qubits where am i where am I then how important Oh another another control faced with PI over 2 and then another Halliwell no more and then another one and then another Hatem art okay so yeah so there's what we got zeros and then it's just this preposition in here right because if we if those are zeros then none of these none of these control rotations is activated and then this is the equivalent of just having the harm arts in there that kind of makes sense but right here okay um someone here yeah I just I worry that that the stream quality is not equipment that it breaks from time to time whoa so but should be find I hope it is fine if not our promising to record a backup session on these and where was I here here here here here okay so following the example of both aha so we're just now generalizing already so this is already the the generalization on how to build that but let us take a look at these first second so my point here is I'm missing a bit of the context on the inputs and the outputs of the algorithm if I if I for me it's clear that zero zero zero it gives you this kind of superposition in here if I turn that into a 1 what does this even mean right like it's mr. this bit messed up no because because that's that's the because that's the circuit of what I call the are the universe of the Keerthi that's another interesting discussion what I wanted to do is I wanted to I'm playing with these QFT because they we've got a key st box in here and if I apply a gift the interface of the key ft which is not what I know so what's the amplitude displayed here so I get a bit confused right now anyway I'll just let's just go ahead I I'm confused because I've nicked into this before and I but I just don't want to go straight with my intuition and I wanted to really I wanted to stick to the explanation in here just not to cuz I I might be a bit biased here so following the puffs example the case where n qubits can be generalized as the following so this basically be the set of code in here it just iterates over the cube it supplies Hannam arts and then after eternam art it does another iteration and and it increments the angle in which we rotate increments or decrements I don't know so this is basically what it does this is basically what these functions here do or they seem to do input state so this is gonna prepare a special and cubed input state for giftie that produces an output of 1 then it goes through the key ft and then I pass the swamp other registers because it gives the the output the output has has the registers in the in the wrong order I think that's and I think that's what they were saying here up in the beginning of the and if you know the chapter so so gonna define this down these functions in here and now let's now implement a giftie on a prepared three qubit state input that should returns your 0 1 input state EFT sir UFT circuit number one okay so so this is the circuit that prepares this is the circuit I think we can ignore this is supposed to give you an input state that that we know will give you one but this is this is all a bit awkward and now okay now it generates the circuit and it hats the swap at the end what I want to show these it so here's a bit inconsistent because here we're doing these but then they we're not having the swap at the end whereas here they we're adding this website also think that also imagine we would need to add a swap in here to be honest between zero and true yeah because if I do these years well how can I saw how can I swap where are you swap here that's the point ah no that's that's awkward 51 I don't know I don't know what I'm doing that's all a bit confusing so then running it in a simulator what does this give us so if we if we run it on a simulator let's just do this one zero zero but I thought I thought it was supposed to be zero zero what and it's one zero zero so I I think we need we indeed see that the outcome is always usually one works acute Accord no not the reverse order of the output is ones use a compared to expected series you want expect this as well since that police contains a reverse key yes but I mean you're adding is swap your added two swapped and why your oh I mean that's so confusing how's it going here the connection it's going all good that's really confusing that is really confusing okay and we're done I guess I'm not gonna I'm gonna go through the real device although it's interesting to see the results but and what are the problems the apothem condition of fifty no is tested by using a special input state which should give you back zero one implement an input state which should give your 1 0 0 and then 1 0 1 let me let me back up a little bit so there's a lot of there's a lot of stuff that I could be trying to explain from what I know right but that's the the the whole chapter is really confusing the whole thing because you start with the mathematics it's really abstract it feels really abstract I'm not saying that it's you know it's it's correct and it's probably correct the way this is expressed in here and and whatnot but it's not really it's not really friendly for someone who's trying to learn that from a computer science perspective and I'm talking about that type of audience that that's kind of that's kind of me really and so I I think whoever is writing this I think if really I mean you should really find the audience right this a in in the old Riley book they do an excellent job explaining these so they basically they they basically go they go in and they explain that the the idea of the QFT and I'll explain later this way let's try to explain that with queries implementation okay so quark has quark has two built-in gates EFT and the inverse key of D here and and basically they are just you know it's the whole thing packed in one gates is gonna help me explain people a bit of the context that I'm missing in here that I'm missing in here and and we have to remember this is a sort of I mean at discrete Fourier transform inspire it inspired these outwards and was based on this is based on like the DFT so to say which is basically saying that let me see if there's some of these pitches in here or something frequency what I want it to say you've got the mass as well you see also the rotations and stuff like that that doesn't help me there doesn't help me there so the put the whole point is you let's take a look at the gifty first of all let's see if this is the one that i that i wanna yes this should be the one that I want to talk about QFT so pay attention what I want what this box is doing right so this ooh so you've got the key in here I'll try to zoom so you so you can see this better so you've got this one in here the if the input is 1 let's assume the we're just talking here about inputs that are not not superpositions they're just like binary numbers right 0 0 1 is the number 1 and the output that we get is a it's a wave that's encoded in the face of your superposition that gives one full cycle that's your input is the one in here right so if we start we start with with the face of 0 then it rotates 45 degrees for the next element in the anklet in superposition for the next element it rotates another 45 degrees so it has 90 degrees and it's 35 and now now we sort of at that point we we've done half the circle right so now we are at a hundred eighty degrees and we go forward - hundred thirty-five - Danny you know or 270 in this case and and so we are at this point here where we've circled like if there will be another box in the superposition this would already be 45 degrees extra on top of that which would be again this one right so we've done one full cycle so this is what the QFT is doing it's basically mapping if you give it if you give it a frequency and I might be using the wrong word but if you give it that not that one number it builds you a way if that and encodes it and it encodes it in the in the face in the in the faces of your superposition so just to show you they show you what happens with another input right so if you put for example 0 1 1 we are this is this should give three times this to within you know within the the amplitude sorry we think the superposition that we have we should give three rounds three full cycles so we start here and and then we rotate one half inch in that this is already three times forty five degrees right it's like before when we have just the one here we're doing step by step 45 degrees um so when we do that we're kind of because we have to go three times faster right like we're rotating three times faster so we're doing 135 degrees then we're back here and then we have already in between the decimal 20 decimal three we've already gone through with the first cycle because we are now back at 45 degrees and so the same here in the same here and so at this point you know we've we've exactly also crossing the second circle the second kind of you know turn around the full 360 degrees and then we're here we realize that the next step the next box would would exactly be this one right so we've done three three three rounds through the circle I hope that explained myself well and I hope that the the thing they didn't break here with from a quality perspective how much time so we're like okay just 30 minutes in that's good so this is this is the way that I understand the QFT and this makes it this makes it a bit closer to how could I say that it makes it bigger more closer to real-world applications because that that's what the the discrete Fourier transform is doing it's it's peaking so I'm not really you know I'm not really a you usually mix up concept frequencies and and periods and whatnot but this is what this is what the DFT is actually supposed to do there's a really good there's a really good video on YouTube from also three three three blue one brown I think three blue one brown on the Fourier transform and that's a yeah and so that's a really good that's the thing a really good primer for for the whole thing in here and I'm not gonna probably shouldn't load this because I'm gonna be and what I'm gonna I'm gonna break the whole Ben Ben within here that's a commercial so I probably probably consider the the the this anyway but basically and what's nice about this video is that it explains and it Maps the whole concept of what the do the Fourier transform is doing with actual rotations it's a really nice video I recommend you to watch this video it's just you know just pointing just giving that reference in there would make a in here would make a huge difference doesn't have to be this video but the point here is to put it so it explains the concept right like of you've seen they're all like different frequencies and they're all mix up into one way if Ansel you what you want to do is you want to know which component so if you have a final wave like this one here you want to know which are the waves that are that this is composed off right that's the that's the utility of this of this whole thing and the this is you know use for some processing and a bunch of stuff but that's the idea of the QFT so you you give it that as an input and then you get the face encoded wave right and the inverse of the QFT is gonna do the opposite rights is gonna if you give it that thing as an input is gonna wrap it up to the frequency that is made of and what's cool about the universe of the Kft is that if you give it a a real like real data from a wave from a signal that you're you're processing is actually going to give you a superposition of the different frequencies that it's made of right so let's try to and I think that's the this is something that it's this is missing the whole point and I don't want to be too harsh on this but it's like it's the the beauty of this is that this here we're not even diving into into that kind of outcomes right like so we're not even diving into the let me show you so if I let's say we let's say we use that as a input right so we've got done here so if I now apply the inverse of the key F key here so you know we've prepared that out that input on purpose because we know these we know that this wave is gonna it's gonna you know should go back to 3 2 2 0 1 1 right and it goes back to 0 1 1 that's what the inverse is doing which is I know it's kind of obvious um how could I get how could I I'm trying to think about a if that would be cool to actually do an example in Kiske with real with real wave data where you would encode each of these things into yeah don't be quite cool actually but it's probably too complicated to pull off and in an hour and a half but you know it's that's that's the whole that's the whole point I mean I I you know what I could do here is I could do I don't know if I could mess up with this even more and and do some I'm just just playing with you know doing some some extra rotations here and there for example just just I'm just riding over some more random rotations and yes it's not a clean it's not a cleaner way if it's not it's a wave that's composed of multiple multiple things right did it do it to do I don't know these maybe you know whatever so you imagine if imagine forget about this first part here just imagine this is your input right then you want to know what frequencies this is made of then you apply the interest of the key of T and you get that which basically means that each of these so what this is telling you is that in order to get such a wave or that this wave is composed of you know a frequency of three with forty forty eight percent so this means that that's the highest contribution but then you've got all the other different frequencies with of course that that contribute to the actually decided no decided noisy if the the magnitude in here the amplitudes or the square amplitudes or the square you know whatever the magnitude I don't know if these really mean contributions as in like you know that could reach way more to the whole shape of the wave but it probably is because we've kind of started off with a frequency of three and then we've done a couple of minor tweaks so it intuitively it intuitively could make sense that this is sort of the the biggest influencer in terms of how the wave is shaped at the end and you are the frequencies are just adding you know it's a bit of extra noise if you avianna you could see this way as well and and so that makes the whole thing I think way more interesting than just that but maybe let's try to let's try to mmm let's try to understand I start understanding circuit that's presented in here for for the three cubic three cubits example okay how's it going on the streamside seems like we got your some warnings but it everything seems kind of fine yeah okay cool so let's let's start unpack how this is how this is how this is built really and and they are I think let's take that as an example because I also know that some people call the QFT inverse gifty some people use the names in in sort of an exchangeable way some coffee mmm what I mean is some people call the inverse DFT or what other people call the QFT so and confuse myself the the I'm actually interesting fact here is that that's pretty cool if you let's clear that all if you apply a QFT let's say we've got a three here if you apply sorry the inverse DFT no the QFT if you apply the key ft like i think it was three times it's the same as applying the inverse Q of T so this is G of T right if I now apply the inverse K F T down here I'll just use two different amplitude displays so we can see so we can compare them so ignore this ignore this big one because this for the whole system yeah so you can see that's it that's an interesting thing as well and this is because of the cyclic nature of the key FG and really the only difference between the key ft and the universe 50 is that the rotations are done clockwise or counterclockwise so and but let's get into this first ok let's say it's kiss I really like this algorithm and I think that they do they this this doesn't do a good service for explaining the algorithm it just adjust to the point and it's probably miss much it's mathematically correct it but it just lacks a lot of things that make might make someone reading these for the first time I'm actually really interested in in this stuff so good let's clear that all let's see let's see what's up here so let's take a look at that circuit and and and yeah and let's think I might even quick I had it but I lost it so so we've got how to market in here we've got a controlled control phase gate off 1/2 I'm not using PI over 2 because this is a control set if I I kind of realized that if if I use these the RZ I should then use an angle to express a rotation but with the zip code you can you get the same result you just define permit Rises at gate as in like in a mound determined by the formula of like how many portions of a half cycle you want to do but maybe okay maybe let's stick to the RZ just to be fair with the with these PI over tool but actually I don't know if I'm still I'm still not fully convinced myself this is really what it should do so what if you if I do know you see it rotates this is your component as well and that's not that's not what I want I just I should talk to yeah I should get I I should get my hands on this difference between there are that and the this is just piece is it's just bothering me so much the are that gate also rotates this your component and we don't want this okay so anyway whatever let's move on so one half which I know it's basically an escape but let's let's stick to these so it's more visible what kind of rotations we're doing okay then 1/4 and and down here and then we have another hardware gate and we actually have the same thing the same rotation like this one mm-hmm another okay so let's try to break down what the algorithm is doing here first time you try to figure out if this is the so is this the one so what is this implementation doing is it taking us from a frequency into an actual building building the actual wave in this in facing coded wave or is it doing the other way around so I think I think this is actually based on the fact that the horror modes are first I think we're building the wave in here right think we're definitely building the fame they're waving here but the trick here else is gonna be what's going on with us what's gonna happen with the swaps because let's see let's he'll happen so basically so the way that I would reason about this is we let's let's put this plane here and let's see how this whole thing evolves right so we start with zero zero zero and what we want to do all right and let's let's try to play with let's try to play with the example of for example that we won I don't know a one full cycle right one full cycle in here so this is our input state we won we want this final result to give us one full cycle and it's obviously not so I think I miss somewhere here I think I'm missing something in here that's definitely not doing that that is the that's not doing that that's actually the other ones that's what I'm that that's that's the inverse DFT that's it inverse gifting I'm getting confused right now if I from face space if I give it a QFT of one that's also not that's also not working quite well I mean even if I had to swap at the end that's still not working quite well is it oh why is that so there hmm I'm trying to there's something wrong with the circuit just definite something awkward with circuit Pied about a bit to kind of add about four I think it's not pi divided by two now I have it so that's 90 degrees there's something off for this circuit that I'm not that I'm a bit confused confused with right now so it starts off with a hot amarte oh I think I see that's not okay I think I see that's that's the that's what I'm missing here is that that's that I was right before this seems to be consistence tracting the wave it's just that we have to add the swap it beginning yeah we got it you see yeah that's it of course so let me let me walk this is my hip hop process the thing is the following so that the and you can construct that circuit differently right so you don't need to swap in here the point is we wanna we want to go from that input to that output right and so see is the way I'm trying to the things I'm trying to do this based on the circuit and that's why I have to do a bit of an extra stretch because this one in here right this one in here basically is if if if we so this one in here has the the reason that I'm doing the swap in here is because if we've got a 1 in here it means right that we we need to basically do a full cycle so my assumption in here is that the to house sorry I mean the two halves of the superposition should be kind of mirrored right because if we want to do one full cycle it means that with our first half of this preposition we have to have done already half this how this or the cycle and and then the rest is just a mirrored version of that right so we start here with a phase of zero and pay attention that the first element of the second half it's already a face hundred eighty so it's kind of already the mirror the mirrored version of that and then each of these components are like a mirrored version of their counterpart on the other half of the superposition so what you want to what you want to do is you want this number one in here you you want you want this number on here to actually create that mirror by applying a hard-working year so this phantom art is not going to be but how are those this rotations happen really do they happen so if I do this here yeah well of course the hardware does happen right because this is Dennis zero after the swap so here if we take a look at the Bloch sphere it's a zero yeah so that Hana Mart is going to basically double the TT state like that right so the rotations won't do it this first rotation won't do anything the second rotation will rotate that component by a fourth Ryan because those rotations are then a function of the weight this number has in the binary representation and that's the point right so if we then the second harm our is going to double as this date and then when we and then when you apply the second rotation here it's gonna rotate it's gonna add 90 degrees to those two states because they have a 1 in the middle cubed but because this one because this one already was rotated right it was rotated here because when we when we apply the harem art that pattern got duplicated so this already had a rotation so when when we when you're adding 90 degrees to this one it it just accumulates it right so you've got at the end you've got that pattern of a half of a half cycle right and so the last harm art what it does is it mirrors this app to the rest of the super position so it's like the V you can see the key of T as a mechanism to what it does is it takes that number one and it unfolds it somehow right I mean somehow by doing those rotations and applying hardware gates it's it unfolds that into the particular particular wave facing coded wave that we have in here step-by-step so but you need that swapping here because you won you won this number one - I mean this number one basically it that's what it means you want a full cycle so the half of this superposition has to be half a cycle and so you do this how cycle by like triggering these two control phase gates in here and then the last Harmar kind of doubles that up for you if we would have or we want to have for example for four cycles right this is really sort of the yeah that's basically these right because you're you're going from zero to hundred eighty then back to zero hundred eighty practice your honor daily so you've seen these four times right so in this case in this case this one goes this one kind of gets swapped with a zero up here and and actually that's that's all you need the rest the rest is going to be basically the harem arts are the old days are gonna have any effect because this one doesn't have anything this one doesn't have anything then the next harm is gonna just copy just gonna just gonna double that yeah and that doubles all things so that's how you get it if you want to have a seven so that's like the the number of qubits of course determines how like how much granular you can go right so if you've got three cubits it means that well if if you would want to do eight iterations that would almost be like it's the same like doing zero with with your precision because you can't really go more go farther or past that right so seven it's already the extreme where we've gone from here to here so we've it's like that the next one would be already so we've done already one circle one one iteration here have we yeah six seven each each it's like each element is giving a full rotation so you get the seven yeah so that's but that's really what it's doing but it's missing so it's missing this swap for this to make sense at all I mean how's it going here health-wise all good my point here is that because of this stay in here let's prepare that state so what's that state let me prepare that state let me open another query and I'll prepare that state and by the way that's actually be confusing because I thought that circuit so that here they use the circuit to go back to so this should give you 0 0 1 at the end right it's all in all confusing so we've got this state in here and now now I'm gonna add minus PI minus PI over 2 or minus PI over 4 so I'm gonna this is basically minus PI oh sorry minus PI would be minus minus 1 in this case and this would be minus 1 divided by 2 and this would be minus 1/4 yeah and that seems suspiciously swapped if I swap these things yeah yeah so this is pay attention if I change the signs to like plus so I I did like the inverse of these right look look at what we have here so we have exactly we've got exactly that one full cycle one full rotation that I talked about this is the and so that is proposal II purposefully or purposely I don't know what's the word that state preparation hides already a swapping that just it just office Kate's obfuscates the whole thing even more right but let's see this is let's assume this is the state that we have and and now let's see what happens if I put in this circuit in here so but you see this something's something's kind of off in here because I would I would do this I would do this totally different like if I add a heart in here because how would I now how would I now turn into a one right so what what you want to do right what you want to do that's the base of the key ft of the inverse gifty so let's try to say so the inverse cavity would be let's take these into into the actual 0 0 1 state because that's frequency 1 right it just gives one full cycle so what you want to do in this case is you're gonna say okay so first let's apply the thought process that we did to do this here but backwards right and remember this here we're saying okay so these numbers have have a certain weight on how this rotations are then applied and we said if we if this is our starting point here so what's the timing by the way okay ten plenty of time if it's a time if it if this is the timing in here if this is the this is the input in here this number one basically means that like healthy so within half hour superposition we have to do already half the half the cycle and then the second half is just a mirrored version of it whereas if we if we would have a tool right in here 0 1 0 pay attention that there's no such me such your effect actually actually it's easier to explain because if you see that if you can see there at the exact copy like of course because you have oh yeah now remember the way that I've reasoned about this later in earlier in some of my videos if you've got like a zero and the lowest weight cubed it means your number is going to be e isn't it's gonna be even right so this means you're gonna have an even number of cycles that you want to represent which kind of essentially means that your second half of your superposition should be an exact copy of after of the other half which you know that that's just what the hardware does applied on a zero it just kind of copies the face right it's if you apply a hardware to if you're playing hardware to 0 it turns into this your plus one state so your they both have the same face but if you're playing to one it it takes it to zero minus one so it's basically mirroring your face so this is your only kind of scaling that effecting here right and so I would go about this in the same way I'd say if I do a horror Mart in my in the last qubit in here that should tell me whether whether my final frequency is even or odd because pay attention that the the cycle here mirrors right so if I apply it if I apply a harm art now if I take a look at the blocks view here it's I see that it's a 1 right and this is exactly that effect this is exactly that effect of we've if those things are mirrored right Eve how could I do how could I do a or let's let's do the following it's just let me do the same that I did here so so we can take a look at the case that's right so ignore these big display here just focus on this one first so if we're gonna apply a two cycles in here so if now I would apply and those imagine those things are equivalent so this this QFT basically it's just taking it just creating that it's just creating that that phase in code equation here if I now apply a hot mark here and I take a look at the amplitudes again of course by position that it has the opposite effect right it takes the whole it leaves the one with this it leaves this half empty it means that if I apply a box here here I'll see that it's a zero and and this is because this Harmar is picking up this pattern of whether this half of my superposition is a copy of this one or it's a mirrored copy of this one so that's the that's the effect in here so that's how I would do this I would basically do this here right but then in turn I know that at the end of my circuit I will want to swap these because I know that these this element of this qubit is gonna then be the lowest so it's gonna be the one that's like the right on the rightmost side of my number because it represents the parity the parity of parity the parity of that of that number right how's it going here it's going good excellent cool and so this the same thought process of kind of applies but now applies to the other qubits right but I I would need so I would still now need to apply some rotations because because basically now I want to know so how it would apply the rotations would I apply them I would probably apply a 1 and a half I think so because that's gonna so let's see what this is doing right what is this doing because that's picking up the pot that's try to think about how to reason about this I mean to deflate so if it's an I know the party of this number right now if this is a 1 so if this number is a 1 now I wanna now I wanna basically I'm missing the intuition here a little bit how would I how would I did it because when we're doing it this way right so if if here we've got a 1 right so what we're doing is this one basically goes all the way here it does it does really like they are two rotations applied the first one is 1/4 then there's a Hana Mart and then there's a health because you want to build that circle in here but the reason you do that is because if this would be a 1 it's got to do with the party of this number as well because if this if this would be a 1 then you would want these things to be mirrored because it means you you're you're you need to rotate even more but essentially I would reverse it like that so I would say I would say here if this is a this is so I would do a what do I say a 1 over 2 rotation for these and I think with quick you can do that like 1 over 4th and so now now we got at the stage where we've got the same like pattern it's either gonna be mirrored or it's gonna be the same if we I like to do this with the two different options in here so we can basically take a look at how this would be different when there's a 1 or 0 here right because remember here's this is 0 0 1 this is 0 0 1 like if I take a look at the no chance I put a chance this plane here oh sorry that's not what I wanted to do and whatever it's this is the facing coded wave with frequency 1 and this is what frequency 2 if I now apply the same same things in here what's gonna happen so is this so what's the panic we get here we get that part right but here we already got okay so here there's no rotation that needs to be applied because we we've already got that mmm that symmetry that we want the only reason being that originally there's a one in here already I'm convinced I was I've explained that better in the past in my other videos but I can't now I can't I can't I can't really I kind of really figure out and more intuitive way to say if the party if the party that we found is one then we still need to apply these rotations in here and then another harm our gate would kind of again pick up the same pattern right like so it would basically tell us whether it's a 0 or a 1 and so we see that it's a 1 that's a 1 and that's a 1 that's queer that's weird that's weird because it should be one really hmm hmm that's not what I was expecting Shh that's not what I was expecting I might I might be doing this in the wrong way I think I want to get it right I just um how's it going here with ok quality goods and stuff like that what I would assume is that I would mail now kind of see were the same in here and then apply another Hatem art that's the way that I would yeah but that's not that's not no no I'm doing something wrong I'm doing something wrong some propping it up like that because that's give me one one one that's not that's not what I want or should those rotations be backwards maybe yeah yeah yeah yeah the rotations are backwards or should be backwards why because now I have these and now obviously once I once I do the swap at the end because as I said like the UM the the parody of this number is then directly mapped to the value of the rightmost qubit so it needs to be swapped in here and then yeah the one in the middle stays in the middle ok so what what's going on here so if I take a look at the amplitudes in here let's try to it that's that's the piece that I'm missing so let's try to let's try understand intuitively that step so why do we need to do because I mean that's the same as doing two separate rotations like that right so this is just notation so and in theory you could even do the hata mart in between that that doesn't really matter because that's that's how it's constructed in here but intuitively it seems for me to be more intuitive like that you do all the rotations you need at once so the harmonic here picks the pattern okay the the last so this big this this picks that you know whether whether that cycle should be mirrored or equal now you need to do over to and over for so let me get rid of this it's gonna oh that's gonna help me maybe see things better with less mess in here so [Music] so how I'm trying to reason about these the way that I the way that we've done it here because these here the rotations are applied in a in a funky way as in like accumulating the so what's the role of what's the role in here right let's say let's say that we have for example a 1 versus like 3 or so so this 3 what is this or or 2 right so what these two is gonna do is this 2 is gonna basically once you're once you're done here so it's gonna activate that it's gonna activate that rotation because we know you we know you wanna do two cycles over here this is not gonna be activated and then and then the harem art just copies that over essentially yeah and essentially basically letting that guy to the rest because it what's the difference between these or these what's the difference so this adds another route no this adds another rotation in here because I think that the intuition here is that the the the has the higher contribution contribution cubits in here basically have the same influences in the SAP systems right in the SAP SAP and like within the half off for rotation so if we you know it's like imagine okay so imagine I think I know intuitive way to see this imagine so we we understand the last key the cubit that's on the rightmost side it's either odd or even and then that party tells you about the nature of the two big house of your superposition now once you've picked on they won't you've decided on these then then you can basically get rid of a get rid of these of this cubed and then just focus on the superposition that you have and then think of the other two numbers as the only inputs that you're gonna I'm so bad at explaining so what I mean is that now if we got a 0 and a 1 in here we have to now imagine that what we want to do is we want to have one full cycle within want to have one full cycle within this half exactly and so what that qubit is gonna do is is gonna if we want one full cycle right to the to the to do to do so it it is going to yeah you have to it triggers rotation in here that basically that's a like a 90 degrees rotation and the hannam are just copies the copies over the pattern button but in a in a mirrored way perfect so this is exactly what this is what this is doing so you knew you know to pick up that so each qubit represents the party of a SAP cycle inside your full I don't know if x5 myself well so once we know the party of this qubit then we basically need to basically need to rotate we need to rotate the other ones as a function of these right because we were saying is if it's one because if it's if it's zero essentially then nothing happens in here because if this is zero how's it going by the way it's going good one hour and a half through so so if the party we've got the party here if this party is one right then we know but why do we need to control on this cannot we build it can I can I not peel the this needs to this needs to happen because this needs to be undone these these two rotations need to be undone if because we're doing basically the reverse right so we're sitting on computation so these two things going to be undone and the reason this is done is because if it's a one in here go down here so if we know the part is one we're gonna have that okay but we still need to have these rotations that basically do the actual it they actually built they actually build the first they build the first rotation so you need to undo that so that's why you're controlling on the parity because if this if this is a zero basically these rotations don't happen it's it's it's tricky to work on an intuitive level right but it's really it's it's I think this is much a much better exercise done than the way this is explained in here without any of these context you know so then you control based on this party this you undo these rotations that's why they are the inverse of the the Zed K so they are like minus 1/4 minus 1/2 and then that these unwinding so these kind of kind of clockwise gives you with the pattern ready to catch of whether the party of this cube should be whether the party here should be you know odd or even so 0 r1 yeah and then you do the same with early with the last cubed so and apologies because this is really messy with all this stuff but basically that's how I would do this so that's how I would build this circuit that gives me one what I don't understand is why it's this circuit that's supposed to give me one why it's not giving me one that's what I don't understand let's let's try to maybe let's try and kiski so this is supposed to give me one right have I tried to think is kid already I forgot oh yeah but it does here give me one oh one zero zero so what am I doing wrong in quark let's clear all out let's try to build it in query so we've got a we've got all hearts then we've got parametrized parameterize rotation so minus pi is minus 1 essentially and this is minus 1/2 and minus 1/4 minus 1/4 I know why didn't work out because I was it didn't work out because I was swapping this stuff could it be because these is God that's why this is done like that it's like I said this is not I don't get it why so this whole life storm is probably me just saying why why why okay let's just go ahead and implement that so there's a hard work aid III now it Peaks the pattern okay say does it like it's so awkward oh my god I mean that's completely counterintuitive to me that's why I ended up building this in the in azekah as you could see the way that I feel that was different right because I I built it I built it under the premise that I had the input in a way that made sense to me this this input is like it's got like the a you have to swap this for this to make sense as in you're rotating around these and giving it like a full circle but this swap is not in here's kind of in a different order and then you do these rotations PI over 2 PI over 4 and it's gonna be over 4 and now yeah and now you see you've got the same thing here right how's it going good ok so poor quality [Music] I can't really do anything about it other than and this is kind of going well the connection is bad I'm really sorry for these so buffering I I hope it will get better maybe if I maybe effective drug crimes detected so let me try to fix that okay hmm so now there should be data coming in now now they should be working yeah back up so there was a bit of a there's a bit of a hiccup I think sorry for that guy's hope this stream he didn't really get interrupted anyhow had some technical problems but I'll put some pointers into these and then maybe write down right now my feedback apologies for these so okay but it seems like now now we're better now we're back into a healthy cool connection was bad so why was I so now this kind of starts to make sense because I I had I had you see the salt and salt gates and so and now this is exactly what I'm saying it's kind of peak it was I was saying speaking of the patterns oh my god this is just so confusing the way this is explained and then finally you've got these and now you've got the one but guess what this is a if you wanna so I know that someone had someone come I mean I complained and some of the people were saying that there's a swap missing in here and the point of the sort missing here is that but if you add that swap in here then you should also swap the input accordingly because now if I add the soap it just doesn't make any sense so if I do this probably it's probably gonna work if I do it this way no either okay no okay III miss I'm sorry that's not that's not how how it should be so this is this in here whatever but you know what I mean if I had a swab in here then that's obviously not gonna work so then you've gotta add a swap here as well or change the way you generate the input now but it's interesting that doesn't doesn't work yeah yeah well it doesn't work because the circuit is it doesn't work because the circuit is tuned to the way these data is structured of course that's why you have these control rotations like that that's yeah so if these needs to be definitely updated that's definitely not not working that's definitely not working so again damnit poor quality it's getting better now III think I'm gonna stop here because I'm having some I'm having some Network ish some big Network it's just because I'm at a place where I don't have so much bandwidth as I really would need to stream properly but I guess that has been enough insightful in terms of the QFT so to be to be honest with you there's not much more I could say I mean I will definitely point you to the playlist where I break down that seriously deep and I go through all the different all this stuff that we've gone through now it's it's just I think because of the lack of context things can easily get lost and I think someone added this swap in here that shouldn't be in here this is really obscure the way this is prepared and the fact that you know you're just told this is supposed to return zero zero one so go ahead and do this but then because of that mistake it returns one zero zero I don't know I think that's but it's basically that's basically what it is right it's nothing else done you take a you take a number of frequency and you try to make or build a wave out of the got it in the face and vice versa so you get a wave that's encoded in your face and you kind of wrap it up in a way that you're in the reverse like sort of in an inverted way and in a way that it gives back the number that it represents the frequency that mates that that makes that that wave the way it is and what we have what I haven't shown in here is that that of course works linearly for a superposition of frequencies so if I have a how is the how is the okay so we were kind of backing good quality but so if just I'll just show you this one last thing so if I make a superposition how can I make a superposition of like for example 1 & 3 or something like that so if I say that it can I just do for example trying to think trying to think so if I do these and I do that what do I get ok so now I have the position of 1 & 2 if I apply the QFT to this or is it the inverse gift 15 it gives me this phase encoded wave if I apply the key ft inverse yeah so what what I'm trying to say is you know you can take that as your input and that builds a wave and it encodes it in your in your face in a way that it has it's sort of a contribution it's it's sort of a mixture of a wave of frequency one and a wave of frequency two and that's how that's how how you get that thing in here it's probably about example but my point is it works with the superposition as well of frequencies and yeah I think that's it I'm gonna leave it here because I see that I'm having some network issues and I don't think it's worth for for everyone else to take a look at this I'll point to the other videos of the key ft in the slack channel and also in Twitter and I hope that helps the reader as well but I think there's there's a bunch of thing that this chapter needs a lot of improvement and for the next session because I'll still be here I'm recording from Spain I'll probably pre or free I will pre record that because I'm gonna be flying back to Germany and so I wouldn't be actually able to do that so life so I'll probably either yeah I'll probably pre record that and upload it and make sure that it gets published in the name or I don't know it doesn't matter I'll publish it earlier or later we'll see but we'll do that via recorded feed another live session and then we'll go back to the regular schedule okay cool thanks for those who managed to follow a little bit I'm apologize for the for the network issues but that's I think the qfg is definitely the chapter in here is definitely can can be improved a lot in my opinion especially the example part in here and the lack of context yeah cool I'm gonna in the stream now and yeah see you see you next week
cool this should work now so um yeah i think i i think thanks to the twitter people uh i've been able to confirm that my intuition was correct in terms of like uh you know the way you map like uh q beats into sort of not qubits but like your your state fun your your uh state vector into a tensor is by like you have one dimension per index or one one index per cubit right so and then you kind of would have these gives you the complex amplitude of that element [Music] and i've seen so so ryan larose basically shared these this is just half an awards it's pretty awesome so it's it's actually a full package i haven't played with these yet but it's a package for using mattress products to simulate quantum compute quantum circuits and it even integrates to to circ so um that looks that looks really awesome and actually he shared a link to the concrete piece that creates um like an mps right and it's basically this part here and so um and what's more it does is with qdids it's not just keywords set the notes on the interior so i think that does it even better because what it does is um it actually creates each of the nodes instead of just having something and then breaking it because i'm following more the concept here of you've got like something big and then you split it up um but here i don't know if i can can you is this readable it's probably not readable i can't assume that so so what is this doing so i have no idea what is this gun tool that is and cuties sentinels on the left and right edges so it actually creates a node really with the they're all initialized it seems like they're all just initialized to the zero state so what this does is it just probably creates that per amount of dimensions i'm not familiar with this notation but i guess that's the point if i go and i just like i'll i'll do it my ways i wanna i'll do it like in a way where i just wanna break this down so first reshape these um if i ignore this for a second and i i get these um what if i do can i what is what is the way how can you with numpy reshape just empty reshape and then the new shape but i don't know what what is it probably go around this again so i would just don't just be like reshape and then i would give it like initial state and then it would just be shape like um so it would just be basically i'm going to hard code it but it's like so the amount the the rank of the tensor would be three and i would all each of them have to have two dimensions um because in this case it's matrix of rays no let's see and if we print that if that makes sort of sense because these would have to be them complex numbers really so what i probably would do is i wanna there's a way you can do that right yeah you give it the type so it's a complex number an array so so you do that so cool and i now uh initial state print okay so i get see if i print initial state for example of the qb like of the element uh zero zero zero it's these yeah and everything else is so everything else basically has a component of like zero so it's reshaped it correctly how does this reshape happen like does it do it in order probably does it in order that's that's the way it does is cool so actually so that's that's it and then if i if i now do like a um if i basically created create a tensor network or a tensor and like note out of these right the end node this is just the end node initial state and it's basically uh the initial node and i do [Music] print these get get tensor i think i can do this right i knowed okay there you go so um if i now what i now want to do is i want to split these so i want to do this uh was it was it like a tent so google tensor network um and i want to do i want to take a look at how the simple the displayed was it the split node exactly and we want a full no we want just this part like split no without the full svd uh i'm not sure if we want these or these but like let's just play with these for a second so so we have these now um this is the note we want to split now the edges that we want to leave in the left and then the right kind of i think it are the first two edges i'm not i'm not so sure but i i would i would guess that that's my guess i don't know why though but i guess i can just choose whatever i want and if i print these two tensors what do i get an error [Music] so what is the problem here and support open types for plus edge and edge so that maybe should be a list of edges or maybe x's don't match array what it's just a double invalid syntax what do i need to give it here or i should just get edges maybe reorder edges i thought i could just refer to the edges documentation notes hot edge get all edges [Music] get etch let me just get edge something like this that gives me the same thing here so i i don't think that's the problem that's not the problem axes don't match what the heck [Music] um um i don't understand that so so what if i just print the edges first node uh get all edges get all edges so three dangling edges yeah kind of makes sense right um and i just wanna now split between the edge zero and one oh ah maybe sorry what i should do is probably inode um so just i node zero and here i node one and i note two i maybe just have to put them all yeah there you go okay cool we don't want to print this anymore okay interesting so now i have this is this tensor so this one tensor that's just alone and it's got like all zeroes this means this cubiet that's fine though i don't know if that's the right way to do that though um okay but now we have these and now if i wanna um i do that again i would just do these with say these node and basically now it just has two edges so uh what if i call these guys for example uh you know q0 this is going to be q1 2 all right and so no sorry this is going to be q12 and this is q0 that seems to be the way that it works and so q12 is the one that's used here let's give it one and two and then this is going to be e1 or q2 i think this is going to be q1 exactly and now i want to do q0 so print the print this the tensor separately just to see how they look like can i just i'm not so sure how this is being printed so so what this is printed like let's just steal that steal this that tensor that looks like pretty like there's a tensor there that is still like kind of not nice or that would be the one in the middle probably right q0 which is just and this would be the one at the edges because those have rank two and this has rank three so i think i just got the numbers wrong but it doesn't matter so that'll be q1 that will be that will be cubits 0 and 2 i think does it matter it does somehow because so um if i print this guy here it's actually the big one if i print this one here so they're both they're both big hmm i'm not super happy with these i'm i'm not sure i'm doing this correctly but i'm basically doing um because it shouldn't have it should have a lower rank so can i get like the rank of the tensor get rank so but that definitely can rank print q0 okay rank two and three um so q0 is rank three why is it rank three though what's the oh what's the rank of i know that doesn't make any sense oh because it's not connected maybe that's the reason sorry so this would be this way ah get a rank oh come on it's three yeah okay but i i should ah okay so i should steal so what i should do is i should connect um yeah yeah i think i think i know what's going on so i create first two parts one is called rank three and another one is god uh can i just get a visualization of this that's the first thing like um graphical something like this common functions maybe copy split node split now it's split node split edge slice edge check connected flat edges cron can i just not like print stuff nicely doesn't matter uh okay so where am i so i'm trying to i'm trying to do split this i'm trying to basically say um i split this into q2 and q1 two q12 has rank three why does this have rank three they should both have rank two no one so it's go one should have the rank three makes sense which is q12 cool deal has rank two so q0 has been separated good um so now i take q12 which is rank 3 and when i want to do what i want to do is i want to separate q12 into q2 and q1 um and if i print those ranks q1 should be the one that has rank three which kind of makes sense yeah no q2 has rank 2 q1 has rank 2. what what am i seeing here no q0 has rank three okay so that's that's then the wrong naming so i thought i had it right so that's like y and two exactly so now q one two sorry so now q12 has the rank but now um so i should keep yeah that's that's that's the the that's what tells me okay so i'm keeping these two dimensions and this is a q 12 has rank three q one two has rank three so if i now take q one two and it has rank three what i want q one two to do is to have exactly they are still these these these yeah yeah no no now that makes sense okay cool so now i have what i want the one in between basically kind of has three three edges q1 so and i think that if i uh what happens if i print a q1 what do i get oh that's just an edge yeah get tensor see that's basically get tensor if i can i just do that zero zero zero zero so that's what we want so these two are probably the ones that we should just i don't know why i'm feeling that these two should be the ones that were connecting the first two dimensions um just because this is where i have no but that doesn't make sense either right tensor and q2 tensor it's all like that yeah i kind of feel like what we should do is how do i connect the net the how do i connect the edges connect connect angling edges uh okay just with this sign connect just with this sign right or is there like a connect so what i'm okay just use these i just what's the how do you do the keyword oh man that's bad um so what we want to do is we want to do uh is it just declarative like that okay i actually have to get these edges i just i mean this edge one would be basically q1 zero is connected with q two one or zero and h2 as q1 1 is connected with q0 0. hmm can it just like print i want to print this nicely in a sort of a graph way but i guess we just know there's no pretty print or something google tensor network print graph or print network whatever so good edges so i want to get the edges off q1 it's not a dangling edge okay so what's a dangling edge which is not a dangling edge oh because they are ready so that's probably this is probably the way this works no so this is not a dangling edge this is not a dangling edge so the tangling edge oh so things are already connected that's that's that's what this is telling me so get all edges okay so we've got two yeah that's the point that's just the damn point q0 has got one dangling edge and one connected q2 is god that's something's wrong so i'm splitting okay so i'm splitting this is i'm splitting it's got two dangling edges and one connected to q0 and after i split these into q2 and q1 what i have is that q2 okay i get it so this is the one we're living in the middle so this should go this way oh man that's tricky exactly so you get you have two dangling edges for q2 q1 has but i want q1 to have one dangling edge why is this happening this way so q12 has three q12 has two dangling edges ah that can be that complicated come on q12 has two dangling edges i feel like i feel like it's not my day today um and i want to split q12 into two parts uh i want to split q12 into two parts q1 q2 in a way that uh maybe maybe i'm just having the wrong dimensions in here so q112 it's called like a dangling edge maybe what i want to do is i want to just do it like these can i do this but then i get the access that don't match uh where does okay so the the one that is the one that is already connected stays here that's what i'm doing that's what i need to do yeah i think so so what i'm what i'm saying now is q1 has got one dangling edge awesome in two connected edges yeah now we're talking and q2 has got like yeah yeah okay perfect cool okay i like it so now we have the three the three notes so q0 q1 q2 those are the notes um okay what i wanted to check now is how can i do a matrix product operator or first we should really check pn contraction i think there's a way to just con contract everything like a contracting auto it's very easy uh so there are all the notes okay so if i just do the result so if i just do these contract q 0 q 1 and q 2 and i print the result what do i get how about each order has to be provided what is this mhm okay i'm gonna try a network with more than one dangling like you might specify the output order of the dangling legs for instance if you're only doing a partial network contraction then you can ah okay cool so i can just set this to true get tensor so i should get back my original tensor yeah okay cool now what i want to do is i wanna i wanna so this is basically mps for these but i you know it kind of it's diff it's this is what's defeating the whole thing is that you kind of have to do this like that right i believe what i should do is i should take a look at these and i think yeah i mean there were just so this is initializing a matrix product a matrix product state for an all ground state which is then probably easy because you can have all the qubits set to zero so i think that's what this is doing here basically screening those nodes and then just connecting so it's just creating dummy dummy dimensions or dummy ranks that mean this is sort of safe to connect the things now what will be uh the mp the mpo4 for like for like these right so this is the this is the tricky part so like the harder mark so the edge gate is basically an empty array of like 1 1 1 -1 divided by one over the square root of two is it is it like is it is this the edge gate um not divided by like multiplying what security oh np so that's actually at least of floats all right do this oh it's an actual so i actually oh yeah but that's correct let me just do this np array that's what that's what i was missing okay cool so that's the harm art gate now um good i guess the idea here is like if you think about if you think about like uh let's see if i can open paint here right if you think about the the paint opening or one if you want a tensor product what you're doing right when you're doing uh when you're doing like the composition of like say the hallmark gate and then the tensor product of another harmonic gate that would be the harmona gate applied to qubit zero and the hardware gate applied to kb1 all what you're doing is you're taking the haramar gate uh thing in here and then basically putting this whole thing into like a bigger version of these right so you have like and and then you have the actual like auto market in here the home market in here and the hard market in here and the hormone gate in here right so this nesting right is what you're basically representing by the contraction of like the two nodes that they have like dimension one and they kind of basically contract them and they become like a no with it with the two uh it's not dimension is the right is the wrong word is this is the rank right so intuitively i don't know why i kind of feel like each of those should be just a hana mark like i have the i have the feeling that each of those should be just a haunted mart and then it just has like another index just like to connect stuff it's an index that will just contract um so we could con we could build it this way uh i mean actually the operators is doing the wrong way the operator should have in this form so it has these two indices which belong to the actual metrics and then these other things are just like but it's hard to grasp intuitively why this works at all you know what i mean so if if i if i just go and say like well you know so i need like three notes so h1 is basically a no with like an h gate right um now that's also the wrong way to do it because you want to have you want to create this extra that dimensions that's what's tricky where's that mps where is the mps mps ah from wave function here actually you have a from wave function method nice okay there's a reshape uh i perform svd across each cat exactly get all dangling blah blah blah it does the whole thing nice this is really neat actually this is the initialization exactly so it does basically like that the cutie dimension how would i how would i oh yeah and by the way i forgot these so i would actually say that you know this is this of time complex um but now so this has got to have the note the the notes at the edges which is going to have three dimensions right so this means that it's just a an array of a matrix i think now what am i doing so that's basically if i print h1 care rank what do i get type error um class least oh sorry np array that's the way to do it it's rank three yeah okay cool and actually h2 okay but this should have two dimensions so actually i should do like these just with this dummy zero and so h2 will be the same okay rank oh now it's rank one why why does this make it rank one i should probably that keeps it yeah so that should just probably be um just the identity you're right so one one one zero zero one complex there you go and so that should just be like the identity gate should it yeah kind of um [Music] so that's the harmonic zero and then the harmon one would be harmonic one would be like uh here i need yet not i mentioned so i just can can i just do it like these i don't know rank four but i don't know if that's let's try without these things i don't know if this is gonna work sorry this is h0 so 343 exactly and what we want to do is we want to connect uh so now we want to connect basically so what if i do get edges get all edges can all edges candle edges they're all dangling so it doesn't really matter which ones we connect i'll just say let's connect let's connect like the zero with the zero and then the one with the 0 something like this so so h1 would be h0 0 uh contractors not contractors connect i forgot how to do this with the keyboard so with h1 0 and then and then h h2 would be basically h1 h 1 1 with h2 0 and if i now um this works cool if i now print all the edges again they should all be well let's go ahead and say like if i if i now connect the qubits with the like if i now basically um say connect let's paint if i now kind of connect these edges with the edges that are coming from the actual state and i just do like a contraction then i should just basically get the uh like a full superposition right like an equal superposition i hope so um so if i now go and say uh so we're gonna connect so we're gonna connect so h is zero with you know cubit zero can i do that it's not a dangling edge sorry h1 with okay that worked i'm gonna connect basically hormar one the second edge with the qb1 that kind of worked i really don't know if this can't work out to be honest and uh and and h2 with uh qv2 okay interesting and if i now let's do this and i print the result i contract everything h0 h1 and that's probably inefficient but like doesn't matter right i just contract all the nodes and print the result like what do i get result i want to have result get tensor obviously so i get all these basically 0.3 like how could i reshape like can i just reshape these np reshape right these two have like the shape of like just 1 8 or something like that i'm going to reshape you know i can reshape array of size 128 into shape why 128 though hmm it's not exactly what i expected what's the rank of tensor let's start from here so print can rank seven that's wrong the rank should still the the rank should be so that's not contracting what i want why seven so now for example if i print um say q0 get all edges shouldn't see any dangling but i see some dangling that's not good because i thought we're connecting them ah maybe i'm maybe i'm hmm maybe i'm just using the wrong so let me just remove all the prints dangling dangling shouldn't have any dangling edges why does it have dangling edges in this out of range dangling it shouldn't have any dangling edges but like even before these right why gives your ass to any dangling edges what is it it's got no dangling edges so what the heck is going on here it's got just one dangling edge or maybe because of these here yeah i get it so the contracting actually so let's just comment this out it seems if i contract it actually really does the full contraction uh so it destroys the thing so first of all let's print these and now what is it complaining about an h4 so that should be then too it's just trial and error it's not a dangling edge there should be zero it's not a dangling edge why two two what is not a dangling edge i hate that i don't know which one it's complaining about if i print the dangling edges of q1 it's one if i print it oh yeah now it works okay in in here it says of q2 [Music] it's one okay so now and now this works awesome anyway now uh again i'm just really playing at the lowest level possible no like you know um not much automation here just really want to try to understand if this works as expected at all if i contract the whole thing and resolve okay get rank 3 yes that's good and if i just do np reshape result get tensor and the shape that i want is like a 1a that's sort of like going back to the to the state vector oh yes that's beautiful that's beautiful that's beautiful yeah because if i do zero point 35 squared and i do eight times this yeah should get close to one yes okay cool now i don't like what i'm uncomfortable with is the fact that you can just like dummy out these dimensions here but it's really worked for the mpo and for the mps okay cool for three hour marks like so my intuition here was right like you you actually um so really each node corresponds to the operation that's going to apply to that particular qubit and i find this really cool i thought it's really cool yeah yeah so now i think i'm kind of ready for the dmrg algorithm i just need to understand how to approach the expectation value calculation which i think it's this thing here basically you're kind of multiplying because at the end of the day the expectation value right it's it's the uh it's this like thing where you have like you know your psy here and then you have your hamiltonian and then so this portion it's basically what we just did now in this video and then this part is uh i think a response to to these upper multiplication in here and then it's just a matter of doing uh doing this this sort of step-by-step approach where you're kind of we're gonna take our hamiltonian build an mpo out of it um and uh and we'll just be what we'll just be doing is i think it's even easier this way uh we'll just be kind of contracting i think that that's that's the whole point here is that you're just contracting like a like sort of a subset of these mpos so you're multiplying all these and then you're getting these two uh and then you're doing this this operation here yeah i think i think i think i finally get it but i think i need probably still a couple hours to get the full algorithm up and running i don't know that's probably not the most efficient um way of doing it but you kind of would get like the hamiltonian so would have to translate the cubot to the izing hamiltonian probably then build out the mpo uh build a random nps and optimize that mps it's very it's basically vqe right it's basically like yeah optimization so um but i'm still it's like the fact you can dummy these things out like and and the fact that you can just like because as i say you could just as well create like okay let's try one thing before finishing this what if i just say q0 is a node an mp array which is basically so so what i will do is i will say it's in a it's it's it's an array where it's it's just it's a cubit that's in the zero state right so that that'll be it but then it has um how many how many rank so the the first should have just rank two so we'll just do it like these q1 would actually have another and q2 which is half like this one and so then and then what we should just do is um basically connect what we finished five so it's gonna be six and seven so you're we're just going to connect like q0 1 with like q1 1 and then q1 2 with q2 one say right so forget about all this stuff in here so we're gonna do this um this is gonna give me the same result no okay of an equal dimension dimension of edge was dimension one so i should maybe really dummy but these things here seem to work oh sorry i think i think i'm gone i'm foot i think that should work it's an orange no no no i was i was i was right this is the correct thing to do but then dimension one okay i should just have like then basically a dummy here ah does this make sense i'm not so sure if this makes sense index out of range one with and you can just create those empty but then these needs another one yeah i don't know maybe that was not like but there has to be a way to create that this way as well so i'm not like uh um if i say that like zero is the kids here is these basically and now i do now i go and i say i think that's what makes more sense okay 0k0 this this was not working the dimensions are not matching why yeah something's like whatever i'll try next time it's not it's not i think i'm not like going in the wrong direction but yeah uh cool at least it worked at least it worked nice
this is what happens every time I try to go up me how yellow submarine that's I shouldn't do that so musty thoughts that's where where you want to go you know so it is let me show you so it's I went through that pretty innocently because that you know a couple weeks ago I was basically doing a bunch of videos I'm at the airport right now by the way so it might be a bit loud I'm sorry for that but I hope I did a couple of tests and it seems like at least my voice comes through it just in an understandable way so and you know what what would kind of caught my attention was when you were running through an X through an example oh yeah Ryan Air flight right now anyway where was that always that always keep me a second why I can't find that to London Stansted so basically just this is just distracting me give me a second now here exactly oh here we go so eat maybe I have to go and step all this is here so we need to measure our circuit many times and then substitute every zero with a one and every one with a minus one I was like what what why and and so this is one this is one thing another thing is I've been reading the quantum information I think it was a big cyber title from Nielsen like Mike and Ike or I can Mike I don't know how how what's the sort of the friendly name for the book the book that everyone is reading and basically there's a bunch I mean the process is really not and I'll do a review and all that stuff and sort of based on my experience etcetera but this like an entire chapter about the very beginning about measurement that's another thing so I'm trying to I'm trying I don't know if I can just say e DB T because I I need sort of a blank this is a zoom out so so one so one thing here was it's the vqe from me how from I'll call it like master thoughts another thing that I'm trying to kind of connect here is Mike and Ike on measurements the whole thing really started because basically the first time I saw these the first time I saw something like this right it's when I was getting into the cue in the very first time and I remember I even asked in Twitter I don't know if I can find that I might have I might have bookmarked the tweet I don't know book marks because Guillaume answered I think he this is one of the I can't remember that was probably kind of it search for that no maybes maybe was one of my tweets but I tweet maybe not super often but I have to clean up these bookmarks it's definitely a lot of stuff in here that it I basically made a tweet where once where I was asking like okay how is it positive like why would you be able to do face estimation by just doing what cackling the expectation valley because the first time I came across the the term expectation value I was super confused like what is a compact Asian value then I realized that means that the average but I understood at the time that this meant the average of your measurements and and so that that kept confusing me and I mean it doesn't not you know stop me from from from farther you know going on with with breaking down stuff and kind of trying to build the intuition but it it's something that now because of because of all these different things kind of coming together nicely basically I think I got a sort of a nice little picture about okay sort of a bit of an aha moment I was like okay now I think I know what this whole thing it kind of makes sense be more right so and actually what triggered the whole thing is really this so this is what I was I was reading this yesterday I again I have no idea how I came up here yeah cuz I was looking for observables what is it observable because in in in Mike's book basically they talk directly introduce a concept of an observable by just saying it's something you know it's something you can observe and measure right but maybe because they don't give examples then I'm stupid here probably it's just my fault right but it still feels super oh it it felt abstract so it's like okay what do you mean I mean is it you know cuz they go ahead and they just talk about like that's an operator so that's an observable and and that felt a bit awkward and then this when I started reading these I just tracked me like it was like a natural is an operator that corresponds to physical quantities such as energy spin or position that can be measured and that's like oh and that's started that started basically a whole chain process in my brain it of like wait a second that's the seventh and then I kept reading and it's like it kind of makes sense for a k-state quantum system service correspond to whatever blah blah blah and so it says here basically that so would the outcome of the measurement so what is the outcome of the measurement of the quantity represented by the observable M on a quantum state fire thing is fine so to understand this you know if you write it this way and then basically is saying that the result of the measurement must be some lambda J which is a real number we read off our measurement device with probability H a square model squared I'm so far squared modulus moreover the state of the system is collapsed into this and Annika and this you know as I read just this little just his first page and a bit of the second one I was like I think I think I get it I get it so basically you know here's an example which is really neat because like for example suppose that we measure keep it in that we wish to measure keep it in the plus and minus bases with measurement results 1-1 respectively I was like oh wait a second one and minus one he says okay now I start to get it because I originally thought that the expectation value was just you you do 100 measurements and you calculate the average result of the measurement M for me you know the the you know a quantum computer or a QP you the ones who can access you know I from IBM or whatever or even if you just look at quark or whatever edit or you're just gonna always measure and get zeros and ones and so I was under the wrong assumption that this is what you're making the averaging around I mean there's just some pieces a bunch of pieces that that brought the whole another thing another thing that that really catalyzed or helped me kind of crystallized that is is is David I don't know why I really in this way what a second so Daffy cupcake has a really nice also article on no that's not that's not oh yeah that's it it has a VQ yeah basically he has what he does is which I kind of don't like and because it just doesn't or it stays on a really abstract level so what they say is like okay let's have an example right so let's see that that's that's what we want to measure the eigenvalue of right so he stays here and because it doesn't go to the practicality of the algorithm which is fine okay the whole thing becomes a bit harsher or hard to understand but a couple of things in these posts that help you or help me as well so the first one I saw I realized this here I was like wait a second that is not that is not how you calculate the average of whatever so he must be doing some kind of decomposition of this in here then he talks about these being introduced before of being sort of the measurement projectors right so and this is also presented like that in or in in in a similar way in Mike and Ikes book and so I was like wait a second this is really this is really what a quantum computer measures right is that that's kind of a mathematical representation of for the corner of computing actually tries to measure but it still you know I was still not not not super clear so it's I cuz I'm trying to reason this in and inside and it's just like if you would see the chain through I think it took like about 24 hours to really it all sort of like a chain of different things you know popping up in my head it was like oh these oh and these oh and it's not this makes sense and so this was also when I then I kept on ready reading is like these corresponds to measure measuring observable em and I was like wait a second you're constructing the measurement you're constructing the observable I was like that's mind-blowing so you're telling because what you're basically saying is whether I did that where did I read that as well here somewhere I'm sorry I don't know if it was here I guess maybe I just jumped over it too quickly but so the mission was specified come with J was for the sequence of real numbers simply provide away exactly the sequence of real number is lambda simply provide a way to specifying what the pointer of the measurement device indicates so to say for the J's outcome so I kind of realize wait a second so yeah I mean basically the only thing a quantum the the quantum like the quantum computing measures is something right it's it's whatever it's been energy and I was like of course I mean that makes sense and continuous like a photo a photonic quantum computer like the one from Xanadu measures position and momentum a quantum computer that is based on superconducting qubits probably and I might say something really wrong here is measuring this beam now I think what the quantum computer is really getting as an outcome of a measurement because the standard measurement is built in the end and to keep you on the corner computer is basically along the z or does that observable which I I think what this means is basically you're gonna measure 1 or minus 1 so you're measuring this beam being 1 or minus 1 and when it's when you measure 1 you know that the state collapses to 0 because that's simply the way the system works and when it you measure minus 1 you know this is minus collapse to the state 1 and then the quantum computer makes the the sort of mapping and says ok the quantum state 0 is that it's a classical bit zero the quantum state 1 is a classical B 1 so and that is why you need to that is why you need to do what me how is saying here which is replace sometimes it's crawling breaks I don't know if it's on there so but basically that's why you you go to do what you got to do here that it's replacing this zero with one and the one with the minus one what confuse me is the way me how puts it it's just like oh yeah because those are the eigenvalues of the said observe or of the said operator or observable and that's it right and for me kind of what I was missing kind of Canadian you know I couldn't connect that at that point in my mind and but this is the sentence man this is the sentence that started off and then I was like yeah I mean really this it's really crucial to kind of deeply understand how you can leverage that because what is really what this really means cuz I first thought okay so what what did that what doesn't mean these like why isn't it just why doesn't this mean in a Prada and at a practical level with a quantum circuit level why doesn't this mean I just prepare the state then I apply that operator and then I measure right well because you're not you're not like that's I was something the wrong understanding of a measurement right in the sense that you're actually measuring a spin right and so what you want to know here is you want to measure the energy this H is you know measure the energy the fact that the the observable is the is also an operator at the same time that's just a technicality but here what you're doing is you really want to measure the energy and so fortunately what the whole thing with a VQ is says is you can formulate the energy observable or you can build the the the the energy observable as a function of the the x y&z observables that are native in a quantum computer right and that's what me how is doing here so it's basically saying you know if this is the measurement if this is the observable we're trying to construct why why did the I mean real why did the the scrawling break just sex if this is the observable we're trying to build to to we're trying to do too sure I can it broke come on the arrows work so this is the this is the observable because this is the Hamiltonian you can basically express that in in that way right which are then all composed of things that you speed measurements so to say you're basically defining and building your energy observable out of a linear combination of off-speed measurements I mind I might not be spin but it's just my guess right now that the 1 n minus 1 are spins basically and that's what allow allows you to do what then the rest of the of the article tells you which is OK build a secret that allows you to measure that another one that does measure that and done then just add the results app and that's it because you're basically translating a measurement you're doing something with a measure and in a kind of measurement that matches what your computer is measuring but then I'm curious because something then then this problem means that the vqe of course it's needs to be adapted based on the machine you're running it on right like if you're running it on a quantum gonna on us on a photonic quantum computer is gonna be different because they're measuring position momentum depends on how you're gonna be encoding that that's interesting that's interesting yeah but I think now I feel better that I kind of like I just basically explained what I had in my mind is definitely that's definitely the thing here what else I wanted I wanted to I wanted to mention something else all these announcements they just keep distracting me I wanted to measure something I wanted to explain something I've measured something else but basically well Vicki we've really ears is come up with a way to generate a random state or like a parameter I see so you can explore different states and then just measure the energies I was like it can't be that simple really in that intuitive level this is really what's happening here it's prepare state because oh yeah because basically what what here they're saying is so one important observable of any physical system is its energy the corresponding matrix or a pretty is called the Hamiltonian is often denoted by H the eigenvectors of its operator and here this is was also it was it was even more clarifying yeah I can factor some of these operator are the states of the system with definite energy and the eigenvalues are the numerical values of the energies of desired states and that's why you in quantum chemistry or you're looking for the for to approximate the lowest eigen eigen value but really that it is that is what it means when you only have a Hamiltonian that's why to build hamiltonians i guess at an experimental level you really have to do a lot of playing around and try to figure out what are the states of your system and what are the energies associated associated to those to those states and then we thought you can build your hamiltonian wait the doc that cannot be this way because if it's this way it means that we already know what's the lowest so I guess experimentally you basically defined the the meltonian somehow but you you you still don't know really what the eigenvalue is what the lowest eigen value is but but that the fact that it's a matrix the fact is expressed this way allows you to then use a quantum circuit to say okay so how can I observe how can I observe that right and so basically States suppose we take 10 to power 6 cubits prepared in the state fire 1 and measure the energy of each of one and make a histogram yeah I couldn't see Figure 1 a so I don't know but now suppose that we prepare these and we measure each of their energies that make Instagram how does it look like if you want B I also cannot see this ice itself if I prema prema prema Prime I don't know a state with well-defined energy dances no I guess the idea is because it's not an eigen state of the Hamiltonian operator so only the eigenstates have have well-defined energy this means there are that but but and and then this is the exactly and this is what just killed the whole thing like even though a given state if I might not have a definite energy you can still ask the question what is the expected energy of this state and that is this like BAM here we have it so this is I don't know you know I still don't feel like extremely confident with this but this whole chain of different bits and pieces out there kind of can help you to connect all those dots really felt like like a good interesting moment yeah so basically that's that's why you want to calculate the expected energy because basically you you're quite sure that the your quote you can be quite certain that this thing is not an eigenstate of your Hamiltonian because you prepared that kind of randomly I mean you start randomly and then you basically try to minimize it and change the parameters but that's it so what you're only trying to find is you're trying to find a state that has an expected energy value that's as low as possible because the variational theorem theorem basically guarantees you that you know the lowest is always the lowest eigen value so you're not gonna kind of get lower than that which basically means that a minimization approach is what you want to do because it means you know it doesn't matter how how deep you go down the hill whenever you find your your minimum local minimum then you can be sure that it's a participation to that global minima but basically that's the so that's all what vqe is is just start with a random state energy state calculate try to observe the tried observe the energy of that try to calculate the energy and then minimize and that's it so and that's why it's that I think it's more than you know it's more than just measuring zeros and ones and and that's one of the big differences between classical computing and and and is that here you're really simulating you're really building a system like a quantum system and so what you want to measure is crucial and then the machine is gonna be tuned to measure something specific like the spin or like the position or like the measurement but sometimes you want to measure all the things right so yeah I don't know I feel I felt I felt like I needed to do this video despite the fact that I was really kind of getting into the girl in to Grover right now and to Grover his quantum search but that really connected all the dots yeah perfect I hope the song was good I'm not going to be able to a do that no that neither repeat this with the same energy so then yeah I guess stay tuned for more
Conveyer/Quantum cable? Spatial Wave carrier? Dono...yet! 🌊✌️👍
He is constructing Quantum loop scanner re-entangable observable operator while he just need mirror state observable that is nullable at demand?
What this is is a &quot;symbiotic&quot; relationship between the mechanical and electric automated worlds!, I know broad and abstract! HA Thats just how i am!
From here i believe we will start getting into &quot;Quantum Memory&quot; which may take on the resemblance of a Double helix!
Excellent!!!! This is where im at as well!!! As of only yesterday! I totally share in your enthusiasm!!! A++! Good work!
this is gonna be or basically kft under 10 minutes and 10-15 minutes I hope and without basically any maths or what's going on with the gate so don't send EFT and intuitive way you have to understand what inputs and outputs is designed for this is really important and you've got class play like you've got typically two different ways to see right so you've got this way of seeing it where you start like this version of the Clifty is designed to take in as an input a frequency right like so you could think of these as frequency number one right you could also have in here multiple frequencies right for example here's a combination of frequency one and frequency three and the output you see here it's basically a phase encoded or it's it's sort of facing coded signal data so let's imagine that we just say what cuz it's easy to see right so will you this is telling you on the output side is that you're gonna have if you take a look at the and the the angle of the of the face how's it moving forward across your superb across your different states it's actually doing a full cycle right since using all your like starting from zero zero zero it's the first point where your halt data until the very one the last one if you'd have another one then you would can see kind of kind of basically go back to that to face zero so that's the idea right phase one through busy one so if you go back to zero and say now I want to code two as an example you see that it's gonna give two cycles right so that's see that's that's the way this circuit is designed um you've got also this other version which is basically so the inverse of that right and here just to make it clear this is the input preparation and if I go up and here the input preparation is basically here's I'm using yeah I'm just using the QFT building hefty gate to prepare um basically that box is that entire circuit so what I'm just doing here is I'm just using that to prepare just you see to prepare the like a valid input state eval it's something that it's easy to do then kind of and then you can see an outcome that makes sense so you've got here--oh basically a 1 right it's the same that we I show you in the other circuit and so what this circuit is designed for is designed to actually tell you which frequencies these signal data is included from kind of Francis forgot a one it matches one if you've got a superposition as I said for example just to show you the display here here so if all we do is something like this so we get like 1 & 3 basically that's your input data and then at the end you get 1 & 3 that's yeah so again and you get it into a superposition right so you actually have to basically do several runs so you can actually get those numbers but let's see that's the idea okay so once once this is clear let's go ahead and try to unpack these two circuits because they're really similar and actually if you if you as it's one curious fact about these algorithm is if you basically concatenate three times the key of T you it's kind of circular because as you can see in the circuit we're basically doing rotations it's all the time rotations so what's really happening here is that you're basically the way you encode that right it's not cubed that makes your number in binary to have a particular influence on how this is being rotated so technically you've got those harem arts here that build you the basis superposition and then you've got the control occasions that so just to show you and the easiest way to see that at that point in time here so if you will go back to the example of one right if I show you in this case basically all what we want to do here with one is we want to have a superposition that that's done right so that entire in this day so if you pay attention there's some some cycles in here that repeat of course so this portion of our output it's basically the opposite is sort of like me a mirrored version of this one because yeah you're trying to give a full cycle so you're kind of half those two steps right those two house so this is something that you're gonna that you're gonna have with a heart of mine right so the heart itself is a gate that is gonna ready it's gonna basically expend the the states also gonna rotate because you have the one in here right so that's already what the hardware that's what the one is it creates done that's right the - state which already has that facing here all the way here but what's interesting to see it's basically how how is this set of rotations affecting the whole thing so and maybe it's gonna be easier if I decompose them so if we do this because at the end of day that's just a compressed way of saying you know that's what we're that's what we're doing so it's gonna it's gonna be then system by step so what what's happening here so it's happening is that this first rotation is telling you okay so from our state in here all the states that have a 1 1 so all the ones in here rotate them like by 90 degrees right and when you sew and when you basically move forward to the next to the next one what's actually happening here is you're you're basically now saying the ones that have the 1 0 1 pattern so this is this is this here rotate them by 45 degrees and so pay attention that in those two cases you're kind of its kind of accumulated and then you end up with the latest one being exactly these where you're now saying the ones for the permanent 1 0 0 1 because that's what those control is that the gates are are doing right like if you take a look at the system level that's one of the ways to interpret the controls that it's it's then for the for for this part here exactly for this part here is oh wait a second I think it's gonna be easier if I show you this in the way give me a second it's gonna be way easier if Ida composes differently help I'll be able to stick with the timing and the ten minutes so that's definitely gonna be easier I think it's gonna be yes so basically because now you can see it's easier to see if you start if you start basically at the lowest value give it so this is everywhere we've got like a 1 in and in this cubed in here we're rotating so those were - so basically you can see here that it's it's rotating those elements by 22.5 degrees and so what we're doing a step by step is we're adding we're taking because the next cubed is has more weight in the you're basically then taking that and also and kind of like adding here right and here you're adding those 45 degrees so in the cases you've already rotated before because there's a 1 as well that basically sums up and save got 65 65 degrees you're kind of creating that slope step by step and then when you're and then in the varial for the next level then you are actually adding you know this this extra 90 degrees and so you're kind of all the all the bottom part here so that becomes it goes from 20 to 212 right and and this one it's a five in this 257 so your each keep it coming gives you that extra weight in there because of the enolate that's a binary number and and then the last kind of you know the last the cherry on top of the cake is basically the harmonic which basically doubles you you know fills up the rest of this preposition and it adds like 180 degrees shift to that part here so everything goes this is because because we've got a 1 in here so that's the essence of this of this version of the circuit basically rotating as a function function of the importance and the way that a particular kid might have and the same and that extends linearly to super positions right I mean there's nothing nothing here that changes the reasoning is the same if you've got something like that the this qubit in here is gonna be both 0 and 1 so you're gonna have those two different situations being developed within your so this is basically that version of it the this part of the gifties maybe a bit less intuitive and I really recommend that you take a look at the in-depth series or the giftie so you can see what I went through trying to understand that but um the idea here is that you're kind of doing the opposite instead of instead of setting up starting from scratch and setting up like including the data in your position would you want to do here is you want to figure out where how does this like you know what worse how do we come here to that data encoding right and the way is the way you want to do that is to when isn't that by in a similar way you wanna identify okay in what was the value of the qubit that led to these particular set of rotations and one way to do this is you you're basically trying to identify cycles because we say here that basically what you're doing at the end is you're if you have a 1 in here when I have a full cycle so this means that the two halves have to be me have to be mirrored this is an indication that there is going to be a wine here and so that's useful for this case because if the first thing that we do is we start doing a harder mark here right that's hope that's what the heart is gonna do for us so the heart is gonna basically detect exactly that pattern so it's gonna see it's gonna see okay here I've got basically a mirrored pattern so I'm gonna I'm gonna get rid of that and pack it all into the portion of my of my amplitudes that that have a 1/4 that cubed because that's that's how the Harmar compresses things and and so basically what this is telling you right is already that here you know that they keep it up here is gonna be a 1 because this pattern indicates you that it's an odd number like what you have in here if this cycle would be if this cycle would be basically the same so because a repetition for example in the case of 2 right so you basically now have two cycles so this means that this is they are not mirrored anymore they are the same because you're doing two circles two cycles now the horror mark is gonna basically do the opposite is gonna get rid of these right and then pack it all into the into the half that starts with a zero so what this what the cubed value here is telling you is that well this this number that we're looking right now we didn't know about because this is theory something you don't know it's gonna have to be an even number right because only even numbers will kind of generate that kind of pattern in the input and so basically what this is telling you is that that essentially you can summarize like the value of this cubed it's literally telling you the actual value of of that what you should have as the lowest cubed in your final right and and so that and then you can extend an idea to explain the rest of the algorithm so the so basically what you then do from here is you applied the inverse rotation so we seen here because you're that's what you're assuming is that if if this is a 1 right if this is 1 we basically have to kind of correct for the the wave rotations that that that you experiencing on this I rather you're rotating as a function of the values in here so you want to go back it's sort of here you want to go back to one step right and and so you're gonna play hotter Martin then identify the next pattern that's probably maybe it sounds to play less intuitive but if you if you go through these and you think about that part of the algorithm as the inverse of this it kind of makes more sense but intuitively you're basically rotating counterclockwise based on the the weight of and then basically as you get down here that's what you so you're basically each qubit you're recovering it's the value that that the cubed you know this one was the value that this qubit is gonna have this one is here is one that so you have the swabs in here at the end of the day it's just that there might seem a bit confusing it because they are at the very end of the circuit but this is this is what you're gonna this is what you what you're doing basically you're you're identifying the cycles and and that type of that outcome after that after each Harmar is telling you what is the value of the key bead that you should have but not the same key where you apply the armor but the one that's kind of opposite into your registry register yeah so that's basically the specific EST it's nothing nothing more than that nothing one that the key points I think this is this this circle is easy to understand you might have sometimes a different arrangement of the control of rotations but at the end of the day it all sums up to the same thing this is bit tricky to understand especially because you're operating your input is for position so that might be a bit a bit less it's bit more complicated to understand intuitively I would say for someone who's approaching these from scratch the two points two key points to understand is why do we have swaps in here and what are those rotations doing why they are backwards why they are like minus minus 1 right so why they're in the inverse of the other rotations and the explanation is again simple right once you've had when do you write compress half of the cycle then what you're trying to do at the end of a is your turn cuz you're trying to back engineer like reverse engineer what you know it's the wrong word but you're trying to basically find what were they what are the values of the qubits that that could lead to that type of cycle and so that basically implies that each of these key beats as we said in the video has undoing that you're literally undoing that here you're kind of applying an inverse rotation based on the based on the actual value or based on the actual position and wave data cubed would particularly have and remember that you're operating across the entire superposition so if you if I managed to move these so say for now I I show you what those things look like that's basically basically nothing happens here house yeah because basically there's no that's that's that's the gist of it is that nothing happens here because basically that's we've got we've basically got a zero here right so that that's telling you and I know cuz if we put is here here but so the fact that nothing is happening is because there's no there's no influence of that particular K bit and that means that it's a zero so that's why nothing is happening so the harbor is able to pick up already the the the pattern right so this is sorry it's telling you that the influence is here so that's number one so and that's why you've got like a day in first part of me here anyway it does those things in a clean way so yeah this is basically this is basically the bunch of rotations and just making sure that the slopes here makes sense because the cycle is telling you about the value of the opposite cubed opposite as in opposite within your cubed bitwise R cubed y z-- representation of the frequencies and that extends linearly to superpositions as well you're gonna have you know you're basically and a half like if here you've got like hereafter you don't have a clean a clean that clean up here where it's empty it means that it's not just zero one it means that it's a combination of both so it means that you know you can then go ahead and do the calculation for both possibilities that's where the circuit is doing within your superposition and then you're gonna end up with one one with more than one amplitude in here that's cool I hope that it was clear how there was not confusing it's a bit long bit of a long executive summary but I think that pretty much summarizes everything that I've learned about the QFT in the past days and weeks
Thumbs up for the shoutout on Twitter, but a few minutes in I still don&#39;t understand why you&#39;re using swaps. You&#39;re adding unnecessary circuit depth to a circuit that already has an awful lot of circuit depth., This cycling that you get btw is exactly what&#39;s used in shor&#39;s algorithm, The swaps are needed to get the right output. For example if you input phase encoded signal data (mapping values to equivalent phase rotations) the (inv)QFT will give you how many time the data is cycling. But in order to do that you might need to use swaps depending on your implementation.
Good job😉👏👍.
Wow! Cool! Thanks!
let's clear out some of the some of the usability things here first this thing to close that which is basically gate diplucate is holding the shift' so kate duplicating is holding this shift yeah okay that's cool removing a gate is just the middle click yeah okay nice I mean isn't just the pad like the mouse pad it might be a bit complicated to do the middle click I think in my laptop but that's a music mouse now so that's okay so it's good enough deleting yeah cull of dragging control column dragon control nice perfect complicating its control shift ok powerful and roll dragging you can track entire rows of gates by holding the control key and then dragging the initial state indicator okay so easier to see like this okay kisses how this works with controlled operations okay okay cool yeah it's fairly intuitive I think I think it's fairly - it bothers me a little bit the tutorial is there all the time but changing you shall state gate resizing okay yeah yeah yeah that's that's cool okay perfect so what I'm trying to do here is I'm gonna be spending I think the next videos I'm gonna park everything else that I've been sort of exploring for now and I'm gonna be coining I'm gonna be trying to coin some terms around uncertainty some things that kind of made make sense to me right now maybe just absolutely nonsense for everyone else maybe it doesn't really take me anywhere wanted to explore I wanted to explore a bit what you can do with with positions other than just like arithmetic I mean at the end of the day kind of everything can be boiled down to earth medic really but just just want to play with it see what see see what do we encounter it would we can do what we cannot do and then kind of all out you know playing with that without any specific aim I think I think one of the problems that I'm kind of struggling with right now or that I see a lot of people struggling is that is a constant strive to justify the industry applications of quantum computing and I think that might might be blind citing us you know in some angles because we're trying to kind of make a step that we are probably too early to make yet and then that's maybe how that's maybe the reason you know I feel the way I feel about all the machine learning stuff that I've been seeing is that it's not there yet I think there's some of course advantages and some things so we can see in in simulating and and chemistry and stuff like that but I really haven't explored that yet I'll just put it aside for now and try to understand a bit more the first principles of working with superpositions and I think that's because the the the thing with the thing so Craig's post about the x-axis controls and Y axis controls kind of opened my mine up a little bit in the sense that there is a bit there seems to be some stuff to explore there and I think that I think that can be interesting so let me just start by coining those terms first and I because I talked in some videos like almost the very beginning about positive uncertainty negative uncertainty some people who are watching the videos are asking me to do more in that direction but this this is not really any kind of official or any I haven't seen this anywhere quite this way so the the basically my thought process is the following so and I'm always thinking from the said access perspective as in this being the computational basis and maybe the blockers will help me explain that a little bit but you know what I kind of have in mind so for me when I talk about like positive and negative in certainty this is the actually I should probably call it real uncertainty this is what you would you get when you do a harm art or when you do a Haram art like using and using a not like a one as a seed and I'm really gonna be using seed because I like the concept of I like the concept of having sort of having sort of a seed to create a to get into super position because that takes you into it into a different type of uncertainty but at the end of the day if you just restrict yourself to two seats which are made of zeros and ones so seats that are living in the z-axis axis what you're gonna get with this proposition is rather so your ear and if we stick just with one cubit you're just gonna either stay at sort of the minus or plus States right so this is the zero plus one divided by the square root of two and and zero minus one and and this is this will be the negative uncertainty and these would be positive in certainty but it's kind of real in the sense that there's no there's no complex component it's it's all happening with the y axis being zero right that's why I call it real uncertainty following the same analogy the same concept we can define complex a certainty in this case is the type of uncertainty that you see that it's only living in the y axis and you would do that by for example getting into the plus state and then applying a is it an S yeah and that's a quarter-turn so an S or and and that would be in this case just just thing just look at the first qubit so in this case that's that's this right so you still got a 50/50 percent chance of observing 0 & 1 if I would do it this way you kind of have this so you've got 50% you've got the Jefferson chance of seeing any of those values but basically what's interesting here is that I can kind of see that actually the amplitudes that's interesting because if you can see the phases are 0 90 90 and 180 that's really interesting so but you see basically this is these are all the the complex uncertainty would be the uncertainty that leaves only within the y-axis or basically it's since it's in certainly they can use basically real seeds so you can use the values in the x-axis as a seed or you can use just a combination of we start from 0 or 1 you can use a combination of horror Mars and an S right so that would be the same just kind of thesis it makes it makes it more compact and so you know and if you were now do that exactly so if you now do that you basically end up at the other side of the so that of the answers I will be basically I think the equivalent of of - I - I exactly and and and that will be complex uncertainty that's how I would coined the term and it's really anything in between I mean you can also be I don't know yeah of course that's not that's not uncertainty anymore because you're back at one here but if you know if you would say like quarter right there'll be another example that's a cool one that's interesting so basically I'm interest I'm interested in seeing what's what's kind of you know what is the shape of those uncertainties and what can we do with that what can we engineer here that is kind of unique and interesting and I don't know I don't even know where to start yet but I think that's I just wanted to drop this video coining the terms and then laying kind of the foundation for my next videos to explore these because of course it can have a mixture of a mixture of uncertainties right and so if I would now kind of rotate if I would now rotate yes right so now you've got now you've got a mixed up off of real and complex uncertainty you can just basically because exactly you're not yeah yeah that's how I would call it interesting it's funny to see that like you know by adding those as gates so you've got all the kind of kind of aligns the kind of aligns all the all the phases all the relative phases interesting without touching the amplitudes so I I don't know I think probably the Nexus I maybe should kind of set some some internal guidelines in terms of what do I want to play with and how do I want to play with this but but basically basically that's it so I talked about there's real uncertainty complex uncertainty and then the real uncertainty of course positive and negative and the complex and certainly can also be positive and negative as we we just have seen right so that would be I will call that negative complex uncertainty but we can also just do positive you know the opposite being in this case if you negate so you know you can for example what I can already see here is complex inserting can be negated so you can you can get it with a I mean you know get it with the x-axis okay with X okay interesting whereas if you'll go to positive or negative in certainty in order to negate that you need to apply the white gate I think not entirely interesting because if it's positive and certainty also not interesting you see that's pretty cool so you've gone okay so if you've got positive and certainly when you apply yeah of course that makes sense about shift shift shift so that kind of keeps I really think that I really on say if I find that I'm I'm really gonna try to work on extending the quark to change the colors here so it kind of it's easier just with the claims of an eye to see whether your because color coding color coding the inside of the balls or maybe the color the amplitudes here will all kind of help me visually see if it's the same or not because here I have to ok so I have to kind of you know look here look here in this okay that's the same but that's flipped that's flipped and that's the same right yeah but basically of course that's as I said that is negated in the sense that in the sense that the this is the same as like this is the shape of negative insert this if I if I do that and if I minus minus yeah yeah yeah okay yeah what else can what else can what I'm what I'm pretty curious about is kind of to try to study and take a look at how for example let's say we're here and then how do the different raising gate like raising gates will affect will affect the the uncertainty right because if we're only rotating one it's interesting you see it only rotates their waist is a one component and here it will rotate there is one component in the first exactly so rotates okay interesting whereas if I do this then rotates the face and all those other the in this one rotates way faster right because as like twice the component interesting whereas if we play with a wide gate of course it doesn't do anything if we play with the next gate it actually plays with the amplitudes which is beautiful and we see that it kind of tends to go to the extremes 0 0 1 1 that's also interesting and what if we rotate them sort of the other way around beautiful yeah kind of makes sense kind of makes sense now the 0 1 and 1 0 are the one is are the ones I get the marks in the peaks of amplitudes interesting yeah I think what's what's interesting one of the things that I want to that we'll explore in the next video is probably kind of the creation and destruction of those uncertainties so sort of the interference effects right because kind of harm art feels like a special gauge in that sense in the in the sense that it's a gate that helps us go from from it helps us create uncertainty the real uncertainty and at the same time it has the opposite effect but I basically you know it's the same game it's kind of then interfering and going back to like a non non sort of kind of like our a certain basis what if you come what if you do something like that what's the e or what's the effect ok that actually it actually negates the cases for position interesting but not entirely you see the the the interesting effect is okay it kind of so this good this goes from 90 to zero this goes from zero to 90 this goes from 90 to zero and this goes from 180 minus 90 so and it says if this is one thing that I want to play with another to play with is the the XS x axis controls I want to play with post elections as well [Music] because if I play and y-axis control now flips the faces okay yeah I got a thing a little bit a little bit about it so this is not to be too unstructured either it's like what do I want to explore I'd like to kind of have you to be more like okay can I do that can I can I not do that but basically basically this is what I have in my mind so real real uncertainty complex uncertainty both positive and negative how do we create those how can we interfere and how can we and and and what can this be useful for other than operating in a superposition as in like applying operations to and why is it useful so for me one of the biggest questions here is like why so what is the advantage of having two types of uncertainties that would be one question right this is just a dimensional everything is it just a we can even do more than that and then have so what if we have these what is this even so now we have sort of a mixture bit over I feel a bit overwhelmed I don't know that was good yeah but I kind of think I kind of feel like I kind of feel like that that there is some stuff in there to explore I feel like a bit of you know like there is something super powerful in front of me which but I don't know how to use it and then kind of like it's dangerous because the one I run into you know kind of like rabbit holes of you know asking weird questions and try to you know spend a lot of time understanding things without really any aim that's not the way I want to spend the time but nevertheless I feel like I should actually kind of just jump in and explore yeah but basically basically that's it so we've got different types of superposition how can we make them interact with each other there will be another question maybe she just write down those questions so how do we create those with seeds and what are the characteristics of those types of uncertainties and then how can we e can even track them or I don't know I don't know it confused me kind of half lost half clear but yeah let's see let's see what happens
I would love to see these certainty and uncertainty patterns online working in a real world application! Live, Let&#39;s see where these takes us ;)
This is amazing by the way
I’ve been long waiting for some one to work with the quark simulator this way!
You would be the perfect person to explain some of the basic math behind quantum computing such as the stuff you mentioned like I -I or square roots etc
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
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