{"id":4094,"date":"2024-09-21T14:39:50","date_gmt":"2024-09-21T14:39:50","guid":{"rendered":"https:\/\/workhouse.sweetdishy.com\/?p=4094"},"modified":"2024-09-24T11:52:15","modified_gmt":"2024-09-24T11:52:15","slug":"phase-estimation","status":"publish","type":"post","link":"https:\/\/workhouse.sweetdishy.com\/index.php\/2024\/09\/21\/phase-estimation\/","title":{"rendered":"Phase estimation"},"content":{"rendered":"\n<p>estimation<\/p>\n\n\n\n<p>One version of Shor\u2019s algorithm is based on phase estimation. This appli-<\/p>\n\n\n\n<p>cation of the quantum Fourier transform is used to estimate the eigenvalue of<\/p>\n\n\n\n<p>a unitary operator, which is a phase:<\/p>\n\n\n\n<p>\u02c6<\/p>\n\n\n\n<p>U|ui = e<\/p>\n\n\n\n<p>i\u03b8<\/p>\n\n\n\n<p>|ui; \u03b8 = 2\u03c0\u03c6 (8.63)<\/p>\n\n\n\n<p>where \u03c6 is a fraction.<\/p>\n\n\n\n<p>As a preliminary to this algorithm, let\u2019s look at a toy version. Suppose you<\/p>\n\n\n\n<p>are given U and an eigenstate |ui. We have seen that the circuit of Figure 7.14<\/p>\n\n\n\n<p>simulates a measurement of U.<\/p>\n\n\n\n<p>|0i<\/p>\n\n\n\n<p>H<\/p>\n\n\n\n<p>\u2022<\/p>\n\n\n\n<p>H<\/p>\n\n\n\n<p>|ui<\/p>\n\n\n\n<p>U<\/p>\n\n\n\n<p>|ui<\/p>\n\n\n\n<p>Here,<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>\ue000<\/p>\n\n\n\n<p>|0i + |1i<\/p>\n\n\n\n<p>\ue001<\/p>\n\n\n\n<p>\u2297 |ui \u2192<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>\ue000<\/p>\n\n\n\n<p>|0i + e<\/p>\n\n\n\n<p>2\u03c0i\u03c6<\/p>\n\n\n\n<p>|1i<\/p>\n\n\n\n<p>\ue001<\/p>\n\n\n\n<p>\u2297 |ui. (8.64)<\/p>\n\n\n\n<p>If \u03c6 were a single bit, then you can see that the output is 0 if \u03c6 = 0.0 and 1<\/p>\n\n\n\n<p>if \u03c6 = 0.1. This circuit thus gives us the value in one run. But in general \u03c6<\/p>\n\n\n\n<p>will be several bits long. A measurement of the upper register in the H basis<\/p>\n\n\n\n<p>will yield a 0 or 1 with probabilities cos<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>\u03c0\u03c6 and sin<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>\u03c0\u03c6. A statistically large<\/p>\n\n\n\n<p>number of measurements will allow us to recover \u03c6 from the counts. But this<\/p>\n\n\n\n<p>is an ine\ufb03cient method.<\/p>\n\n\n\n<p>Note that the H transform on the upper register is the one-bit Fourier<\/p>\n\n\n\n<p>transform. In order to estimate \u03c6 to more bits of accuracy, we must have<\/p>\n\n\n\n<p>a qubit for each signi\ufb01cant \ufb01gure of \u03c6 and then perform an inverse Fourier<\/p>\n\n\n\n<p>transform, as shown in the circuit of Figure 8.13.<\/p>\n\n\n\n<p>|0i<\/p>\n\n\n\n<p>H<\/p>\n\n\n\n<p>. . .<\/p>\n\n\n\n<p>\u2022<\/p>\n\n\n\n<p>QF T<\/p>\n\n\n\n<p>\u22121<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<p>t qubits |0i<\/p>\n\n\n\n<p>H<\/p>\n\n\n\n<p>\u2022<\/p>\n\n\n\n<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p>\n\n\n\n<p>, \u03c6<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>= \u03c6<\/p>\n\n\n\n<p>t<\/p>\n\n\n\n<p>\u03c6<\/p>\n\n\n\n<p>t\u22121<\/p>\n\n\n\n<p>\u00b7\u00b7\u00b7\u03c6<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>. (8.65)<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Quantum Algorithms 167<\/p>\n\n\n\n<p>Then we start with t working qubits in the input register, and use them to<\/p>\n\n\n\n<p>control gates of the form U<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>k<\/p>\n\n\n\n<p>. After the control gates, the output on the k<\/p>\n\n\n\n<p>th<\/p>\n\n\n\n<p>line is<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>(|0i + |1i) \u2212\u2192<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>\ue010<\/p>\n\n\n\n<p>|0i + e<\/p>\n\n\n\n<p>2\u03c0i2<\/p>\n\n\n\n<p>k<\/p>\n\n\n\n<p>\u03c6<\/p>\n\n\n\n<p>|1i<\/p>\n\n\n\n<p>\ue011<\/p>\n\n\n\n<p>(8.66)<\/p>\n\n\n\n<p>=<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>\ue010<\/p>\n\n\n\n<p>|0i + e<\/p>\n\n\n\n<p>2\u03c0i(0.\u03c6<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u03c6<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>\u00b7\u00b7\u00b7\u03c6<\/p>\n\n\n\n<p>k<\/p>\n\n\n\n<p>)<\/p>\n\n\n\n<p>|1i<\/p>\n\n\n\n<p>\ue011<\/p>\n\n\n\n<p>. (8.67)<\/p>\n\n\n\n<p>You can see that just before the QFT gate, the state of the upper register is<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>t<\/p>\n\n\n\n<p>\ue000<\/p>\n\n\n\n<p>|0i + e<\/p>\n\n\n\n<p>2\u03c0i\u03c6<\/p>\n\n\n\n<p>|1i<\/p>\n\n\n\n<p>\ue001<\/p>\n\n\n\n<p>\u2297<\/p>\n\n\n\n<p>\ue000<\/p>\n\n\n\n<p>|0i + e<\/p>\n\n\n\n<p>4\u03c0i\u03c6<\/p>\n\n\n\n<p>|1i<\/p>\n\n\n\n<p>\ue001<\/p>\n\n\n\n<p>\u2297 . . . \u2297<\/p>\n\n\n\n<p>\ue010<\/p>\n\n\n\n<p>|0i + e<\/p>\n\n\n\n<p>2\u03c0i.2<\/p>\n\n\n\n<p>t<\/p>\n\n\n\n<p>\u03c6<\/p>\n\n\n\n<p>|1i<\/p>\n\n\n\n<p>\ue011<\/p>\n\n\n\n<p>(8.68)<\/p>\n\n\n\n<p>=<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>t<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>t<\/p>\n\n\n\n<p>\u22121<\/p>\n\n\n\n<p>X<\/p>\n\n\n\n<p>k=0<\/p>\n\n\n\n<p>e<\/p>\n\n\n\n<p>2\u03c0i\u03c6k<\/p>\n\n\n\n<p>|ki (8.69)<\/p>\n\n\n\n<p>This is just the QFT mod 2<\/p>\n\n\n\n<p>t<\/p>\n\n\n\n<p>of \u03c6<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>and an inverse Fourier transform will give<\/p>\n\n\n\n<p>you \u03c6<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>exact to t signi\ufb01cant \ufb01gures.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>estimation One version of Shor\u2019s algorithm is based on phase estimation. This appli- cation of the quantum Fourier transform is used to estimate the eigenvalue of a unitary operator, which is a phase: \u02c6 U|ui = e i\u03b8 |ui; \u03b8 = 2\u03c0\u03c6 (8.63) where \u03c6 is a fraction. As a preliminary to this algorithm, let\u2019s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4042,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[497],"tags":[],"class_list":["post-4094","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-quantum-algorithms"],"jetpack_featured_media_url":"https:\/\/workhouse.sweetdishy.com\/wp-content\/uploads\/2024\/09\/algorithm-1.png","_links":{"self":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/4094","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/comments?post=4094"}],"version-history":[{"count":2,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/4094\/revisions"}],"predecessor-version":[{"id":4588,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/4094\/revisions\/4588"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media\/4042"}],"wp:attachment":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media?parent=4094"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/categories?post=4094"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/tags?post=4094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}