Deutsch
Simplest demonstration of quantum computation
Last updated
Simplest demonstration of quantum computation
Last updated
is one of the simplest demonstrations of an improvement of quantum computation over classical computation using , and .
Consider an unknown function that maps . We want to know if .
The only way to get the answer is to measure f(0) and f(1), i.e. query the oracle twice.
We have 2 qubits. We can design a circuit with any gates including a black box oracle gate that implements the unknown function.
Phase kickback is the workhorse in almost every quantum algorithm.
Classical bits can only be flipped, from 0 to 1 and back. Therefore information must be encoded in a series of bits.
Qubits have one additional degree of freedom which is phase. For example, . More generally, is phase-shifted away from by an angle . Why is this important?
Encoding information in the phase allows us to perform certain computations with exponentially fewer qubits. However, this new kind of information encoding also makes it very difficult and non-intuitive to create new quantum computing algorithms.
Deutsch algorithm does not have any good practical applications.
But, in practice, the secret function is fairly contrived and we know of no application where this function is both important and so expensive to query that a single query improvement is worth a quantum computation.
To identify if , we can calculate . Thanks to quantum superposition and phase kickback, we can do that with just 1 query of the oracle.
Prepare two qubits in the state.
Apply the oracle such that
This can be achieved by first applying the secret function on qubit 1 and then a CNOT gate on qubit 2.
Applying a Hadamard on qubit 1 and rearranging the states the output becomes , where .
Measure qubit 1. If , then interferes destructively and vanishes and the output is 0. If , then interferes destructively and vanishes and the output is 1.
In theory the algorithm (and its ) shows a clear quantum advantage over the classical best case.