We can generalize the pair-testing scheme by applying Hadamards to every qubit! Here is the circuit diagram:
The layer of Hadamards is called the Hadamard transform. Let's see what this circuit does in the case of a single solution.
Implement the circuit above, consisting of a Hadamard transform, an oracle, and a Hadamard transform. The oracle is provided as oracle_matrix(combo)
, which you can invoke using the QubitUnitary()
function.
To interact with codercises, please switch to a larger screen size.
Learning Objectives: