Exploring quantum phase kickback
In this first recipe, we will take a closer look at a staple component of many quantum algorithms, quantum phase kickback, which is used to let one or more qubits pick up the phase angle of a second qubit without changing that second qubit. In the Building the Grover algorithm recipe, we will use phase kickback to identify the correct solution for our search and to amplify the probability of measuring that solution.
This recipe will require a little bit of math to explain some pretty unintuitive aspects of the process and results, but we'll walk through it. It is a really good starting point for the mind-blowing aspects of quantum algorithms.
Getting ready
The sample code for this recipe can be found here: https://github.com/PacktPublishing/Quantum-Computing-in-Practice-with-Qiskit-and-IBM-Quantum-Experience/blob/master/Chapter09/ch9_r1_kickback.py.
The recipe in itself is pretty simple and consists of a set of steps that will walk...