Shor's Factoring Algorithm and Modular Exponentiation Operators

Q1 Arts and Humanities Quanta Pub Date : 2023-09-15 DOI:10.12743/quanta.v12i1.235
Robert L. Singleton Jr
{"title":"Shor's Factoring Algorithm and Modular Exponentiation Operators","authors":"Robert L. Singleton Jr","doi":"10.12743/quanta.v12i1.235","DOIUrl":null,"url":null,"abstract":"We provide a pedagogical presentation of Shor's factoring algorithm, which is a quantum algorithm for factoring very large numbers (of order of hundreds to thousands of bits) in polynomial time. In contrast, all known classical algorithms for the factoring problem take an exponential time to factor such large numbers. Shor's algorithm therefore has profound implication for public-key encryption such as RSA and Diffie–Hellman key exchange. We assume no prior knowledge of Shor's algorithm beyond a basic familiarity with the circuit model of quantum computing. Shor's algorithm contains a number of moving parts, and can be rather daunting at first. The literature is replete with derivations and expositions of Shor's algorithm, but most of them seem to be lacking in essential details, and none of them provide a pedagogical presentation. They require a thicket of appendices and assume a knowledge of quantum algorithms and classical mathematics with which the reader might not be familiar. We therefore start with first principle derivations of the quantum Fourier transform (QFT) and quantum phase estimation (QPE), which are the essential building blocks of Shor's algorithm. We then go on to develop the theory of modular exponentiation (ME) operators, one of the fundamental components of Shor's algorithm, and the place where most of the quantum resources are deployed. We also delve into the number theory that establishes the link between factorization and the period of the modular exponential function. We then apply the QPE algorithm to obtain Shor's factoring algorithm. We also discuss the post-quantum processing and the method of continued fractions, which is used to extract the exact period of the modular exponential function from the approximately measured phase angles of the ME operator. The manuscript then moves on to a series of examples. We first verify the formalism by factoring N=15, the smallest number accessible to Shor's algorithm. We then proceed to factor larger integers, developing a systematic procedure that will find the ME operators for any semi-prime N=p×q (where q and p are prime). Finally, we factor the composite numbers N=21, 33, 35, 143, 247 using the Qiskit simulator. It is observed that the ME operators are somewhat forgiving, and truncated approximate forms are able to extract factors just as well as the exact operators. This is because the method of continued fractions only requires an approximate phase value for its input, which suggests that implementing Shor's algorithm might not be as difficult as first suspected.Quanta 2023; 12: 41–130.","PeriodicalId":37613,"journal":{"name":"Quanta","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2023-09-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Quanta","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.12743/quanta.v12i1.235","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"Arts and Humanities","Score":null,"Total":0}
引用次数: 0

Abstract

We provide a pedagogical presentation of Shor's factoring algorithm, which is a quantum algorithm for factoring very large numbers (of order of hundreds to thousands of bits) in polynomial time. In contrast, all known classical algorithms for the factoring problem take an exponential time to factor such large numbers. Shor's algorithm therefore has profound implication for public-key encryption such as RSA and Diffie–Hellman key exchange. We assume no prior knowledge of Shor's algorithm beyond a basic familiarity with the circuit model of quantum computing. Shor's algorithm contains a number of moving parts, and can be rather daunting at first. The literature is replete with derivations and expositions of Shor's algorithm, but most of them seem to be lacking in essential details, and none of them provide a pedagogical presentation. They require a thicket of appendices and assume a knowledge of quantum algorithms and classical mathematics with which the reader might not be familiar. We therefore start with first principle derivations of the quantum Fourier transform (QFT) and quantum phase estimation (QPE), which are the essential building blocks of Shor's algorithm. We then go on to develop the theory of modular exponentiation (ME) operators, one of the fundamental components of Shor's algorithm, and the place where most of the quantum resources are deployed. We also delve into the number theory that establishes the link between factorization and the period of the modular exponential function. We then apply the QPE algorithm to obtain Shor's factoring algorithm. We also discuss the post-quantum processing and the method of continued fractions, which is used to extract the exact period of the modular exponential function from the approximately measured phase angles of the ME operator. The manuscript then moves on to a series of examples. We first verify the formalism by factoring N=15, the smallest number accessible to Shor's algorithm. We then proceed to factor larger integers, developing a systematic procedure that will find the ME operators for any semi-prime N=p×q (where q and p are prime). Finally, we factor the composite numbers N=21, 33, 35, 143, 247 using the Qiskit simulator. It is observed that the ME operators are somewhat forgiving, and truncated approximate forms are able to extract factors just as well as the exact operators. This is because the method of continued fractions only requires an approximate phase value for its input, which suggests that implementing Shor's algorithm might not be as difficult as first suspected.Quanta 2023; 12: 41–130.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Shor的因式分解算法和模幂算子
我们提供了Shor因子算法的教学演示,这是一种量子算法,用于在多项式时间内分解非常大的数字(数百到数千位的顺序)。相比之下,所有已知的用于分解问题的经典算法都需要指数级的时间来分解如此大的数字。因此,肖尔算法对RSA和Diffie-Hellman密钥交换等公钥加密具有深远的意义。我们假设除了对量子计算电路模型的基本熟悉之外,没有对肖尔算法的先验知识。肖尔的算法包含许多可移动的部分,一开始可能会让人望而生畏。文献中充满了对肖尔算法的推导和阐述,但它们中的大多数似乎缺乏基本细节,而且没有一个提供教学演示。它们需要一大堆附录,并假定读者可能不熟悉量子算法和经典数学知识。因此,我们从量子傅立叶变换(QFT)和量子相位估计(QPE)的第一性原理推导开始,它们是Shor算法的基本组成部分。然后,我们继续发展模幂运算(ME)算子理论,这是Shor算法的基本组成部分之一,也是部署大多数量子资源的地方。我们还深入研究了数论,建立了因数分解和模指数函数周期之间的联系。然后应用QPE算法得到Shor因子分解算法。我们还讨论了后量子处理和连分数方法,该方法用于从ME算子的近似测量相角中提取模指数函数的精确周期。手稿接着列举了一系列的例子。我们首先通过分解N=15来验证形式主义,N=15是肖尔算法可访问的最小数字。然后,我们继续分解更大的整数,开发一个系统的过程,该过程将找到任何半素数N=p×q(其中q和p是素数)的ME算子。最后,我们使用Qiskit模拟器对合数N= 21,33,35,143,247进行因式分解。可以观察到,ME运算符在某种程度上是宽容的,截断的近似形式能够像精确运算符一样提取因子。这是因为连分式的方法只需要一个近似的相位值作为其输入,这表明实现肖尔算法可能并不像最初想象的那么困难。广达2023;12: 41 - 130。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
Quanta
Quanta Arts and Humanities-History and Philosophy of Science
CiteScore
1.30
自引率
0.00%
发文量
5
审稿时长
12 weeks
期刊介绍: Quanta is an open access academic journal publishing original research and review articles on foundations of quantum mechanics, mathematical physics and philosophy of science.
期刊最新文献
Tunneling Probability of Quantum Wavepacket in Time-Dependent Potential Well The Enigmas of Fluctuations of the Universal Quantum Fields On Weak Values and Feynman's Blind Alley Quantum Mechanics with Real Numbers: Entanglement, Superselection Rules and Gauges Shor's Factoring Algorithm and Modular Exponentiation Operators
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1