Result of Grover on Qiskit simulator

I have executed this circuit and I don't understand why the result is $$|11\rangle$$ ?

• [q, q] : solution register
• [q] : ancilla register (clause value)
• [q] : boolean value of Oracle function Thanks 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 think it's because the number of solutions is greater than N/2 ? How can I fix it if it's possible ? Apr 27 '20 at 17:12
• @julienrodriguez what do you expect from the circuit? What are you looking for? Do you know what would happen if the number is exactly N/2? – Apr 27 '20 at 19:10
• this circuit compute a simple 2-sat formula (not a or not b). I see quantumcomputing.stackexchange.com/questions/5318/… before my ask. May 1 '20 at 8:28
• @julienrodriguez I'm not sure if this will really help you, since you're dealing with a special case. May 1 '20 at 21:57

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  