Let me do the math for 2-qubit. The amplitude in the superposition for 2-qubit is 1/2 for every state. Flip one of them and the average become 1/4. Flip 1/2 around 1/4 becomes 0. So the amplitude is 0 if it is not the answer. So the measurement is 100% for the true answer.

Thanks. I make more clarification in the article to make this a little bit more clear.

Written by

Deep Learning

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store