Hello Quantum Village people. It's great to be here. So I'm Mark Jackson and this is Catherine Spendier and we are the Quantum Evangelists. That's actually our title at Quantinium. How many of you have heard of Quantinium? No? Okay, good. So Quantinium is the recent merger between Honeywell Quantum Solutions and Cambridge Quantum Computing and so we're one of the largest quantum computing companies in the world and we're very proud to be here taking part in the world's first Quantum Village and Quantum Capture the Flag competition. So there are three parts to what I want to talk to you about today. The first is just what is quantum computing because I think a lot of you based on some of the discussions that we've had here in the back don't know what quantum computing is and how amazing it is and and what it's good for even. The second part is going to be about Ticket which is our software development kit and and it's open source and it's free and it's available for anyone to use and in particular it's the basis for a lot of the challenge problems that we have set for Capture the Flag and there might be hints and things in there and so I'll talk generally about what Ticket is and how it can help you and then Catherine is going to take over and she's going to go through some examples and then this might be useful for some of the Capture the Flag type challenge problems. So that's what we have today for the next hour or so and tomorrow my colleague Thomas over there in the back he's going to be talking about quantum natural language processing and things like that. So let's get started. So why all this fuss about quantum computing? Why do we go to all the bother of building quantum computers like you just heard about from Oxford Quantum Circuits? It's not just because quantum computers are a faster computer. That's not it. It's because we think they will be able to do things that we never ever could have done before and a prime example is in chemistry. So there on the upper left-hand corner this is my favorite molecule. This is caffeine. It's not an especially large molecule. We know what the equations are. We've known for a hundred years what the equations are to simulate this on a computer. The problem is that if you put this on a computer it would need to be about the size of the earth to do this. To figure out the chemical properties of caffeine if you wanted to put this on a computer. And if you wanted a larger molecule like penicillin there it's not even theoretically possible. You would need a computer the size of the entire universe to do that. So clearly normal computers have a lot of problem simulating molecules and figuring out chemical properties. Now in contrast quantum computers can do this with a very modest number of qubits. So a qubit is the basic ingredient in a quantum computer. It stands for quantum bit and we spell it there with a Q. And as you've just heard we're talking about building quantum computers with thousands or hundreds of thousands or millions of qubits. So just try to think about that for a second. That's how powerful quantum computers are compared to normal computers. The amazing thing is this is not science fiction. We actually have quantum computers. So you've just heard about one from from OQC using superconducting technology. And this is a technology used by IBM and Google and several others. We have one at QuantiNuon which uses ion trap technology. There's a photonic approach and there's many others. So we don't just have one method of building quantum computers. We have several. Each of which has advantages and disadvantages. There's no obvious winner yet. I'm sure every person in this room has heard of Moore's Law. So we have seen over several decades that computers have doubled in power roughly every 18 months or so. Quantum computers are in a much faster trajectory. So this top line here this shows the progress made in what's called the quantum volume which is kind of an estimate of the power of a quantum computer. And we've been able to increase this by a factor of 10 every year. So because of this we think that we will have commercial applications in as soon as three years. This is this is not 20 years from now maybe they'll be useful. We think in just a few years companies will be deploying quantum software to solve real world problems. So this is why we're so excited about it. And this is why we're here today to get you programming on quantum computers. This is what a quantum program looks like. I've had many people come up to me and ask well I'm a programmer how can I start programming quantum computers. It is completely different. The whole logic behind programming quantum computers is based on quantum physics. And so this is how we do it. I know it kind of looks like a child's game or something but every horizontal line represents a qubit. Every colored block represents an operation on the qubit. So we initialize them and then we do all these operations and we put the qubits in what are called superpositions, which means they exist in two different configurations at the same time. Or entanglement, which means the value of this qubit depends on the value of this qubit even if they're separated. And this is a purely quantum physics effect. And then at the end of the calculation we measure the qubits. We force them to choose. are you zero or are you one up until then it's in this weird quantum state and that's what a quantum program does it mixes them all up so that the correct answer pops out at the end and the wrong answers get diminished but we don't get to find out what it is until the very very end this is what we think we can do with a quantum computer these are some of the applications and I want to mention this is probably a very incomplete list there's probably going to be some very smart young person who thinks of some killer app that we never would have considered before but some of the things that we have thought of already are chemistry like I've talked about being able to simulate much larger molecules and figuring out what their chemical properties are and this could be used for material science and it could be used for pharmaceutical companies when they design medicine we could have things like supply chain scheduling and job shop scheduling and things like that trying to find the optimal value of something obviously there's a lot of financial implications because a lot of banks have trading algorithms based on machine learning and so quantum machine learning is becoming its own subfield so there's now a lot of quantum machine learning algorithms that especially financial institutions are employing for more efficient trading and then finally cybersecurity and given the audience this is probably the one thing that you know about quantum computing it does have the capability to undo a lot of forms of encryption maybe not today but at some point in the future and a lot of groups and government agencies are very aware of this and are already taking precautions about that so what do we do when we program quantum computers so at the very top level of the stack we have applications so these are things that companies or individuals want to solve so these are real-world problems these in turn depend on quantum algorithms so this is the just like a normal algorithm so these are kind of recipes that people have developed but they're completely quantum so we would have to sort of figure out what the problem is and swap out the classical part and replace it with a quantum part these quantum algorithms depend on ticket so ticket is the software development kit and the compiler which interfaces between the different algorithms and either the hardware or the simulator that you use because quantum computers are still pretty expensive and we don't always have easy access to a quantum computer so oftentimes we still use simulators to do this so uh so this is why we've developed ticket we've spent several years doing this last year we made it open source it's really the the liaison between any type of quantum computer you have and any type of algorithm and it's becoming increasingly popular as of last night we've had almost half a million downloads so so again we've spent eight years developing this it's now open source it's a very widely used tool not just a continuum of course but all across the quantum computing field we support nearly every quantum platform so pretty much every quantum computer that you've ever heard of is on this list of including Oxford quantum circuits you see there at the bottom there are other compilers and SDKs but ours is by far the most universal and we've also put a lot of emphasis in having ticket make the most efficient execution of your code because especially nowadays when we don't have that many qubits and there's still a relatively high error rate you want to be sure to get the most power out of your software how does it do this how does it find the most efficient way to run your quantum software on any computer so there's two components to this the first component is optimizing just your quantum program or circuit as we call it and this has nothing to do with the hardware you're running it on it's just your program itself the second component is specific to the hardware you're running so as you probably figured out all these different quantum computers they have different idiosyncrasies they use different technology the qubits are connected differently they have different error rates there's a lot of differences ticket is aware of all of that so that you don't have to be so ticket will take all of that into account and find them the best way to run your program on that hardware that you've chosen so to focus a little bit more on the first part here when you want to when you run your program you want to use as few operations or gates as possible because every operation takes a little time and it's another source of potential error and so what it will do is it will first go through your program and it will look for certain combinations of gates and it will try to find a simpler way to express that so mathematically your program is untouched it's identical to what it was before but there might be a simpler way to express that the second part is more macroscopic it looks for larger patterns and again it tries to just find a simpler way to do that so here are some examples so these are combinations of gates that ticket will look for and so you see that these are kind of little sub components of a larger Quantum program the simplest one up here is the upper left hand corner so that's two CNOT operations in a row so it means so it's actually entangling these qubits twice the funny thing is is that this actually one operation undoes the other so even though you have these two operations they actually cancel each other out leaving the qubits untouched so if ticket sees this it just removes those two gates which means your program runs a little bit faster and it's a bit more likely to make an error these other replacements are less obvious but if you're curious I published the scientific article here explaining all the mathematical Theory behind this so once it does that then it moves on to the constraints for your hardware so it takes into account how the qubits are connected it takes into account the native operations on that computer because these aren't necessarily the native operations that you would use in your program and then some computers including ours have what's called mid-circuit measurement where it can actually measure a qubit and use the result for the rest of the circuit to continue and so ticket knows all this for you and it will take this into account so here are a few examples so these are three quantum computers by three well-known companies they all use superconducting technology so they have something in common but you see that the way that the qubits are connected is very different and these are these are superconducting physical qubits so they're locked into place there's nothing you can do so ticket knows this and it also knows that the the basis Gates so the native operations on that platform are very different so ticket will automatically do the configuration to map your qubits on your program into those and to map your operations into those so for an example of how important this could be the circuit on the right hand side this is a typical circuit you'll notice that it has five qubit couplings so the two qubits they're entangled with each other as well as the top three so there are some five qubit couplings we say the machine on the left though by IBM it has at most four qubit couplings so naively we might think there's no way to run this program on this computer that's not true we actually can do that but we have to be a little bit clever about it what we have to do is something called routing so we have to move the information on the qubits around and this is a perfectly legitimate application we do it using something called a swap gate and you can do that by introducing the CNOT Gates as shown here but of course remember what I just said adding more Gates is what we don't want to do we're trying to make the program smaller not larger and so ticket will do this routing but only as it needs to to make your program work and again it has a built-in heuristic optimizer so you don't need to do anything ticket will figure this out for you obviously we use ticket internally for our own application development but many many other groups use it as well IBM uses it Google uses it even CERN the physics lab in Geneva they use it and these are some of the articles which they've written there have been many benchmarks done studying ticket compared to some others this is an independent group called Arlene and they show that in almost every case ticket will make your program run faster so so we are constantly updating it and as I mentioned last September we made it open source so it's free there are no licensing restrictions every line of code is available for you to download and inspect if you have a clever idea for how to improve it and make make the optimization work better you're absolutely welcome to contribute if you happen to have a quantum computer in your backyard and you want to write your own extension so that people can run the software on your machine you're absolutely welcome to write that extension and and people have done that we have a lot of exciting things coming up so right now you download it from GitHub and you run it locally but a future version will be on the cloud and and this will be necessary as programs become larger and more sophisticated you'll need to access things like like my Azure and AWS to do the compilation and such so this is how you download it if you'd like to take a screenshot I would encourage you to do so so this is the GitHub repo it's uh it's completely straightforward so that's how you would do it there are some examples and notebooks and things to help you get started Catherine is going to talk a lot more about that in a second um and so now Catherine is going to talk about ticket in more detail and she's going to go through some examples of how you can get started and learning to program and again this is a fantastic opportunity if you've ever wanted to learn quantum programming I would encourage you to do so we've set a lot of challenge problems up some easy and some less easy and and we'll have a prize at the very end and and we'll actually keep the competition open uh even after Defcon is over to encourage people to do that so uh so with that I'm going to hand it over to Catherine thank you Mark hello okay great okay it takes a little bit of time to connect okay great so hello everyone so I am here to help you get started um the CTF right so how many of you have now logged into and signed up for the CTF okay few of you great awesome so please do so go to Quantum Village sign up for the CTF and you are able to try out the first time probably to do a quantum circuit and how to code it and then play around with it so I'm here this weekend I'm gonna be your ticket point of contact and for the ticket specific challenges please find me I'll be in the back there and I can give you specific technical guidance on it okay so um so first of all um as Mark really I mentioned um ticket is kind of like the liaison between the hardware and different Quantum languages you have for example kisskit or Cirque or so on and then we can access different Hardwares with ticket for example the oqc which are here today so if you can do this this will be great so anyways to get started with ticket what you have to do is you have to first of all have your Python environment set up I would suggest you're 3.9 or 3.10, if you set up the Python. Then what you want to do is you want to do a bib install by ticket. So sorry, I apologize. Here it is a typo. I'm going to take this out right now. So you want to do a bib install by ticket. This is going to install the latest version of by ticket. I think it's 1.15. Then if you want to start doing a quantum circuit in by ticket, what you want to do is you want to import the circuit class. And then you want to define your circuit. And you do a circuit with the number of qubits. There is going to be a challenge questions in there. So go look at the information about how you do circuits in by ticket. And then you can actually, one of the multiple choice questions is going to be on this. So maybe I should expand here a little bit on it. So you have ticket, which is the compiler, the quantum software development kit. And by ticket is the Python language package for you to use. So ticket is pretty much the C++ that goes into the by ticket. So in any case, I will use it kind of ticket and by ticket interchangeably. So make sure that you understand that by ticket is just a Python package. So any case. In any case, how many of you know what a qubit is? OK, some of you. OK, good. So you have a classical qubit, right? A classical bit with a 0, 1. And a qubit is typically something that is on a Bloch sphere. So how many of you know what the Bloch sphere is? A few of you. OK, so maybe I should show this. I figured I should probably have a picture of a Bloch sphere. So this is a Bloch sphere. And typically on a pole. So you have the state in this base, the C basis, which is a 0. And the 1 basis, the C basis up is a 0. So imagine you have a vector pointing out that would be 0. And a vector pointing down on a Bloch sphere, that would be 1. And in quantum computing, what you have, you have a vector that can be in any of these positions on this Bloch sphere. It can be up, down. It could be on the x or y-axis. But you can have it in any face, anywhere on this Bloch sphere. So this is the very unique thing about quantum computing. You just don't have 0 and 1. You have all the states in between. And that makes quantum computing super cool. So when you are doing quantum computing, what you're doing, more or less, is you're starting with a state in your Bloch sphere. You are maybe initializing it to be in a 0 state. And then you apply quantum computing algorithms or code, like your ideas. And then you start to rotate your state on this Bloch sphere. And then eventually, you're going to measure it. You're going to measure the state on this Bloch sphere. And that's then your output. But you cannot only do it once. You have to do it many, many, many, many times. You have to do it 1,000 times in order to get your answer, or more than that, because it's all probabilistic. So quantum computing is a probabilistic idea. It's not just deterministic. So you have to run it many, many times. So in any case, what you do when you do a quantum circuit, you play with this vector on a Bloch sphere. Right? You're like, swishing around, moving around, do your computation, and then eventually, you're going to measure it. You're going to measure the values of your Bloch sphere. Anyways, I don't want to give too much away. But you're going to have to learn the Bloch sphere. And you're going to have to learn how to do vectors. And you're going to have to know what a vector is, the absolute value of it, in order to measure it and understand what the value is of a qubit. So this is going to give you a way that. So yes. Yes. So this is what I want to do. So in any case, the understanding now that you're on a Bloch sphere, what you want to do is you want to develop a circuit. Right? So you have a circuit class. And then what you want to do is you want to start to rotate the circuit. So you want to rotate your vector. Right? So for example, you have different types of gates. So you can have an Rx gate, an Rc gate, an x0 gate. And each of these gates does something different. For example, the Rx gate has a x0 gate. And it's the x rotation of an angle pi on the Bloch sphere. It's just imagine a Bloch sphere again. And then you would start at a 0 state. And then you would rotate around the x-axis by an angle of pi. Right? So it's all rotation. So you can also rotate about the c-axis and x0. This is a gate. And I'm going to show you a circuit soon where you actually can connect the qubits. So here I'm connecting and entangling two qubits. I'm entangling qubit 0 and entangling qubit 2. OK. OK. In any case, this is how you compare a circuit. Then you can measure your circuit. Because in quantum computing, if you don't measure your circuit, you have not accomplished what you wanted. So you have to measure your circuit. You also make sure that this is in your code when you do this. So here now, I'm showing you a circuit which I just made. So initialized, it's a three qubit circuit. The first qubit, we rotated around the c-axis by a quarter of pi. Here, we rotated around the x-axis by pi. And then here, this is your x0 gate. So we're connecting qubit 0 and qubit 2. These are now entangled. So this is a very simple circuit, right? You can explore during the CTF. You're going to be exploring more and more complicated circuits. And then what you see here, what Mark already said, so this is one of these horizontal lines are your qubits. And then you have your classical register. So what is the idea of a classical register? Why do we need a classical register? Right. So we have to measure the state of a qubit. And for that, we need a classical register. So when you're in any kind of language, doesn't matter if you use ticket, you use circ, or you use Qiskit, you're going to have this measure function. You're going to have to apply it to your circuit, OK? And then to do that, then eventually, you're actually able to read out the state of a given qubit in your classical register, OK? So this is what this little measure button is, what it shows you. And now you know you measured your system. So now, how do you run a circuit? So this, I showed you how to develop a circuit. You can do only kind of different gates. Again, I would, for the CTF, I go out there and learn about what different gates do, right, on your block sphere. Learn about, what does a Hadamard gate do? What does a CX gate do? And so on, right? So learn about this. And make your circuit. You can run circuits depending on the challenge questions. Then how do you run a circuit? So there's different ways of running a circuit. First of all, what a lot of people are doing is you're running on simulators, right, classical simulators. But you can also run it on the back end, OK? So if you want to explore, so we have our Lucy available for you, right? So you can try to figure out how to run circuits on Lucy, right? Or how many of you have heard about IBM? Some of you? So you can, for example, set up an IBM Q account, right? And there you then have access to their back ends. So anyways, you can do simulators, or you can do back ends just like Lucy or for IBM. Or you can use Azure. How many of you know Amazon Bracket? Some of you. If you're interested in accessing quantum computers through Amazon, you can also set up a Bracket account, OK? And then Microsoft. Azure has also access for you to quantum computers. So just check out. So IBM Q, Microsoft Azure, they all have access. But today, I would tell you, please, try to get access to Lucy. I know Lucy is on some of them, too, right? One of the, I think, Bracket and Azure, I believe so. But you have access to Lucy today, so please do that. Anyways, if you want to do that. If you want to get a hold of IBM, for example, then what you would install, you would install, bib install, by ticket Qiskit. So by ticket can go with Qiskit, by ticket Cirq, right? By ticket Bracket, by ticket Azure, by ticket OCQ. This is how we get the different back ends. So this is the call you want to look for. And I will show you then a little bit of a documentation where you can go and explore. Anyways, then you have to do different extensions. You have to do. You have to do a little bit of coding here. And here, right now, we take the air back end from IBM. This is simulator. It will simulate your circuit, right, how you can run it. So anyways, you run this code. And then you can simulate your circuit. In this case, I simulated it. So here, you have the number of shots. So you can do it a couple of times. So maybe it's too much. Let's do 2,000 shots here. OK, we're going to try to implement our circuit we made, right? So it's a circuit. What are the outcomes, right? Each of these qubits could be a 0 or 1, because we're measuring in the C basis, right? So the qubit 0, you could have a 0, 1. For qubit 1, you could have a 0, 1. For qubit 2, we could have a 0, 1, right? So your measurement could be 0, 0, 0, 0, 1, 0, 0, 1, 1, and so on, right? You still have so many different, you have three to the n different, two to the three different options, right, you can have. So the two to the three is how much? Eight, OK, good. So you have eight different solutions you could have, right? In any case, you can run this now. And go ahead, and in this case, when you run it, so I'm going to do 2,000 shots, if I can read right. I run it, and now we'll see it takes a little bit, I think. No, and then we do print counts. So now you see, right? So this specific way, this circuit gave you 1,000 shots for 0, 0, 0, and 991 shots on 0, 1, 0, right? So if you would go in here now, I'm just playing around, because we can do that, right? So for example, we can do another one. What have we not done? Let's put a Hadamard gate on qubit 2, just for fun. So we go up here, and then we're going to do here, we're going to do a circ, oopsie, a Hadamard gate, and we're going to put it on qubit 2, right? So now I'm going to run it. So here, this is a way of output. Now we're going to render it. You do a circuit mesh here, all. OK, so here now, you see what happened. Did we see the Hadamard gate? Oh, I probably have to, sorry about this. I probably have to just run it again. Let's run it again. OK. So you see here now is the Hadamard gate. It's right here, right? So we have added the Hadamard gate. So after we did the rotations, and we did the x0 commissions, entangled qubit 0 and 2, we then applied the Hadamard gate. So that's what I want to tell you, too. When you do these circuits, be careful how you code the gates, right? Because they're going to be added along on your circuit, right? So even though we wanted to maybe initialize the Hadamard gate at beginning. We can do it the other way. You have to be careful about the sequence you apply a gate. OK, that makes sense? So for example, if you would want to do the Hadamard gate here at the beginning, you would have to make sure that it's one of the first calls in your circuit class. OK, anyways, so now we can run this circuit again and see if we get a different outcome. See, now we've got a total different outcome, right? We added one gate, the Hadamard gate, which puts the specific qubit into superposition. So a Hadamard gate, what it does, it puts the qubit into a superposition between the zero and the one state. So we have the 50% chance of being in a one state and the 50% chance being in the zero state. But now just looking at the program here, you now can see we got more answers, right? So more qubit. So we have a zero, one, zero. With 500 shots. Zero, zero with around 500 shots. Zero, zero, one with 475 shots. And zero, one, one, one with 472 shots, right? Typically, these simulators have seeds. So depending on which seed you're using, you may get the same answer. But a different seed, you get a different answer, right? So be also aware of that, that seeds are very important to choose from. Anyways, what I haven't done here now, we could run this on a backend. But in order to run it on a backend, you're going to need an API. Right? You need some account information. You need to have an API token. And then you can code that in. So if you have question about how to do that, you can go and just Google buy ticket manual, OK? So it's very important for your CTF. Go online, Google buy ticket manual. And there you can go through, and it will tell you about how to construct a circuit, right? It goes through everything, how you construct a circuit. My mouse is super sensitive. But it's all right there. So for the CTF, I suggest go to buy ticket manual and go ahead and do that, right? The other one is, so as Mark mentioned before, Honeywell Quantum and Cambridge Quantum Computing, they merged, right? So all the ticket tutorials and ticket documentation, a lot you're also going to have. You can find on the CQCL GitHub page, OK? If you go there, you're going to have buy ticket. You can click on examples. And here, you're also going to have some pretty neat examples, circuit analysis, circuit generation, compilation, how to run a different backends, OK? So everything is out there for the CTF, for the ticket examples, right? You learn how to go between Qiskit and Ticket, between the IBM Python language Qiskit, and how to go to Ticket, right? You will learn how to compile to different backends. You will learn how to optimize circuits, turn to CTF, so stuff Mark mentioned earlier, OK? So any case, here's the technical part of it. Look at this. Look at the buy ticket examples. Go to the manual we have for you available online, and then work it out, OK? Make your first quantum circuit. Play around with it. Use a simulator. It is up to you to now create and have fun with this, OK? And find me. Happy hacking. Want to say something? Thank you. Thanks. Thanks. No worries.