Shor's Algorithm for Factoring Large Integers

合集下载

shor

shor

Shor 算法摘要: RSA 加密算法是一种非对称加密算法,由于对极大整数做因数分解的难度决定了RSA 算法的可靠性。

Shor 算法利用量子计算的并行性,可以快速分解出大数的质因子,随着Shor 算法的提出和量子计算机研究的深入,RSA 算法面临的威胁与日俱增。

关键词:RSA 算法 Shor 算法 量子 周期1、引言RSA 算法是第一个能同时用于加密和数字签名的算法,也易于理解和操作。

RSA 是被研究得最广泛的公钥算法,从提出到现今的三十多年里,经历了各种攻击的考验,逐渐为人们接受,普遍认为是最优秀的公钥方案之一。

但是随着Shor 算法的提出和量子计算机研究的深入,RSA算法面临的威胁与日俱增。

Shor 算法是迄今量子计算领域最著名的算法。

它利用量子计算的并行性,可以快速分解出大数的质因子,将使量子计算机很容易破解目前广泛使用的密码如RSA 公钥加密系统,严重威胁到银行、网络和电子商务等的信息安全以及国家安全。

因此,Shor 算法的提出迅速引起了世界各国对量子计算研究的高度关注。

2、RSA算法原理2.1选取1)随机选择两个大质数p和q,p不等于q,计算N=pq;2)选取平文m ,并且有m<N;3)计算N的欧拉数ϕ(N)=(p-1)(q-1).2.2选取公钥(e,N)1)选取公钥,满足条件gcd (ϕ(N),e)=1.2.3加密1)寻找d ,满足条件e d ⨯≡1mod (ϕ(N));2)将平文编码:N c m emod ≡,求得密文c. 2.4 解密利用私钥(d ,N )、密文c 和算法c d ≡n m mod 求得m。

由算法过程可知,能否由N找出p和q是破解RSA算法的关键。

RSA解密可转化为求如下的大数因子分解问题:N为已知大奇数,N=m×n,求m和n。

2.5原理分析L 表示存储位数,当N 增加时,L 也随之增加。

分解N 需要的计算次数为:L L N N→=2log 2121,这类问题是不可解问题。

A Sequential Algorithm for Generating Random Graphs

