0
$\begingroup$

I am trying to flip the phase of the solution state in an oracle for Grover's algorithm. I am wondering if an MCZ gate will flip the target qubit of |0> if the control qubits are in their correct states. Thanks

$\endgroup$

1 Answer 1

2
$\begingroup$

No. In order to get the phase flipped if the target qubit is 0, you need to add X gates before and after applying the MCZ gate: enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.