{"id":8593,"date":"2025-01-23T12:58:38","date_gmt":"2025-01-23T18:58:38","guid":{"rendered":"https:\/\/scottaaronson.blog\/?p=8593"},"modified":"2025-01-24T10:07:40","modified_gmt":"2025-01-24T16:07:40","slug":"good-news-for-once-a-faster-quantum-fourier-transform","status":"publish","type":"post","link":"https:\/\/scottaaronson.blog\/?p=8593","title":{"rendered":"Good news for once!  A faster Quantum Fourier Transform"},"content":{"rendered":"\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Update:<\/mark><\/strong> In the comments, Craig Gidney <a href=\"https:\/\/scottaaronson.blog\/?p=8593#comment-2000868\">points out<\/a> that Ronit&#8217;s O(n log<sup>2<\/sup> n) quantum circuits for the exact QFT were already published by <a href=\"http:\/\/arxiv.org\/abs\/quant-ph\/0006004\">Cleve and Watrous<\/a> in 2000 (in a paper whose main point was something else, parallelization).  Ronit&#8217;s O(n (log log n)<sup>2<\/sup>) circuits for the approximate QFT still appear to be new (Gidney says he and others <a href=\"https:\/\/algassert.com\/post\/1620\">knew related techniques<\/a> but had never explicitly combined them).  Of course, while the exact result was Platonically &#8220;known,&#8221; it wasn&#8217;t sufficiently <em>well<\/em> known that any of the four quantum algorithms experts I&#8217;d consulted had heard of it!  Hopefully this very post will go some way toward fixing the situation.<\/p>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Another Update:<\/mark><\/strong> Richard Cleve <a href=\"https:\/\/scottaaronson.blog\/?p=8593#comment-2000899\">writes in<\/a> <a href=\"https:\/\/prism.ucalgary.ca\/items\/747b4b9d-2e67-4f90-8475-8ec6d236a419\">to say<\/a> that the approximate QFT circuits were known also&#8212;albeit, in an <a href=\"https:\/\/cs.uwaterloo.ca\/~cleve\/pubs\/2004EfficientQft.pdf\">unpublished 2-page abstract<\/a> by Ahokas, Hales, and himself from the 2003 ERATO conference, as well as a followup <a href=\"https:\/\/prism.ucalgary.ca\/items\/747b4b9d-2e67-4f90-8475-8ec6d236a419\">Master&#8217;s thesis<\/a> by Ahokas.  Unlike with the exact case, I&#8217;m not kicking myself trying to understand how I missed <em>these<\/em>.<\/p>\n\n\n\n<p>Ironically, I hope this post helps get this prior work a well-deserved mention when the QFT is covered in introductory quantum information classes.<\/p>\n\n\n\n<p>Meanwhile, my hope that Ronit returns to do more theory is undiminished! When I was a kid, I too started by rediscovering things (like the <a href=\"https:\/\/math.libretexts.org\/Bookshelves\/Calculus\/Calculus_(OpenStax)\/06%3A_Applications_of_Integration\/6.04%3A_Arc_Length_of_a_Curve_and_Surface_Area\">integral<\/a> for the length of a curve) that were centuries old, then rediscovering things (like an efficient algorithm for <a href=\"https:\/\/en.wikipedia.org\/wiki\/Isotonic_regression\">isotonic regression<\/a>) that were decades old, then rediscovering things (like <a href=\"https:\/\/epubs.siam.org\/doi\/pdf\/10.1137\/S0097539795293639\">BQP\u2286PP<\/a>) that were about a year old \u2026 until I\u00a0<em>finally<\/em>\u00a0started discovering things (like the <a href=\"https:\/\/www.scottaaronson.com\/papers\/collision.pdf\">collision lower bound<\/a>) that were zero years old. This is the way.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>In my <a href=\"https:\/\/scottaaronson.blog\/?p=8591\">last post<\/a>, I tried to nudge the arc of history back onto the narrow path of reasoned dialogue, walking the mile-high tightrope between shrill, unsupported accusation and na\u00efve moral blindness. For my trouble, I was condemned about equally by leftists for my right-wing sympathies and by rightists for my left-wing ones. So today, I&#8217;ll ignore the fate of civilization and return to quantum computing theory: a subject that&#8217;s reliably brought joy to my life for a quarter-century, and still does, even as my abilities fade.  It turns out there <em>is<\/em> a consolation for advancing age and senility, and it&#8217;s called &#8220;students.&#8221;<\/p>\n\n\n\n<p>This fall, I returned from my two-year leave at OpenAI to teach my undergrad <a href=\"https:\/\/www.scottaaronson.com\/qclec.pdf\">Introduction to Quantum Information Science<\/a> course at UT Austin.  This course doesn&#8217;t pretend to bring students all the way to the research frontier, and yet sometimes it&#8217;s done so anyway.  It was in my first offering of Intro to QIS, eight years ago, that I encountered the then 17-year-old <a href=\"https:\/\/en.wikipedia.org\/wiki\/Ewin_Tang\">Ewin Tang<\/a>, who broke the curve and then wanted an independent study project.  So I gave her the problem of proving that the <a href=\"https:\/\/arxiv.org\/abs\/1603.08675\">Kerenidis-Prakash quantum algorithm<\/a> achieves an exponential speedup over any classical algorithm for the same task, not expecting anything to come of it.  But after a year of work, Ewin <a href=\"https:\/\/scottaaronson.blog\/?p=3880\">refuted my conjecture<\/a> by <a href=\"https:\/\/arxiv.org\/abs\/1807.04271\">dequantizing the K-P algorithm<\/a>&#8212;a <a href=\"https:\/\/www.quantamagazine.org\/teenager-finds-classical-alternative-to-quantum-recommendation-algorithm-20180731\/\">breakthrough<\/a> that led to the demolition of many other hopes for quantum machine learning.  (Demolishing people&#8217;s hopes?  In complexity theory, we call that a proud day&#8217;s work.)<\/p>\n\n\n\n<p>Today I&#8217;m delighted to announce that my undergrad quantum course has led to <em>another<\/em> quantum advance.  One day, after my lecture, a junior named Ronit Shah came to me with an idea for how best to distinguish <em>three<\/em> possible states of a qubit, rather than only two.  For some reason I didn&#8217;t think much of it at the time, even though it would later turn out that Ronit had essentially rediscovered the concept of <a href=\"https:\/\/en.wikipedia.org\/wiki\/POVM\">POVMs<\/a>, the <a href=\"https:\/\/www.cs.cmu.edu\/~odonnell\/quantum15\/lecture20.pdf\">Pretty Good Measurement<\/a> (PGM), and the 2002 <a href=\"https:\/\/arxiv.org\/abs\/quant-ph\/0211111\">theorem<\/a> that the PGM is optimal for distinguishing sets of states subject to a transitive group action.<\/p>\n\n\n\n<p>Later, after I&#8217;d lectured about <a href=\"https:\/\/en.wikipedia.org\/wiki\/Shor%27s_algorithm\">Shor&#8217;s algorithm<\/a>, and one of its centerpieces, the O(n<sup>2<\/sup>)-gate recursive circuit for the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Quantum_Fourier_transform\">Quantum Fourier Transform<\/a>, Ronit struck a second time. He told me it should be possible to give a smaller circuit by recursively reducing the n-qubit QFT to two (n\/2)-qubit QFTs, rather than to a single (n-1)-qubit QFT.<\/p>\n\n\n\n<p><em>This<\/em> was surely just a trivial confusion, perfectly excusable in an undergrad. Did Ronit perhaps not realize that an n-qubit unitary is actually a 2<sup>n<\/sup>\u00d72<sup>n<\/sup> matrix, so he was proposing to pass directly from 2<sup>n<\/sup>\u00d72<sup>n<\/sup> to 2<sup>n\/2<\/sup>\u00d72<sup>n\/2<\/sup>, rather than to 2<sup>n-1<\/sup>\u00d72<sup>n-1<\/sup>?<\/p>\n\n\n\n<p>No, he said, he understood that perfectly well. He still thought the plan would work. Then he emailed me a writeup&#8212;claiming to implement the exact n-qubit QFT in O(n log<sup>2<\/sup>n) gates, the first-ever improvement over O(n<sup>2<\/sup>), and <em>also<\/em> the approximate n-qubit QFT in O(n (log log n)<sup>2<\/sup>) gates, the first-ever improvement over O(n log n).  He used fast integer multiplication algorithms to make the new recursions work.<\/p>\n\n\n\n<p>At that point, I did something I&#8217;m still ashamed of: I sat on Ronit&#8217;s writeup for three weeks.  When I at last dug it out of my inbox and read it, I could discover no reason why it was wrong, <em>or<\/em> unoriginal, <em>or<\/em> unimportant.  But I didn&#8217;t trust myself, so with Ronit&#8217;s permission I sent the work to some of my oldest quantum friends: Ronald de Wolf, Cris Moore, Andrew Childs, and Wim van Dam.  They agreed, after some back-and-forth, that the new circuits looked legit.  A keystone of Shor&#8217;s algorithm, of quantum computing itself, and of my undergrad class had seen its first real improvement since 1994.<\/p>\n\n\n\n<p>Last night Ronit&#8217;s paper <a href=\"https:\/\/arxiv.org\/abs\/2501.12414\">appeared on the arXiv<\/a> where you can read it.<\/p>\n\n\n\n<p>In case anyone asks: no, this probably has no practical implication for speeding up factoring on a quantum computer, since the QFT wasn&#8217;t the expensive part of Shor&#8217;s algorithm anyway&#8212;that&#8217;s the modular exponentiation&#8212;and also, the O(n log n) approximate QFT would already have been used in practice.  But it&#8217;s conceivable that Ronit&#8217;s circuits <em>could<\/em> speed up other practical quantum computing tasks!  And no, we have no idea what&#8217;s the ultimate limit here, as usual in circuit complexity.  Could the exact n-qubit QFT even be doable in O(n) gates?<\/p>\n\n\n\n<p>I&#8217;d love for Ronit to continue in quantum computing theory.  But in what&#8217;s surely a sign of the times, he&#8217;s just gone on leave from UT to intern at an AI hardware startup.  I hope he returns and does some more theory, but if he doesn&#8217;t, I&#8217;m grateful that he shared this little gem with us on his way to more world-changing endeavors.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update: In the comments, Craig Gidney points out that Ronit&#8217;s O(n log2 n) quantum circuits for the exact QFT were already published by Cleve and Watrous in 2000 (in a paper whose main point was something else, parallelization). Ronit&#8217;s O(n (log log n)2) circuits for the approximate QFT still appear to be new (Gidney says [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false},"categories":[5,4],"tags":[],"class_list":["post-8593","post","type-post","status-publish","format-standard","hentry","category-complexity","category-quantum"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/posts\/8593","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8593"}],"version-history":[{"count":5,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/posts\/8593\/revisions"}],"predecessor-version":[{"id":8600,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/posts\/8593\/revisions\/8600"}],"wp:attachment":[{"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8593"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8593"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}