Corey Roth [MVP] : Quantum Computinghttp://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Quantum+Computing/default.aspxTags: Quantum ComputingenCommunityServer 2007.1 (Build: 20917.1142)Thoughts on the post-quantum computing erahttp://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2017/12/18/thoughts-on-the-post-quantum-computing-era.aspxMon, 18 Dec 2017 21:04:52 GMTceb7fe2a-c56b-4d85-99e6-8dd548580538:8728CoreyRoth0http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=8728http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2017/12/18/thoughts-on-the-post-quantum-computing-era.aspx#comments<p>With IBM, Google, and Microsoft pouring funding into the research of quantum computing, it's really starting to look like we are going to see the benefits in the next 5 - 10 years. Google may be <a href="https://gizmodo.com/why-google-is-poised-to-hit-the-next-critical-milestone-1821121798">just weeks</a> from announcing they reached the quantum supremacy milestone and IBM may not be far behind either. Today, I wanted to share my thoughts on how quantum computing may affect cryptography as we know it.</p><p><strong>Effects on cryptography</strong></p><p>When we talk about the basic cryptography used for things like TLS when you access your bank's website, the premise behind securing your data is surprisingly simple. The certificate uses a public key which is really just a large number that's the result of multiplying two prime numbers together. This key has a size typically between 256 bits and 2048 bits. It's quite a large number. To find the two factors via brute force, in today's classical computers, it would take a billion years to solve (give or take a year or two). In computational complexity theory, they refer to these problems as intractable. They just can't be solved with the computers we have today. </p><p>However, once we have quantum computers, by the nature of entanglement and superposition, it can brute force all of the possibilities using an algorithm such as <a href="https://en.wikipedia.org/wiki/Shor%27s_algorithm">Shor's algorithm</a> in a couple of minutes. Quantum Computers will ultimately break RSA encryption as we know it. It will take a significant number of qubits though before this can happen. The largest number factored to date is 56163, far smaller than a number that is 256 digits long. This means your bank login is safe from quantum computing for a little bit longer.</p><p><strong>Prediction - the media will cause mass hysteria about quantum computers and cryptography</strong></p><p>Here is what I think is going to happen. Some journalist looking for the next click-bait is going to stumble upon this following an upcoming advancement in the field of quantum computing. With half the facts the journalist, will write an article with a headline such as "Quantum Computers are breaking into your bank account right now." This will cause other media outlets to spread the word and amplify the message and people will go into a 1999 Y2K style frenzy. Consumers will freak out. Some will stop using the Internet for a while. </p><p>The thing is there are already smart people thinking about this and working on algorithms for <a href="https://en.wikipedia.org/wiki/Post-quantum_cryptography">Post-quantum cryptography</a>. That doesn't mean a system for post-quantum cryptography will be available at the same time we get a quantum computer that can break RSA. We might, but I doubt it. Assuming post-quantum cryptography for the we is still certificate based, vendors will have to start creating those certificates. Then the web platforms like Apache and IIS will have to support it (not to mention the OS itself). Then the browsers will have to be updated as well. That's a lot of moving parts.</p><p>Companies will be scrambling to figure out what to do. I am predicting another gold rush for consulting firms (like Y2K) to help companies come up with a post-quantum strategy. Keep in mind it's not just the ecommerce site we are securing. It's the servers, the network communication, the connections to the cloud, etc. Some new people are going to get rich off of this.</p><p>I think the hysteria will happen whether it is warranted or not. Even when we start seeing quantum computers, not everyone is going to have access to them at the scale required to break the RSA. Even with Microsoft and IBM putting quantum compute in the cloud, most people will only have access to a small number of qubits. To get enough quantum computer power, it's absolutely going to cost you. That's not to say that some researcher with early access to quantum hardware couldn't "turn to the dark side and cause some mischief." It sounds like the making of a science fiction film, right?</p><p><strong>Effects on cryptocurrency</strong></p><p>Now I am hoping the bubble of cryptocurrencies like Bitcoin pops long before we reach post-quantum computing. I think it's going to be around for a while though. We may be out of Bitcoins by then but one of the other networks will rise up to take its place. I don't think a lot of thought has gone into the effects of quantum computing on cryptocurrencies yet, but I think the threat is real. Cryptocurrencies like Bitcoin are based on SHA-256. New blocks of bitcoins are generated basically by brute force by trying to <a href="https://en.wikipedia.org/wiki/Bitcoin#Mining">mine</a> a nonce to go along with the hash value. This sounds like something a quantum computer could do quite well. If someone were able to mine say all the remaining blocks in a cryptocurrency in a few days instead of years, that could be bad for the cryptocurrency economy. </p><p>This is all speculation of course, but I wouldn't be surprised if some we hear a story of some PHD university researcher who took off with a ton of cryptocurrency and disappeared off the grid in Fiji. Sounds like another science fiction film, right? Maybe I need to go into screenwriting. The implications are easy to exaggerate I know. It doesn't take much to spook and investor though. One new story goes viral, and a bubble could pop.</p><p><strong>Conclusion</strong></p><p>I think a lot of what happens in post-quantum computing and cryptography will happen to some degree. However, you will have to be able to discern perception and reality. Keep an eye on the state of the industry so you know what's going on. Then make smart informed decisions instead of knee-jerk reactions.</p><p>If you want to start learning more about quantum computing, check out my guide on <a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2017/12/15/how-to-start-learning-about-quantum-computing.aspx">How to start learning about Quantum Computing</a>.</p><img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=8728" width="1" height="1">Quantum ComputingHow to start learning about Quantum Computinghttp://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2017/12/15/how-to-start-learning-about-quantum-computing.aspxFri, 15 Dec 2017 17:16:00 GMTceb7fe2a-c56b-4d85-99e6-8dd548580538:8726CoreyRoth0http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=8726http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2017/12/15/how-to-start-learning-about-quantum-computing.aspx#comments<p>Quantum Computing is becoming quite the hot topic lately. With research being done by Google, IBM, Microsoft, universities, and a number of other players, it’s looking this is really going to happen. In fact, Google may just be <a href="https://gizmodo.com/why-google-is-poised-to-hit-the-next-critical-milestone-1821121798">weeks away</a> from announcing the Quantum Supremacy milestone. If you aren’t familiar with the concept of Quantum Supremacy yet, it’s basically the point where a quantum computer can complete a computation in a short time where a classical computer can’t complete it at all. This is a big deal. While there are some simple quantum computers out there right now (you can try out IBM’s via the <a href="https://quantumexperience.ng.bluemix.net/qx/experience">Q Experience</a>), this will be a big deal.</p><p>Now, quantum computing isn't for everyone. I'm pretty sure it's not even for myself, but I am interested in the technology so I am intrigued to learn more. The point of this post isn't to teach you all of the details about quantum computing (because I am far from qualified to do that). It's to teach you some of the basic concepts you should go learn about and point you to resources on where to learn more. For my current limited quantum computing knowledge, I have learned from resources from <a href="https://en.wikipedia.org/wiki/Quantum_computing">Wikipedia</a>, <a href="https://quantumexperience.ng.bluemix.net/qx/experience">IBM</a>, and <a href="https://docs.microsoft.com/en-us/quantum/?view=qsharp-preview">Microsoft</a>. Google has some <a href="https://research.google.com/pubs/QuantumAI.html">resources</a> too, but I think most of them assume you already have a PHD in Physics or Computer Science. I found that some of the resources do a better job at explaining concepts than others. Since this is a complex topic, you can learn something from reading each of them. I will warn you, that this stuff is complicated. It's got to be if quantum computing is going to be as revolutionary as predicted. With a Computer Science degree, I learned about a lot of these concepts while at University, but I have long forgotten these things. Let's face it, you don't use things like Linear Algebra much when you are creating an Intranet in Office 365.</p><p>What follows below is some of the key areas of quantum computing that I think you will want to learn more about. There's a lot to learn about quantum computing, but this should give you some good building blocks.</p><p><strong>What is Quantum Computing?</strong></p><p>The promise of quantum computing is that they will be able to solve computational problems in minutes or hours versus years on classical computer. It all starts with qubits and how they interact with each other. To understand more, start by reading an <a href="https://quantumexperience.ng.bluemix.net/qx/tutorial?sectionId=beginners-guide&page=002-Introduction~2F001-Introduction">Introduction</a> in the Beginner's Guide of the IBM Q Experience. Then go read Microsoft's <a href="https://www.microsoft.com/en-us/quantum/what-is-quantum-computing">take</a> on it. They also have a <a href="https://www.youtube.com/watch?time_continue=10&v=cOUrzxyng04">short video</a> about it. Finally, if you want to go deep, read up on <a href="https://en.wikipedia.org/wiki/Quantum_computing">Wikipedia</a>.</p><p><strong>Who are the players?</strong></p><p>IBM, Google, and Microsoft have all been in the media a lot lately with announcements. If we were to compare this to the space race, IBM has someone in orbit, Google is about to plant a flag on the moon, and Microsoft just decided what type of rocket fuel to use. I think Microsoft picked a compelling type of rocket fuel though, <a href="https://www.microsoft.com/en-us/quantum/why-microsoft">topological quantum computing</a>. They have a <a href="https://www.microsoft.com/en-us/quantum/team">world-class team</a> working on it too. <a href="https://www.dwavesys.com/">D-Wave Systems</a> was the first company to have a commercially viable quantum device but it's limited to specific scenarios. This is not to discount the teams of university researchers that these companies have partnered with throughout the world as well. </p><p>One company you may notice that is sitting on buckets of cash but is remarkably missing is Apple. Apple has not announced any research in quantum computing at this point. There are a lot of theories on this, but since Apple can't make a quantum computer "pretty" and overcharge for it, I don't think it's ever going to happen.</p><p><strong> Greek Letters</strong></p><p>If it's been a while since you've looked at the Greek Alphabet, you better go do so now. Due to the amount of linear algebra involved, there are Greek letters everywhere, and while you might remember Alpha or Beta, remembering Psi, Phi, and Theta might be a bit harder. When you are reading through the documentation, pull up the article on Greek Letters on <a href="https://en.wikipedia.org/wiki/Greek_alphabet#Letters">Wikipedia</a> and keep it handy as a reference.</p><p><strong>Linear Algebra</strong></p><p>To understand the world of quantum computing, you need to understand several linear algebra concepts. Specifically, you need to understand the concept of vectors and matrices. You'll want to understand their notation and the operations on them. For example, you'll need to understand how to add and multiply matrices together and the tensor product. The <a href="https://docs.microsoft.com/en-us/quantum/quantum-concepts-2-vectorsmatrices?view=qsharp-preview">Vectors and Matrices</a> article in Microsoft's quantum computing concepts section is quite good. The following section on Eigenvalues and Eigenvectors is important as well. They also recommend the book <a href="http://joshua.smcvt.edu/linearalgebra/book.pdf">Linear Algebra</a> (<a href="http://joshua.smcvt.edu/linearalgebra/">additional materials</a>) Third Edition by Jim Hefferon (available for free at the links). If you've never studied linear algebra (or it's been a while), it might be worth reviewing that book as you get into things.</p><p><strong>Qubits</strong></p><p>Whereas bits are the basic object of classical computing, qubits are the fundamental object of information in the quantum computing world. However, they are significantly complex. Like a bit, they can have a value of 0 or 1, but both at once through a process called superposition. We can visually represent a single qubit with something called a Bloch Sphere. This sphere has a radius of one with an X, Y, and Z axis. This may not make sense yet, but it actually helps us later when we are trying to understand how gates transform a qubit later. IBM has a pretty good <a href="https://quantumexperience.ng.bluemix.net/qx/tutorial?sectionId=beginners-guide&page=004-The_Weird_and_Wonderful_World_of_the_Qubit~2F001-The_Weird_and_Wonderful_World_of_the_Qubit">description</a> of Qubits and the Bloch Sphere. However, it made more sense to me, when I read through Microsoft's <a href="https://docs.microsoft.com/en-us/quantum/quantum-concepts-4-qubit?view=qsharp-preview">description</a>.</p><p>Column vectors are the basis of representing qubits. When we perform operations on the qubit, we are effectively transforming those vectors (or matrices when there are multiple qubits). However, column vector notation can be a bit cumbersome at times. That's where Dirac notation comes in. In the Q Experience getting started guide, they talked about the 0 and 1 states being represented as |0> and |1>, but I didn't really pick up why there. Microsoft has a page on <a href="https://docs.microsoft.com/en-us/quantum/quantum-concepts-6-diracnotation?view=qsharp-preview">Dirac Notation</a> that explains it quite well. When you start representing multiple qubits in Dirac notation, they will look something like |01> or |00>. However, it wasn't clear to me until I read the <a href="https://quantumexperience.ng.bluemix.net/qx/tutorial?sectionId=beginners-guide&page=006-Multi-Qubit_Gates~2F001-Multi-Qubit_Gates">IBM documentation</a> that the qubits should be read from right to left. That means the qubit on the right is the first qubit. </p>
<p><strong>Operations / Gates</strong></p><p>In a classical computer, there are only four functions (AND, OR, NOT, NAND) that map bits. In quantum computing, there are an infinite number of possible transformations on a single qubit. However, in reality, there are only a few that you deal with in these early examples. The gates are all named after <a href="https://en.wikipedia.org/wiki/Jacques_Hadamard">mathematicians</a> and <a href="https://en.wikipedia.org/wiki/Wolfgang_Pauli">theoretical physicists</a> that have long past. Remember, we have known about quantum computing for some time. We just didn't know how to get there. When looking at the gates it may be easier to think of what the gate does when represented on the Bloch Sphere. There are gates known as the X, Y, and Z gates. They correspond to operations on the accesses of the sphere. For example, the X gate is thought of as a "bit-flip" where it is effectively flipping 0s and 1s in the matrix representation of the qubit. The <a href="https://quantumexperience.ng.bluemix.net/qx/tutorial?sectionId=beginners-guide&page=005-Single-Qubit_Gates~2F001-Single-Qubit_Gates">Q Experience Beginner's Guide</a> explains this gate fairly well. Throughout their guide, you can also click on a link to open the composer where you can actually try out these operations on a simulator and even their working quantum computers. The Y and Z gates do similar operations around their axis. If you want to get more into the math behind all of these operations, the <a href="https://docs.microsoft.com/en-us/quantum/quantum-concepts-4-qubit?view=qsharp-preview">Microsoft page</a> has quite a bit of detail.</p><p>To put our qubits in a state of superposition, you use the Hadamard gate, often labeled as an H gate. To learn about the H gate, check out the <a href="https://quantumexperience.ng.bluemix.net/qx/tutorial?sectionId=beginners-guide&page=005-Single-Qubit_Gates~2F002-Creating_superposition">Creating Superposition</a> page on the Q Experience first. You'll use this gate a lot as you're starting to experiment.</p><p><strong>Entanglement</strong></p><p>When using the Controlled NOT (CNOT) gate, we can put multiple qubits into an entangled stage. What happens here is that when two qubits are entangled, when you measure one qubit it affects the other. This concept is a bit harder to grasp, so I've got a number of references. First, look at Microsoft's page on <a href="https://docs.microsoft.com/en-us/quantum/quantum-concepts-5-multiplequbits?view=qsharp-preview">Multiple Qubits</a> You can read a bit more from <a href="https://quantumexperience.ng.bluemix.net/qx/tutorial?sectionId=beginners-guide&page=006-Multi-Qubit_Gates~2F001-Multi-Qubit_Gates">IBM</a>. However, once I tried it out in a <a href="https://docs.microsoft.com/en-us/quantum/quantum-writeaquantumprogram?view=qsharp-preview">simulator (step 6)</a>, I think it made the most sense.</p><p><strong>Experimenting with the IBM Q Experience</strong></p><p>The best way to understand some of this is to try some experiments. I started with using the IBM Q Experience. It's been out for some time so I looked at it before Microsoft's Quantum Development Kit Preview came out this week. The Q Experience has a <a href="https://quantumexperience.ng.bluemix.net/qx/editor">Composer</a>, where you can visually drag and drop your gates onto qubits to run an experiment. There, it will show you which quantum computers are available and interesting facts should as what temperature the dilution refrigerator is running at.</p><p><a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/QExperienceQuantumComposer_59D108E3.png"><img width="554" height="396" title="QExperienceQuantumComposer" style="display:inline;background-image:none;" alt="QExperienceQuantumComposer" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/QExperienceQuantumComposer_thumb_1C43AB1A.png" border="0" /></a></p><p>You can drag and drop gates anywhere you like and then choose to Run or Simulate your results. This provides a visual representation of the underlying code going into the quantum computer. You can click on Switch to QASM Editor and you will see the code. If it looks like classical assembly language to you, that's because it's very similar. Remember, we're just dealing with qubits and gates here.</p><p>You can sign up for an account with the Q Experience and it will give you a fixed number of executions each day on an actual quantum computer. IBM current has 5 qubit and 16 qubit quantum computers in the Q Experience. Right now, it looks like the 16 qubit machine is offline because it's not showing any longer. Sometimes the Run button won't be available at all though. This all depends on the availability of the quantum computers as they take them down for maintenance regularly. </p><p>Just launching the composer is a bit daunting though. Instead it's easier to start with existing experiments throughout the Beginner's Guide. For example, on the <a href="https://quantumexperience.ng.bluemix.net/qx/tutorial?sectionId=beginners-guide&page=006-Multi-Qubit_Gates~2F001-Multi-Qubit_Gates">CNOT page</a>, you can run a variety of pre-configured examples in the Composer. This is a great way to learn quickly and actually try your results on a real quantum computer. </p><p><strong>Experimenting with the Microsoft Quantum Development Kit Preview</strong></p><p>This week, Microsoft released the <a href="https://docs.microsoft.com/en-us/quantum/?view=qsharp-preview">Quantum Development Kit Preview</a>. Microsoft doesn't have a quantum computer yet, but they have quite the development stack already. Using your own computer (and later Azure), you can simulate a quantum computer in Visual Studio 2017. Installation isn't too hard but you need to do it on actual hardware (not a VM). I think some Virtual Machine hosts do support the necessary CPU features if enabled though. Let's be clear though, simulating a quantum computer is CPU intensive and can be slow depending on the complexity of your algorithm. </p><p>I'll be posting a detailed walk through of the development kit pretty soon so I won't go into a lot of detail here today. Once you have the kit <a href="https://docs.microsoft.com/en-us/quantum/quantum-installconfig?view=qsharp-preview">installed</a>, go through the <a href="https://docs.microsoft.com/en-us/quantum/quantum-writeaquantumprogram?view=qsharp-preview">Quickstart</a>. It walks you through a program from the ground up. To date, this has helped me learn some of the most about quantum computing yet.</p><p><strong>When will quantum machines be commercially available?</strong></p><p>We are starting to see a number of successful prototypes in the works now. From last I read, IBM is targeting 2021 and Microsoft says around "five years", so 2022. I suspect Google may be closer than that. That may seem pretty far off but it's really not in the scheme of things. The field of quantum computing actually started in the 1980s and it has taken us this long just to get where we are. </p><p><strong>Why should you care?</strong></p><p>Quantum computing isn't for everyone. That's true. However, once we enter a post-quantum computing era (and we will), the benefits will eventually affect you. I'm picturing a <a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2017/12/18/thoughts-on-the-post-quantum-computing-era.aspx">Y2K style gold-rush caused by quantum computing</a> in the next ten years. I absolutely believe in quantum computing and while I'll never be capable of contributing directly to the research, I think I can help evangelize it.</p><p>I also recommend <a href="https://www.youtube.com/watch?v=70Z-UUPjYY4&feature=youtu.be&wt.mc_id=mkto_EM363725A1LA1&ls=email&mkt_tok=eyJpIjoiWVRVNU5qUTROVGd3TlRjeiIsInQiOiJvOWxQS3JNODhvNWFrUU5nNUtuOTVYRzdiblA5Z0pIa0l5M1hxcWkwMlNSbFdhb1M4UGswTzFabE0zalYwRXBxczVUSU15QWtyZ3BPOWlPbDRUNWNBZzFNbjBrWU9rXC82SWZkYjBmNmNhWHByN2FSVTFmSVB5Vjh1dU5xeWJqRHlCbVhPaGIrbENJd3JDb0xZMXJDUVl3PT0ifQ%3D%3D">watching this keynote</a> from the Microsoft Quantum team at Future Decoded. It has some great visual representations of quantum computing as well as what industries it may make an impact in.</p><p><strong>Summary</strong></p><p>When it comes to quantum computing, there is a lot to learn. You are not going to learn it all in a day. When you are reading about quantum computing, it's easy to get lost. That's ok though. I've read several of these pages multiple times, and I pick up a little more each time. I'll keep this post updated as I find other good resources.</p><p>Finally my usual disclaimer. I'm far from an expert in the field of quantum computing. If I got something wrong here, kindly correct me in the comments as opposed to trolling me.</p><img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=8726" width="1" height="1">AzureQuantum Computing