The quantum component of Shor's algorithm searches efficiently for nontrivial square roots using an algorithm called period finding. Given an operator
One can show that the state
This is the circuit we have to build for our procedure. We can do so easily using the qml.QuantumPhaseEstimation
operation, thanks to which we will only have to worry about defining the unitary matrix
Implement the above circuit for qml.QuantumPhaseEstimation
template!
Finally, we will use the get_phase
function to translate the output to a decimal value.
To interact with codercises, please switch to a larger screen size.
Learning Objectives: