Skip to content

Commit 59506d2

Browse files
committed
update week 12
1 parent 2a009d1 commit 59506d2

File tree

10 files changed

+1279
-228
lines changed

10 files changed

+1279
-228
lines changed

doc/pub/week12/html/week12-bs.html

Lines changed: 230 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,71 @@
3939
'sections': [('Plans for the week of April 7-11, 2025',
4040
2,
4141
None,
42-
'plans-for-the-week-of-april-7-11-2025')]}
42+
'plans-for-the-week-of-april-7-11-2025'),
43+
('Reminder on the Quantum Fourier transform',
44+
2,
45+
None,
46+
'reminder-on-the-quantum-fourier-transform'),
47+
('Quantum phase estimation algorithm',
48+
2,
49+
None,
50+
'quantum-phase-estimation-algorithm'),
51+
("Brief overview of Shor's algorithm",
52+
2,
53+
None,
54+
'brief-overview-of-shor-s-algorithm'),
55+
('Some history', 2, None, 'some-history'),
56+
('Problem Statement', 2, None, 'problem-statement'),
57+
('Reduction to Order-Finding',
58+
2,
59+
None,
60+
'reduction-to-order-finding'),
61+
('Continued Fraction Expansion',
62+
2,
63+
None,
64+
'continued-fraction-expansion'),
65+
('Basics of number theory', 2, None, 'basics-of-number-theory'),
66+
('QFTs again', 2, None, 'qfts-again'),
67+
('Quantum Period Finding', 2, None, 'quantum-period-finding'),
68+
('Applying Quantum Fourier Transform (QFT)',
69+
2,
70+
None,
71+
'applying-quantum-fourier-transform-qft'),
72+
('Classical Post-Processing',
73+
2,
74+
None,
75+
'classical-post-processing'),
76+
('Complexity and Practical Considerations',
77+
2,
78+
None,
79+
'complexity-and-practical-considerations'),
80+
('Error Analysis and Success Probability',
81+
2,
82+
None,
83+
'error-analysis-and-success-probability'),
84+
("Summarizing Shor's algorithm",
85+
2,
86+
None,
87+
'summarizing-shor-s-algorithm')]}
4388
end of tocinfo -->
4489

4590
<body>
91+
92+
93+
94+
<script type="text/x-mathjax-config">
95+
MathJax.Hub.Config({
96+
TeX: {
97+
equationNumbers: { autoNumber: "AMS" },
98+
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
99+
}
100+
});
101+
</script>
102+
<script type="text/javascript" async
103+
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
104+
</script>
105+
106+
46107
<!-- Bootstrap navigation bar -->
47108
<div class="navbar navbar-default navbar-fixed-top">
48109
<div class="navbar-header">
@@ -59,6 +120,21 @@
59120
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
60121
<ul class="dropdown-menu">
61122
<!-- navigation toc: --> <li><a href="#plans-for-the-week-of-april-7-11-2025" style="font-size: 80%;">Plans for the week of April 7-11, 2025</a></li>
123+
<!-- navigation toc: --> <li><a href="#reminder-on-the-quantum-fourier-transform" style="font-size: 80%;">Reminder on the Quantum Fourier transform</a></li>
124+
<!-- navigation toc: --> <li><a href="#quantum-phase-estimation-algorithm" style="font-size: 80%;">Quantum phase estimation algorithm</a></li>
125+
<!-- navigation toc: --> <li><a href="#brief-overview-of-shor-s-algorithm" style="font-size: 80%;">Brief overview of Shor's algorithm</a></li>
126+
<!-- navigation toc: --> <li><a href="#some-history" style="font-size: 80%;">Some history</a></li>
127+
<!-- navigation toc: --> <li><a href="#problem-statement" style="font-size: 80%;">Problem Statement</a></li>
128+
<!-- navigation toc: --> <li><a href="#reduction-to-order-finding" style="font-size: 80%;">Reduction to Order-Finding</a></li>
129+
<!-- navigation toc: --> <li><a href="#continued-fraction-expansion" style="font-size: 80%;">Continued Fraction Expansion</a></li>
130+
<!-- navigation toc: --> <li><a href="#basics-of-number-theory" style="font-size: 80%;">Basics of number theory</a></li>
131+
<!-- navigation toc: --> <li><a href="#qfts-again" style="font-size: 80%;">QFTs again</a></li>
132+
<!-- navigation toc: --> <li><a href="#quantum-period-finding" style="font-size: 80%;">Quantum Period Finding</a></li>
133+
<!-- navigation toc: --> <li><a href="#applying-quantum-fourier-transform-qft" style="font-size: 80%;">Applying Quantum Fourier Transform (QFT)</a></li>
134+
<!-- navigation toc: --> <li><a href="#classical-post-processing" style="font-size: 80%;">Classical Post-Processing</a></li>
135+
<!-- navigation toc: --> <li><a href="#complexity-and-practical-considerations" style="font-size: 80%;">Complexity and Practical Considerations</a></li>
136+
<!-- navigation toc: --> <li><a href="#error-analysis-and-success-probability" style="font-size: 80%;">Error Analysis and Success Probability</a></li>
137+
<!-- navigation toc: --> <li><a href="#summarizing-shor-s-algorithm" style="font-size: 80%;">Summarizing Shor's algorithm</a></li>
62138

