The Deutsch-Jozsa algorithm
Disse Sied is noch nich översett. Se kiekt de engelsche Originalversion an.
Deutsch's algorithm outperforms all classical algorithms for a query problem, but the advantage is quite modest: one query versus two. The Deutsch-Jozsa algorithm extends this advantage — and, in fact, it can be used to solve a couple of different query problems.
Here's a quantum circuit description of the Deutsch-Jozsa algorithm. An additional classical post-processing step, not shown in the figure, may also be required depending on the specific problem being solved.
Of course, we haven't actually discussed what problems this algorithm solves; this is done in the two sections that follow.
The Deutsch-Jozsa problem
We'll begin with the query problem the Deutsch-Jozsa algorithm was originally intended to solve, which is known as the Deutsch-Jozsa problem.
The input function for this problem takes the form for an arbitrary positive integer Like Deutsch's problem, the task is to output if is constant and if is balanced, which again means that the number of input strings on which the function takes the value is equal to the number of input strings on which the function takes the value .
Notice that, when is larger than there are functions of the form that are neither constant nor balanced. For example, the function defined as
falls into neither of these two categories. For the Deutsch-Jozsa problem, we simply don't worry about functions like this — they're considered to be "don't care" inputs. That is, for this problem we have a promise that is either constant or balanced.