A Sequential Algorithm for Generating Random Graphs
A Sequential Algorithm for Generating Random Graphs
Mohsen Bd Amin Saberi1
arXiv:cs/0702124v4 [] 16 Jun 2007
Stanford University {bayati,saberi}@ 2 Yonsei University jehkim@yonsei.ac.kr
(FPRAS) for generating random graphs; this we can do in almost linear time. An FPRAS provides an arbitrary close approximaiton in time that depends only polynomially on the input size and the desired error. (For precise definitions of this, see Section 2.) Recently, sequential importance sampling (SIS) has been suggested as a more suitable approach for designing fast algorithms for this and other similar problems [18, 13, 35, 6]. Chen et al. [18] used the SIS method to generate bipartite graphs with a given degree sequence. Later Blitzstein and Diaconis [13] used a similar approach to generate general graphs. Almost all existing work on SIS method are justified only through simulations and for some special cases counter examples have been proposed [11]. However the simplicity of these algorithms and their great performance in several instances, suggest further study of the SIS method is necessary. Our Result. Let d1 , . . . , dn be non-negative integers given for the degree sequence n and let i=1 di = 2m. Our algorithm is as follows: start with an empty graph and sequentially add edges between pairs of non-adjacent vertices. In every step of the procedure, the probability that an edge is added between two distinct ˆj (1 − di dj /4m) where d ˆi and d ˆj denote ˆi d vertices i and j is proportional to d the remaining degrees of vertices i and j . We will show that our algorithm produces an asymptotically uniform sample with running time of O(m dmax ) when maximum degree is of O(m1/4−τ ) and τ is any positive constant. Then we use a simple SIS method to obtain an FPRAS for any ep, δ > 0 with running time O(m dmax ǫ−2 log(1/δ )) for generating graphs with dmax = O(m1/4−τ ). Moreover, we show that for d = O(n1/2−τ ), our algorithm can generate an asymptotically uniform d-regular graph. Our results are improving the bounds of Kim and Vu [34] and Steger and Wormald [45] for regular graphs. Related Work. McKay and Wormald [37, 39] give asymptotic estimates for number of graphs within the range dmax = O(m1/3−τ ). But, the error terms in their estimates are larger than what is needed to apply Jerrum, Valiant and Vazirani’s [25] reduction to achieve asymptotic sampling. Jerrum and Sinclair [26] however, use a random walk on the self-reducibility tree and give an FPRAS for sampling graphs with maximum degree of o(m1/4 ). The running time of their algorithm is O(m3 n2 ǫ−2 log(1/δ )) [44]. A different random walk studied by [27, 28, 10] gives an FPRAS for random generation for all degree sequences for bipartite graphs and almost all degree sequences for general graphs. However the running time of these algorithms is at least O(n4 m3 dmax log5 (n2 /ǫ)ǫ−2 log(1/δ )). For the weaker problem of generating asymptotically uniform samples (not an FPRAS) the best algorithm was given by McKay and Wormald’s switching technique on configuration model [38]. Their algorithm works for graphs 2 2 3 2 with d3 max =O(m / i di ) with average running i di ) and dmax = o(m + 2 2 2 4 time of O(m + ( i di ) ). This leads to O(n d ) average running time for dregular graphs with d = o(n1/3 ). Very recently and independently from our work, Blanchet [12] have used McKay’s estimate and SIS technique to obtain an FPRAS with running time O(m2 ) for sampling bipartite graphs with given

正确对待算法的作文题目

正确对待算法的作文题目

正确对待算法的作文题目英文回答:Correct Attitude towards Algorithms.Algorithms have become an integral part of our daily lives, from the way we search for information on the internet to the way we shop online. With the increasing reliance on algorithms, it is important for us to have a correct attitude towards them.First and foremost, it is important to understand that algorithms are simply a set of instructions or rules to be followed in problem-solving operations. They are not inherently good or bad, but it is how they are used that determines their impact. Therefore, it is crucial for us to use algorithms responsibly and ethically.Furthermore, it is essential to be aware of the potential biases and limitations of algorithms. Algorithmsare created by humans, and as a result, they may reflect the biases and prejudices of their creators. It is important to critically evaluate the algorithms we encounter and consider the potential implications of their use.In addition, it is important to remember that algorithms are tools, not replacements for human judgment and critical thinking. While algorithms can assist us in processing and analyzing large amounts of data, they should not be relied upon blindly. It is important to use algorithms as a complement to human intelligence, rather than a substitute for it.In conclusion, having a correct attitude towards algorithms involves using them responsibly, being aware of their potential biases, and recognizing their limitations. By approaching algorithms with a critical mindset, we can harness their potential while mitigating their negative impact.中文回答:正确对待算法。

最优化方法有关牛顿法的矩阵的秩为一的题目

最优化方法有关牛顿法的矩阵的秩为一的题目

英文回答:The Newton-Raphson method is an iterative optimization algorithm utilized for locating the local minimum or maximumof a given function. Within the realm of optimization, the Newton-Raphson method iteratively updates the current solution by leveraging the second derivative information of the objective function. This approach enables the method to converge towards the optimal solution at an accelerated pacepared to first-order optimization algorithms, such as the gradient descent method. Nonetheless, the Newton-Raphson method necessitates the solution of a system of linear equations involving the Hessian matrix, which denotes the second derivative of the objective function. Of particular note, when the Hessian matrix possesses a rank of one, it introduces a special case for the Newton-Raphson method.牛顿—拉弗森方法是一种迭代优化算法,用于定位特定函数的局部最小或最大值。

纹理物体缺陷的视觉检测算法研究--优秀毕业论文

纹理物体缺陷的视觉检测算法研究--优秀毕业论文

摘 要
在竞争激烈的工业自动化生产过程中,机器视觉对产品质量的把关起着举足 轻重的作用,机器视觉在缺陷检测技术方面的应用也逐渐普遍起来。与常规的检 测技术相比,自动化的视觉检测系统更加经济、快捷、高效与 安全。纹理物体在 工业生产中广泛存在,像用于半导体装配和封装底板和发光二极管,现代 化电子 系统中的印制电路板,以及纺织行业中的布匹和织物等都可认为是含有纹理特征 的物体。本论文主要致力于纹理物体的缺陷检测技术研究,为纹理物体的自动化 检测提供高效而可靠的检测算法。 纹理是描述图像内容的重要特征,纹理分析也已经被成功的应用与纹理分割 和纹理分类当中。本研究提出了一种基于纹理分析技术和参考比较方式的缺陷检 测算法。这种算法能容忍物体变形引起的图像配准误差,对纹理的影响也具有鲁 棒性。本算法旨在为检测出的缺陷区域提供丰富而重要的物理意义,如缺陷区域 的大小、形状、亮度对比度及空间分布等。同时,在参考图像可行的情况下,本 算法可用于同质纹理物体和非同质纹理物体的检测,对非纹理物体 的检测也可取 得不错的效果。 在整个检测过程中,我们采用了可调控金字塔的纹理分析和重构技术。与传 统的小波纹理分析技术不同,我们在小波域中加入处理物体变形和纹理影响的容 忍度控制算法,来实现容忍物体变形和对纹理影响鲁棒的目的。最后可调控金字 塔的重构保证了缺陷区域物理意义恢复的准确性。实验阶段,我们检测了一系列 具有实际应用价值的图像。实验结果表明 本文提出的纹理物体缺陷检测算法具有 高效性和易于实现性。 关键字: 缺陷检测;纹理;物体变形;可调控金字塔;重构
Keywords: defect detection, texture, object distortion, steerable pyramid, reconstruction
II

量子计算密码攻击进展

量子计算密码攻击进展

第43卷第9期计算机学报Vol. 43 No. 9量子计算密码攻击进展王潮1) ,2), 3)姚皓南1),2)王宝楠1),2),5)胡风1),2)张焕国6)纪祥敏4),6)1)(特种光纤与光接入网重点实验室, 特种光纤与先进通信国际合作联合实验室上海大学上海 200444)2)(密码科学技术国家重点实验室北京 100878)3)(鹏城实验室量子计算中心广东深圳 518000)4)(福建农林大学计算机与信息学院福州 350002)5)(上海电力大学计算机科学与技术学院上海 200090)6)(武汉大学国家网络安全学院武汉 430072)摘 要通用量子计算机器件进展缓慢,对实用化1024-bit的RSA密码破译尚不能构成威胁,现代密码依旧是安全的. 量子计算密码攻击需要探索新的途径:一是,量子计算能否协助/加速传统密码攻击模式,拓展已有量子计算的攻击能力;二是,需要寻找Shor算法之外的量子计算算法探索密码攻击. 对已有的各类量子计算整数分解算法进行综述,分析量子计算密码攻击时面对的挑战,以及扩展至更大规模整数分解存在的问题. 结合Shor算法改进过程,分析Shor算法对现代加密体系造成实质性威胁前遇到的困难并给出Shor破译2048位RSA需要的资源. 分析基于D-Wave量子退火原理的RSA破译,这是一种新的量子计算公钥密码攻击算法,与Shor算法原理上有本质性不同. 将破译RSA问题转换为组合优化问题,利用量子退火算法独特的量子隧穿效应跳出局部最优解逼近全局最优解,和经典算法相比有指数级加速的潜力. 进一步阐述Grover量子搜索算法应用于椭圆曲线侧信道攻击,拓展其攻击能力. 探讨量子人工智能算法对NTRU等后量子密码攻击的可能性.关键词量子计算;量子退火;量子计算密码;量子攻击中图法分类号TP309 DOI号 10.11897/SP.J.1016.2020.01691Progress in Quantum Computing Cryptography AttacksWANG Chao1),2),3) YAO Hao-Nan1),2) WANG Bao-Nan1),2),5) HU Feng1),2)ZHANG Huan-Guo6) JI Xiang-Min4),6)1)(Key Laboratory of Specialty Fiber Optics and Optical Access Networks, Joint International Research Laboratory of Specialty Fiber Optics and AdvancedCommunication, Shanghai University, Shanghai 200444)2)( State Key Laboratory of Cryptology, Beijing 100878)3)( Center for Quantum Computing, Peng Cheng Laboratory, Guangdong Shenzhen 518000)4)(College of Computer Information Science, Fujian Agriculture and Forestry University, Fuzhou 350002)5)(College of Computer Science and Technology, Shanghai University of Electric Power, Shanghai 200090)6)(School of Cyber Science and Engineering, Wuhan University, Wuhan 430072)Abstract Due to the limitations of hardware, the development of universal quantum computer devices isslow. At present, the maximum integer factorization by general Shor’s algorithm is 85 (using the characteristics of Fermat numbers to factor the integer 85 with 8 qubits), which is not a threat to thepractical 1024-bit RSA by Shor’s algorithm. Since the universal quantum computer cannot be practical in a收稿日期:2019-08-27;在线出版日期:2020-02-07. 本课题得到“国防创新特区项目”、国家自然科学基金项目(61572304,61272096)、国家自然科学基金重点项目(61332019)、密码科学技术国家重点实验室开放课题基金资助. 王潮,博士,教授,中国计算机学会(CCF)会员(E200008909S),主要研究领域为人工智能、网络信息安全、量子密码学等.E-mail:****************.cn.姚皓南,硕士研究生,主要研究领域为信息安全、量子密码学. 王宝楠,博士研究生,主要研究领域为信息安全、量子密码学. 胡风,博士研究生,主要研究领域为信息安全、量子密码学. 张焕国,博士,教授,主要研究领域为密码学、密码协议、可信计算等. 纪祥敏(通信作者),博士研究生,副教授,中国计算机学会(CCF)会员(30663M),主要研究领域为信息安全、密码学、可信计算.E-mail:***************1692 计算机学报 2020年short time, the modern cryptography is still secure enough now. Quantum computing cryptography attack needs to explore new ways to enhance its quantum attacking ability: Firstly, whether quantum computing can assist/accelerate traditional cryptography attack mode and expand its more powerful quantum attacking ability on the basis of the existing quantum computing. Secondly, it is necessary to find quantum computing algorithms other than Shor’s algorithm to explore quantum computing cryptographic attack. In this paper, various existing algorithms for integer factorization algorithms of quantum computing are studied and show optimistic potentials of quantum annealing algorithm and D-Wave quantum computer for deciphering the RSA cryptosystem. Such as Shor’s algorithm (factor up to 85) via different platforms (like Hua-Wei quantum computing platform), quantum adiabatic computation via NMR (291311), D-Wave (purchased by Lockheed Martin and Google etc., has been initially used for image processing, machine learning, combinatorial optimization, and software verification etc.) quantum computer (factored up to 376289), quantum computing software environment provided by D-Wave (factor the integer 1001677 with 87 qubits) to obtain a higher success rate and extend it to a larger factorization scale. Actually, D-Wave using quantum annealing may be closer to cracking practical RSA codes than a general-purpose quantum computer (IBM) using Shor’s algorithm. In addition, the model limitations and precision problems existing in the expansion of integer factorization to a larger scale are discussed. Majorities of scholars think Shor’s algorithm as the unique and powerful quantum algorithm for cryptanalysis of RSA. Therefore, the current state of post-quantum cryptography research exclusively referred to potential threatens of Shor’s algorithm. This paper analyzes the RSA deciphering method based on D-Wave quantum annealing principle, which is a new public key cryptography attack algorithm for quantum computing, and it is fundamentally different from Shor’s algorithm in principle. It is the second effective quantum attack method (RSA deciphering) in addition to Shor’s algorithm. Thus, the post-quantum cryptography research should further consider the potentials of D-Wave quantum computer for deciphering the RSA cryptosystem in future. Furthermore, Grover’s quantum searching algorithm is applied to the elliptic curve side channel attack to expand its attack capability. It is a new effective public key cryptosystem attack method, which is helpful to expand the attack of quantum computing on other public key cryptosystem constitutions. Finally, the possibility of quantum artificial intelligence algorithm attacking NTRU and other post-quantum cryptography is discussed. It is necessary to explore a new cryptographic scheme that can resist the attack of quantum computing, and combine evolutionary cryptography with quantum artificial intelligence, which is expected to be applied to the design and analysis of cryptography algorithms in the post-quantum cryptography.Keywords traditional cryptography; quantum computing; quantum annealing; quantum computing cryptography; quantum attack1 引言现在的量子计算机可以分成两类. 一是通用量子计算机[1,2],由于硬件平台发展缓慢,对现在实用化1024-bit RSA密码破译尚不能构成威胁,现代密码依旧安全. 二是D-Wave专用量子计算机,其商业化进展迅猛. 基于通用量子计算机的Shor算法受限于量子硬件发展缓慢,对现在广泛使用的RSA公钥密码体系没有实质上的威胁. 但是人们容易将硬件发展较快、无法运行Shor算法的专用量子计算机与通用量子计算机混淆,对现代密码体系的安全性做出错误的判断,错误地以为现代密码体系即将受到Shor算法的攻击进而不再安全[3].量子计算[4,5]将有助于推动密码攻击领域的诸多课题. 量子攻击提供了一种新的、不同于传统密码的计算模式,在密码设计和破译领域实现对传统密码的进一步拓展.2014年,Nature资深评论员Matthias Troyer在报道中指出,包括Shor算法在内的量子密码破译无法实用化[6]. 2018年,Google量子人工智能实验室9期王潮等:量子计算密码攻击进展 1693主任John Martinis在Science报道中指出通用量子实用化任重道远,认为破译公钥密码距离实用化“be years”,美国能源部DOE也赞同这个观点[7,8].2018年,荣获2012年物理诺贝尔奖的Serge Haroche教授在报告“The Nobel Prize Series India 2018”中指出,短期内量子计算机有望应用于量子模拟、量子通信、量子测试等研究领域.2019年《Nature》上发表了Google最新一代量子处理器Sycamore[9],包含53个量子比特. 对量子处理器的输出进行重复性采样,并与经典计算机模拟的结果进行比较. Sycamore完成同样的任务只需要200秒,而Google估计使用目前世界上最强大的超级计算机Summit需要1万年. 以此证明该量子处理器实现了量子优越性(Quantum Supremacy). IBM 提出使用二级存储[10]可以模拟54-bit量子计算机,并且通过优化将经典计算机执行任务的时间从1万年降低到2.55天. IBM研究中心主任Dario Gil表示,量子计算机不会凌驾于经典计算机之上,两种计算机会是协同工作的方式. 量子计算机对硬件的要求较高,而将其与经典计算机进行混合架构共同执行任务,可以在达到量子加速的同时降低对量子硬件的需求.尽管现在量子计算在一个任务上已经实现了量子优越性,但是由于量子纠错和容错量子计算技术远超当前技术水平[11-13],通用量子计算机进展缓慢,量子算法达到实用化阶段尚需时日,以破译RSA公钥密码为例,目前分解n位大整数需要2n位逻辑量子比特[14]. 基于Shor算法实现破译1024位RSA密码实际需2000多位通用逻辑量子比特,远非当下的通用量子计算机所能达到. 而专用量子计算机D-Wave硬件平台发展较快并且与洛克希德马丁、谷歌、美国国家航空航天局、美国国家实验室等多家机构进行合作,在量子计算机商用化的道路上处于领跑地位. 因此,有必要探索专用量子计算机(D-Wave)在密码设计与密码分析领域的潜力.从密码学家的角度来看[15],通用量子计算存在的两个问题可能构成了量子密码分析的主要障碍:增加容错量子位的数量. 第一个是所谓的量子比特的数量. 技术的进步使可用量子位的数量经常翻倍,这与经典计算机的摩尔定律相似,但是通用量子计算机受硬件限制,发展难度较大. 第二个就是容错. 在量子计算中,错误通常是由于量子比特与其环境之间不受控制的相互作用而产生的. 2019年,最多量子比特的量子计算机拥有72个容错量子位,已经可以解决以前无法解决的组合、优化等问题,但目前还不能解决密码问题. 所以在通用量子计算机的进展缓慢、对实际运行的公钥密码不能构成安全威胁背景下,未来抗量子密码的研究有必要探索专用量子计算机(D-Wave)在密码设计与密码分析领域的潜力.本篇综述主要归纳与总结传统密码与量子计算密码攻击的国内外研究进展,分析量子计算在公钥密码攻击和椭圆曲线侧信道攻击现状,并展望量子人工智能算法对NTRU等后量子密码攻击的可能性. 为量子计算在信息科学领域的工作提供思路. 根据《Nature》[6]和《Science》[7][8]报道,通用量子计算机进展缓慢,它的几个典型应用都无法成功,破译公钥密码距离实用化“be years”,因此,量子计算密码攻击需要探索新的途径:一是,量子计算能否加速传统密码攻击模式;二是,需要寻找Shor 算法之外的量子计算算法探索密码攻击.2 Shor算法对公钥密码的攻击三种公钥密码包括离散对数难题(Discrete Logarithm Problem, DLP),大整数分解难题(Inte-ger Factorization Problem, IFP)和椭圆曲线离散对数难题(Elliptic Curve Discrete Logarithm Problem, ECDLP). 对于IFP和ECDLP,传统算法中最有效的方法是1991年由Pollard等人提出的通用数域筛选算法(GNFS)[16]. 通用数域筛选法(GNFS)求解大数质因子和椭圆曲线离散对数的时间复杂度分别是1/32/3[(log)(log(log))](e)N NO[17]和(expO(())M P [18],这里的N是指要分解的大数,k就是我们要求的椭圆曲线的离散对数,P 是有限域的素域范围.本章节主要介绍Shor算法对RSA的攻击研究和Shor算法求解椭圆曲线离散对数的研究.2.1 Shor算法分解整数的研究公钥密码系统的安全性随着Shor算法的提出和量子计算的发展受到了威胁. 众所周知,RSA密码系统的安全性在于整数分解问题的难度. 它所依赖的数论问题不能在有效的多项式时间内求解. 破译RSA的核心问题即整数分解问题[19].Shor算法通过将因式分解问题简化为求阶的问题来发挥效用. 关于量子计算机的仿真[20]及Shor算法对整数N的分解的研究一直受到国内外学者的广泛关注.1996年,阿根廷科学家Cesar Miquel等人[21]分析了损耗和退相干对量子分解电路性能的影响,1694 计 算 机 学 报 2020年并且展示分解整数N=15,这项工作为实践中实施Shor 量子算法提供了很好的参考.2000年英国伦敦帝国学院布莱克特实验室的Parker 等人[22]给出了一个单一的纯量子比特与log2N 量子比特在任意混合态下的集合都足以有效地实现Shor 分解算法.2001年,IBM 研究实验室的Vandersypen 等人[23]使用室温液态核磁共振技术实现了整数N =15的Shor 算法演示性实验. 该实验主要目的是演示量子计算机的控制和建模,没有针对Shor 算法的扩展性进行研究,无法应用到更大的整数.2004年,美国赫尔辛基理工大学的Vartiainen [24]基于约瑟夫森电荷量子位寄存器实现整数N =21的Shor 算法实验. 由于实验对退相干时间有严格要求,通过使用特别设计的量子位门和数值优化的方法完成了物理实现,因此难以扩展到大规模整数分解.2007年,文献[25]基于Quantware 库使用30个量子比特完成整数N =943的分解,并研究残余耦合引起的缺陷对Shor 算的影响. 同年,基于光量子计算机的Shor 算法整数分解由Lu 等人[26]首次完成,通过操控四个光量子实现了N =15的整数分解,通过实验证明该平台可以执行Shor 算法,并完成整数分解.2011年,布里斯托大学的M.G.Thompson 等人使用可控相位门和哈达门展示执行Shor 算法的基本过程[27],并成功完成整数N =15的分解.2012年,Lucero 等人[28]基于约瑟夫森电荷量子电路成功使用3个量子比特分解整数N =15,和前文中Vartiainen 的实验一样,对退相干时间严格要求,物理实现的要求较高.2012年,Enrique Martin Lopez 等人实验实现了Shor 量子分解21的过程,通过使用一个迭代协议将量子比特重复利用,使得所需的所有的量子比特的数量是标准协议中要求的三分之一[29].2013年,佐治亚大学的Geller 等人[30]使用8量子比特完成整数N =51和N =85的分解,由于利用了费马数的特殊性质,不能作为通用方法.2013年,文献[31]提出量子电路执行整数分解任务时第二寄存器的优化方法. 通过寻找2阶元素来实现整数的分解. 因此第二寄存器的量子比特数可以大大减小,有效降低总量子比特数.2016年,Thomas 等人[32]提出基于Kitaev 的Shor 算法的实现. 通过有效地使用和控制七个量子位和四个“高速缓存量子位”分解整数15. 与传统算法相比,减少了近3/4的量子比特数.2017年,上海大学王宝楠等人[33]提出了针对RSA 的小Qubit 量子攻击算法设计,降低了算法的复杂度和成功率,提高了原算法中模幂计算的运算速率. 实验表明,该方法可以用11、10、9量子比特成功分解整数119的量子电路.2018年Google 公司Craig Gidney [14]提出引入1n -个辅助量子比特(Dirty Ancillae Qubits)将Shor 算法执行所需的量子比特数(Clean Qubits)从Zalka [34] 1.5(1)n O +缩减到了2n -,并且没有增加电路的渐进规模和深度. Dirty Qubits 以一种未知状态存在不需要精确的初始化,但在电路执行结束之前需转为已知状态. Clean Qubits 用于具体的电路构造,需要初始化为已知的计算基态,Shor 算法发展如表1. 表中()M n 是乘法的经典时间复杂度,其极限是(lg )(lg )2O n n n ⋅⋅[35]. ε是通用门的最大误差.表1 Shor 量子算法改进过程Year DepthGatesClean QubitsTotal QubitsShor [36]1994(())nM n Θ (())nM n Θ ()n Θ()n ΘBechman [37] 1996 3()n Θ 3()n Θ 51n + 51n + Veldral [38] 1996 3()n Θ3()n Θ43n +43n + Beauregard [39] 2003 31(lg n εΘ31(lg lg )n n εεΘ23n + 23n + Takahashi [40] 2006 31(lg n εΘ 31(lg lg )n n εεΘ 22n +22n +Zalka [41] 2006 31(lg n εΘ31(lg lg )n n εεΘ1.5(1)n O +1.5(1)n O +Häner [42] 2016 3()n Θ 3(lg )n n Θ 22n + 22n + Craig Gidney [14]20173()n Θ3(lg )n n Θ2n +21n +2019年,Google 公司Craig Gidney [43]假设物理门错误率为310-,surface code 周期1微秒反应时间10微秒,同时考虑到噪声的影响等条件,使用窗口算法进行优化. 评估破解2048位RSA 需要的物理9期王潮等:量子计算密码攻击进展 1695量子比特数为22325184,需要的时间为8小时,所需的物理量比特数以及量子比特精度远远超出当前硬件水平,对实际运行的公钥密码不能构成安全威胁.Microsoft和Google量子研究组的研究人员Matthias Troyer和John Martinis均表示由于通用量子计算机硬件的限制短期内无法实现Shor算法破译现在实际使用的RSA加密体系,寻找通用量子计算机的杀手级应用仍是一大挑战. 因此,在量子计算攻击密码方面需要探索不同于Shor算法的量子计算密码破译之路.2.2 Shor算法求解椭圆曲线离散对数的研究目前,与Shor算法攻击RSA的研究相比,针对ECC的Shor算法的研究比较少. 原因大致有两个:一是因为ECC算法相对于RSA算法的数学理论较为复杂,在工程应用中实现较为困难;二是因为Shor算法本是设计用来解决大数分解和求解离散对数的,如果要想利用Shor算法求解椭圆曲线离散对数,理论上是不能直接完成的,而且因为椭圆曲线上的运算都是点的运算,很难进行量子电路的设计. 从而导致Shor算法求解椭圆曲线离散对数问题成为了一个科研上的难题.1994年,Shor[44]提出Shor算法,作为量子计算机最著名的应用之一,在大素数分解问题上比非量子计算算法有指数级别的优势,同时Shor算法还可以应用在离散对数问题上.1997年,里奇蒙大学的Jodie Eicher和Yaw Opoku[45]在理论上设计了使用Shor算法解决与离散对数问题类似的椭圆曲线问题的具体步骤. 证明在Shor算法的基础上进行修改可以解决椭圆曲线问题. 和Shor算法一样,想真正物理实现这种算法需要解决量子器件的诸多挑战.2003年,滑铁卢大学John Proos研究了基于Shor算法的椭圆曲线问题[46]. John Proos从Shor算法和数学分析进行研究:不同椭圆曲线在有限域下具有不同的性质,选择其中适当的一条特殊的椭圆曲线进行分析. 在Shor算法基础上针对模幂运算与量子傅里叶变换进行优化. 以此分析椭圆曲线问题上的优化方案和算法步骤. 根据计算结果,在Shor 算法的基础上求解ECDLP时,对于给定的n位整数,需要6n量子比特. 但是没有就实验模拟的过程进行研究. 同时该文献给出了另一种观点:求解椭圆曲线离散对数问题可以看作是求解二维的大数分解问题.2014年,美国微软研究院Martin Roetteler等人[47]给出了一个类似于Shor量子分解算法的概要量子电路,该量子电路设计了三个量子寄存器,由于椭圆曲线上点的表示及点的运算的复杂性,用量子电路来体现是极其困难的. 一般说的实现Shor算法的量子电路需要三个量子寄存器:第一个和第二个为控制量子寄存器,第三个为工作寄存器,事实上第三个量子寄存器只是一个代称,其可能需要多个量子寄存器来协同完成“工作寄存器”的功能. 即便可以,构造量子电路实现对ECC的攻击也将会是非常复杂的.2017年,美国微软研究院Martin Roetteler等人[48]对使用Shor算法求解椭圆曲线的离散对数问题时需要的量子资源进行了估算. 这些估算来自用于受控椭圆曲线点加法的Toffoli门网络的仿真,在量子计算软件工具套件|iLIQU〉的框架内实现. 确定可逆模块化运算的电路实现,包括模加法、模乘法和模逆运算,以及可逆椭圆曲线点加法. 得出结论:在n比特素数域上定义的椭圆曲线上的椭圆曲线离散对数,可以在量子计算机上用至多332448log()4090n n n+Toffoli门的量子电路计算,其量子比特数最多为292log()10n n++⎡⎤⎢⎥. 虽然提出通过量子电路来实现Shor算法解决ECDLP(Elliptic Curve Discrete Logarithm Problem),并分析了实现这些电路所需的资源,但没有通过实验完全证明.2018年,上海大学陈宇航等人[49]提出能够使用小量子比特数来破解椭圆曲线加密的Shor量子攻击方法,对当前安全曲线有较大威胁,它的通用性更强. 该方法的步骤为:选取一条二进制素域上的椭圆曲线,然后输出该椭圆曲线上的所有点;任意选取椭圆曲线上两点P和Q,满足P kQ=,k为离散对数,输出与椭圆曲线上各点(,)t tx y对应的x t P+ ty Q和x t P的点;构造以k为周期的周期函数;创建两个量子寄存器并设置其初始状态;对第一量子寄存器1ϕ执行Hadamard变换;将,U x a算符应用于第二量子寄存器2ϕ;对第一量子寄存器进行量子傅立叶逆变换:测量第一量子寄存器的本征态概率,求使其达到最大值的阶k;如果阶k是满足P kQ=,则攻击私钥为k.图1是基于Shor算法求解椭圆曲线离散对数k问题的流程图.目前,Shor算法对公钥密码的攻击还需要更深入的研究,通用量子计算机分解大数和求解ECC离散对数的能力还很有限. 当前的物理实现只能控制运行Shor算法的小规模的量子比特,尚不能对现今使用的1024位RSA和163位的ECC构成威胁. 如果真正部署Shor算法在多项式时间内攻击现在的加1696 计 算 机 学 报 2020年密算法,必须使用千位以上的通用量子计算机.据《Nature 》和《Science 》[6]-[8]等报道,破译现有的163位ECC 密码所需要的千位量子比特的通用量子计算机,在未来5到10年内仍难实现. 目前,在通用量子计算机的器件条件限制的情况下,对公钥密码ECC 的小Qubit 量子计算攻击问题仍没有得到较好解决. 未来,探索小比特破译椭圆曲线ECC 是一大挑战.图1 Shor 算法求解椭圆曲线离散对数k 的流程图3 基于量子绝热理论的整数分解方法目前,通过量子计算实现整数分解主要有两个研究方向:一种为上面介绍的Shor 算法的电路模型算法,另一种为绝热量子计算[50](Adiabatic Quantum Computation ,AQC). 量子绝热计算已经应用于诸多组合优化问题,比如旅行商、图着色、蛋白质折叠、整数分解等问题[51-54]. 此外,AQC 对由相位差、环境噪声和酉运算的不完善引起的误差具有更好的鲁棒性[55,56]. 因此,它很快发展成为量子计算中极具吸引力的一个领域.2001年,Burges [57]首次提出将整数分解问题转化为优化问题,为绝热量子计算应用到整数分解做出了基础性工作,并于2010年由Schaller 和Schutz-hold [58]改进该方法.3.1 基于绝热量子理论的NMR 的整数分解的研究现状2008年,彭新华等人[59]首次提出了基于绝热量子计算的因子分解算法,并成功地在NMR 量子处理器上实现了21的分解.2012年,徐南阳等人[60]在文献[59]的基础上提出了一个改进的绝热量子算法,并通过核磁共振量子处理器实现了对整数143的分解.2014年,Nikesh S. Dattani 等人[61]利用两个质因子的特殊性质实现4比特分解整数56153,但是该数两个因子的二进制形式仅有两位不同,因此该方法不具有通用性与可扩展性.2016年,Soham Pal 等人[62]提出经典和量子计算混合方案通过500 MHz 核磁共振谱仪(NMR)实现对整数551的分解.2017年,李兆凯,彭新华,杜江峰等人[63]使用核磁共振谱仪(Nuclear Magnetic Resonance ,NMR)在高于室温下使用3个量子比特实现整数291311的分解. 该方法是使用大数两个素因子的特殊性质实现的,不具有通用性和可扩展性.2017年,杜江峰等人在室温下的固态单自旋系统上完成绝热量子算法整数分解实验[64],系统将金刚石中的自旋作为量子处理器,通过分解整数N=35作为系统的基准测试,证明实验结果具有高保真度.基于绝热量子理论的NMR 的整数分解的研究由于量子比特数的限制,无法扩展到大规模整数分解的情况. 该研究仅可作为理论验证性的探索性的实验. 在通用量子计算机的进展缓慢和NMR 的量子比特数受限的情况下,D-Wave 量子计算机和基于D-Wave 量子退火原理的整数分解的研究突飞猛进. 3.2 基于D-Wave 量子退火原理的整数分解的研究使用量子计算方法攻击RSA 公钥体系问题上,Shor 算法作为量子计算机最著名的应用之一,学界普遍性认为在不考虑硬件平台限制的情况下,严重威胁现在的公钥密码体系,从而忽略其他量子计算攻击RSA 公钥体系的算法. 实际上学界众多学者均认为实际部署Shor 算法攻击现有的加密体系仍然遥遥无期.受限于相干时间、噪声、量子纠错等技术限制,近期难以研制出对现在使用的公钥密码具有威胁的通用量子计算机. 因此需要寻找不依赖通用量子计算机的量子算法攻击公钥密码. 实现原理不同的专用量子计算机D-Wave 可以执行与Shor 量子算法不同的绝热量子算法,对攻击公钥密码有重要的扩展9期 王 潮等:量子计算密码攻击进展 1697作用. D-Wave 量子计算机核心原理量子退火(Quan-tum Annealing ,QA)利用量子领域重要的物理性质量子隧穿效应,在组合优化容易陷入局部最优问题上比传统优化算法更具优势,指数级搜索问题中有望逼近甚至达到全局最优解. 这也是考虑将D-Wave 量子计算机用于密码设计及密码分析的基础.2018年ETSI 会议专家分析D-Wave 专用量子计算机在攻击加密体系受到忽视的原因. 因为D-Wave 最初商业化的应用主要是的应用包括Loc-kheed Martin 用于公司里飞机控制软件的测试,Google 将其用于图像识别问题等. 早期应用中不包括攻击加密体系,同时将整数分解问题转换为组合优化问题一直以来并没有被重点关注,从而忽视了利用D-Wave 的量子隧穿效应在组合优化问题上的独特优势攻击RSA 加密体系的应用. 因此,未来抗量子密码领域的研究还需要考虑基于量子退火原理的专用量子计算机攻击的威胁. 3.2.1 D-Wave 量子计算机的背景2011年5月,加拿大D-Wave 公司推出全球首款128个量子位的商用量子计算机D-Wave One 系统. 随后以1000万美元卖给著名的Lockheed Martin (洛克希德马丁)公司用于F35战机等先进武器的设计,它标志着量子计算机正式进入商用阶段[65].2012年,Geordie Rose 提出了D-Wave 量子计算机发展趋势图,预示D-Wave 量子计算机的量子比特规模大约每两年增加一倍,达到了经典计算机中摩尔定律的增长速度,如图2所示.图2 D-Wave 量子计算机发展路线(引自D-Wave 官网)D-Wave 量子计算机发展迅猛,完全不同于通用量子计算机的量子门电路构造思路,旨在多学科路线发展以及实用型商业化目标,目前正处于从纯科学向工程学的转型阶段. D-Wave 自2011年开始发布商用型D-Wave 量子计算机,相继与美国军火商Lockheed Martin 、Google 、美国Los Alamos 国家实验室(LANL)、美国橡树岭国家实验室(Oak RidgeNational Laboratory ,ORNL)等建立合作. 2019年德国Forschungszentrum Jülich 超级计算中心购买了D-Wave 公司最新的Advantage 量子计算机,配备超过5000个量子比特,是D-Wave 2000Q 的两倍以上. 符合Geordie Rose 提出的发展趋势,与经典计算机领域的摩尔定律提出的发展速度相当.3.2.2 基于D-Wave 量子退火原理的整数分解国内外研究现状量子退火算法最早是由 A.B.Finnila [66]提出来的,主要是用来解决多元函数的最小值问题. D-Wave 的量子退火算法旨在组合优化、机器学习[67]、采样等问题的研究,包括地球物理反演[68]、蛋白质折叠问题[53]、旅行商问题(Travelling salesman problem)[69]、图像着色问题(GCP)[52]、城市交通问题[70]、整数分解问题[71]、希格斯玻色子优化问题[72]、量子模拟问题[73-74]等.量子退火(Quantum Annealing ,QA)算法基本思想是利用量子涨落来构造优化算法,即量子隧穿效应(Quantum Tunneling Effect). 与传统经典计算机模拟热波动的模拟退火不同,量子退火算法独特的量子隧穿效应更容易跳出局部最优解,有望逼近全局最优解.如图3所示,模拟退火算法在陷入局部最优点P 后只能以“翻山越岭”的方式越过能量势垒到达全局最优点P ',而量子退火算法独特的量子隧穿效应不用暂时接受较差的当前解就可以直接从P 点穿透能量势垒到达P ',这是与经典模拟退火及其他众多计算搜索算法相比的一个独特优势.图3 量子退火与模拟退火示意图2012年,上海大学王潮等人首先提出将组合优化问题映射到D-Wave 机器的理论模型[65],并且分析了量子计算在密码破译方面的应用.2017年,Dridi 等人[54]首次提出将代数几何应用于量子退火相关问题. 将代数几何与量子退火算法结合通过D-Wave 2X 分解整数200099,该模型存在量子连接限制,需要的比特数多.2018年,Shuxian Jiang 等人[71]通过D-Wave。

Simplified proof of the Fourier sampling theorem

Simplified proof of the Fourier sampling theorem

Simplified Proof of theFourier Sampling TheoremPeter Høyer∗BRICS†May29,2000AbstractWe give a short and simple proof of Hales and Hallgren’s Fourier Sampling Theorem[“Quantum Fourier Sampling Simplified”,Pro-ceedings of the Thirty-First Annual ACM Symposium on Theory ofComputing,ACM Press,May1999].The transparency of our proof-technique allows us to generalize and tighten their result.1IntroductionIn the recent years,the theory of quantum computing has been greatly deve-loped and expanded.Two of the most striking results in the area are Grover’s algorithm for searching[3]and Shor’s algorithms for factoring andfinding discrete logarithms[6].For an excellent introduction to quantum computing, see for example[2].Any quantum algorithm works on afinite Hilbert space H.Two types of operations are allowed,thefirst is unitary operators on H,the second is measurements of the whole or parts of the system.Since we are interested inthe computational complexity of the algorithms,we restrict the operations allowed to only those that can be implemented efficiently.One of the primary operators used in the quantum algorithms developed so far,is the quantum Fourier transform.Two of its main uses are to set up a quantum system in an initial state and to perform quantum Fourier sampling.The quantum Fourier transform is actually not a single operator, but a family of operators.One can define Fourier transforms for anyfinite group G.If the group G is Abelian,then there exists exactly one Fourier transform for G,and if G is non-commutative,then there are infinitely many Fourier transforms for G.For every integer n≥1,the quantum Fourier transform over the cyclic group Z n is defined byF n=1nn−1i,j=0ωij n|i j|,(1)whereωn=exp(2π√over Z n,perform quantum Fourier sampling over Z m for some m sufficiently large compared to n.This idea,however,adds complications to the analysis of the modified algorithm;for example,one then has to show that the relevant data is still attainable via sampling from the modified distribution D′.Recently,Hales and Hallgren[4]proposed a general technique for circum-venting such complications.They showed that,for any input state|u ,the original distribution D is contained in the modified distribution D′by re-striction.This allows us to sample from D via sampling from D′.Wefirst explain the notation involved and then we state their theorem.Let1<N<M be integers.For any integer0≤i<N,let i′=⌊iM/N+1/2⌋denote a closest integer to iM/N,and setδi=i′−iM/N. Note that|δi|≤1/2.Given an input state|u = N−1i=0u i|i ,set|v =F N|u and|w =F M|u .Let D v:{0,...,N−1}→[0,1]denote the probability distribution in-duced by measuring|v ,that is,D v(i)=| i|v |2.Define probability distribu-tion D w:{0,...,M−1}→[0,1]similarly.Let D w′:{0,...,N−1}→[0,1] denote the probability distribution defined by D w′(i)=c·D w(i′),where c= N−1i=0D w(i′) −1is the normalization factor.Thus,we obtain distribu-tion D w′by restricting D w to outcomes j for which j=i′for some0≤i<N, and then relabeling i′by i.Finally,for any two probability distributions D and D′over{0,...,N−1},let|D−D′|= N−1i=0|D(i)−D′(i)|denote their total variation distance.Theorem1(Hales and Hallgren)For any polynomial s(n),there exists a polynomial t(n)such that for all integers N≤2n and M≥t(n)N,and all input states|u = N−1i=0u i|i ,we have|D v−D w′|≤1and secondly,we show that in Theorem1,it suffices to pick t(n)to be onthe order of s(n)n.The applications of Hales and Hallgren’s theorem are many.For instance,it allows a simplified proof of Shor’s theorem for factoring(see Section3of[4]).When applying their theorem,we would use the Fourier transform F M instead of F N.We set up the input state|u ,apply F M and then measurethe system.We repeat this experiment until the measurement produces an outcome j such that j=i′for some0≤i<N.When that happens,we output i and stop.By Theorem2below,the expected number of repetitionsis on the order of MMs|D v−D w′|≤41M) .4sIn the calculations to come,we use many inequalities and bounds.Several of these bounds are not tight as our primary aim is to give a simple and basic proof.Operator A is not necessarily unitary,but it is linear and can be written as a sum A = N −1i,j =0a ij |i j |where a ij ∈C is given bya ij =1N N −1 k =0ωk (i −j +δi N/M )N .(3)Note that |a ij |≤1for all 0≤i,j <N ,that is,every coefficient has absolute value at most 1.The next lemma expresses that every diagonal element a ii is close to 1,whereas every off-diagonal element a ij (i =j )has small absolute value.The lemma is a variant of Claim 1in [4].Lemma 3For operator A = N −1i,j =0a ij |i j |given by Equation 2,Re(a ii )≥1−5 N |i −j |NN2then,for all 0≤k <N ,we have Re(ωkδi M )≥cos(πN/M )≥1−5 NM 2.Now consider the off-diagonal element a ij for some 0≤i,j <N withi =j .If δi =0then a ij =0,so suppose ing that the rightmost sum in Equation 3is a geometric series,rewrite a ij =1N 1−ωδi N MM .To lower bound the absolute value of the5denominator,write 1−ωi −j +δi N/M N = sin πi −j M ≥ sin πi −j 212and,by symmetry,that sin(πx )≥2(1−|x |)if1N |i −j |N −πM ,allowing us to conclude that |a ij |≤2M provided M ≥8N .⊓⊔Lemma 3tells us that operator A acts as the identity I = N −1i =0|i i |,modulo some error terms.To analyze the “damage”caused by those error terms,writeA =I +E .Let E = N −1i,j =0e ij |i j |.Then |e ii |2=|Re(a ii )−1|2+|Im(a ii )|2=1+|a ii |2−2Re(a ii )≤10(N10N |i −j |N NM2+log 2(N ) .Proof We prove this lemma by rephrasing it in terms of matrices and vectors,and then introduce a vector norm and its induced matrix norm which we easily can bound.Hence,consider E an N ×N matrix (e ij )N −1i,j =0,and let Norm(·)denote the matrix norm defined byNorm(B )=max B x 2: x =1 where x 2=(x ∗·x )1/2denotes the Euclidean norm of the N ×1column vector x ,and where x ∗denotes the Hermitian adjoint of x .Then,clearly,we have that E |v ≤Norm(E ),and thus it suffices to upper bound the matrix norm of E .For this,note that Norm(E )≤Norm(|E |)where |E |denotes the matrix obtained by replacing each entry of E with its absolute value.Observe that,by Lemma 3,we have Norm(|E |)≤Norm(C )where C =(c ij )N −1i,j =0withc ij = 6N|i −j |N NMatrix C is circulant with positive real-valued entries and hence its norm is equal the sum of any row or any column,Norm(C)= N−1j=0c1j= N−1i=0c i1. We upper bound the leftmost sumN−1j=0c1j=N|j|N ≤N j ≤N√2.Then|w′ has unit norm and|v −|w′ ≤52 E|v ≤1b≤1+ E|v .(4)Proof By definition,b= A|v = (I+E)|v ,so1− E|v ≤b≤1+ E|v .Equation4follows since we assume E|v ≤1/2. Let|y =|v −|w′ .Then|y = I−1b(I+E) |v = 1−1b |v −1b E|v . Hence, |y ≤ 1−1b +1b E|v ≤5Theorem 2follows immediately by composing Lemmata 4,5,and 6.Proof of Proof of Theorem 2Write |w ′ =c RF M |u =1b A |v where c =1b N .By Lemma 4,we have d = E |v ≤3N2N 512,so by Lemma 5, |v −|w ′ ≤5s and |1−1b |≤d ≤1s .⊓⊔3DiscussionOur Theorem 2generalizes Hales and Hallgren’s theorem in two ways.Firstly,if we want to apply Fourier sampling over Z N ,then,by Theorem 2,it suffices to be able to implement the Fourier transform F M for some M which is only a log(N )factor larger than N .Thus,for such an M ,we only need log log(N )additional qubits to implement F M instead of implementing F N .Secondly,in Theorem 2,not only are the distributions D v and D w ′close,but so are the states |v and |w ′ just prior the final measurement.In the setup studied by Hales and Hallgren,we are given a state |u on which we want to apply a Fourier transform F N which is immediately followed by a measurement of the system.Now,suppose we do not want to measure the state F N |u ,but instead first apply some other operations on it and then measure it.In that case,we cannot apply Hales and Hallgren’s theorem,but we can apply Theorem 2.The reason is that Hales and Hallgren’s theorem says that the distributions are close,not that the states themselves are close,as stated in Theorem 2.AcknowledgementsI am very grateful to Sean Hallgren for helpful discussions.I would like to thank an anonymous referee for a careful reading and for many constructive suggestions,and Gilles Brassard and Joan Boyar for comments.References[1]E.Bernstein and U.Vazirani,Quantum complexity theory,SIAM J.Comput.26(1997)1411–1473.8[2]R.Cleve,An introduction to quantum complexity theory.To appearin Collected Papers on Quantum Computation and Quantum Information Theory,World Scientific,C.Macchiavello,G.M.Palma,and A.Zeilinger, editors,2000.Also available at Los Alamos National Laboratory e-Print archive as</abs/quant-ph/9906111>.[3]L.K.Grover,Quantum mechanics helps in searching for a needle in ahaystack,Phys.Rev.Lett.79(1997)325–328.[4]L.Hales and S.Hallgren,Quantum Fourier sampling simplified,Proceed-ings of the Thirty-First Annual ACM Symposium on Theory of Comput-ing,ACM Press(1999)330–338.[5]A.Yu.Kitaev,Quantum measurements and the Abelian stabilizer problem(1995).Available at Los Alamos National Laboratory e-Print archive as </abs/quant-ph/9511026>.[6]P.Shor,Polynomial-time algorithms for prime factorization and dis-crete logarithms on a quantum computer,SIAM put.26(1997) 1484–1509.9。

A Note on Shor’s Quantum Algorithm for Prime Factorization

A Note on Shor’s Quantum Algorithm for Prime Factorization

A Note on Shor’s QuantumAlgorithm for Prime FactorizationZhengjun CaoInstitute of System Science,Chinese Academy of Sciences.Beijing,P.R.China.zjcamss@Abstract It’s well known that Shor[1]proposed a polynomial time algorithm for prime factorization by using quantum computers.For a given number n,he gavean algorithm forfinding the order r of an element x(mod n)instead of giving analgorithm for factoring n directly.The indirect algorithm is feasible because factor-ization can be reduced tofinding the order of an element by using randomization[2].But a point should be stressed that the order of the number must be even.Actually,the restriction can be removed in a particular case.In this paper,we show thatfactoring RSA modulus(a product of two primes)only needs tofind the order of2,whether it is even or not.Keywords Shor’s quantum algorithm,RSA modulus.1IntroductionFactoring integers is generally thought to be hard on a classical computer.But it is now hold that prime factorization can be accomplished in polynomial time on a quantum computer.This remarkable work is due to Peter W.Shor[1].For a given number n,he gave a quantum computer algorithm forfinding the order r of an element x(mod n)instead of giving a quantum computer algorithm for factoring n directly.The indirect algorithm is feasible because factorization can be reduced tofinding the order of an element by using randomization[2].We now briefly give this reduction.Tofind a factor of an odd number n,given a method for computing the order r of x,choose a random x(mod n),find its order r,and compute gcd(x r/2−1,n).The Euclidean algorithm[3] can be used to compute gcd(x r/2−1,n)in polynomial time.Since(x r/2−1)(x r/2+1)= x r−1≡0(mod n),the numbers gcd(x r/2−1,n)and gcd(x r/2+1,n)will be two factor of n. This procedure fails only if r is odd,in which case r/2is not integral,or if x r/2≡−1(mod n), in which case the procedure yields the trivial factors1and ing this criterion,it can beshown that this procedure,when applied to a random x(mod n),yields a nontrivial factor of n with probability at least1−1/2k−1,where k is the number of distinct odd prime factors of n. Refer to[1]for a brief sketch of the proof of this result.One phenomena might be observed that existing prime factorization algorithms[4,5,6,7,8, 9]as well as Shor’s quantum algorithm all aim to factor arbitrary numbers.No algorithm pays more attentions to some numbers of particular structure,for instance,product of two primes. But those numbers are of great importance in public key cryptography.They are usually called RSA modulus.In this paper,we give a new algorithm to factor a product of two primes based on Shor’s quantum algorithm,which takes advantage of the special structure.we show that factoring RSA modulus only needs tofind the order of2,whether it is even or not.2PreliminaryLet N=pq be a product of two odd primes,Φ(N)be Euler Totient Function.We knowΦ(N)=(p−1)(q−1)=pq−p−q+1andN−Φ(N)+1=p+qConsidering the following equationx2−Mx+N=0(∗) where M is undetermined.Hence,we obtain two rootsx1=M+√M2−4N2,x2=M−√M2−4N2IfM=N−Φ(N)+1 then equation(∗)can be rewritten asx2−(p+q)x+pq=0 Therefore,x1|N,x2|N. IfM=N−Φ(N)+1 then neither x1nor x2is an integer(since x1x2=pq).The above discussion leads to the following theorem:Theorem 1If N =pq is a product of two distinct odd primes,then M +√M 2−4N 2|N ⇐⇒M =N −Φ(N )+1.Proof ⇐=)It is trivial.=⇒)Since N =pq is a product of two distinct odd primes and M +√M 2−4N 2|N ,without loss of generality,we assume that M +√M 2−4N 2=p .Hence M +√M 2−4N =2p ,M 2−4N =4p 2−4pM +M 2.Therefore,M =p +q =N −Φ(N )+1.⊓⊔3A quantum computer algorithm for factoring RSA modulusDenote by ord N (2)the order of 2relative to N,where N is a product of two distinct odd primes.Obviously,ord N (2)|Φ(N )Set s :=[N ord N (2)],where [x ]denotes the integer part of number x .Clearly,Φ(N )≤s ×ord N (2)Therefore,Φ(N )∈{ord N (2),2×ord N (2),···,(s −1)×ord N (2),s ×ord N (2)}.It is well known that Φ(N )must be kept in secret.How to search for Φ(N )in the set{ord N (2),2×ord N (2),···,(s −1)×ord N (2),s ×ord N (2)}In the following,We design a quantum computer algorithm by theorem 1,which takes advantage of the relation between computing Φ(N )and factoring N .The algorithm succeeds to compute Φ(N )and factor N synchronously.A Quantum Algorithm for Factoring RSA Modulus:(1)input N,compute ord N (2)by using Shor’s quantum algorithm (2)s ←[N ord N (2)](3)M ←N −s ×ord N (2)+1(4)if M 2−4N is not a square,then s ←s −1,goto step (3)(5)t ←M +√M 2−4N 2,if t is not an integer,thens ←s −1,goto step (3)(6)output t,N/t .How much time does this algorithm take?Apart from the time of computing ord N(2)in step (1),it seems that the running time of the algorithm mainly depends on the number of loops,i.e.,the value of s.In fact,it only depends on the upper bound for p+q−1ord pq(2).Ifp+q−1 ord pq(2)≤k,where k is an integer,then above algorithm will halt in k loops.As for to verify that whether M2−4N is a square,easy!4ConclusionIn this paper,we take advantage of the particular structure of a product of two primes to design a quantum computer algorithm for factoring RSA modulus.we show that factoring RSA modulus does not need to randomly choose number x such that the order of x relative to modulus N is even.It only needs tofind the order of2relative to modulus N,whether it is even or not.References[1]Peter W.Shor.Polynomial-time algorithm for prime factorization and discrete logarithms on aquantum computer.SIAM Journal on Computing Vol.26,No.5,pp.1484-1509.1997.[2]ler.Riemann’s hypothesis and tests for put.System Sci.,13,pp.300-317.1976.[3] D.E.Knuth.The art of computer programming,Vol.2:Seminumerical algorithms,2nd ed.,Addison-Wesley.1981.[4]L.M.Adleman.Algorithm number theory–the complexity contribution,in Pro.35th Annual sym-posium on foundations of computer science,IEEE Computer Society Press,pp.88-113.1994.[5] A.K.Lenstra and H.W.Lenstra.The development of the numberfield sieve.Lecture Notes inMathematics1554,1993.Springer-Verlag,Berlin.[6] A.K.Lenstra and H.W.Lenstra,JR.,M.S.Manasse,and J.M.Pollard.The numberfield sieve,inProc.22nd Annual ACM symposium on theory of computing,Association for Computing Machinery, New York,pp.564-572,1990.[7]J.M.Pollard.A Monte Carlo method for factorization.BIT15,331-334,1975.[8]Carl Pomerance and S.S.Wagstaff.Implementation of the continued fraction integer factoring algo-rithm.Congressus Numerantium37,99-118,1983.[9]Carl Pomerance.The quadratic sieve factoring algorithm.In Advances in Cryptology:Proceedingsof Euro’1984.LNCS209,pp.169-182.Springer-Verlag,Berlin.。

算法是把双刃剑作文

算法是把双刃剑作文

算法是把双刃剑作文The use of algorithms in today's society has undoubtedly become a double-edged sword. On one hand, algorithms have revolutionized various industries, providing efficiency and convenience. On the other hand, they have raised concerns regarding privacy, bias, and the potential for manipulation. This essay will explore the multifaceted nature of algorithms, discussing theirpositive contributions as well as the negative implications they bring.From a positive perspective, algorithms have transformed industries such as healthcare, finance, and transportation. In healthcare, algorithms have been developed to analyze vast amounts of data, assisting in disease diagnosis and treatment recommendations. This has led to improved patient outcomes and more personalized healthcare. Similarly, in finance, algorithms have enabled faster and more accurate trading decisions, benefiting investors and financial institutions. Additionally,algorithms have optimized transportation systems, reducing traffic congestion and enhancing efficiency.Moreover, algorithms have played a significant role in the development of artificial intelligence (AI) and machine learning (ML). Through the use of complex algorithms, AI systems can learn and adapt from data, enabling them to perform tasks that were previously only achievable by humans. This has led to advancements in various fields, including image recognition, natural language processing, and autonomous vehicles. Algorithms have paved the way for groundbreaking innovations, revolutionizing industries and improving our daily lives.However, the dark side of algorithms cannot be ignored. One major concern is the issue of privacy. As algorithms collect and analyze vast amounts of personal data, there is a risk of this information being misused or falling into the wrong hands. This raises concerns about surveillance, data breaches, and the potential for discrimination based on sensitive attributes. The Cambridge Analytica scandal, where personal data was harvested without consent forpolitical purposes, serves as a stark reminder of the dangers of algorithmic power.Another pressing issue is algorithmic bias. Algorithms are created by humans, and they can inadvertently perpetuate or amplify existing biases. For example, in the criminal justice system, algorithms used for risk assessment have been found to disproportionately target minority groups. This bias can lead to unfair treatment and perpetuate social inequalities. It is crucial to address these biases and ensure that algorithms are developed and implemented in a fair and transparent manner.Furthermore, algorithms have the potential to manipulate public opinion and behavior. Social media platforms, for instance, utilize algorithms to curate personalized content for users. While this can enhance user experience, it also creates echo chambers and filter bubbles, reinforcing existing beliefs and limiting exposure to diverse perspectives. Additionally, algorithms used in online advertising can manipulate consumer behavior, leading to targeted marketing and potential exploitation.In conclusion, algorithms have become a double-edged sword in our society. While they have undoubtedly brought numerous benefits and advancements, they also raise significant concerns. Privacy, bias, and manipulation are among the key issues that need to be addressed. It is essential to strike a balance between harnessing the power of algorithms for progress and safeguarding the rights and well-being of individuals. Transparency, accountability, and ethical considerations should guide the development and deployment of algorithms to ensure a positive and inclusive future.。

量子算法:解决复杂问题的潜在方法(二)

量子算法:解决复杂问题的潜在方法(二)

量子算法:解决复杂问题的潜在方法引言:在过去几十年里,信息技术的快速发展引发了人们对算法的需求日益增长。

传统计算机已经在处理大规模数据和复杂问题时遇到了瓶颈,这使得科学家们不得不寻找新的方法来应对这些挑战。

量子算法,作为一种新兴技术,被认为具有巨大的潜力,可以解决迄今为止无法高效解决的问题。

1. 量子计算的基本概念量子计算是一种基于量子力学原理的计算方式。

与传统计算机使用的二进制位(比特)不同,量子计算机使用的量子位(量子比特,或简称qubit)可以同时表示0和1两种状态,这种特性被称为“叠加”。

此外,量子比特之间还可以通过“纠缠”实现信息的传递和处理。

2. 量子算法的先驱:Shor's AlgorithmShor's Algorithm是迄今为止最著名的量子算法之一,由彼得•肖尔(Peter Shor)于1994年提出。

该算法通过利用量子计算机的并行计算和纠缠特性,能够在多项式时间内完成大素数的分解。

这意味着,量子计算机在处理密钥加密和解密等领域能够具备破解传统密码体系的能力。

3. 量子搜索算法:Grover's AlgorithmGrover's Algorithm是另一个重要的量子算法,由洛夫•格罗弗(Lov Grover)于1996年提出。

该算法可以在未排序的数据库中快速定位目标项,其运行时间的平方根与传统算法相比具有显著降低。

Grover's Algorithm在大规模数据搜索和优化问题中具有重要应用潜力。

4. 通过量子机器学习解决复杂问题随着大数据时代的到来,机器学习在解决复杂问题中发挥着越来越重要的作用。

量子机器学习结合了量子计算的优势和机器学习的技术,被认为是未来人工智能发展的重要方向之一。

通过利用量子纠缠和叠加的特性,量子机器学习可以在处理高维度和非线性数据时提供更高效的解决方案。

5. 量子模拟算法:解决物理系统的挑战在物理科学领域,模拟复杂的量子系统是一项巨大的挑战。

算法是一把双刃剑作文材料

算法是一把双刃剑作文材料

算法是一把双刃剑作文材料英文回答:Algorithm is a powerful tool that has revolutionized the way we live and work. It has enabled us to automate tasks, make complex calculations, and process large amounts of data efficiently. However, it is also a double-edged sword, as it can be used for both good and bad purposes.On the positive side, algorithms have greatly improved our lives in many ways. For example, they have made it possible for us to search for information on the internet, navigate using GPS, and receive personalized recommendations for products and services. In the field of healthcare, algorithms are being used to analyze medical images, diagnose diseases, and develop new treatments. They have also made significant contributions to fields such as finance, transportation, and entertainment.However, the use of algorithms also raises concernsabout privacy, bias, and ethical issues. For example, algorithms can be used to track and monitor individuals without their consent, leading to violations of privacy. They can also perpetuate and even exacerbate existingbiases and discrimination, as they are often trained ondata that reflects societal inequalities. Moreover, the use of algorithms in decision-making processes, such as hiring and lending, can result in unfair outcomes for certain groups of people.In conclusion, while algorithms have the potential to bring about positive changes in our lives, it is importantto recognize that they also have the potential to cause harm. Therefore, it is crucial to carefully consider the ethical implications of their use and to developregulations and guidelines to ensure that they are used responsibly and for the greater good.中文回答:算法是一把强大的工具,彻底改变了我们生活和工作的方式。

七比特shor算法

七比特shor算法

七比特shor算法一、引言随着信息技术的快速发展,数据安全与保密已成为越来越受到重视的问题。

量子计算作为一种具有巨大潜力的技术,其在密码学、优化问题等领域具有重要应用价值。

在众多量子计算算法中,Shor算法尤为重要,因为它可以实现量子计算机在有限时间内对大数进行因子分解,从而破解目前广泛使用的RSA加密算法。

本文将介绍七比特Shor算法,分析其原理、实现与应用,并探讨我国在相关领域的研究进展和发展趋势。

二、七比特Shor算法的原理1.量子比特与经典比特的对比量子比特(qubit)与经典比特(bit)有很大的区别。

量子比特可以同时处于0和1的叠加态,而经典比特只能表示0或1。

这使得量子计算机在处理某些问题上具有指数级的速度优势。

2.七比特Shor算法的优势Shor算法利用量子计算机的量子比特特性,通过量子电路实现大数因子分解。

七比特Shor算法在量子计算中具有较高的效率,相较于其他量子算法,其在实验实现上更具可行性。

3.量子计算与因子分解在经典计算机上,大数因子分解问题被认为是困难的问题,因为已知的最快算法如Pollard"s Rho 算法也只能实现平方根级别的加速。

而量子计算机利用量子比特的特性,可以实现对大数的快速分解。

Shor算法就是一种在量子计算中实现因子分解的高效方法。

三、七比特Shor算法的实现1.量子电路设计量子电路是实现量子算法的基础。

七比特Shor算法需要设计一个适当的量子电路,使得量子计算机能够在有限时间内完成大数因子分解。

2.量子门操作在量子电路中,量子门操作是关键。

通过对量子比特进行旋转门、纠缠门等操作,实现量子比特状态的变换,从而完成算法的执行。

3.量子测量在量子计算中,量子测量是确定算法输出结果的重要步骤。

通过对量子比特进行测量,得到计算结果,并根据测量结果进行后续处理。

四、七比特Shor算法的应用1.密码学Shor算法最具潜力的应用是在密码学领域。

如果能够实现大规模的量子计算机,那么现有的加密算法如RSA将不再安全。

量子计算中的量子算法

量子计算中的量子算法

量子计算中的量子算法量子计算是一种创新性的计算模式,它的基本单元是量子比特,不同于传统计算机的二进制比特。

量子比特以一定的概率处于0或1的态,具有量子叠加和量子纠缠的性质。

这使得量子计算能够通过量子态叠加以及量子并行性,以更快的方式运行某些算法。

在这里,我们将着重讨论量子计算中的量子算法。

目前,量子计算的发展还处于初级阶段,但是已经发现了一些类似于Shor质因数分解和Grover搜索的量子算法。

Shor算法可以有效地分解数,并在短时间内解决基于大质数的加密问题,这在传统计算机上是不可能完成的。

Grover搜索可以在平均O(n^(1/2))次操作内找到一个未排序的列表中的目标项,这是比传统算法更快的。

下面我们将对这两个算法进行介绍。

Shor算法量子计算的其中一个重要应用是将大质数分解为其素数乘积的因子。

一些加密算法基于此思想而在使用中。

Shor算法是一种用于分解质因数的量子算法,它使用量子傅立叶变换(QFT)来寻找最小解决方案。

该算法的基本思想是从0到N-1的随机数S开始,通过一个量子算法,找到正整数r和算法输出s1,使得s^r ≡ 1 mod N 并且 s1 不等于和1. 接着,在不同的输入下进行傅里叶变换和逆傅里叶变换以得到可能的解决方案,最终可得到质因数。

Shor算法通过不同的量子门操作实现。

它是一种新的、创新性的算法,比传统的数学算法更快。

Grover算法Grover搜索是一种在未排序列表中查找重复项的快速算法。

如果列表中包含一个目标项,则可以使用Grover算法查找该项。

该算法的基本思想是,将未排序列表视为一个量子状态,然后使用相应的量子算法进行匹配。

在其基本特征中,算法在O(n^1/2)次查询内返回目标内容,相比于传统线性搜索更为高效。

总结量子计算技术虽然还处于发展阶段,但已经展示出了令人惊叹的潜在速度优势。

目前,已经发现了一些能够发挥这些优势的量子算法,如Shor算法和Grover搜索。

Shor ppt

Shor ppt
j0
Quantum Fourier Transformation
0 ,...... N 1
j
1
N 1
e2 ijk / N k
N j0
N 1
N 1
x j j yk k
j0
j0
Representation of basis
设n个量子位的量子计算机的计算基矢态为 |j> , 则 其二进制表示为:
xr 1 dN ,其中d为整数. 若r为偶数
xr 2 1 xr 2 1 dN
再找 xr 2 1 与N的最大公约数.
Input: A composite number N.
Output: A non-trivial factor of N.
Runtime:
O log N 3 operations. Succeeds with
probability O(1).
1.IF N is even, return the factor 2.
2.Determine whether N ab for integers a 1,b 2 and if so
return the factor a。
3.Randomly choose x in the range 1 to N-1.if gcd x, N 1
1 r1
r s0 us
1
区分素数和合数,以及将合数分解为素因子的问题, 是整个算术中最重要和最有用的一个问题。……科学的尊 严似乎要求,每一个有助于解决这样一个优雅和著名问题 的努力要得到热情支持。
-----高斯
将求阶算法变换成因子分解的快速算法
xr 1(mod N ) xr mod N 1
(3) Efficient algorithms can be used to break the RSA public-key cryptosystem.

Semiclassical Shor's Algorithm

Semiclassical Shor's Algorithm

PACS No.: 03.67.-a, 03.67.Lx, 03.65.Sq Keyword(s): Quantum Information, Quantum Computation, Semiclassical Theories and Applications MIT-CTP-3346 quant-ph/0303037
The discovery by P. Shor of an efficient algorithm to factorize integer numbers based on the laws of quantum mechanics [1] (see also [2]), was a landmark event in quantum computing [3] (see also [4] and [5]). Shor’s quantum algorithm determines the prime factors of a composite l-bit number N in1 O [l2 log l log log l] steps, while the best classical algorithm of A.K. Lenstra and H.W. Lenstra [6] requires O [exp{cl1/3 log2/3 l}] steps, for some c. This shows how powerful a quantum computer could be. This discovery fueled the theoretical and experimental search for practical realizations of such a “machine of wonders” (see for instance [2], [4], [7], [8], and references therein). Nonetheless, to build a quantum computer with the required power is a very challenging and still not accomplished task. This makes Shor’s algorithm a theoretically important work which, at present, cannot be implemented if not for very small numbers [9], [10]. It is then of strong interest to explore semiclassical limits of Shor’s algorithm, and to see how much the related approximations affect the algorithm. Some ideas along these lines are already present in the literature [11]. There it is shown that the Quantum Fourier Transform (the core of the algorithm), could be simplified if one uses a macroscopic signal to control the quantum gates. We assume here that semiclassical devices should be easier to handle than quantum devices, a semiclassical device being (in this context) a physical system performing the computation, whose dynamics is partially governed by the laws of classical physics and partially by those of quantum mechanics. A cogent example is the system imagined in [11], where the macroscopic signal controlling the quantum gates is a pulse of several volts in a coaxial cable. It is easy to convince oneself that, on general grounds, it is a lot handier to deal with such a classical pulse than to deal with more “fragile” (decohering) quantum signals. The approach we take in this paper is fundamental and general, as we would like to give the mathematical prescriptions for implementing Shor’s algorithm on generic semiclassical devices. We shall make use of generalized coherent states, and tackle the difficult problem to find out what a semiclassical approximation is in this framework. Our primary goal is to see if the semiclassical limit of Shor’s algorithm is still more powerful than the classical factoring algorithm. If it is, the task of constructing a semiclassical computer would be worth pursuing. The method we present here (based on generalized coherent states |λ of SU(2) for spin j = 1/2) is made of two parts: First, we show that in the |λ basis a symplectic structure arises. Hence the physical system making the computation could, in principle, be described by a classical phase-space, and the computation itself as an evolution in this phase-space. In this setting, the quantum fluctuations are naturally dropped by mapping j (j + 1) → j 2 . A fully classical version of Shor’s algorithm would then be the one where all the quantum operators (gates) O are replaced by their classical counterparts λ|O|λ , and the quantum evolution replaced by a classical path over the phase-space.

QUANTUM COMPUTING AND SHOR'S FACTORING ALGORITHM

QUANTUM COMPUTING AND SHOR'S FACTORING ALGORITHM
1
QUANTUM COMPUTING AND SHOR'S FACTORING ALGORITHM Yu. I. Manin 1. Introduction
2. Quantum parallelism
2
time (as a function of the bit size of N ) since already the length of the list is N: Barring a theoretical breakthrough in understanding such problems (for example, a proof that P = NP ), a practical response might be in exploiting the possibility of parallel computing, i.e. calculating simultaneously many { or even all { values of F (x): This takes less time but uses (dis)proportionally more hardware. A remarkable suggestion due to D. Deutsch (see DeuJ], Deu]) consists in using a quantum superposition of the classical states jxi as the replacement of the union of N classical registers, each in one of the initial states jxi. To be more precise, here is a mathematical model formulated as the de nition. 2.2. Quantum parallel processing: version I. Keeping the notation above, assume moreover that N = 2n and that F is a bijective map (the set of all outputs is a permutation of the set of all inputs). (i) Quantum space of inputs/outputs is the 2n{dimensional complex Hilbert space Hn with the orthonormal basis jxi, 0 x N ? 1. Vectors jxi are called classical states. (ii) Quantum version of F is the unique unitary operator UF : Hn ! Hn such that UF jxi = jF (x)i: Quantum parallel computing of F is (a physical realization of) a system with the state space Hn and the evolution operator UF . Naively speaking, if we apply UF to the initial state which is a superposition of all classical states with, say, equal amplitudes, we will get simultaneously all classical values of F (i.e. their superposition):
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
†e-mail: crlile@ime.uerj.br
Coordena¸ ca ˜o de Ciˆ encia da Computa¸ ca ˜o Laborat´ orio Nacional de Computa¸ ca ˜o Cient´ ıfica - LNCC Av. Get´ ulio Vargas 333, Petr´ opolis, RJ, 25651-070, Brazil
2
In Quantum Mechanics, vectors are systematically called states. We use this term from now on. The physical interpretation of |ψ is that it coexists in two states: |0 and |1 . It is similar to a coin that is partially heads up and partially tails up simultaneously. We cannot push further the analogy simply because quantum phenomena do not have a classical analogue in general. The state |ψ can store a huge quantity of information in its coefficients α and β , but this information lives in the quantum level, which is microscopic (usually quantum effects appear in atomic dimensions). To bring quantum information to the classical level, one must measure the qubit. Quantum Mechanics tells us that the measurement process inevitably disturbs a qubit state, producing a nondeterministic collapse of |ψ to either |0 or |1 . One gets |0 with probability |α|2 or |1 with probability |β |2 . The non-deterministic collapse does not allow one to determine the values of α and β before the measurement. They are inaccessible via measurements unless one has many copies of the same state. Two successive measurements of the same qubit give the same output. If |α|2 and |β |2 are probabilities and there are only two possible outputs, then |α|2 + |β |2 = 1. (2) Calculating the norm of |ψ , Eq. (2) gives || |ψ || = |α|2 + |β |2 = 1.
1
Introduction
In the last 30 years, the number of transistors per chip roughly doubled every 18 months, amounting to an exponentially growing power of classical computers. Eventually this statement (Moore’s law) will be violated, since the transistor size will reach the limiting size of one atom in about 15 years. Even before that, disturbing quantum effects will appear. Ordinarily one states that if an algorithm is inefficient, one simply waits for hardware efficient enough to run it. If the exponential increase in the power of classical computers becomes saturated, the class of inefficient algorithms will remain useless. From this pessimistic point of view, Computer Science seems to face very narrow limitations in the near future, coming from the physics underneath computer architecture. It is important to keep in mind that a computer is a device governed by the laws of Physics. For decades, this fact was irrelevant. Computer Science emerged in a mathematical context and the specifics imposed by Physics were so few that most computer
where α and β are complex numbers. |ψ is said to be a superposition of the vectors |0 and |1 with amplitudes α and β . Thus, |ψ is a vector in a two-dimensional complex vector space, where {|0 , |1 } forms an orthonormal basis, called the computational basis (see Fig. 1 in the real case). The state |0 is not the zero vector, but simply the first vector of the basis. The matrix representations of the vectors |0 and |1 are given by |0 = 1 0 and |1 = 0 1 .
2
Review of Quantum Mechanics for Quantum Computation
In classical computers, a bit can assume only values 0 or 1. In quantum computers, the values 0 and 1 are replaced by the vectors |0 and |1 . This notation for vectors is called the Dirac notation and is standard in Quantum Mechanics. The name bit is replaced by qubit, short of quantum bit. The difference between bits and qubits is that a qubit |ψ can also be in a linear combination of the vectors |0 and |1 , |ψ = α|0 + β |1 , (1)

Contents based on lecture notes from graduate courses in Quantum Computation given at LNCC.
1
scientists paid no attention to them. One possible explanation for this state of matters is that computers work under the laws of classical physics, which are common sense. In a seminal paper, Feynman [1] argued that the way classical computers work is a special case of some more general form allowed by the laws of Quantum Mechanics. He gave general arguments supporting the idea that a manifestly quantum device would be exponentially faster than a classical one. Subsequently, Deutsch [2] generalized the classical circuit model to its quantum counterpart and gave the first example of a quantum algorithm faster than its classical counterpart. Based on Deutsch’s work, Simon [3] developed a quantum algorithm exponentially faster than its classical counterpart, taking advantage of entanglement, corroborating with Feynman’s arguments. The greatest success came with Shor’s work [4]. He developed exponentially faster quantum algorithms for factoring integers and for finding discrete logarithms when compared to the known classical algorithms. Shor’s algorithms allow one to render most current cryptographic methods useless, when a quantum computer of reasonable size is available. This work is an introductory review of Shor’s factoring algorithm. We have put all our efforts to write as clear as possible for non-specialists. We assume familiarity with undergraduate Linear Algebra, which is the main mathematical basis of Quantum Mechanics. Some previous knowledge of Quantum Mechanics is welcome, but not necessary for a persistent reader. The reader can find further material in [4, 5, 6, 7, 8]. Section 2 reviews basic notions of Quantum Mechanics necessary for Quantum Computation. Section 3 introduces the notion of quantum circuits and presents some basic examples. Section 4 describes how factorization can be reduced to order calculation and Section 5 gives a quantum algorithm for it. Section 6 shows the quantum Fourier transform. Section 7 gives an example and finally Section 8 shows the decomposition of the Fourier transform circuit in terms of the universal gates.
相关文档
最新文档