9 Quantum sensing: It’s not just a phase

 

This chapter covers

  • How quantum operations can learn useful information about unknown operations with phase kickback
  • Creating new types in Q#
  • Running Q# code from a Python host program
  • Recognizing important properties and behaviors of eigenstates and phase
  • Programming controlled quantum operations in Q#

In the last chapter, we implemented our first quantum algorithm, Deutsch–Jozsa, in Q#. By helping Nimue and Merlin play Kingmaker, we saw how quantum programming techniques like phase kickback can give us advantages in solving problems. In this chapter, we will take a look at phase-estimation algorithms we can use in our quantum programs to solve different types of problems. Again, we will return to Camelot; this time, we will use a game between Lancelot and Dagonet to illustrate the task at hand.

9.1 Phase estimation: Using useful properties of qubits for measurement

Throughout the book, we’ve seen that games can be a helpful way to learn quantum computing concepts. For instance, in the previous chapter, Nimue’s game with Merlin let us explore our first quantum algorithm: the Deutsch–Jozsa algorithm. In this chapter, we’ll use another game to discover how to learn the phases of quantum states using phase kickback, the quantum development technique used by Deutsch–Jozsa and many other quantum algorithms.

9.1.1 Part and partial application

9.2 User-defined types

9.3 Run, snake, run: Running Q# from Python

9.4 Eigenstates and local phases

9.5 Controlled application: Turning global phases into local phases

9.5.1 Controlling any operation

9.6 Implementing Lancelot’s best strategy for the phase-estimation game

Summary

Part 2: Conclusion