Consider the quantum oracle Uf for a function f:Bn→Bn which acts on the state ∣x⟩∣y⟩ of 2n qubits as follows:
Uf∣x⟩∣y⟩=∣x⟩∣y⊕f(x)⟩
The function f is promised to have the following property: there exists a z∈Bn such that for any x,y∈Bn,
[f(x)=f(y)] if and only if x⊕y∈{0n,z}
where 0n≡(0,0,…,0)∈Bn.
(a) What is the nature of the function f for the case in which z=0n, and for the case in which z=0n ?
(b) Suppose initially each of the 2n qubits are in the state ∣0⟩. They are then subject to the following operations:
Each of the first n qubits forming an input register are acted on by Hadamard gates;
The 2n qubits are then acted on by the quantum oracle Uf;
Next, the qubits in the input register are individually acted on by Hadamard gates.
(i) List the states of the 2n qubits after each of the above operations; the expression for the final state should involve the n-bit "dot product" which is defined as follows:
a⋅b=(a1b1+a2b2+…+anbn)mod2
where a,b∈Bn with a=(a1,…,an) and b=(b1,…,bn).
(ii) Justify that if z=0n then for any y∈Bn and any φ(x,y)∈{−1, +1}, the following identity holds:
∥x∈Bn∑φ(x,y)∣f(x)⟩∥∥∥2=∥∥∥x∈Bn∑φ(x,y)∣x⟩∥2
(iii) For the case z=0n, what is the probability that a measurement of the input register, relative to the computational basis of Cn results in a string y∈Bn ?
(iv) For the case z=0n, show that the probability that the above-mentioned measurement of the input register results in a string y∈Bn, is equal to the following:
zero for all strings y∈Bn satisfying y⋅z=1, and 2−(n−1) for any fixed string y∈Bn satisfying y⋅z=0.
[State any identity you may employ. You may use (x⊕z)⋅y=(x⋅y)⊕(z⋅y),∀x,y,z∈Bn.]