查看“︁多伊奇-乔萨算法”︁的源代码
←
多伊奇-乔萨算法
跳转到导航
跳转到搜索
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{noteTA|G1=IT|G2=P}} '''多伊奇-乔萨算法'''({{lang-en|Deutsch–Jozsa algorithm}})是[[戴维·多伊奇]]和[[理查德·喬薩]]于1992年提出的一种[[确定性算法|确定性]][[量子演算法|量子算法]]。1998年,{{le|理查德·克利夫|Richard Cleve}}、{{le|阿图尔·埃克特|Artur Ekert}}、基娅拉·马基亚韦洛(Chiara Macchiavello)与{{le|米凯莱·莫斯卡|Michele Mosca}}对其进行了改进。<ref name="DJ92">{{Cite journal |last=David Deutsch |author-link=David Deutsch |last2=Richard Jozsa |author-link2=Richard Jozsa |name-list-style=amp |year=1992 |title=Rapid solutions of problems by quantum computation |journal=Proceedings of the Royal Society of London A |volume=439 |issue=1907 |page=553–558 |bibcode=1992RSPSA.439..553D |citeseerx=10.1.1.655.5997 |doi=10.1098/rspa.1992.0167 |s2cid=121702767}}</ref><ref name="CEMM98">{{Cite journal |last=R. Cleve |last2=A. Ekert |last3=C. Macchiavello |last4=M. Mosca |year=1998 |title=Quantum algorithms revisited |journal=Proceedings of the Royal Society of London A |volume=454 |issue=1969 |page=339–354 |arxiv=quant-ph/9708016 |bibcode=1998RSPSA.454..339C |doi=10.1098/rspa.1998.0164 |s2cid=16128238}}</ref>尽管该算法目前在现实中基本没有用途,但可以证明它比任何可能的确定性经典算法都快指数级,是最早提出的有此特性的量子算法之一。<ref>{{Cite journal |last=Simon |first=Daniel |date=November 1994 |title=On the Power of Quantum Computation |url=http://citeseer.ist.psu.edu/viewdoc/download?doi=10.1.1.51.5477&rep=rep1&type=pdf |journal=94 Proceedings of the 35th Annual Symposium on Foundations of Computer Science |page=116–123 |doi=10.1109/SFCS.1994.365701 |isbn=0-8186-6580-7 |s2cid=7457814 |access-date=2022-05-24 |archive-date=2016-04-16 |archive-url=https://web.archive.org/web/20160416194728/http://citeseer.ist.psu.edu/viewdoc/download?doi=10.1.1.51.5477&rep=rep1&type=pdf }}</ref> == 问题描述 == 在多伊奇-乔萨问题中,我们有一个被称为[[预言机]]的黑盒量子计算机,它能实现某一函数 <math>f\colon\{0,1\}^n\rightarrow \{0,1\}</math>。该函数以n比特值作为输入,输出结果则为0或1。问题[[承諾問題|承诺]]该函数要么是[[常函数]](即对任何输入都输出恒定值0或1),要么是平衡(balanced)函数(即对一半的输入返回1,另一半则返回0)。<ref>{{Cite web|title=Certainty from Uncertainty<!-- Bot generated title -->|url=http://www.fortunecity.com/emachines/e11/86/qcomp2.html|access-date=2011-02-13|archive-url=https://web.archive.org/web/20110406191104/http://www.fortunecity.com/emachines/e11/86/qcomp2.html|archive-date=2011-04-06}}</ref>问题的任务是通过预言机确定<math>f</math>是常函数还是平衡函数。 == 问题背景 == 多伊奇-乔萨问题是专门为量子计算设计的一个问题,该问题对于量子算法而言相对容易,但对任何确定性经典算法来说都是十分困难的。其提出的动机是展示可以由量子计算机有效并且正确解决的一个黑盒问题,而同时确定性经典计算机则需要进行大量计算才能解决该问题。更准确地说,该问题表明了复杂度类{{le|EQP|Exact quantum polynomial time}}(即可以由量子计算机在多项式时间内精确地解决)与[[P (複雜度)|P]]之间的预言分离(oracle separation)。<ref name="Johansson2017"> {{Cite journal |last=Johansson, N. |last2=Larsson, JÅ. |year=2017 |title=Efficient classical simulation of the Deutsch–Jozsa and Simon's algorithms |journal=Quantum Inf Process (2017) |volume=16 |issue=9 |page=233 |arxiv=1508.05027 |bibcode=2017QuIP...16..233J |doi=10.1007/s11128-017-1679-7 |s2cid=28670540}} </ref> 由于该问题在概率经典计算机上也很容易解决,因此它不会产生与复杂度类[[BPP (複雜度)|BPP]](即在概率经典计算机上以多项式时间解决且误差有界)之间的预言分离。{{le|西蒙问题|Simon's problem}}则是一个证明[[BQP (複雜度)|BQP]]和BPP之间产生预言分离的例子。 == 经典算法 == 对于传统的确定性算法而言,假设''n''是比特数,则在最坏情况下需要<math>2^{n-1} + 1</math>次对<math>f</math>的求值。为了证明<math>f</math>是常函数,必须对超过一半的输入进行计算并且发现它们有相同的输出。最好情况是<math>f</math>为平衡函数且恰好选择的前两个输入值对应不同的输出值。对于传统的[[随机化算法|随机算法]],<math>k</math>次求值足以产生高概率的正确答案(对<math>k \geq 1</math> 错误概率为<math>\epsilon \leq 1/2^{k}</math>)。然而,如果想保证获得正确答案的话,仍需要<math>k=2^{n-1} + 1</math>次求值。多伊奇-乔萨量子算法则仅需一次对<math>f</math>的求值就能获得准确的答案。 == 历史 == 多伊奇-乔萨问题是[[戴维·多伊奇]]早期工作(1985年)的推广。当时他提出的算法针对的是<math> n = 1 </math>的简单情形,即有一个输入为1比特的[[布尔函数]]<math>f: \{0,1\} \rightarrow \{0,1\}</math>,需要确定该函数是否是常函数。<ref name="Deu85"> {{Cite journal |last=David Deutsch |author-link=David Deutsch |year=1985 |title=Quantum Theory, the Church-Turing Principle and the Universal Quantum Computer |journal=Proceedings of the Royal Society of London A |volume=400 |issue=1818 |page=97–117 |bibcode=1985RSPSA.400...97D |citeseerx=10.1.1.41.2382 |doi=10.1098/rspa.1985.0070 |s2cid=1438116}} </ref> 多伊奇最早提出的算法实际上并不是确定性的。1992年,多伊奇与乔萨共同提出了一种确定性算法,并将该算法推广到<math>n</math>比特的输入值。与多伊奇的算法不同,该算法需要进行两次而非一次函数求值。 后来克利夫等人<ref name="CEMM98" />又对多伊奇-乔萨算法进行了改进,提出了一种既具有确定性又仅需一次<math>f</math>求值的算法。不过为了纪念多伊奇和乔萨两人开创性的贡献,该算法仍被称为多伊奇-乔萨算法。<ref name="CEMM98" /> == 算法 == 多伊奇-乔萨算法成立的前提之一是由<math>x</math>计算<math>f(x)</math>的预言机必须是一个不会将<math>x</math>[[量子退相干|退相干]]的量子预言机。此外,它也不能在算法结束后留下任何<math>x</math>的拷贝。 [[File:Deutsch-Jozsa-algorithm-quantum-circuit.png|右|缩略图|400x400像素| 多伊奇-乔萨算法[[量子电路]]]] 假设我们有<math>n+1</math>比特量子态<math>|0\rangle^{\otimes n} |1\rangle </math> ,即前n比特分别处于<math>|0\rangle </math>而最后一比特则是<math>|1\rangle </math> 。对每个比特应用[[阿达马变换]]可以得到 : <math>\frac{1}{\sqrt{2^{n+1}}}\sum_{x=0}^{2^n-1} |x\rangle (|0\rangle - |1\rangle )</math> . <math>f</math>是由量子预言机实现的函数。预言机将量子态<math> |x\rangle|y\rangle </math>映射到<math> |x\rangle|y\oplus f(x) \rangle </math>,其中<math>\oplus</math>是模2加法(由[[受控非门]]实现,可以看作是量子版[[异或门]])。于是该量子预言机可以将上述量子态转换为 : <math>\frac{1}{\sqrt{2^{n+1}}}\sum_{x=0}^{2^n-1} |x\rangle (|f(x)\rangle - |1\oplus f(x)\rangle )</math> . 对于每个<math>x, f(x)</math>的结果为0或1。为了检验这两种可能性,我们注意到上面的量子态等价于 : <math>\frac{1}{\sqrt{2^{n+1}}}\sum_{x=0}^{2^n-1} (-1)^{f(x)} |x\rangle (|0\rangle - |1\rangle )</math> . 此时可以忽略最后一个量子比特<math>\frac{|0\rangle - |1\rangle}{\sqrt{2}}</math>,剩余部分为: : <math>\frac{1}{\sqrt{2^{n}}}\sum_{x=0}^{2^n-1} (-1)^{f(x)} |x\rangle</math> . 再对每一量子比特进行[[阿达马变换]],得到 : <math>\frac{1}{\sqrt{2^n}}\sum_{x=0}^{2^n-1}(-1)^{f(x)} \left[ \frac{1}{\sqrt{2^n}} \sum_{y=0}^{2^n-1}(-1)^{x\cdot y} |y\rangle \right] = \frac{1}{2^n}\sum_{y=0}^{2^n-1} \left[\sum_{x=0}^{2^n-1}(-1)^{f(x)} (-1)^{x\cdot y}\right] |y\rangle </math> 其中<math>x\cdot y=x_0 y_0\oplus x_1 y_1\oplus\cdots\oplus x_{n-1} y_{n-1} </math>是每一比特相应乘积之和。 最后,我们可以检验测量得到<math>|0\rangle^{\otimes n}</math> 的概率 : <math>\bigg|\frac{1}{2^n}\sum_{x=0}^{2^n-1}(-1)^{f(x)}\bigg|^2</math> 当<math>f(x)</math>是常函数([[干涉 (物理学)|相长干涉]])时此概率为1,当<math>f(x)</math>是平衡函数([[干涉 (物理学)|相消干涉]])时此概率为0。换句话说,如果<math>f(x)</math>是常函数的话测量结果为<math>|0\rangle^{\otimes n}</math> (即所有量子比特全为零),其他结果则表明<math>f(x)</math>是平衡函数。 == 多伊奇算法 == 多伊奇算法是一般多伊奇-乔萨算法的特例。此时我们需要检查<math>f(0)=f(1)</math>是否成立。这相当于检查<math>f(0)\oplus f(1)</math>,当结果为零时表明<math>f</math>是常函数,否则则不是常函数。 我们从两比特量子态<math>|0\rangle |1\rangle</math>开始,对每一量子比特应用[[阿达马变换]],结果为 : <math>\frac{1}{2}(|0\rangle + |1\rangle)(|0\rangle - |1\rangle).</math> 函数<math>f</math>可以将<math>|x\rangle |y\rangle</math>映射为<math>|x\rangle |f(x)\oplus y\rangle</math>,将此函数应用于当前的量子态,可以得到 : <math>\frac{1}{2}(|0\rangle(|f(0)\oplus 0\rangle - |f(0)\oplus 1\rangle) + |1\rangle(|f(1)\oplus 0\rangle - |f(1)\oplus 1\rangle))</math> : <math>=\frac{1}{2}((-1)^{f(0)}|0\rangle(|0\rangle - |1\rangle) + (-1)^{f(1)}|1\rangle(|0\rangle - |1\rangle))</math> : <math>=(-1)^{f(0)}\frac{1}{2}\left(|0\rangle + (-1)^{f(0)\oplus f(1)}|1\rangle\right)(|0\rangle - |1\rangle).</math> 忽略最后一个比特与全局相位因子,可以得到量子态 : <math>\frac{1}{\sqrt 2}(|0\rangle + (-1)^{f(0)\oplus f(1)}|1\rangle).</math> 再次应用阿达马变换,得到 : <math>\frac{1}{2}(|0\rangle + |1\rangle + (-1)^{f(0)\oplus f(1)}|0\rangle - (-1)^{f(0)\oplus f(1)}|1\rangle)</math> : <math>=\frac{1}{2}((1 +(-1)^{f(0)\oplus f(1)})|0\rangle + (1-(-1)^{f(0)\oplus f(1)})|1\rangle).</math> 当且仅当测量结果为<math>|0\rangle</math>时有<math>f(0)\oplus f(1)=0</math>。反之,当且仅当测量结果为<math>|1\rangle</math>时有<math>f(0)\oplus f(1)=1</math>。因此我们可以肯定地知道<math>f(x)</math>是否为常函数。 == 参考文献 == {{Reflist}} [[Category:量子演算法]]
该页面使用的模板:
Template:Cite journal
(
查看源代码
)
Template:Cite web
(
查看源代码
)
Template:Lang-en
(
查看源代码
)
Template:Le
(
查看源代码
)
Template:NoteTA
(
查看源代码
)
Template:Reflist
(
查看源代码
)
返回
多伊奇-乔萨算法
。
导航菜单
个人工具
登录
命名空间
页面
讨论
不转换
查看
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
特殊页面
工具
链入页面
相关更改
页面信息