We design a quantum algorithm to invert a permutation over N items using sqrt(N) in-place queries,
and we identify some tasks requiring more in-place queries than standard XOR queries.
Like a game of
20 Questions, the
query complexity
of a problem is the number of questions (queries) about the problem's input that must be answered to find a solution.
Changing how we ask questions and receive answers, known as the
query model, can change how many questions are needed.
Consider the following problem in query complexity, called
Permutation Inversion:
a magician shuffles a deck of N cards numbered
1 to
N.
Your goal is to find the position of
1 using as few queries as possible,
but you can only query by handing the magician a chalkboard with a number x
which she returns after writing the value of the card at position x.
As you might intuitively expect, about N queries are necessary to solve this problem on average.
With a quantum computer, however,
the ability to query in superposition means it might matter how the magician responds.
When she writes down her answer next to your query, that's called a
standard XOR query.
When she erases your query to write her answer, that's called an
in-place query.
Some problems are known to require far fewer in-place queries than standard queries,
and before our work, no task was known to require more in-place queries than standard queries,
seeming to suggest in-place queries are more powerful than standard queries.
Despite this, researchers believed that standard queries might outperform in-place queries for some problems,
and researchers conjectured that Permutation Inversion
N
was an example.
We refuted this conjecture by designing an algorithm for Permutation Inversion using
√ N
in-place queries.
However, we also came up with tasks that require far
more in-place queries than standard queries,
showing that the two query models are better suited for different tasks.