Die Seite is noch nich übersetzt. Se kieken die englische Originalversion.
Deutsch's algorithm solves the parity problem for the special case that n=1.
In the context of quantum computing this problem is sometimes referred to as Deutsch's problem, and we'll follow that nomenclature in this lesson.
To be precise, the input is represented by a function f:Σ→Σ from one bit to one bit.
There are four such functions:
The first and last of these functions are constant and the middle two are balanced, meaning that the two possible output values for the function occur the same number of times as we range over the inputs.
Deutsch's problem is to determine which of these two categories the input function belongs to: constant or balanced.
Deutsch's problem
Input: a function f:{0,1}→{0,1}
Output: 0 if f is constant, 1 if f is balanced
If we view the input function f in Deutsch's problem as representing random access to a string, we're thinking about a two-bit string: f(0)f(1).
When viewed in this way, Deutsch's problem is to compute the parity (or, equivalently, the exclusive-OR) of the two bits.
Every classical query algorithm that correctly solves this problem must query both bits: f(0) and f(1).
If we learn that f(1)=1, for instance, the answer could still be 0 or 1, depending on whether f(0)=1 or f(0)=0, respectively.
Every other case is similar; knowing just one of two bits doesn't provide any information at all about their parity.
So, the Boolean circuit described in the previous section is the best we can do in terms of the number of queries required to solve this problem.
Deutsch's algorithm solves Deutsch's problem using a single query, therefore providing a quantifiable advantage of quantum over classical computations.
This may be a modest advantage — one query as opposed to two — but we have to start somewhere.
Scientific advances sometimes have seemingly humble origins.
Here is a quantum circuit that describes Deutsch's algorithm:
To analyze Deutsch's algorithm, we will trace through the action of the circuit above and identify the states of the qubits at the times suggested by this figure:
(As always, we're following Qiskit's qubit ordering convention, which puts the top qubit to the right and the bottom qubit to the left.) It may feel unintuitive to write this product state partly distributed (leaving the states of qubit 1 factored out), but this will make our later expressions more compact.
Notice that in this expression, we have f(0)⊕f(1) in the exponent of −1 as opposed to f(1)−f(0), which is what we might expect from a purely algebraic viewpoint, but we obtain the same result either way.
This is because the value (−1)k for any integer k depends only on whether k is even or odd.
Applying the final Hadamard gate to the top qubit leaves us with the state