[Quantum Information] Deutsch-Jozsa Algorithm
Deutsch-Jozsa Algorithm
Notes from RWTH Aachen University course
“Quantum Information” Summer semester 2020
professor: Müller, Markus
Deutsch-Jozsa Algorithm
- Multi-qubit Deutsch Algorithm
- Problem:
- For N=2n, we are given an N-bit string
- input: x∈{0,1}N such that either:
- all xi have the same value: constant
- N/2 of the xi are 0 and N/2 of the xi are 1: balanced
- goal: find out whether x is constant or balanced
The query setting:
- Can think of N-bit memory, which can access at any point of our choice (A random access memory)
- A memory access can be done via a so-called black box, which outputs xi on input i
- can be realized by a (n+1)-quibit unitary:
Ox|i,b⟩⟼|i,b⊕xi⟩ - if we set the target qubit to |−⟩
Ox|i⟩|−⟩⟼(−1)xi|i⟩|−⟩- Basis |i⟩ picks up the phase of (−1) if xi=1, otherwise, nothing happens.
- target qubit remains in |−⟩ (omitting)
- called phase oracle
if change |−⟩ to |+⟩
Ox|i⟩|+⟩⟼|i⟩|+⟩
no change depends on xi
Deutsch-Jozsa Algorithm
- start with |ψ0⟩=|0⟩⊗n registers
- apply Hadamard gate to each qubit
- 1√2n∑i∈{0,1}n|i⟩
- more generally
|ψ1⟩=1√2n∑j∈{0,1}n(−1)i⋅j|j⟩
- 1√2n∑i∈{0,1}n|i⟩
- apply a phase oracle Ox,±
- |ψ2⟩=1√2n∑i∈{0,1}n(−1)xi|i⟩
- |ψ2⟩=1√2n∑i∈{0,1}n(−1)xi|i⟩
- apply another Hadamard gate to each qubit
- |ψ3⟩=1√2n∑i∈{0,1}n(−1)xi∑j∈{0,1}n(−1)i⋅j|j⟩
- the amplitude of |j⟩=|0...0⟩
- since i⋅On=0 for any i∈{0,1}n
12n∑i∈{0,1}n(−1)xi={1if xi=0,∀ iconstant−1if xi=1,∀ iconstant0balanced
- |ψ3⟩=1√2n∑i∈{0,1}n(−1)xi∑j∈{0,1}n(−1)i⋅j|j⟩
- measure the final state
The probability to project onto |0...0⟩ in the final state is 1 if x is constatnt
If x is balanced, some other outcome will be obtained.
Only one quantum query and O(n) other operations (H-gates)
but not exponential
- classical: needs at least N/2+1 queries. (N=2n)
but more efficiently if we allow a small error probability
example:
- query x at two random positions
- output x is constant if two bits are the same
- output x is balanced if two bits are different
output the correct answer with probability 1 if x is constant
output the correct answer with probability 1/2 if x is balanced
⇒ Total probability to output the correct answer: 3/4
Bernstein-Vazirani Problem
Problem:
For N=2n, we are given a bit string x∈{0,1}n with the property that there is some unknown bit string a∈{0,1}n such that xi=i⋅a mod 2goal: to find a
exactly the Deutsch-Jozsa Algorithm, the final measurement suprisingly yields the output a with certainty.
quantum:
- deterministic
- one query
classical:
- allowed to output with a small error probability
- n queries
留言
張貼留言