0% found this document useful (0 votes)
6 views2 pages

Shor's Algorithm

This document outlines Homework 3 for PHY 443: Quantum Computing, focusing on Shor's Algorithm. It includes problems on modular arithmetic, quantum order finding, and the quantum Fourier transform, requiring students to demonstrate understanding through calculations, circuit designs, and programming tasks. Additionally, it discusses the practical hurdles in factoring large RSA keys and the complexities of Shor's algorithm compared to classical methods.

Uploaded by

Ekant Yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Shor's Algorithm

This document outlines Homework 3 for PHY 443: Quantum Computing, focusing on Shor's Algorithm. It includes problems on modular arithmetic, quantum order finding, and the quantum Fourier transform, requiring students to demonstrate understanding through calculations, circuit designs, and programming tasks. Additionally, it discusses the practical hurdles in factoring large RSA keys and the complexities of Shor's algorithm compared to classical methods.

Uploaded by

Ekant Yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 2
Homework 3: Shor's Algorithm PHY 443 PHY443: Quantum Computing Homework 3: Shor’s Algorithm Problem 1 (Modular-Arithmetie Warm-Up). (a) (Review) State Euler's theorem and the defi- nition of the order r = ordy(a) of a modulo N. Include the relationship with Euler's totient function $(N). (b) Take N = 15 and base a = 2 (which is coprime to N). Complete the table of 2* mod 15 for j= 1,2,... until the powers repeat. Identify the order r. F_[t]2]3[4 [5] 6] 78 2 mod 15 (e) Verify that r is even and 2°/? = —1 (mod 15). Use the greatest-common-divisor (GCD) trick p= eed(2"? — 1,15), q=ged(2"?? + 1,15) a) to recover the non-trivial factors p and 4. (d) Repeat parts (b)-(c) for N = 21 with base a = 5. Comment on what goes wrong (or right) and why an even order is crucial. Problem 2 (Quantum Order Finding by Phase Estimation). (a) Draw a iwo-register cireuit for order finding of a = 2 modulo N = 15 using t = 4 counting qubits, controlled modular exponentiation blocks Ux (where Ualy) = jay mod N)), and an inverse Quantum Fourier Transform (QFT). Clearly label each register’s role, (b) Show that, just before the inverse QFT, the combined state can be written as Sot (2mike zLe( rr) mi ®) where r is the order found in Problem 1(b). Explain (qualitatively) how the inverse QFT followed by a measurement yields an integer close to a fraction /2 that approximates j/r for some integer j, which can be turned into r via the continued-fraction algorithm. (c) (Hands-on) Use the IBM Quantum Composer (https: // quantum. ibm. com/ composer/ files/ new) or any quantum simulator to build a sirnple oner-finding circuit for « small modulus (e.g. N= 15, a= 2). Take a screenshot of your circuit, simulate it, and report your result. What order did the simulator find? Did the cireuit behave as expected? Comment on any discrepancies between theoretical expectations and simulation results. Problem 3 (End-to-End Shor and Algorithmic Speed-Up). (a) Summarize all four classical + quantum steps of Shor’s algorithm in one or two clear sentences per step. Use N = 35 (= 5 x7) a3 your running example. (6) Using any programming language (Python recommended), implement only the classical post- processing loop: ‘© Choose rundom a eoprime to N Page 1 Homework 3: Shor’s Algorithm PHYA43 Find r by repeated squaring © Apply the GCD tests © Repeat until factors emerge Run it 50 times for N = 35 and report the empirical success rate. Discuss briefly why the quantum order-finding step would replace the slowest sub-routine én a classien! approach, (c) Explain—in plain English and one formula—why Shor’s algorithm is said to be O((log.N)*) time on a quantum computer, compared with the best known sub-exponential classical methods (eds, the general ruumber-field sieve). What does exponential speed-p mean here? Addition- ally, comment on both the time and space complerity of Shor's algorithra, (4) (Discussion, approximately 150 words) List two current practical hurdles preventing us from factoring a 2048-bit RSA key today. Focus on hardware seale (qubit. count, error rates) and software stack (compilers, error correction), not on deep fault-tolerance theory. Problem 4 (From Period to Factors). (a) Suppose you know that for some a = 7, the order of @ modulo N = 33 is r = 10. Show that a"/? = 1 (mod N), and use the identity: ged(a’/? — 1, N) (3) to find the factors of 33. Draw a connection between this problem and the technique used in Problem 1 (b) Explain why the requirement that r is even and a'/? = —1 (mod N) is essential for Shor’s ‘algorithm to succeed in this step. (c) Provide an example where r is even buta’/? # —1 (mod N), and explain why Shor's algorithm would fail for that base a. Hint: Look for cases where a”! 1 (mod N). Problem 5 (Understanding the Quantumn Fourier Transform). (a) Write the 3-qubit quantum Fourier transform matric QFTs explicitly as an 8 x 8 matrix of compler entries. (You may leave an- swers in exponential form: €2*,) (b) Given the periodic state: (10) + |2) + |4) + 16), (a) apply QFTs to |). What is the resulting state (in the computational basis)? (c) Explain what a measurement on this state (after QFT) would yield, and how continued fraction expansion would be used to extract the order r. Calculate the probability of obtaining each possible measurement outcome. (4) (Bonus) Provide a circuit implementation of QFTs using only single-qubit gates and CNOT gates. Page 2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy