 Okay, microphone is okay. Okay, so hello everybody. And apologies for the delay in starting we had some technical difficulties. First of all, great to be here. Thank you all for attending and thanks to the organizers. My name is Callum McPherson, I work for Quentinium and the ticket team. So mostly a software position. Yeah, I'm going to give you overview of a ticket or software package as well as a very brief overview of some quantum algorithms. So I'll start with some slides and then I will move to some gypsy notebooks to shoot walking through a tutorial how to use a ticket. And I will also have a brief section on Grover's algorithm. You can set round a link to get a repository. This contains the notebooks so you can follow along with me later after my slides are finished. Yeah, I should say if there's any questions. Yeah, feel free to interrupt and ask me for clarification. Let's get started. So just as we recap, it's maybe worth thinking about why we're interested in quantum computing in the first place. So in short, the reason we're interested in quantum computing is because there are specific problems where we can argue that quantum computing offers a computational advantage over standard classical computing. Here's a well known example of this. The first is shores algorithm which provides a near exponential speed up for print for a factory. And this is relevant to RSA photography. There's Grover's algorithm which I'm going to talk about that which provides a quadratic speed up for various unstructured search problems. So several applications in quantum chemistry and material science will thought that quantum computers is potentially useful for drug discovery and for finding the materials. And there are other applications which I'm not going to focus so much on, but these include machine learning and various combinatorial optimization forms. Here's an example of a quantum algorithm. This is called the variational quantum items. This is the example of a hybrid variational algorithm. Has anyone really with these before. One, maybe two. So yeah, I'm not going to go into too much detail here, but basically the way this algorithm works is that you prepare some. You prepare some quantum state, and this state is parameterized. And then you calculate some cost or some expectation value based on the program state. And then you wrap this up in an optimization loop and try and find parameters which maximize or minimize the value of the cost. So this is a hybrid quantum classical algorithm. Maybe something that's fairly near term terms of what we can achieve on the quantum computers we have today. But it has many disadvantages as well, which makes it challenging to extract an advantage from these types of approaches. An example of a classic or textbook quantum algorithm is Grover's algorithm. So, as I said before, Grover's algorithm solves unstructured search problems and can achieve a drastic speed up searching data base. But this is also challenging to implement as the circuit stated to perform this algorithm with a very large. So we have a quantum circuit here, we prepare a superposition of all of our, all of our states. And then we have this black box oracle here which marks the entry of the database that we're interested in, and we can form this kind of averaging procedure. We need to take these two steps iteratively, and then we amplify the ability of measuring the desires. So, apologies that was quite brief. So yeah, here is a sort of pictorial description of what's going on in Grover's algorithm. So we start with a uniform superposition of all states, we're interested in this particular state w as this is some entry in our database. So, we assume that we have access to some black box this oracle function, which applies a minus sign to the state that we're interested in and leaves all the other states below. And after we apply this oracle. We have all of our basis states usual and the basis state that we're interested in is reflected across the x axis. And from the next step, which is kind of an inversion around this average line here. So, then the state is then reflected back across the x axis. And if I repeat these two steps over and over again, this basic state is going to get a larger and larger amplitude and so by measure that state, then I will get the right answer with higher capabilities. So that was a very brief overview. I will go into some practical examples of that later on. So, if this is a bit unclear, then hopefully that's okay. So, now we'll talk about quantum software so already quite a lot of quantum software that exists for various practices. So I'm going to make a distinction between what we might call the system software of quantum computing and the application software. So system software is the stuff we need to actually run things on quantum computers, and application software is software that can be useful for various applications we might want to explore with quantum computers themselves. So under system software we have quantum compilers ticket is quantum compiler, it takes some high level representation of a program that's understandable by humans and transforms that program onto something that can run on the real device. We also have online services. So Amazon has offered web access to real quantum computers through AWS, Microsoft is something similar with Azure. So under system software we also have packages related to quantum error correction and error mitigation to try and improve the reliability of quantum computers. So one of these is called Kermit, which is a pun, and you might be using Kermit later on in the hackathon as well. And finally there are like actual pro special purpose programming languages based around quantum computing, well known example is Microsoft's huge shark, for instance. For system software we have libraries for quantum chemistry like in quantum, which is a chemistry package by continue for computation chemistry. There's packages for machine learning, and other other application is packages. We have a brief interlude on quantum hardware. I assume you've heard a bit about this already. So, currently, there are many games in town when it comes to the physics of quantum computers. So, one approach is to use track times, like we have a continuum, along with other companies like IQ and they continue. And then companies looking at superconductors like IBM, Google, spaghetti and so on. And there's, this is an exhaustive list of told there are many different approaches to quantum that use different physical systems to realize the humans. This is quite good because if you're not quite sure how to scale something it's good to have many different approaches attacking the parallel based on physics. And so what are some challenges that we might face with quantum machine. Firstly, the issue is that we don't have enough cubits for many of the most exciting applications. For instance, shores algorithm requires very large circuits to implement and also requires quantum error correction codes, which leads to a very large number of cubits you need for any practical use of shores algorithm. So the things we do have are subject to lots of complex quantum noise. Currently we don't have the capability to run error correction schemes at scale to correct these errors. So we have to make do with a lot of noise that corrupts the results of our computation. Another one to emphasize is that quite often the performance of quantum algorithms depends on a lot of like low level implementation details. So, if you have a large circuits more noise will accumulate over the course of your computation and degrade your results, but there's also the connectivity of the device and various other details we need to consider when thinking about quantum algorithms. So, you can access quantum computers through IBM, and here I've just gone to my IBM quantum account and asked you to show me a real device. So this is a schematic of the IBM Guadaloupe device, I believe. So this is graph, and this shows how the cubits are laid out on the real device itself. So we have some information about the various error characteristics of our real device. So we have this CNOT error, which is the error associated with performing the two cubit gates, which turns out to be quite important metric. Importantly, we can only have these two cubit gates between nearest neighbor, no less of our device. So, some compiler will have to solve for the constraints of this nearest neighbor interaction. So, yeah, what I'm trying to emphasize is that there's a large difference between the high level description of algorithms and textbooks and the sort of low level details of real experiments on hardware. So, just to give you an example, this is a circuit that I drew earlier, this circuit forms the quantum barrier transform. So here I have this, I have these Hadamard gates, which are single cubit gates, and I have these two cubit gates, these controlled unitary interactions acting between my cubits. And you can see that my cubits that are, I have all possible pairs of interactions between my cubits. So, you can think of this as, sorry, you can think of this as a complete connectivity graph. So, all of my cubits are talking to each other. And if I compare this to the topology of the device itself, the topology is much faster, so I've only got nearest neighbor interaction between these five cubits. So, some compiler will have to solve for the constraints of the device before I can run this circuit on a real, on a real quantum future. The device only have also as a limited gate set, so I need to translate my circuit into a gate set which my device understands, and in doing so hopefully I don't introduce too much additional error into my presentation. I'm going to have shown an example of the circuit once it has been compiled to the real device and you can see that now each cubit is assigned to a physical node of the device itself, and my circuit is in the IBM gate set and has only nearest neighbor interactions between the nodes. It might look like this is not a nearest neighbor interaction, node one is connected to node three, but if I look at the graph, I see that node one and node three are nearest neighbors. So now, after that introduction, firstly, are there any questions on what I've presented so far. So what is Ticket now? Ticket is our software library. It's developed by us at Quantinium, but it's fully open source. It is a high performance compiler for quantum circuits. So, fully open source, so you can visit us on GitHub. It also has the property of being so-called hardware agnostic, which is a strange term, but basically means it doesn't make any fundamental assumptions about the kind of quantum device that you want to run your circuit on, so it can target a wide range of quantum hardware platforms. And an additional bonus is that it's compatible with a lot of other popular software libraries in the ecosystem, so if you're familiar with Qiskit or SIRC or Penelain, you can use Ticket in conjunction with those tools at a sort of complimentary. So you can install Ticket, which I would encourage you to play around with. You just install this with the PIC package manager, so PIC install package. And there's a separate command for the different extension modules. Oops, sorry for the change in slide colour. So, how does Ticket structure? So, underneath Ticket is high performance C++ library. This ensures that we have an efficient implementation in that we can rewrite circuits with good quantum performance. And we then have a Python interface, which is PyTicket. This is what you install. And this is hopefully more user-friendly than writing everything in C++. And then we have different extension modules to interface with different software and hardware platforms. And then we have extensions to interface with Qiskit and SIRC and Penelain, like I said, so you can build your circuits in any of these software libraries and then convert them to Ticket and target any quantum device which we have an extension for. And this is not an exhaustive list of extensions. We have several more. So you can just run your circuits on an IonTrap device or an IBM Superconducting device or whatever you like. Okay, so that wraps up my slides. I'll now get into the notebook section. Are there any questions so far? Nope. Yes. So how does it make simulation work? Yeah. So does it like find lots of consumations if we have made the search data? So, when you're talking about circuit optimization, the main benefit is that it improves performance in the presence of noise. So if you're doing like a noiseless simulation where you don't model the device noise that's present in a real device, then you might not notice much difference from circuit optimization. If you think long term, perhaps a compiler could minimize the depth of the circuit, so the overall runtime of the computation could be improved. But yeah, for noiseless simulation, I think the main benefit of optimizing compilers is for noisy simulation and for experiments on real devices. Does that answer your question? Okay. Okay, so now let's open up my notebook. You bear with me. Okay, so these notebooks, I have two notebooks and they should both be in the GitHub repository that you were linked, so feel free to follow along or not, you can just watch me. Okay, so I'm going to talk you through how to build basic circuits in a second. To build a circuit, we create an instance of this circuit class here. I should say, is everyone fairly familiar with Python or is there, most people used Python before or do you know? I'm going to assume that you know how to do some Python followers, but okay, there's also a cheat sheet going around that should be helpful. Okay, so to build a circuit, we create an instance called this circuit class here, and then we can build our circuits by adding gates sequentially so we can add Hadamard to the first qubit circuits or zero index, so we add it to the zero qubit. Then we can form a controlled x interaction between the zero and the first qubit here, and then we can draw a nice picture of our circuit. So it looks something like this. So we have this circuit renderer here that's interactive and we can swap between different visualizations or we can display in dark mode. So yeah, this this circuit builds a entangled bell state and we can verify this by simulating our circuit on this very simple state vector simulator we have here. So I import this air state back in from one of the extensions and then I can just execute my circuit. Tech it will do some matrix multiplication, it will give me this the quantum state that comes out of this circuit. So, here I have some state vector as a non pyrite, and these are my amplitudes of state vectors so if we compare this with our, with our bell state we can see that this matches what we expect from this circuit, it's just an entangled state with equal amplitudes and the same. So hopefully that makes sense. Nothing we can do is we can do a shop space simulation so we can do our simulation as before but we can instead probabilistically sample from our state vector. So this is more in line with what happens in a real quantum system where you have probabilistic measurements. So I added some measurements, measurements on the end of my circuit here. So, now I can. So I'm using this air back noiseless air back in simulator, so I can run this circuit for 1000 shops, all this means is I just execute my circuit 1000 times and then I gather statistics about which measurement outcomes are more or less portable. So I can get this result objects result object, and then I can print out this dictionary here where the keys are the basis states and the values are the number of shops that landed in that basic state. So from this I can. So you can see that as we would expect we're approximately 1550 distribution and the zero zero and one one state which is consistent with what we expect from measuring the bail state. So this isn't exactly 5050 as it's still sampling now you're still flipping a coin every 10, but this is just what we expect. And then I can. I can make this pot here, and you can see, yeah, this is just a graphical representation to show that I have 5050 probability of measuring zero zero one one. So there's a lot of other gates that you can add to your circuit and through a ticket. For instance, you can add these parameterize gates. And so if you're doing one of these variational algorithms when you have these big parameterize circuits you might want to do this. So you specify the parameter value first, then you specify the qubit the gates on. You can also add additional less common gates through this type, you know, you're so I can build a circuit that I can add a multi controlled exit top legates to cubits zero one and two. So you can see this in the diagram here. So this red gates this multi controlled X. So if you're not sure what this does. This applies a bit to the to this cubits, both of these control cubits are in the one state. So I'm, I'm performing an X operation conditional upon the values for two of my curious. So the circuit we've considered so far are fairly trivial. So, perhaps we'd want to consider a more interesting circuit. So let's build a circuit for the quantum free transfer, which I mentioned earlier. This is an important sub routine in many quantum algorithms shows up in shores algorithm and various approaches to quantum chemistry. So this is really what this transformation is doing. And this is this. Sorry, I find this year three operator to my basic state, perform this transformation here. So, and I'm transforming from the computational basis to the period basis. So if you're familiar with the classical discrete free transform, this is almost exactly the same mathematical transformation, but it's just applied to a quantum state. So I have my vector. And what I get is a large vector with where the amplitudes are my three coefficients. So I can implement this circuit and, and take it fairly easily by just adding a bunch of single cubic gates and some control gates here. I'm sure you had to do that. So here I'm going to build a circuit and as I just draw the diagram. So, so it looks something like this. So, yeah, so I apply. So this kind of pattern that the circuit follows. So I apply a Hadamard, the first few bits, and then apply control rotation to the first cubic condition going to the second, and then another control location, then I jump to the next qubit form another control location. So you can imagine this kind of pattern just repeats for larger instances of the constant free transform. So say I want to generalize this, this pattern, and then just write a function, which builds the n qubits free transform. I can create a circuit here with this function. I can then iterate to my circuit and apply a Hadamard on every gate, and then I can for every, for every qubit, I can apply a number of CX gates that decreases by one when I jump to the next, sorry, a number of two cubic gates which decreases by one when I jump to the next qubit. So I have this counter here, and then I subtract this value of this counter so I'm just adding all these two qubits. And finally, this is not that important, but this is just to make the mathematical operation seem nicer. I can just add some swap gates to the end of my circuit. So I'll have a swap between the first and the last qubit and the second qubit and the second to last qubit. And this is just a pattern that makes the unitary operation nicer. So if I wanted to build the QFT for the, sorry, one second, for four qubits, I can just plug the value of four into this function, and then I can draw my diagram, and then we have the pattern that we expect. Okay, so, like I said, the quantum Fourier transform is an example of a subroutine, so it's a part of your quantum algorithm that will appear as a block in combination with other subroutines. And one thing that you might want to do is wrap up this subroutine in a box because if you just look at raw quantum gates, it's often quite hard to tell what's going on. So if I want to build, I can wrap the circuit, I have above here, up into a box, and then I can just append it onto the end of my circuit like this. Sorry, so I can just scroll down. Now I think that's useful to do and take it is to synthesize a circuit to form specified unitary operation. We can just pass a ticket NumPyray with the unitary operation we want to form and take it will automatically generate a circuit to implement that whatever, whatever operation is specified. So for any, for any operation up to three qubits, we can just automatically get, get a circuit for any valid quantum operation that we want. So we can do this with the two qubit unitary box, we can just pass a NumPyray, like I said, and then we can add this box to a circuit, and then we have something like this. So this, this two qubit unitary box performs this fermionic swap gate. This is just an example of a gate that I came up with earlier. So this is just the standard swap gate but introduces a minus sign along with the swap. So it's similar to fermions. So, perhaps this box in that informative so we can like break the box down with this decomposed boxes operation, and then we can find out what's inside. So this circuit, this unitary box is implemented in terms of these single qubit gates and these entangling TK2 gates. TK2 gates are just take its own internal representation, but they're easily converted to more familiar gates that you might recognize. Yes. Okay, so the input to a CERC box is a circuit. So if you're a user and you want to wrap some circuit that you have up into a box and then add it to a diagram for like easier visual interpretation, then that you can do that with CERC box. The unitary box, you pass it. You don't know the circuit in advance, and you pass it non-pirate and it will automatically build a circuit for you. Yeah, so anyone following along the notebooks on GitHub? Okay. Let me know if there are any technical issues following along. So another thing you might want to do is you might want to export circuits from a different format. So one thing that's quite widely used is CASM, which is sort of a low level specification language for a quantum circuits. And I was introduced some years ago, so just a fairly low level description of the quantum gates in your circuit, similar to like an assembly language or something. So if I have a circuit saved as a CASM file, then I can just read this CASM file in and then generate a circuit from that. So I can do this here. I've got my CASM file here, and you can see that this is just a fairly bare bones representation of the circuit here. And then I'll switch back here. It should have a nice circuit diagram in my important circuit. So, yes, this important circuit happens to be just an algorithm called phase estimation. So I'm going to use this later on in the demo. So I won't, don't worry too much about the theory of what this does, but I just have a bunch of single cubic gates, and then I have a bunch of these controlled unit trees again. And then I have quantum and inverse quantum free transport at the end here. So, what this does allows me to calculate eigenvalues of some unitary operator to some chosen position, but that's not going to be important in this talk. So I can analyze the circuit by asking take it how many gates it has so I can just use this end gates property of the circuit. And I find out that I have 21 gates in my circuit, and 11 of these gates are to keep it gates. So it's counting these swaps and these control unit trees. So the number of two gates is maybe important to track your thinking about circuit optimization because at the level of physics they introduced much more error than a single case. So this is perhaps a metric that you want to minimize if you wanted to run your quantum computations more reliably. Okay. And shows how to build circuits is ready for the questions about that parking and get on to running and experiments on simulators. Okay, seems everyone's okay. So, the, all the simulations I've done so far have been totally noiseless. So normally source of error has been sort of the sampling error. But one thing I can do as an alternative to scheduling real device time as you use a simulator that has some physics based noise model of a real device. So, I can connect to this IBM q emulator through packets cascade extension. And I can then construct a noise model that's based on this real device. I think it should be a different one. All right. So this is connecting to the real time device. Sorry, this is an emulator that uses a noise model that's based on the parameters of the real place. So, takes a little to one this one. Yeah, I should say, if you're following along. I think you should be able to execute everything I've done so far, but to run experiments on real devices or use this noisy emulator, you'll need to configure your IBM credentials locally. I've linked to some documentation on that student. Okay, looks like that's finished. So here I've loaded in another phase estimation circuit this one might just be a bit bigger. Here I'm using five cubits to estimate the phase. So, if I look at the connectivity of this circuit, I have all possible cubits interacting with one another as before, like I showed in my slides. And if I look at the connectivity of the device that I'm targeting, I can see that I have this much sparser connectivity graph. And so this is, this is what IBM QG Carter. This is how the cubits are later in this sort of nearest neighbor to apology again. So, before I can run my face estimation circuit on this real device, I have to compile my circuit to match the constraints of the topology. So I can specify this by using this gets compiled circuit function and then just passing my circuit can specify an optimization level. So take it will optimize your circuits by default. But for illustration purposes, I turned it off here. We have 136 CX gates so you can see that compiling my circuit down into the native gate set has really increased my gate count. So I've now got this really, really big circuit here that is too big to get on the screen. So I probably want to reduce the size of this before I run it on the real devices that will be very noisy. So, if I look at the connectivity graph of my compiling circuit after a ticket has solved for the, for the constraints, then I will get, then I will get this sort of inter like nearest neighbor interaction between my cubits. So what ticket is done is it's inserted swap operations to exchange the information around between cubits so that all of my constraints are satisfied. Do people have a fair idea of what these graphs mean is that is that clear or do you want me to go over that again. Okay. So a question. Okay. So I'm going to run the circuit here by executing this command, and then I can draw this graph. So, with phase estimation, this is just the detail of the algorithm that I won't cover that much, but the, if you like right answer in phase estimation is encoded in a single bit string. So here is the expected bit spring that encodes the correct answer that I'm looking for in my algorithm. And you can see all of these other contributions are just noise. So, all of these are introduced by the fact that the low level implementation of the circuit isn't accomplishing exactly what mathematically it's supposed to. But one thing I can do is I can specify a higher level of optimization. And then take it will work harder to try and give me short circuit which hopefully has less errors cumulative. So, you can see if I, I now have, I'm now done from over 130 gates to 52. Two cubic gates. So, this optimized version is much smaller than my original battery. So you can see I've got this much stronger signal for my correct answer. I can get my correct answer with higher probability. I should say that this is not a very realistic experiment. These, this is just a using a noisy simulator so this is just to illustrate that larger circuit tends to introduce more noise. Yes. Yes, the maximum optimization level is two, and that is the default. So, take it will form and if you use optimization level to take it will form a pre selected sequence of optimizations based on the specific device that you're targeting. Take it also allows you to use your own optimization methods which you write yourself so you can either use the default settings for the specific device or you can write your own optimization. So one thing that take it was designed to be able to do easily was to swap between different devices and simulators. So, you might seen already that there's a lot of quantum software out there and if you require specific software to run to run your circuits on real devices and lead to a kind of vendor lock and when you have to use all of IBM's tools to use IBM's devices or all of some other providers tools to use their devices. So, take it is taking like translate circuits to run on many different devices. So, it's supposed to be flexible and allow researchers to explore the different trade offs between different types of quantum hardware. Take it has this very generic sort of back end interface, which just represents a connection to a real device or simulator, so I can just swap out using like two or three lines of code, and then I'm just running the exact same circuit on a different device or a different simulator. So here I'm going to use one of Google's search sampling simulators. So this is just a bit different to the IBM simulators we've been using so far. And you can see that using the exact same code and just swapping out these two lines here, I can just run the same circuits I was doing before on a totally different simulator. So, this is the kind of thing that's designed to be fairly easy and take it. You can see that now my compiled circuit is in the different get set and that's because this simulator supports. This gets natively is far as it is as well as the CZ. Okay, so now I'm going to. So I've shown how to be like use the default compilation so the default settings for optimize new circuits but I'm going to talk very briefly about. How to like customize the optimization if you like. So, there's a lot, a lot more to say on this that wouldn't fit in this talk, but I'll show a brief example, so I can load in this circuit as it hasn't found this is a circuit which is relevant for chemistry so it's a chemical simulation of diatomic hydrogen. So I can load this circuit in here. So you can see it looks like this. And it's also quite large circuit as 150 gates in total, and 56 of these are these two qubit CX gates here. So, yeah, I've got these interesting sort of matter structures going on here. This is fairly generic optimization, you can do and take it is called full people optimize. This is an optimization method that's designed to improve the gate count of most circuits. So what this will do is essentially traverse your circuit and cancel any redundant gate operations but also try and essentially synthesize optimal some circuits within your circuit. So, I showed the unitary to queue box earlier, and this can generate a way to implement arbitrary to keep it operation. So this will essentially do that on different blocks of your circuit, and just apply some other very general optimizations which are supposed to help most cases. So I can import this from the private passes module, I then apply this as an in place transformation to this Jordan Wagner chemistry surface. And I can look at my outputs. So here. So you can see that now I've converted to tickets internal gates. And there's TK one CX gets it. You can see I've really improved my gate here so I was started at 150 with 56 to keep it gates. And now I'm down at 46 in total and 17 of these are to keep us. So I would still need to convert this away from the TK one gets it. Hopefully you can see that this is a very good equipment. Optimizing my sorry. Nothing you might want to do is define what's called a rebase pass. So a rebase pass is just a transformation of your circuit into a gate set which is supposed to be supported by a real device. IBM happens to use this set of gates here. So this early X gates, and this is X gates, this RZ rotation and this control of not the details of this are not that important, but I can use this auto rebase pass, and then pass in my gate set here as a parameter. I can apply that to my circuit. And then I forgot to draw the diagram. So if I draw. So if I draw my circuit now I see that I'm now in the, the IBM gates again after having optimized a circuit. I mean, there's a bunch of other circuit transformations you can do in, in ticket and you can sort of compose them together as you'd like so what you can do is you can construct a sequence pass which is a list of optimizations and then pass those in as a list so you can perform this full people optimize first, and this IBM rebase and then just apply it to my circuit, and then I should get the same circuit, but I could replace these passes with anything and they would rewrite my circuit in whatever way I would like. Yeah, so finally I'm going to talk about working with other quantum software libraries. So as I said, take it has a few like joint functionality with other popular tools like kiscuit, sir, Microsoft's Q shop. And this allows you to use tickets compilation features and conjunction with our tools. So if you want to do your machine learning and any lane or kiscuit and then convert to a ticket and use benefits of both libraries and you can do that fairly easily. So here, I can just import this one function here, take it to kiscuit, and this is just a way to convert it to be two different circuit formats. So if I take this qft circuit which I built earlier. I can convert to a kiscuit circuit manager and applying this function to it so I can then just pass this into my function, and then I've got a kiscuit circuit and there's also a function for going backwards as well so you can translate back and forward between these different software libraries, which is quite useful because yeah there's a lot of different software libraries out there. And so yeah you can do exactly the same thing with Google search for instance so there's an analogous function tk to search, which just takes a ticket circuit and converts it to a circuit, so I can just get my output in the same way by just passing my circuit into this function here. So yeah that's just about wraps up all I have to say for this section. Just as a summary I've tried to give you some idea of the motivation behind a ticket the problems it solves how to construct different circuits with the various primitives we have available running simulations on noiseless and noisy simulators. It's a game for targeting the real device, although we have ran anything on a real device today, and also to perform these different circuit optimizations as well as working along with different other ST case. So yeah just as a reminder you can install a ticket here like this, and we also have some useful life to the API documentation and the notebook examples and yeah you can visit our get help as well. So, yeah, if you want to interact with us and get help or make issues or a little press, then you're welcome. Yeah, that just about wraps up everything I have to say for now. Any questions. No. Yeah. I'm sorry I'm struggling to hear you speak up a little bit. Yeah. Yeah, so this just execute your circuit 1000 times and then measure some samples on each repetition and then from those from those simulations you can gather statistics about the different probabilities in your experiment. Does that answer your question. So you're, you're repeating your circuit 1000 times and collecting statistics because measurement in quantum mechanics is probabilistic so you want to repeat your circuit many times to get some kind of statistical confidence about what your result is supposed to be. So, yeah, the emulators are designed to mimic the real device as closely as possible so they have the same gates, same connectivity, everything's the same except you're running it on a PC or on a server rather than using real device time. But yeah it's supposed to mimic the real device so on a real device you would also repeat your circuit many times and try and get statistics about your, your measurement results. I'm sorry I'm struggling to hear people at the back. Oh yeah, of course yeah. Yeah so are you talking about these graphs here. Okay, and so yeah it's useful to start here. So here I've got this. Where's my circuit here. One second. So if I look at my circuit here I've got all of these two cubic gates which are interacting between cubits here do you see that. So, this is quite a big circuit, but I think you'll, I've got what this graph is supposed to represent is that I have two cubic gates acting between every pair of cubits in my circuit. So, this, this MP for cubits is interacting with this SP cubic here. And all of these cubits are talking to one another. So that is what is represented in this connectivity graph here. So this is what my, how my circuit is connected. And then I can contrast that with how my device is connected. So, this is how the cubits are laid out on the real IBM device. And on my circuit, I have all of my cubits interacting with one another. So I need to insert some swap operations into my circuit to make my circuit valid before I can run it on the real device. So I then compile my circuit. So that's all of my gates are just assigned to specific nodes of the device and I only have nearest neighbor interaction. And then I can see that now my, the graph of my cubits is now nearest neighbor only. So I don't have any more, all of these cubits interacting together. Does that make sense. Okay. So, yeah maybe someone else in the room can answer this question better but yeah we have products that extract uses quantity real quantity which is to generate, generate verifiable randomness, but yeah I don't work in that project. So perhaps Mark or someone else wants to answer. Anyone else got any questions before I wrap up for a while. Yeah, the background. It's different depending on different hardware platforms so on superconducting devices the cubits are fixed nodes in place. So you have to use swap gates to exchange the quantum information around between the cubits. You also need to translate into the native gate set of IBM for instance. So this is different with say trapped times because you can physically shuffle the irons rounds into different gate zones. So, yeah, with iron traps, you the sort of swapping happens at a lower level than the circuit based level. So if you, if you're trying to map a circuit to a real device architecture where you're fixed nodes, you will need to add some swap gates, and also convert to the supported get set with the device. Does that make sense. Yeah. They are directed. Oh, sorry, I'm, I'm confusing two things. Yes, these, these graphs here are undirected. I'm confusing another thing. Yeah. Yeah. How does this machine. So, even though you see circuits like this in the standard sort of gate based model internally ticket stores that as I directed a cyclic graph. And then we have optimization passes which are like rewrites to that graph. So, full people optimized which I showed for instance is just traversing the graph and making local optimizations on the graph. I'm not sure about answers to your question. How does this transformation. Okay, so a high level and ticket splits the routine process up into several stages. So first, it'll try and find an optimal assignment of logical to physical cubits on a device. So if you have the cubits in your circuit, you'll have to be some mapping from those cubits to the physical nodes of the architecture. So this is called a cubit placement. So after the placement is done, a ticket will perform another step where it traverses the circuit, trying to satisfy the connectivity with the minimum number of swaps, once the placement is decided on. So, yeah, those are two separate quite complex problems which ticket has to solve in order to do this. So I think finding the placement is equivalent to a variant of sub graph isomorphism, and then there's, which is a well known NP complete problem. And there's also the process of minimizing the number of spots is equivalent to I think token swapping. So another challenging comment or a problem. Is there a break scheduled or should I keep going into my next. So it's been about an hour since I started take a break. Yeah, you can take a break. 10 minutes. Thank you. Yeah, that'll be totally fine. Yeah, like, um, my section on Grover's I would have this to show it. This one. Then stop recording. Oh, yeah. I was like, I hope we get a pre 30. Yeah, so. I think I think. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. You can actually do multi-controlled zeds with non-fully connected qubits, but you just have to first decompose your multi-controlled zed into single and two qubit gates and then insert swaps from there to sort of exchange the effect. I can maybe show you the compiled circuit, can I? Oh, compiled sort of always happens with live demos. Yeah, so maybe this isn't that informative, but basically all of these, all of these multi-controlled zeds can be broken down into two qubit gates. So then I can just use my usual routine procedure to map this circuit to an architecture of my choice. Yeah, so underneath, so this is this is like what's actually running on the simulator, right? So this is the circuit that I am sending to my simulator to be processed and then it produces this plot. I just didn't show this diagram before. Oh, the connectivity graph. Yeah, I think so. I know for this case that I haven't, I haven't passed a noise model. This is just an ideal simulator. So this specific simulator doesn't have connectivity, but I could use another simulator that did. So if I show you the connectivity graph, none of these optimizations are done with connectivity in mind. But if you replace this air backend, if you either give it a noise model with some graph implicit in the noise model or a more realistic simulator, then you will see some nearest neighbor only. Thanks. Okay. Still got a couple of minutes. I'm happy to wrap up there though. There's no more questions. Okay. Thanks for your attention. I hope you got something of this and I think your next lecture is on ad battle algorithms. So enjoy. Thank you. Yeah. Hi, do you all hear me. So there is a small change of plan. So what we're going to do is instead of taking the shuttle slightly later for the recession, we're going to take the shuttles now to go back up. The last lecture will be again at the blackboard. Okay. And from there, they will be the welcome reception on the main terrace of ICT. Okay. So wait around again at the entrance of this building and the shuttle will bring you up. If you want to walk your welcome but otherwise just wait for there. I'll bring you up and then the course will start in half an hour or something like this. Okay. In the same room as this morning. Okay. Okay. Okay. Okay. Okay. Okay. Okay. Okay. Okay. Okay. Okay. Okay. Okay.