{"id":1878,"date":"2008-03-24T19:34:11","date_gmt":"2008-03-25T02:34:11","guid":{"rendered":"http:\/\/dabacon.org\/pontiff\/?p=1878"},"modified":"2008-03-24T19:34:11","modified_gmt":"2008-03-25T02:34:11","slug":"shor-calculations-quantum-wonkish","status":"publish","type":"post","link":"https:\/\/dabacon.org\/pontiff\/2008\/03\/24\/shor-calculations-quantum-wonkish\/","title":{"rendered":"Shor Calculations (Quantum Wonkish)"},"content":{"rendered":"<p>Over at Emergent Chaos I found an article which throws down the gauntlet over quantum computers.  And there isn&#8217;t anything I cherish more than gauntlets thrown down!<br \/>\nNote: I should preface this by saying that I don&#8217;t consider myself a over the top hyper of quantum computers in the sense attacked by the author.  I find quantum computers fascinating, would really like to see if one can be built, but find the hyperbole that accompanies any small advance in the field a bit over the top.  However I also think the article misses a lot of important points (and insinuates that people haven&#8217;t actually thought about these points, something which I find as annoying as quantum computing hype.)<br \/>\n<b>Update:<\/b> Say it ain&#8217;t so <a href=\"https:\/\/www.schneier.com\/blog\/archives\/2008\/03\/quantum_computi_1.html\">Bruce<\/a>.  Say it ain&#8217;t so.<br \/>\n<!--more--><br \/>\nBut onto the article.  It begins with notes about quantum computer hyperbole, and about Scott Aaronson&#8217;s Scientific American article, and then jumps into the meat:<\/p>\n<blockquote><p>The crypto-obviating algorithms in question are Shor&#8217;s algorithm for factoring and an algorithm he developed for discrete logs. I was surprised to learn that Shor&#8217;s algorithm requires 72k<sup>3<\/sup> quantum gates to be able to factor a number k bits long. Cubed is a somewhat high power. So I decided to look at a 4096-bit RSA key, which is the largest that most current software supports &#8212; the crypto experts all say that if you want something stronger, you should shift to elliptic curve, and the US government is pushing this, too, with their &#8220;Suite B&#8221; algorithms.<br \/>\nTo factor a 4096-bit number, you need 72*4096<sup>3<\/sup> or 4,947,802,324,992 quantum gates. Lets just round that up to an even 5 trillion. Five trillion is a big number. We&#8217;re only now getting to the point that we can put about that many normal bits on a disk drive. The first thing this tells me is that we aren&#8217;t going to wake up one day and find out that someone&#8217;s put that many q-gates on something you can buy from Fry&#8217;s from a white-box Taiwanese special.<\/p><\/blockquote>\n<p>Okay a couple points are in order.  First of all, the main limiting factor for Shor&#8217;s algorithm is modular exponentiation.  Modular exponentiation is the procedure for taking two whole numbers a and N and computing a<sup>r<\/sup> mod N.  Interestingly it is also the limiting step in RSA encryption.  Now the author of this article says that to factor a k bit number you need O(k<sup>3<\/sup>) quantum gates.  But, while this is true, it isn&#8217;t the real important part of the story.  This is because while you require O(k<sup>3<\/sup>) quantum gates (or classical gates if you are doing the RSA encryption), this does not imply that Shor&#8217;s algorithm requires O(k<sup>3<\/sup>) time steps.  In fact, it is fairly easy to trade time and space resources in modular exponentiation.  A good resource for some of these tradeoffs is in Rod Van Meter&#8217;s thesis <a href=\"http:\/\/arxiv.org\/abs\/quant-ph\/0607065\">quant-ph\/0607065<\/a>.  For example, Rod shows algorithms for modular exponentiation on a nearest neighbor linear architecture (which is very very restrictive) which require a time of O(k<sup>2<\/sup> log k).  So, to say that this naive analysis which just takes O(k<sup>3<\/sup>), calculates it, notes it is a large number, isn&#8217;t nearly half the story.  A more complete version of the story can be found in Rod&#8217;s thesis, and in particular I would direct you to the plot on page 151.  There, for example, you will learn that the real story is that a quantum computer running at 1 MHZ could factor a 4096 qubit number using millions of qubits, in about an hour, even with the severe restriction of the architecture being a linear nearest neighbor system.<br \/>\nThen the author goes on to say some very strange things<\/p>\n<blockquote><p>A complication in my calculations is the relationship between quantum gates and quantum bits. For small numbers of qubits, you get about 200 qugates per qubit. But qubits are rum beasts. There are several major technologies that people are trying to tease qubits out of. There&#8217;s the adiabatic techlogies that D-Wave is trying. There are photon dots, and who knows how many semiconductor-based methods.\n<\/p><\/blockquote>\n<p>Quantum gates per qubit?  I assume the author is refering to problems with quantum error correction, but have no idea where the 200 quantum gates per qubit number comes from.  Anyone?  (And &#8220;photon dots?&#8221;  The author probably means quantum dots used to produce single photons and linear optics, but &#8220;photon dots&#8221; what the hell are those?)<br \/>\nThe confusion continues with<\/p>\n<blockquote><p>\nBut let&#8217;s just assume that they all work as advertised, today. My next observation is that probably looking at billions of q-bits to be able to get trillions of q-gates. My questions to people who know about the relationship between quantum gates and quantum bits yielded that the real experts don&#8217;t have a good answer, but that 200:1 ratio is more likely to go down than up. Intel&#8217;s two-billion transistor &#8220;Tukwila&#8221; chip comes out this year. Five trillion is a big number. We are as likely to need 25 billion qbits to factor that number as any other good guess. Wow.\n<\/p><\/blockquote>\n<p>Yeah, certainly a billion qubits is a lot, but the numbers I see are millions to tens of millions.<br \/>\nFinally we get something truly strange:<\/p>\n<blockquote><p>\nThe factoring that has been done on today&#8217;s quantum computers is of a four-bit number, 15. If you pay attention to quantum computing articles, you&#8217;ll note they always factor 15. There&#8217;s a reason for this. It&#8217;s of the form (2<sup>n<\/sup>-1) * ( 2<sup>n<\/sup>+1). In binary, 2<sup>n<\/sup>-1 is a string of all 1 bits. A number that is 2<sup>n<\/sup>+1 is a 1 bit followed by a string of 0s, and then a 1 again. These numbers are a special form that is easy to factor, and in the real world not going to occur in a public key.\n<\/p><\/blockquote>\n<p>No the reason 15 was factored doesn&#8217;t have anything to do with the fact that these numbers are easy to factor.  It has to do with this being the smallest example where Shor&#8217;s algorithm is not vacuous.  Strawman, meet this paragraph.  Paragraph, strawman.<br \/>\nNext we get some more silliness:<\/p>\n<blockquote><p>\nLet&#8217;s presume that quantum computers advance in some exponential curve that resembles Moore&#8217;s Law. That is to say that there is going to be a doubling of quantum gates periodically, and we&#8217;ll call that period a &#8220;generation.&#8221; Moore&#8217;s specific observation about transistors had a generation every eighteen months.<br \/>\nThe difference between factoring four bits and factoring 4096 bits is 30 generations. In other words, 72*4<sup>3<\/sup> * 2<sup>30<\/sup> = 72*4096<sup>3<\/sup>. If we look at a generation of eighteen months, then quantum computers will be able to factor a 4096-bit number in 45 years, or on the Ides of March, 2053.\n<\/p><\/blockquote>\n<p>Okay, so what is wrong with this argument?  Well first of all, the author takes the quantum computer of four qubits, and then converts this to a number which is, as the author says about a number about the total number of quantum gates!  Doh.  The number of quantum gates needed to factor 15 isn&#8217;t 4.  But even assuming this, note that the author is trying to compare apples and oranges.  There are two separate issues going on in these scaling arguments.  One is the number of qubits and the other is the depth of the circuits used in Shor&#8217;s algorithm.  If you make a reasonable division between these two (as is done in Van Meter&#8217;s thesis) for example, then I can assure you that the date at which we factor a 4096 bit number, assuming a Moore&#8217;s law type scaling, certainly ain&#8217;t 2053.<br \/>\nAnd then finally we have the triumphant &#8220;I asked a smart guy ending:&#8221;<\/p>\n<blockquote><p>\nBut I also talked to a bigwig in Quantum Information Theory (that&#8217;s quantum computing and more) and gave him a sketch of my argument. I heard him speak about Quantum Information and he gave the usual Oooooo Scary Quantum Computers Are Going to Factor Numbers Which Will Cause The Collapse of All Financial Markets And Then We Will All DIEEEEE &#8212; So That&#8217;s Why We Need More Research Money boosterism.<br \/>\nHe wouldn&#8217;t let me attribute anything to him, which I understand completely. We live in a world in which partisanship is necessary and if he were seen putting down the pompoms, he&#8217;d be fired. Telling middle-aged technocrats that the math says their grandkids are going to see quantum computers shortly before they retire will cause the research money dry up, and if that happens then &#8212; well, the world won&#8217;t end. And then where would we be?<br \/>\nNonetheless, he said to me sotto voce, &#8220;There&#8217;s nothing wrong with your math.&#8221;\n<\/p><\/blockquote>\n<p>Okay, peoples, fess up.  Who was it who didn&#8217;t read this closely enough?<br \/>\nSo what&#8217;s the lesson?  Building a real quantum computer for cracking RSA is a huge task.  It&#8217;s not, however, one, which, as the author of the above article insinuates, is beyond reason to be striving to achieve.  It&#8217;s also important to point out that there are also lots of other reasons we&#8217;d like to build a quantum computer, not the least of which is doing things like physical chemistry with them (and these kick in their advantage, it seems, for much smaller and short running quantum computers.)<br \/>\nAnother thing I find fascinating about this whole discussion is that the basic slowdown in Shor&#8217;s algorithm is the slowdown used by RSA in its encryption.  What this tells me at some deep level is that the quantum computers were are going to build to break modern public key cryptosystems are probably also going to have to be comparable in power to the computers they are trying to beat.  In other words I&#8217;d be amazed if a TRS-80 quantum computer can break the cryptography on today&#8217;s desktop.  On the other hand, it&#8217;s also important to realize that modern public key cryptosystem&#8217;s are probably restricted, right now, to something not too different from aTRS-80 color computer&#8230;.because they&#8217;re running on your cell phone!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Over at Emergent Chaos I found an article which throws down the gauntlet over quantum computers. And there isn&#8217;t anything I cherish more than gauntlets thrown down! Note: I should preface this by saying that I don&#8217;t consider myself a over the top hyper of quantum computers in the sense attacked by the author. I &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/dabacon.org\/pontiff\/2008\/03\/24\/shor-calculations-quantum-wonkish\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Shor Calculations (Quantum Wonkish)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[65,66],"tags":[],"class_list":["post-1878","post","type-post","status-publish","format-standard","hentry","category-quantum-computing","category-quantum-computing-bastardizations"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/dabacon.org\/pontiff\/wp-json\/wp\/v2\/posts\/1878","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dabacon.org\/pontiff\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dabacon.org\/pontiff\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dabacon.org\/pontiff\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dabacon.org\/pontiff\/wp-json\/wp\/v2\/comments?post=1878"}],"version-history":[{"count":0,"href":"https:\/\/dabacon.org\/pontiff\/wp-json\/wp\/v2\/posts\/1878\/revisions"}],"wp:attachment":[{"href":"https:\/\/dabacon.org\/pontiff\/wp-json\/wp\/v2\/media?parent=1878"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dabacon.org\/pontiff\/wp-json\/wp\/v2\/categories?post=1878"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dabacon.org\/pontiff\/wp-json\/wp\/v2\/tags?post=1878"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}