This preview shows page 1. Sign up to view the full content.
Unformatted text preview: the two cases by measuring the
ﬁrst qubit in the sign basis.
¶12. Measurement: Therefore we can determine whether f (0) = f (1) or
not by measuring the ﬁrst bit of | 2 i in the sign basis, which we can
do with the Hadamard gate (recall H |+i = |0i and H | i = |1i):
| 3i = ( H ⌦ I )| 2 i
±|0i| i, if f (0) = f (1)
±|1i| i, if f (0) 6= f (1)
= ±|f (0) f (1)i| i. ¶13. Therefore we can determine whether or not f (0) = f (1) with a single
evaluation of f .
(This is very strange!)
¶14. In e↵ect, we are evaluating f on a superposition of |0i and |1i and
determining how the results interfere with each other. As a result we
get a deﬁnite (not probabilistic) determination of a global property
with a single evaluation.
¶15. This is a clear example where a quantum computer can do something
faster than a classical computer.
¶16. However, note that Uf has to uncompute f , which takes as much time
as computing it, but we will see other cases (Deutsch-Jozsa) where the
speedup is much more than 2⇥. D. QUANTUM ALGORITHMS Quantum algori...
View Full Document
- Fall '13