Week - 4 - Quantum Boolean Oracles
Week - 4 - Quantum Boolean Oracles
Jothishwaran C.A.
X ⊗ X ⊗ · · · ⊗ X ≡ X ⊗n
| {z }
n-times
▶ When the H gate is applied to each of the n qubits of the system.
The combined operator can be represented as:
H ⊗ H ⊗ · · · ⊗ H ≡ H ⊗n
| {z }
n-times
▶ When these operators are applied to the n-qubit basis state |0n ⟩ the
results are as follows:
X ⊗n |0n ⟩ = |1n ⟩
1 X
H ⊗n |0n ⟩ = √ |x⟩
2n x∈{0,1} n
Toffoli gate: a formal introduction
▶ The Toffoli gate (CCX ) is a three qubit gate and has the following
actions on the three-qubit computational basis:
|x0 ⟩ |x0 ⟩
|x1 ⟩ |x1 ⟩
|x2 ⟩ |(x2 + x0 · x1 )⟩
▶ Consider the Toffoli gate with a condition the target qubit is initially
fixed in the |0⟩ state:
|x0 ⟩ |x0 ⟩
|x1 ⟩ |x1 ⟩
|0⟩ |x0 · x1 ⟩
▶ The CCX gate with the initial state as shown before transforms the
target qubit from |0⟩ to |x0 · x1 ⟩
|x⟩ |x⟩
|0⟩ |x⟩
▶ This is the equivalent oracle for the single bit function F (x) = x.
The other single bit oracle maybe defined as follows:
|x0 ⟩ |x0 ⟩
|x1 ⟩ |x1 ⟩
|0⟩ |(x0 + x1 ⟩)
|0⟩ |F (x)⟩
▶ It is possible to build any Boolean oracle with the CNOT , CCX and
X gates.
Varying the inputs of the Oracles
▶ Since the oracle is a unitary transformation, they are transformations
since the inverse of UF is simply the adjoint, UF† .
▶ If the target qubit of an oracle is fixed to the |1⟩ state, then applying
the oracle UF on such a state yields the following:
1
UF |x⟩ |−⟩ = UF |x⟩ √ (|0⟩ − |1⟩)
2
1
= |x⟩ √ (|0 + F (x)⟩ − |1 + F (x)⟩)
2
▶ The resultant target qubit is in the state |−⟩ when F (x) = 0 and
− |−⟩ when F (x) = 1. The combined result can be written as,