8 What is a quantum algorithm?

 

This chapter covers

  • Understanding what a quantum algorithm is
  • Designing oracles to represent classical functions in quantum programs
  • Working with useful quantum programming techniques

One important application of quantum algorithms is obtaining speedups for solving problems where we need to search inputs to a function we’re trying to learn about. Such functions could be obfuscated (such as hash functions) or computationally difficult to evaluate (common in studying mathematical problems). In either case, applying quantum computers to such problems requires us to understand how we program and provide input to quantum algorithms. To learn how to do so, we’ll program and run an implementation of the Deutsch–Jozsa algorithm, which will let us learn properties of unknown functions quickly using quantum devices.

8.1 Classical and quantum algorithms

Algorithm (noun): a step-by-step procedure for solving a problem or accomplishing some end.

—Merriam-Webster Dictionary

When we talk about classical programming, we sometimes say that a program implements an algorithm: that is, a sequence of steps that can be used to solve a problem. For example, if we want to sort a list, we can talk about the quicksort algorithm independently of what language or operating system we are using. We often specify these steps at a high level. In the quicksort example, we might list the steps as something like the following:

8.2 Deutsch–Jozsa algorithm: Moderate improvements for searching

8.2.1 Lady of the (quantum) Lake

8.3 Oracles: Representing classical functions in quantum algorithms

8.3.1 Merlin’s transformations

8.3.2 Generalizing our results

8.4 Simulating the Deutsch–Jozsa algorithm in Q#

8.5 Reflecting on quantum algorithm techniques

8.5.1 Shoes and socks: Applying and undoing quantum operations

8.5.2 Using Hadamard instructions to flip control and target

8.6 Phase kickback: The key to our success

Summary

sitemap