For two input qubits

PHYSICS · Multi-part · Fermi University Physics · Quantum Information & Technology · The quantum circuit model and quantum algorithms · The quantum circuit model and quantum algorithms

Quantum Information and Technology, Ch Oracles, quantum parallelism and the first algorithms

Problem

For two input qubits x1,x2x_1,x_2, the phase oracle of a two-bit function gg is Og∣x1x2⟩=(−1)g(x1,x2)∣x1x2⟩O_g|x_1x_2\rangle=(-1)^{g(x_1,x_2)}|x_1x_2\rangle. ((a)) For g=ANDg=\mathrm{AND}, g(x1,x2)=x1∧x2g(x_1,x_2)=x_1\wedge x_2, write OgO_g as a 4×44\times4 diagonal matrix in the basis ∣00⟩,∣01⟩,∣10⟩,∣11⟩|00\rangle,|01\rangle,|10\rangle,|11\rangle, and identify it with a gate from Chapter 5. ((b)) For h=NORh=\mathrm{NOR}, h(x1,x2)=1h(x_1,x_2)=1 only at x1=x2=0x_1=x_2=0, write OhO_h as a 4×44\times4 diagonal matrix, and show that Oh=(X⊗X) OAND (X⊗X)O_h=(X\otimes X)\,O_{\mathrm{AND}}\,(X\otimes X). ((c)) Explain in words why conjugating any two-qubit phase oracle by X⊗XX\otimes X turns the oracle for g(x1,x2)g(x_1,x_2) into the oracle for g(xˉ1,xˉ2)g(\bar x_1,\bar x_2) (both input bits negated), and check that this rule is consistent with part (b), using NOR(x1,x2)=AND(xˉ1,xˉ2)\mathrm{NOR}(x_1,x_2)=\mathrm{AND}(\bar x_1,\bar x_2).

Browse the problem library