63139
</ul>
64140
</li>
@@ -98,13 +174,163 @@ <h2 id="plans-for-the-week-of-april-7-11-2025" class="anchor">Plans for the week
98174
<div class="panel-body">
99175
<!-- subsequent paragraphs come in larger fonts, so start with a paragraph -->
100176
<ol>
101-
<li> TBA</li>
102-
<li> <a href="https://youtu.be/" target="_self">Video of lecture TBA</a>
177+
<li> Quantum phase estimation algorithm, final derivation and discussions</li>
178+
<li> Brief discussion of Shor's algorithm</li>
179+
<li> Reading recommendation: Hundt section 6.4 for the QPE and section 6.5 for Shor's algorithm
180+
<!-- o <a href="https://youtu.be/" target="_self">Video of lecture TBA</a> -->
103181
<!-- o <a href="https://github.com/CompPhysics/QuantumComputingMachineLearning/blob/gh-pages/doc/HandWrittenNotes/2024/NotesApril10.pdf" target="_self">Whiteboard notes</a> --></li>
104182
</ol>
105183
</div>
106184
</div>
107185

186+
187+
<!-- !split -->
188+
<h2 id="reminder-on-the-quantum-fourier-transform" class="anchor">Reminder on the Quantum Fourier transform </h2>
189+
190+
<!-- !split -->
191+
<h2 id="quantum-phase-estimation-algorithm" class="anchor">Quantum phase estimation algorithm </h2>
192+
193+
<!-- !split -->
194+
<h2 id="brief-overview-of-shor-s-algorithm" class="anchor">Brief overview of Shor's algorithm </h2>
195+
196+
<ol>
197+
<li> Shor's algorithm is a quantum algorithm for integer factorization.</li>
198+
<li> It efficiently factors large integers by leveraging quantum period finding.</li>
199+
<li> Exponential speedup over the best-known classical algorithms.</li>
200+
<li> Breaks RSA encryption, which relies on the difficulty of factoring.</li>
201+
</ol>
202+
<!-- !split -->
203+
<h2 id="some-history" class="anchor">Some history </h2>
204+
205+
<p>Shor's algorithm, introduced by Peter Shor in 1994, revolutionized the
206+
field of cryptography. It demonstrated that a quantum computer could
207+
solve integer factorization and the discrete logarithm problem
208+
efficiently, posing a significant threat to classical cryptosystems
209+
such as RSA.
210+
</p>
211+
212+
<!-- !split -->
213+
<h2 id="problem-statement" class="anchor">Problem Statement </h2>
214+
215+
<p>The objective of Shor's algorithm is to factorize a large composite
216+
integer \( N \) into its prime factors. Given \( N = p \times q \),
217+
where \( p \) and \( q \) are unknown distinct primes, the problem of
218+
factorization can be reduced to finding an integer \( a \) such that
219+
\( 1 < a < N \) and \( \gcd(a, N) = 1 \).
220+
</p>
221+
222+
<!-- !split -->
223+
<h2 id="reduction-to-order-finding" class="anchor">Reduction to Order-Finding </h2>
224+
225+
<p>The key reduction in Shor's algorithm lies in transforming
226+
factorization into an order-finding problem:
227+
</p>
228+
229+
<ol>
230+
<li> Choose a random integer \( a \) such that \( 1 < a < N \) and \( \gcd(a, N) = 1 \).</li>
231+
<li> Determine the smallest positive integer \( r \) such that \( a^r \equiv 1 \pmod{N} \).</li>
232+
</ol>
233+
<p>The integer \( r \) is known as the \textit{order} of \( a \) modulo
234+
\( N \), and it helps in discovering the factors of \( N \).
235+
</p>
236+
237+
<!-- !split -->
238+
<h2 id="continued-fraction-expansion" class="anchor">Continued Fraction Expansion </h2>
239+
240+
<p>After obtaining the rational approximation from the quantum algorithm,
241+
classical computation using continued fraction expansion aids in
242+
deducing the correct order \( r \).
243+
</p>
244+
245+
<!-- !split -->
246+
<h2 id="basics-of-number-theory" class="anchor">Basics of number theory </h2>
247+
248+
<ol>
249+
<li> The problem: Factor an integer \( N \) into its prime factors.</li>
250+
<li> Reduce factoring to period finding \( f(x) = a^x \mod N \), where \( a \) is randomly chosen such that \( \gcd(a, N) = 1 \).</li>
251+
<li> The period \( r \) satisfies \( a^r \equiv 1 \mod N \).</li>
252+
<li> Once \( r \) is known, factors are given by \( \gcd(a^{r/2} \pm 1, N) \).</li>
253+
</ol>
254+
<!-- !split -->
255+
<h2 id="qfts-again" class="anchor">QFTs again </h2>
256+
257+
<p>The Quantum Fourier Transform is crucial to Shor's algorithm. It
258+
leverages quantum parallelism and interference to efficiently estimate
259+
the periodicity of a function.
260+
</p>
261+
$$
262+
\text{QFT}: \vert x\rangle \mapsto \frac{1}{\sqrt{2^n}} \sum_{y=0}^{2^n-1} e^{2\pi ixy/2^n} \vert y\rangle
263+
$$
264+
265+
<p>The quantum part of Shor's algorithm is designed to find the period \(
266+
r \) of the modular exponentiation function \( f(x) = a^x \bmod N \):
267+
</p>
268+
269+
<!-- !split -->
270+
<h2 id="quantum-period-finding" class="anchor">Quantum Period Finding </h2>
271+
<p>Quantum Period Finding: Key to Shor's Algorithm</p>
272+
273+
<ol>
274+
<li> Quantum subroutine for finding the period \( r \) of \( f(x) \).</li>
275+
<li> Similar to Quantum Phase Estimation (QPE).</li>
276+
<li> Uses two quantum registers:</li>
277+
<ul>
278+
<li> First register: Superposition of all possible inputs \( x \).</li>
279+
<li> Second register: Computes \( f(x) = a^x \mod N \).</li>
280+
</ul>
281+
</ol>
282+
<!-- !split -->
283+
<h2 id="applying-quantum-fourier-transform-qft" class="anchor">Applying Quantum Fourier Transform (QFT) </h2>
284+
285+
<ol>
286+
<li> The QFT is applied to the first register after the controlled unitary operations.</li>
287+
<li> Peaks in the measurement correspond to multiples of \( 1/r \).</li>
288+
<li> Post-processing classically determines \( r \) by continued fractions.</li>
289+
</ol>
290+
<!-- !split -->
291+
<h2 id="classical-post-processing" class="anchor">Classical Post-Processing </h2>
292+
293+
<ol>
294+
<li> Once \( r \) is found, factors of \( N \) are computed by \( \gcd(a^{r/2} \pm 1, N) \).</li>
295+
<li> If \( r \) is odd or \( a^{r/2} \equiv -1 \mod N \), try a different \( a \).</li>
296+
<li> With high probability, this yields a non-trivial factor of \( N \).</li>
297+
</ol>
298+
<!-- !split -->
299+
<h2 id="complexity-and-practical-considerations" class="anchor">Complexity and Practical Considerations </h2>
300+
301+
<ol>
302+
<li> Quantum Complexity: Polynomial in \( \log N \).</li>
303+
<li> Classical Best Known: Sub-exponential (Number Field Sieve).</li>
304+
<li> Quantum Advantage: Exponential speedup over classical algorithms.</li>
305+
<li> Practical Challenges: Quantum error correction, large qubit counts.</li>
306+
</ol>
307+
<!-- !split -->
308+
<h2 id="error-analysis-and-success-probability" class="anchor">Error Analysis and Success Probability </h2>
309+
310+
<p>The probability that a randomly chosen \( a \) leads to successful
311+
factoring is generally greater than 50\%. The quantum component
312+
requires carefully managed resources for high precision.
313+
</p>
314+
315+
<p>Error correction is crucial, as any errors in operations or QFT can
316+
significantly impact the accuracy of period estimation and the
317+
eventual factorization.
318+
</p>
319+
320+
<!-- !split -->
321+
<h2 id="summarizing-shor-s-algorithm" class="anchor">Summarizing Shor's algorithm </h2>
322+
323+
<p>Shor's algorithm is a central quantum algorithm demonstrating
324+
exponential speedup over classical counterparts. It brought both
325+
excitement for potential quantum advancements and a reconsideration of
326+
current cryptographic standards.
327+
</p>
328+
329+
<ol>
330+
<li> Shor's algorithm is a groundbreaking quantum algorithm for factoring.</li>
331+
<li> Combines quantum period finding with classical number theory.</li>
332+
<li> Highlights the potential of quantum computing to break RSA.</li>
333+
</ol>
108334
<!-- ------------------- end of main content --------------- -->
109335
</div> <!-- end container -->
110336
<!-- include javascript, jQuery *first* -->
@@ -116,7 +342,7 @@ <h2 id="plans-for-the-week-of-april-7-11-2025" class="anchor">Plans for the week
116342
</footer>
117343
-->
118344
<center style="font-size:80%">
119-
<!-- copyright --> &copy; 1999-2024, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license
345+
<!-- copyright --> &copy; 1999-2025, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license
120346
</center>
121347
</body>
122348
</html>

0 commit comments

Comments
 (0)