Recall that multi-solution oracle
To implement Grover search for multiple solutions, we will just plop this new multi-solution oracle into the original circuit for a single Grover step:
Let's start by coding up this new oracle. Create an oracle for a random solution set of a given size using the MultiControlledX
gate. Remember that this takes a string for control_values
(e.g.,"11011"
) as a parameter rather than a list of bits.
To interact with codercises, please switch to a larger screen size.
Learning Objectives: