12 Arithmetic with quantum computers

 

This chapter covers

  • Programming with the Q# Numerics library
  • Implementing Shor’s algorithm to factor integers
  • Recognizing the implications of quantum computing for security infrastructure

In chapter 11, we used a quantum programming technique called amplitude amplification in Grover’s algorithm to speed up searching unstructured data sets. While Grover’s was not the most efficient search approach for smaller data sets, as we looked to scaling up to larger and larger problems, our quantum approach offered a clear advantage. In this final chapter, we’ll build on the skills we’ve developed throughout the book to tackle one of the most famous quantum algorithms: Shor’s algorithm. We’ll implement Shor’s and show how it can give us an advantage when trying to factor large integers. While that may not seem like the most interesting task, the difficulty of factoring integers actually underpins much of our current cryptographic infrastructure.

12.1 Factoring quantum computing into security

12.2 Connecting modular math to factoring

12.2.1 Example of factoring with Shor’s algorithm

12.3 Classical algebra and factoring

12.4 Quantum arithmetic

12.4.1 Adding with qubits

12.4.2 Multiplying with qubits in superposition

12.4.3 Modular multiplication in Shor’s algorithm

12.5 Putting it all together

Summary

Wrapping up