Skip to main content

Quantum Class 12, Thu 2022-10-13

1 Followup on free-ranging discussion from last time

  1. What use is quantum computation?

    "What good is a newborn baby?" - attributed to Mike Faraday and Ben Franklin.

  2. Value of PhD

    1. I like the idea, but maybe it's obsolescent.

    2. It teaches stubbornness and how to accomplish a 4 year project, which is unusual in industry.

    3. It's required for academia, but universities are obsolescent.

    4. It can be a status symbol in government, military, business.

    5. It's required to manage technical people with PhDs. Otherwise they won't respect you and you'll have trouble making technical decisions. Similarly, effective hospital managers are MDs.

      The mushy degrees that combine management with a technical concentration, either in math or health, have been tried for decades and always fail. OK, them's fighting words, so bring it on.

    6. However, you won't live longer because of the time you spent as a grad student. Maybe there were better uses of those 4 years.

  3. Strategic career advice

    1. Work to stay current in your field. Your employer may oppose this. If so, do it on your own time.

    2. E.g., I'm 70 years old and I'm teaching quantum computing.

      I proposed this course to ECSE 3 years ago, created it, and spend a lot of time learning the material.

      The difference between you and me is that RPI pays me to learn this.

    3. If you don't stay current, you'll be laid off after 20 years as obsolescent.

    4. In this credentialed society, collect the pretty pieces of paper. It's easier now with all the online courses.

    5. Be prepared for big unexpected changes. Imaging describing today's world to someone from even 5 years ago....

    6. Finally, make contacts and be friendly. All of my jobs have been from people I knew. As my grandmother said, "Be nice to the people you meet on the way up. You may meet them again on the way down."

2 Shor's algorithm to factor an integer

2.1 The problem

  1. Factorize an integer.

  2. in BQP.

  3. almost exponentially faster than best classical algorithm.

  4. Largest examples I can find: 56153 = 233 × 241.

2.2 Notes

  1. This is the most famous quantum algorithm.

  2. It's the one that has the potential to break much public key crypto.

  3. This is the deepest topic of this course so far.

  4. Takeaways from this algorithm are that some serious math is involved, and the quantum version is unlike the classical version.

  5. If you don't absorb all the details, then absorb its flavor.

  6. I sometimes show videos because they present the idea better than me.

  7. OK to ask questions and make comments during the videos. I'll pause the video and try to answer.

2.3 Application: break RSA

  1. Public-private key crypto.

  2. Oversimpifying, RSA private key is a pair of large primes.

    Public key is their product.

  3. Odd fact: if 2 public keys have a common factor, then you can easily factor both of them with gcd.

  4. Publish the public key.

  5. Use intended recipient's public key to encrypt message then send it.

    Recipient uses his private key to decrypt it.

  6. Or, use private key to sign message then publish or send it.

    Anyone can use the public key to verify it.

  7. Invented in 1970s, secretly before publicly.

  8. Aside: visit the NSA's National Cryptologic Museum. Note how nothing there is under 50 years old.

  9. All this assumes that you can reliably get someone's genuine public key.

    Some scams involve faking phone numbers, email addresses, etc.

  10. Based on a function that's hard to invert, e.g., factoring.

  11. RSA has competitors.

  12. There are various ways to embed RSA or a competitor into an encryption program, with choices of algorithm, key length, etc.

  13. On linux, you can encrypt a file with pgp, gnupg, LUKS, zip encryption, zfs encryption, truecrypt (suddenly discontinued w/o any stated reason in 2014), etc, etc.

  14. At one time, there was no version of pgp that was legal both in the US and outside the US.

  15. At one time, the US proposed that crypto must have a back door. However this was dropped.

  16. A paranoid person might suspect that the chaos was deliberate to make it harder to use crypto. But that's just crazy talk.

  17. RSA is slow, so it's used only to encrypt a session-specific symmetric key that is used for the rest of the message, ssh session, etc.

  18. Gnupg et al do a 3rd level of encryption.

    The private key is encrypted with a passphrase.

    You use the passphrase to decrypt the file.

    The encrypted passphrase is stored ~/.gnupg .

    If you lose ~/.gnupg, you lose all your encrypted data.

    You can change the passphrase by re-encrypting the private key w/o re-encrypting the whole file.

    You can have multiple passphrases to give to different people.

    You can cancel a passphrase by deleting the version of the encrypted private key that was encrypted with it.

  19. So, you need 3 things to access the encrypted file: the encrypted file, the encrypted secret key, and the passphrase.

2.4 Classical factoring

  1. Efficient algorithms are complicated and use number theory.

  2. Rational sieve is good first algorithm to study. It's simple and reasonably fast.

2.5 Videos

  1. Shor on, what is Shor's factoring algorithm? (2:09)

    It's good to listen to the inventor of a big idea.

  2. Umesh Vazirani's lecture, 2018.

    1. This jumps into the middle of things a little. However the alternatives are worse: not to show Vazirani at all, or to also show all the earlier videos.

    2. Lecture 10 1 Period Finding (19:27)

    3. Lecture 10 2 Shor's Factoring Algorithm (25:42)

  3. Hacking at Quantum Speed with Shor's Algorithm (16:35). Optional to watch on your own.

  4. The Story of Shor's Algorithm, Straight From the Source | Peter Shor (31:27) 2021-07-02 Gives the history. Optional to watch on your own.

  5. https://medium.com/@aditya.yadav/rsa-2048-cracked-using-shors-algorithm-on-a-quantum-computer-660cb2297a95

  6. Hacking at Quantum Speed with Shor's Algorithm (16:35)

  7. Five lectures by Abraham Asfaw in Qiskit's Introduction to Quantum Computing and Quantum Hardware.

2.6 Vanished videos

  1. 43 Quantum Mechanics - Quantum factoring Period finding (19:27)

  2. 44 Quantum Mechanics - Quantum factoring Shor's factoring algorithm (25:42)

2.7 IBM Quantum

https://quantum-computing.ibm.com/composer/docs/iqx/guide/shors-algorithm

https://qiskit.org/textbook/ch-algorithms/shor.html

4 HHL algorithm to solve a linear system of equations

  1. Quantum Machine Learning - 37 - Overview of the HHL Algorithm 5:48.

    quick, deep, intro.

  2. Quantum algorithm for solving linear equations 36:31.

    quite understandable.

  3. Quantum Algorithms for Systems of Linear Equations (Quantum Summer Symposium 2020) 19:22.

  4. IBM Quantum Algorithms for Applications from qiskit

    E.g., Fourier transform and HHL.

  5. HHL Algorithm

    This is in Huawei HiQ, an open-source software framework for quantum computing.

  6. https://en.wikipedia.org/wiki/Quantum_algorithm_for_linear_systems_of_equations

5 Term project

Time to start thinking of a term project, on a topic at least vaguely related to the course. Teams of any size ok. For the grad version, also write a paper.