I have executed this circuit and I don't understand why the result is $|11\rangle$ ?
[q[0], q[1]]
: solution register[q[2]]
: ancilla register (clause value)[q[3]]
: boolean value of Oracle function
Thanks you
Quantum Computing Stack Exchange is a question and answer site for engineers, scientists, programmers, and computing professionals interested in quantum computing. It only takes a minute to sign up.
Sign up to join this communityI have executed this circuit and I don't understand why the result is $|11\rangle$ ?
[q[0], q[1]]
: solution register[q[2]]
: ancilla register (clause value) [q[3]]
: boolean value of Oracle functionThanks you
3 out of 4 states are inverted, that leads to the following situation before you do the Grover Diffusion, which mirror around the red line:
This will bring the all states to zeros, but not $|11\rangle$...
So, I add a "ghost qubit" in the solution space in order to increase N. I fixe the "ghost qubit" to a state (|1> here) and we get #solutions < N/2