Quantum Computing Hardware
Gates H, Z and H are applied in that order to a qubit in |0⟩, which is then measured. What is the probability of getting 1?
- A0%
- B50%
- C100%
Show answer and explanation
Answer: C. 100%
The first H gives (|0⟩ + |1⟩)/√2, and Z flips the sign of the amplitude of |1⟩, giving (|0⟩ − |1⟩)/√2. A measurement at this point would give 0 and 1 with 50% each: Z has not changed the measurement probabilities, but it has changed the relative phase. The second H makes the |0⟩ components cancel and the |1⟩ components add, giving |1⟩, so the probability of getting 1 is 100%. Turning differences in phase into differences in measurement results through interference is the basic mechanism of quantum algorithms.
- A. This is the value when Z is left out and H is applied twice.
- B. This is the value for a measurement before the second H; it misses the fact that the phase change made by Z shows up in the result through interference.
- C. Correct. The combination H, Z, H acts like an X gate and turns |0⟩ into |1⟩.