 Let me welcome the next speaker, Matthew Trenish. He did a keynote on quantum computing, and he works for IBM on QIS kits on quantum computing as a senior research engineer. A big round of applause. Thank you, Matthew. Thanks for that introduction. So today, I'm trying to run a workshop on getting started with quantum information theory of quantum computing using the QIS kit SDK. This presentation's a dupe. I've got a mix of little slides with some diagrams in it, but most of it is going to be in a Jupyter notebook. If you click that, if you go to that link there, which is just my GitHub QIS kit dash workshop, there are some links you can. All you need is a web browser to run this. There's a link off the read me if people want to follow along. Or if you happen to have Jupyter notebook in Python 3 installed locally, you can also run it locally on your laptop instead of a web-hosted version. I also believe I have the link in the notebook, but I figured that is a much shorter link. So I'm going to leave this up on the screen for a bit. I don't know who wants to follow along with me on their lap. Yes? OK, well, we'll be cloning this. Yes, this is the GitHub repo. You can clone it. And in the read me and further down, there's a link to, I think, the services Google collab. It's Google's hosted Jupyter notebook environment, so you don't need to run anything locally. So if people want to follow along now, they're more than welcome to. I only see four people with their laptop out, so that's fine. But if are the people who do have their laptop out intending to follow along, I can wait for you to get everything set up or I can just dive into it. Sir, what was that? OK, well, that's the thing is you just go to that link and there's another link on the read me to just run it on a web browser. You don't need anything local. You just need a Google account if you want to. Yeah, yeah, there's no rush. And I realize my name is very difficult to spell, so I wish there was a good format to send this out ahead of time. People are good or need to keep waiting? OK. So the first thing you need to do, these are just the instructions I was talking about before. That's the longer link to Google Cloud, but if you go to the shorter link, it links there as well. The first thing you need to do is if you're running in Google Cloud or you've never used QuizKit before is to install it. If you just uncomment that first pound sign and run this command with Shift Enter, it will install QuizKit locally. And I don't need to do that because, obviously, I have it installed locally. But also, while people are installing it, it takes a few seconds to pull from the internet. I just thought I'd give a little background on what QuizKit is before we move along for those who might not have been in my presentation yesterday as well. These slides are exactly the same. So QuizKit is an SDK for dealing with what are called NISC devices or NISC computers, which just means noisy intermediate-scale quantum computers. Those are quantum computers that exist today and in the near future, like the next decade or so, where they have a small number of qubits, like around 100 or less, maybe a little more. And they're not fault tolerant, which means that noise and errors affect their operation. It's an Apache 2 license project, and it's designed to be back-end agnostic. While it does include out-of-the-box support for IBM's quantum devices and some local simulators that are packaged with it, it's written in a way that if you have your own quantum devices or your own simulators, it's easily adaptable. It designs abstract frameworks for dealing with quantum computation. And like a lot of, well, that's completely legible. I apologize, like a lot of open source projects, it's made up of different components. In QuizKip, they're all named after the classical elements. So in the center there, we have the Terra component, which is the base. It's a Python interface to interface software with hardware, so it lets you interact with actual quantum devices or simulators. And that's the one we'll actually be spending most of the time with today. Then there's the Air component, which is a high-performance C++ simulator that also supports noise modeling. On the top, there's the Aqua component, which for typical software development is the one most people will probably be interested in. It provides a Python library interface, so you can just call a Python library, you give it data, and it will do the quantum operations under the covers and give you a result back. And then there's the Ignis component, which, as I said, the current quantum computers and the ones that QuizKip is designed to work with are not fault tolerant and have a lot of noise. The Ignis project is there to help deal with that noise. It lets you characterize it and try to do statistical mitigation techniques. And the component we're going to be spending most of the time on today in this workshop is called Terra, which is the base layer for interfacing software with the quantum devices. It provides an SDK for writing quantum circuits. It's like a DSL and Python that lets you define a quantum circuit and build it up, and then you can send that to a device, you can draw it, you can do all sorts of things with it. And then it also lets you compile those circuits. Each quantum device has its own characteristics, certain ways the qubits are aligned, and other things that you need to factor in when you're trying to run a circuit on a quantum device. And Terra will compile those circuits so it will run on the actual device and hopefully do it efficiently. And it's written in Python. So assuming everyone was able to do the first step and install QuizKit without an error, is that good for people who are following along? I don't know how many are. The next step is to just check it by just running this one and it imports the version. The next thing people want to do potentially is scientists. Resolution is so low it's hard to read, is to sign up for the quantum experience. This enables you to get an account and submit jobs to the publicly accessible IBM quantum computers. You don't actually need to make a separate account, there's a single sign on. If you just click that link and you'll see this is a picture of what it looks like, you can make an account or what I actually do, I work for IBM but I just click the GitHub link and it just works. So you get an account from that. And once you make an account, you can click that link to get credentials. And once you get credentials then we can continue. I'm going to run this because it takes a little bit of time with the network traffic. But since I already have credentials saved, I don't need to do this step. But if you do, you just want to comment out this line and follow the text that I wrote in the notebook and you copy the API token from the instructions and you put it in that string where it says my API token and that will work. But since I have mine saved locally already, I can just run this and it's going to list the quantum computers I have access to. Which in this case, there are three of them. Two five bit quantum computers which are QX4 and QX2 and then one 14 qubit device which is misleadingly labeled 16 because physically exist. All three of them are in Yorktown Heights, New York at the IBM Research Lab there. Okay, so we are going to connect it to remotely or? Yes. We are going to run a simulator. So the workshop is all going to be run locally on the simulator for time because there are three quantum computers and however many people sitting here trying to run jobs on them and there's also everyone in the world has access to them. But it's just, there's a unified API interface. So it's like a cloud API and you submit your jobs to it and then it's like an old school HPC cluster where it's shared time batching. But we have access to the Q4, Q2 and Q16, Qbit 16 machine. Yeah, so you have access to all of these. The Q16 is actually a 14 qubit computer, not 16 because two of the qubits failed. So they just disabled them but for the workshop we're going to be running everything locally on a local simulator or if you're using Google collab you'll be using it on Google's computer and that's just for time reasons. I believe if I scroll down, I think I put it. Yeah, right there I say. So in the workshop if you're following along there are these back end SIM strings which is the variable I use for this local simulator. If you just replace back end SIM with back end it will run on one of the quantum devices which is something I do in a second. Are there any other questions before I move on? Yeah. Some kind of grid. Some kind of grid. That means you have three computers in the back end but you can't end up in any one. Oh no, you specifically pick which one because they all behave differently because they're all noisy. So they have individual characteristics that you have to build the circuits for which is what I was saying Tara does during the compilation step. So you pick the specific one you want to run on which is going to be two or three lines down. So let me just run this one and it'll give you a better picture once network traffic is fun. By the way this is why we do everything on the local simulator for this workshop because if everyone has to wait for the network to and this is just querying the devices to get their information. We're not actually submitting the job I'm just asking all three devices what are your characteristics? What are your back end properties? This is the fun part where we wait. Okay there we go. Oh and this is gonna be really fun with the 1024 by 768. So this is the 14 qubit one and that's called the coupling map which shows the relationship between qubits that you can run multiple operations on. So each dot is a qubit and then the line between them means there's a way to run two qubit operation on them so you can run like anywhere there's a line you can run between those two nodes and then you can see there are 14 qubits there and it says there's zero jobs I think the network is running late and then it's the least busy and it's operational and then these T1 and T2 are time parameters for decoherence they're two different ways that your quantum state decays and those are the times you have until that happens on average between all of the qubits which is not very long if you know 56 microseconds is not that long but then we can compare it to another one which in this case is IBM QX2 which is a five qubit device you can see the coupling map is very different the number of qubits is very different and all of the parameters are also different and then the other thing the other back end characteristic I wanted to show was this one and so we're gonna sit here and wait for the HTTP traffic to go back and forth again and this shows the this is going to show the details on the IBM QX2 device which was that the one I just showed they're very similar in this level yeah so IBM QX2 is the one on the screen right now and then QX4 is just the other five qubit one and it looks very similar but the time parameters are different and here we can see the QX2 so we can see more details here so we can see that there are certain types of quantum gates that run on it which is something we'll be talking about in a minute says it's not a simulator it has a list representation of that graph the number of executions you can run in a single job things like that but then there are more details so we can see the individual error rates for each qubit and the coherence time parameters for each of them and we can see the error rates this resolution makes it's a very low resolution projector so it's all overlapping but on that one you can see the error rates for two qubit operations which is something we'll also be talking about and then here is an error map where you can see the error rates for the qubits relative to the coupling map which actually helps you figure out how when you're going to run something on this which qubit you want to pick and then the job history is just the amount of jobs I've run on this in the past so that was just the back end aside to give people some time to sign up for the quantum experience if they wanted to because the real fun of this is not to play around with it in a simulator but it's actually experiment with the real devices and I wanted to so the bulk of the time in the workshop is going to be on showing the basic concepts of quantum information theory through QuizKit and in Python code in this workshop but before I got into that I wanted to show the slides again from my presentation yesterday because it's very graphical and it helps people think about what a qubit is and we'll try to relate to this so the easiest way to think about a qubit is with the block sphere which is that sphere right there and you can think of the state of a qubit at any time as that orange vector and it can be anywhere on the surface of the sphere so you and when you perform operations on a qubit you're just moving that vector to a different position on the sphere and just like a classical bit it can be at the zero state or the one state and you don't really have to worry too much about that notation it's called brocket notation and in this it just means it's a vector which it is because it's pointing up or down and when you're ready to read the value out of a qubit that's called measurement and you'll get a zero or a one and what will happen is it will collapse up or down it collapses up it's gonna be a zero and if it collapses down it's going to be a one and this measurement is irreversible so you can have that arrow pointing anywhere along the surface of the sphere but when you measure you get a zero or a one out and that's the only information you'll get out of the system and you perform operations on a qubit by using quantum logic gates which I talked about before there are a lot of different logic gates they do all different types of rotations the example I have there is called the X gate or the quantum knot gate and it's the most simple one and it's just a, you can think of it as a 180 degree rotation around the X axis so in this example if you start at the base of state zero which a freshly initialized qubit always starts at that zero because it's the ground state when if you run an X gate on that it just becomes a one because it rotates over the X axis and points down two things to keep in mind with quantum logic gates though is that they're reversible and which means you can go either way and they're also represented by unitary matrices which is a special type of matrix if you're not familiar with linear algebra you can read the Wikipedia page on it but I mention that because all quantum logic gates are represented by unitary matrices and all operations are matrix multiplication so you have a vector for your quantum state with all of your qubits and you multiply it by this unitary matrix and you get your output vector state and that's the most common way that people actually represent these logic gates they don't draw these spheres and rotate with arrows they just do a matrix multiplication so now we can see this in practice so the first thing we can do in quiz kit is this line here which just gives us the simulator we're just setting that up but we can build a quantum circuit and a very simple one of that so this first one is just going to give us one qubit and then one classical register to store it which are these two lines here so we say give us a quantum register with one qubit and assign it to the variable Q and then we do one classical register one classical register with one classical bit and we label that C we define a circuit with Q and C for the quantum register and the classical register and we just measure we run that operation and what we're expecting is because it's a fresh qubit and we're not performing any we're not running any logic gates on it it should always be at that zero basis state which is represented this doesn't even fit on the resolution so we can execute this circuit and then look at the amount of results we get so we always get a zero we run this circuit 1,024 times because quantum qubits are probabilistic so they can behave randomly and that's expected but there's also noise in a real quantum computer and we want to account for that by running things multiple times to so we can look at the statistics over time even if we encounter an individual error so whenever we do execution we'll see numbers like this and I think for this workshop I do all 1,024 and maybe a hundred in a few spots but it doesn't really matter and then we can also graph it because everyone likes pretty pictures and in this case it's 100% of the time we get a zero and then we can look at the quantum knot gate which was that first gate that I showed and in this case we do the same setup so we get a quantum register with one qubit a classical register with one classical bit to store the result, the zero or the one on the output and then we define a circuit with those and then in quiz kit the way you run the x gate is you just apply the you just run the method x on the quantum circuit object like right there and we say we're going to run that on quantum register bit zero and then measure and then we're going to draw that circuit to see what it looks like the actual circuit representation which is just x gate on qubit zero and then measure are people able to follow along? is this also legible? okay and then what we're expecting like before is to always get a one instead of a zero because we apply that x gate so this is just the qubit for that and the same thing before we're going to execute on the back end simulator and in this case we're only running it 100 times these circuits are so small it doesn't really make a difference because things are going to be fast and then we're just going to print the counts and here we get 100 times 100% because we get it 100 times and then we can also graph that and we get 100% of the time this is really low resolution so there are the next thing we're going to talk about is called superposition but before we get into the details on that I just wanted to mention there are two fundamental properties to quantum mechanics and quantum computation that really give you which are going to be basically all like hover in this workshop but it should give you a basis to understand why quantum computing is different and and those are superposition and entanglement and if you look at them superposition is the property that a physical system in a definite state can behave randomly in the case of quantum computation it means you can prepare a qubit identically and even though it's identically prepared it will give you a random result the second one is a little bit more abstract and that's called entanglement and that's two systems that are too far apart to influence each other can still behave in a way that while individually random are correlated and I know that's a little weird to think about and hopefully later in the workshop I'll be able to demonstrate that a little bit more clearly but it's these two properties that really make quantum computing special because it's relying on these quantum mechanical effects and the first one we're going to talk about is superposition because it's a little bit easier to wrap your head around people have probably heard of Schrodinger's cat you know the classical thought experiment where you have a cat in a box with poison in a vial that's on a time delay to open you don't know when and when the cat's in the box you can think of it as alive and dead at the same time and you don't know until you look at it whether it is alive or dead when you look at it from quantum computing it's the same thing but a little bit less morbid I guess so in this case we've talked about the zero basis state and the one basis state the zero and one but what happens when the qubit that vector is pointing anywhere else in between them the system can be thought of as being both a zero and a one at the same time because you only get the zero or the one on the output I personally like to think of it more as just a probability thing so the vector is pointing to x plus one it's halfway between one and zero and when you measure you'll get a 50-50 chance of it being a zero or one if it's a little bit closer to zero your probability will go up that it's going to be a zero and if it's pointing a little bit down it'll probability will go up to be a one and just like the x gate for doing a quantum knot there's a quantum logic gate called the Hadamard which is used for putting things in superposition and you can think of the Hadamard as an rotation over the x plus z axis which is just that diagonal right there so if you're at the basis state zero and you apply a Hadamard it'll go down to that plus one x and that's that superposition state where it's a 50-50 so we can build this in quiz kit the same way so just like before we're going to build a quantum register with one qubit a classical register with one classical bit for the result build a circuit with those apply a Hadamard and then measure and then we can draw that circuit and see what it looks like and just like before it's the same thing but instead of an x gate we have an h gate so we apply an h gate and we measure and then we're going to execute this a hundred times and print the output and it's behaving randomly we have a 50-50 chance of it being one or zero and that's more or less what we get because random doesn't mean perfectly distributed so it's about a 50-50 split between a one and a zero which is what we expect when we measure in that superposition state we can also graph that because graphs are easier to read so here we had a 60-40 split which is pretty much exactly what we expected but things are a little bit interesting when we start looking at the phase component the Hadamard is its own inverse so if you apply a Hadamard twice it goes back to the state it was in originally assuming it's along that basis state so if we start at zero we apply a Hadamard it goes to that plus x and if we apply it again it'll just rotate back up to zero and the same is true for when we're at one if we're pointing down at one and we go we apply a Hadamard it will go to minus x instead of plus x or you can think of that as zero minus one as opposed to zero plus one because the phase is different that little red thing there is the phase and so while the Hadamard lets you put things in superposition it also lets you look at the phase because if you apply this rotation you can look at the phase component of something and it's just rotating it along that basis state that z-axis which is where we're measuring from and that's pretty useful but we can also demonstrate this in quiz kit the same way so in here in this case we're building the same quantum circuit again from one quantum register one qubit and one classical bit and we just apply a Hadamard twice and we measure it and our gate looks like that and we then we execute it we get zero hundred percent of the time like we expect and we just graph that and the same is true if we put things in starting from the one basis state so we apply an x gate to go from zero to one then we apply a Hadamard twice and we measure and we should get one hundred percent of the time and we do and we can graph that we get one hundred percent of the time before I move on are there any questions because that's are people able to follow me am I moving too quickly any clarification on things sorry what was that how did we get hundred percent probability of one this time so this time we were doing the so we started in the one basis state so we started by applying an x gate and appointed down to one and then we applied a Hadamard so it went to negative one and like I said the Hadamard because of the phase is its own inverse so when it's at negative one we rotate over the z plus x axis and it goes back down to one um... so that's what I was showing there in the circuit uh... was that it goes from uh... zero minus one of the minus x position and then it goes back down to one answer your question uh... general query uh... in the representation of qubits like uh... the value of the qubit change when we observe it value maybe zero or one right so when we when we measure and observe it we get a zero or one output and that's because it's collapsing we can't look at the sphere uh... from it's that's not actually a sphere but from that logical perspective we can't look at the position along the sphere when we want to look at qubit we either get a zero or one because that vector will move up or down yeah either it can spin up or spin down uh... so it is a probability so but how uh... this qubits can be used to represent data because uh... the value uh... depends where we observe uh... the value changes so how it can be used to represent the data um... well i mean you get a zero or one output so you can think of it as bit string of the number of qubits long or you can uh... use uh... some other tricks to use data out uh... which algorithm am i using well i'm not specifically talking about any algorithms yet i'm still just looking at the basics of how qubits how you interact with qubits dealing at a level below algorithms to give some fundamentals uh... in the presentation yesterday i used an algorithm called bernstein vasarane which was looking at uh... it's an oracle problem and i think that was recorded and we can look at that then uh... there any other questions uh... bernstein vasarane yeah you can uh... uh... the recorded the key notes were recorded yesterday yeah so all of them are online online on the channel uh... on youtube okay i think that would be online soon uh... are there any other questions before i move on uh... so i'm not going to get into a lot of other quantum gates right now because there are there are lots of them there is a in the quiz kit tutorials repository which is this really large repository filled with a bunch of jupiter notebooks that explain all the basics of quantum information theory a lot of uh... different algorithms things like shores algorithm which is what everyone is always excited about because of rsa uh... and a lot of other algorithms like rovers and uh... but it also explains fundamentals there's a notebook in there that uh... provides a list of all of the quantum gates that are by by default available in quiz kit the standard ones but because it's targeted for people who are familiar with linear algebra they don't actually show the cubit rotation model uh... i'm i use that because i find it a bit easier since my linear algebra is pretty weak that's what i'm using here but uh... that's not intuitive for people who aren't super familiar with how this uh... rotating in vector spaces works uh... so i just put an example here to show how in code how you can take the gate from that notebook and translate it to the output state on a block here so in this example i am uh... running the white gates on building the same quantum circuit from one cubit one classical bit and just applying the white gate and in this case i'm using a different simulator called state vector simulator so instead of measuring and getting a count is your one output since we're simulating we can look at the quantum state as a vector uh... of the components so i was showing zero plus one before you can represent the quantum state is a vector so that zero and that one have a coefficient in front of them so if it's at the base of state zero it's a one coefficient in a zero coefficient or if it's pointing anywhere along the surface you can give it uh... its own number as a coefficient that will represent its position on the sphere and the state vector simulator lets you get that's get that state vector instead of measuring so we use that and then we use this visualization function plot block multi-vector to plot the output of the you know on a block sphere what the output of that operation looks like and it can be any any it can be a full quantum circuit with a lot of different gates or or just one like we're doing here uh... so in this case if we apply the white gate it will go from zero or one because doing a uh... hundred and eighty degree rotation over the y-axis is the same as doing it over the x if it's pointing straight up because there's no phase which goes up to down but because there are gates a lot of gates that only work on phase you can't always see anything if it be if you're at the zero basis state and you're rotating this way like that like screwing a light bulb you're not going to see anything because the vector is still going to point up uh... so you need to put it in superposition with a hadamard to do it first so i put this example here this is just called the uh... s dagger gate uh... which is that symbol right there you don't have to worry about the math i've never actually used it in a practical application i don't know what it's really used for personally but uh... it's a phase rotation gate and i just picked it to do that so in here you can see we apply a hadamard before we apply that s dagger and we run this cell and you can see it goes from we apply a hadamard so it goes from the zero to the plus x state and then the dagger rotation moves it to that minus y and if we run this without that hadamard it just points up at zero because we're rotating the phase and there's no phase component and if you look at that notebook i linked to you can use this to try to visualize what the gate is going to do and move it around an experiment to see how these operations are modifying the qubit state on the block sphere if you don't want to think about the matrix multiplication next thing i want to talk about before i do that are there any other questions so the next thing i want to talk about it is uh... multi qubit circuits and gates and all of the examples before we were looking at a single qubit and what a single qubit gate does to this the state of that qubit but to do real computation and get to what the woman in the front row was talking about before that's not real data that's one bit you get a zero or one how can you do anything with one bit the so you're going to want to use more than one bit to do things and then there are operation the real power of quantum computation comes when you start using operations on multiple qubits at the same time so in this case we're gonna start looking at some operations on larger quantum circuits so here we're going to make a quantum register with three qubits and we're going to build a circuit with those with those three qubits and then we're just going to apply an x-gate on the first qubit and or the second qubit in the third qubit because of zero index in python and we draw that circuit so just like before where we had the three we we represent in a quantum circuit the qubits with the single lines and gates on them and it just shows the order of operations uh... so here you can see we're applying an x-gate on qubits two and three and not on on the first qubit and when we execute the circuit using the state vector simulator because we're gonna look at that state we can get a vector output and this is where the complexity from quantum computation comes from because of something called the entanglement principle i was talking about before and we'll get into in a minute because it's we need some more basics to understand it the complexity grows exponential with a number of qubits you can't represent the state of uh... quantum computer by each component individually like in a classical computer you have in a classical computer you have zero or one for each bit in a quantum computer because of entanglement they're all coupled so when you look at the quantum state it becomes two to the n coefficients in the vector for the quantum state that you have to represent so here you can see we have all zeros except for the one answer right there another way to represent that is by plotting the quantum state as a three-dimensional histogram which that is really tiny because of this resolution i apologize and you can see the individual components so you can see zero zero through one one and you can see we have one answer because it's a deterministic because we're just applying x gate so there's two ones and one zero and that's uh... one one zero which is this one peak these peaks are probabilities of being a result so it's uh... just like the 2d histogram we were looking at before but this is three-dimensional because the quantum state grows in complexity and it's also much easier to think of things in the block sphere when it's deterministic like this so here we can see we have cubit zero at the zero basis state and we applied the x gate to these two that's the other way to think about it represent the cube the block sphere representation falls apart when we start looking at entanglement because it's hard to visualize things being correlated but not touching and the only multi-cubit operation i'm going to talk about today is called the c not gate which is the cx uh... had a slide on it uh... this one which is if the there are two cubits operates on two cubits one is a control and one is a target the control is represented by this dot and the target is represented by that plus and if the control is at a zero it does nothing on the target but if the control is at a one then it flips the coefficients on the target uh... or applies an x operation you can think of this so if this was at zero the a there would be one and the be there would be zero because it's pointing up uh... and if you if we apply the c not and the control is at a one state it'll flip that so it'll become zero on the zero and one on the one so you have a one on your output so we can see what a c not looks like on a quantum circuit in quiz kit by just uh... applying the cx which is the control x gate of the c not gate and we do the same thing so here we're going to build a quantum circuit with two register or two cubits uh... two classical bits for the measurement we build that circuit we're going to measure and we're going to draw it you can see here we have uh... the c not which is what we want it and then we can simulate with the state vector as before to look at the quantum state since it's smaller we have only four components because it's two to the second power in complexity and we can represent this quantum state it's going to be zero zero because everything is at zero and we can draw the 3d histogram and then if we were to i don't i did not put a block sphere here but it's pretty simple everything is at zero it's pretty uninteresting uh... but then we can add measurement and get the counts and you see we get zero every single time and we can plot the histogram for that because everyone likes that blue 2d histogram uh... and then we can show when the first cubit the control is at one we apply a c not so we draw that circuit so that x gate is going to put cubit zero at one at the one basis state right there and we apply a c not so that's going to flip the zero to a one or so we expected to and we can run this through state vector simulator get our quantum state and you can see that coefficient used to be here on zero on zero zero and now it's here on one one and we can show that in our on our three d histogram plot for the quantum state of the whole system and then we can also do the counts and we get one one like we expect uh... and then plot the histogram because why not so this is how you start thinking about multi cubit operations that the complexity grows so thinking about the system as a whole gets more complicated uh... but we've only looked at the classical operations to try to build this basis for how we're going to look at multi cubit uh... the next step is going to look when things get when we start using entanglement and where things start being in super position states while we're applying these operations to them that's where things get more complicated uh... how much time do i have just ten minutes uh... so before i move on because it's the next section is the last one uh... i want to make sure there are no more questions uh... before we move on or people able to keep up okay if there's nothing i'll just move on to the last section uh... which is entanglement and this is i struggled to come up with a way to think about this so like i said before entanglement is where you have two cubits that are independent but their output is correlated here we're going to build something called a bell state which is the typical way the easiest way to put things in entangled state so we're going to set up a uh... two cubit quantum register and two classical registers and we're going to build a bell state which is you put the first cubit in superposition with the hadamard and then you apply a c not to entangle them uh... so one cubit is in superposition it's in that state where it can be a zero or one fifty fifty chance you don't know and then we apply the c not on it which changes the output of the second one if it's one uh... and that sets up an entanglement and then we're going to look at this from a lot of different ways so we're going to look at the output this one this measure is a is going to look at the first cubit whether it's a zero or one by itself not looking at the two cubits together just the first one then we're going to look the phase or the superposition basis of that second cubit by applying a hadamard before we measure which is right there then we're going to look at the second cubit the same way on its basis state and then it's phase by applying a hadamard and then we look at both cubits together in the basis state so the first one in the second one we're going to get a zero or one on the output then we're going to look at the this with this with this third example here we're going to get a zero zero zero one a one zero or one one and then we're going to look at the phase of that again and we're going to get a zero zero zero one a one zero or one one and we're going to look at all of these circuits to try to get a grasp on what's going on in this entanglement case so we build all of those circuits and then we're just going to draw them to show what they all do so here hadamard we build that bell state and then we measure here we build that bell state again then we apply a hadamard to look at its superposition basis or its phase and then we measure and then the next two are the same thing just the measure is on the other qubit and then same thing and then we look at both cubits together so we measure we put it set up a bell state and we measure both of them and then we apply the hadamard on the after on the two of them to look at the phase and then we use the state vector simulator to put all of these together and execute them all and then we look at the I'm sorry we look at we use the regular simulator the state vector simulator we use later I just did that as a shortcut and we look at the first qubit along its basis state so we get a zero or one fifty percent of the time which is on that first qubit with the hadamard which is what we expect we did that before we it's at the plus x we're not doing anything else and we get a zero or one that's what we expect then we look at its phase or so we look at counts just raw then we look at its phase and in the same same way because it's in a superposition we get a zero or one fifty fifty one is this this is then we look at the second qubit same thing because this is where the entanglement starts to come in we can't really tell that they're entangled because we're just looking at them individually it's in a superposition because we applied that scene up so if it's zero with zero and the other one it's one and then we look at its phase and it's the same thing and now we look at this is where the entanglement starts to really become a little bit obvious so when we look at two qubits together we get correlated results so if the first qubit is a zero the second qubit is a zero and if the first qubit is a one the second qubit is a one they're always correlated there's nothing in the middle which is starting to show there's an entanglement because the output is correlated and then if we look at the phase it's also correlated which if you remember the principle I was talking about before it's they're not touching they're not interacting they're not connected uh... we're just applying the operation to the two of them at one in a superposition state and the output becomes correlated uh... and that's what entanglement is uh... and then we can also look at that three-dimensional histogram as before and you can see here that we see that same correlation between these corners which are zero zero and one one and that's the uh... that that demonstrates that these are correlated so before I show how this is different from like a classical way are there any questions on that I know it's pretty abstract and I'm trying my best to come up with explaining this without the math oh you can so uh... often you use the c-nauts and the hadamard to set up an entanglement and then you perform operations on one or both of the cubits to perform operations and that's actually like where the power from quantum computing comes in because you can change one cubit and because they're correlated the operation affects the other one and that's actually like that's how like quantum Fourier transform and all the big quantum algorithms you expect are built I'm just showing you just the basic building blocks at the end I have a lot of links to more information uh... because what I thought was valuable in this presentation instead of showing you all of these abstract algorithms build the building blocks and in the software to show how you can do this at home yourself and try to understand the basics so when you look at those other algorithms you understand how they're built and maybe play around with them you're on your own so the last thing I want to show in my remaining five minutes was how this is different from a classical way so you can build a classical system where you always get zero zero and one one is your output but that's not entangled and we can build that on a quantum computer pretty easily so here what I'm doing is I'm just building two quantum circuits with two cubits two classical bits and applying X gates on one of them one of those sets and then I just measure everything and you can see I get one where it's just measured so it's always going to be zero zero and one where I apply an X and then measure so it's going to be one one and then I can execute both of them combine the results and plot a histogram and there I get what looks like the same exact thing we were getting before where it's fifty-fifty where the result is always zero zero one one um... but this is not actually correlated they're just zero zero one one and we can show that by looking at that superposition basis or the phase by applying had a mart so here we build the same thing up again and we just apply a had a mart to the end so here we have we apply the had a mart for the first case where it was just zero zero and then we do the same thing again with um... when it's in the one so we apply the X so it's in a one and we apply had a mart and we measure so we're just looking at that that phase component by applying the had a mart and then we do the same thing with the execution we combine them and we run it and we visualize the histogram and you can see there the results aren't correlated when you look at that phase component there in individual superposition so you get basically an even spread across all of them which is what which shows that you can you can build something that looks like it's entangled classically but it's not actually entangled and that's that's where things get different so that's all i had in this notebook i like i said before i was trying to build the basic building blocks to give people an understanding of how quantum algorithms are built from these basic things that those two key concepts of superposition and entanglement and a lot of the things in this notebook are built off this quack quiz kit tutorials repository i mentioned before and there are some other notebooks that continue off where this one where i built off this one so these three notebooks here uh... this one goes more into the concept of phase which i just briefly touched on i didn't deep dive in on uh... and then the next one is testing entanglement so we showed what entanglement is and how it's different from a classical case this one starts probing it to show that it's really entangled uh... and show what that correlation can do and then quantum teleportation in super dense coding starts building off that entanglement to do real things and it's not teleportation like in star track it's it's different and and then something uh... i have a car oops i didn't mean to i have a colleague who gives uh... introductory talks that are uh... and he likes to teach through games in that quiz tutorials repository there's a directory called games and it shows a bunch of games built using superposition and entanglement so it shows how you can actually run these games on the quantum computers and play around with them uh... one of them's like battleship there are other things uh... there are a lot of examples there those are fun to play around with locally if this was all too dense and you never want to look at this again and you you hate me for introducing you to weird spheres with rotating vectors and all of that uh... the quiz kid aqua project is what i mentioned earlier is designed to give you a python library that abstracts away quantum algorithms so it does all of the circuit building underneath and all of the algorithms there ones in there for like shores algorithm grover's algorithm burnstein valzorani all the big algorithms and their application specific ones like chemistry uh... machine learning there's an svm example in there uh... and it just gives you a python library so you give it data in the formatted expects and it gives you the result on the output and then the last one is there was a paper published very recently that goes into all i was talking about here in more detail with the math to back up so shows you the rotations the map at math in the quiz kit examples and it's uh... very good read and it it builds off of where i where i left off and continues to go because i had to figure out what to talk about in fifty minutes so i think i'm out of time but i'm gonna be around for the rest of the conference and if people have any questions i don't know if we have time for questions now but uh... i'll be around you want to just borrow this one thank you matthew anyone for question do we have the probability of having one question that's that's fine video tutorials uh... yes i think there there are probably uh... i know there is a team at ibm that are okay so we thought of running uh... in a classic quantum computing machine or simulator kind of thing but we could not find any video tutorial or any reference okay i i don't know of any because i thought myself this by looking at the code and all of those notebooks okay but i will ask internally to see if there are people working on it specifically like the aqua team that algorithms project they have a group of people working on machine learning applications and the aqua project their documentation lists how you can use some of the machine learning algorithms the one that i played around with personally as an svm which is pretty simple but it shows how you can do an svm on a quantum computer uh... using aqua uh... and that's in the documentation but there's no uh... video example i know about i can ask because that's actually good feedback i can uh... help have people start working like video tutorials on these things okay the quantum computing uh... quantum com processor q four q two that is uh... i'd be a processor ibm's processor yet so those are two of ibm's quantum computers uh... there some more some are only available to pay customers but those three that i showed before those are publicly accessible so if you follow the instructions in the notebook you can sign up for an account for free you don't even need you can just use your github credentials and then once you get that token you can submit jobs to it anytime from anywhere in the world because it's just but we need to wait and then yes it's a shared time machine so you have to wait in a queue i've been here all week and the queues have been very short because i think in america where most of the people are using them there everyone's asleep but uh... i'm not actually sure why the queues are short but uh... sometimes the queues can be very long sometimes they can be very short and you can look at the queue before you submit so you can pick which machine you run on okay the varice simulator code available for the quantum computer where is the simulator code? uh... so there is the quiz kit error project which i mentioned at the beginning that's the simulator you can find that on github uh... in the quiz kit organization and it's uh... and there's also in quiz kit terra there's a python simulator but that's more limited because of python's memory constraints