In
quantum computing
A quantum computer is a computer that exploits quantum mechanical phenomena. On small scales, physical matter exhibits properties of wave-particle duality, both particles and waves, and quantum computing takes advantage of this behavior using s ...
, Grover's algorithm, also known as the quantum search algorithm, is a
quantum algorithm
In quantum computing, a quantum algorithm is an algorithm that runs on a realistic model of quantum computation, the most commonly used model being the quantum circuit model of computation. A classical (or non-quantum) algorithm is a finite seq ...
for unstructured search that finds
with high probability
In mathematics, an event that occurs with high probability (often shortened to w.h.p. or WHP) is one whose probability depends on a certain number ''n'' and goes to 1 as ''n'' goes to infinity, i.e. the probability of the event occurring can be m ...
the unique input to a
black box
In science, computing, and engineering, a black box is a system which can be viewed in terms of its inputs and outputs (or transfer characteristics), without any knowledge of its internal workings. Its implementation is "opaque" (black). The te ...
function that produces a particular output value, using just
evaluations of the function, where
is the size of the function's
domain
A domain is a geographic area controlled by a single person or organization. Domain may also refer to:
Law and human geography
* Demesne, in English common law and other Medieval European contexts, lands directly managed by their holder rather ...
. It was devised by
Lov Grover in 1996.
The analogous problem in classical computation would have a
query complexity
In general, a query is a form of questioning, in a line of inquiry.
Query may also refer to:
Computing and technology
* Query, a precise request for information retrieval made to a database, data structure or information system
** Query language ...
(i.e., the function would have to be evaluated
times: there is no better approach than trying out all input values one after the other, which, on average, takes
steps).
Charles H. Bennett, Ethan Bernstein,
Gilles Brassard
Gilles Brassard is a faculty member of the Université de Montréal, where he has been a Full Professor since 1988 and Canada Research Chair since 2001.
Education and early life
Brassard received a Ph.D. in Computer Science from Cornell Univers ...
, and
Umesh Vazirani
Umesh Virkumar Vazirani is an Indian–American academic who is the Roger A. Strauch Professor of Electrical Engineering and Computer Science at the University of California, Berkeley, and the director of the Berkeley Quantum Computation Center. ...
proved that any quantum solution to the problem needs to evaluate the function
times, so Grover's algorithm is
asymptotically optimal
In computer science, an algorithm is said to be asymptotically optimal if, roughly speaking, for large inputs it performs at worst a constant factor (independent of the input size) worse than the best possible algorithm. It is a term commonly en ...
.
Since classical algorithms for
NP-complete problems
In computational complexity theory, NP-complete problems are the hardest of the problems to which ''solutions'' can be verified ''quickly''.
Somewhat more precisely, a problem is NP-complete when:
# It is a decision problem, meaning that for any ...
require exponentially many steps, and Grover's algorithm provides at most a quadratic speedup over the classical solution for unstructured search, this suggests that Grover's algorithm by itself will not provide
polynomial-time
In theoretical computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations p ...
solutions for NP-complete problems (as the square root of an exponential function is still an exponential, not a polynomial function).
Unlike other quantum algorithms, which may provide exponential speedup over their classical counterparts, Grover's algorithm provides only a quadratic speedup. However, even quadratic speedup is considerable when
is large, and Grover's algorithm can be applied to speed up broad classes of algorithms.
[ Grover's algorithm could brute-force a 128-bit symmetric cryptographic key in roughly 264 iterations, or a 256-bit key in roughly 2128 iterations. It may not be the case that Grover's algorithm poses a significantly increased risk to encryption over existing classical algorithms, however.]
Applications and limitations
Grover's algorithm, along with variants like amplitude amplification
Amplitude amplification is a technique in quantum computing that generalizes the idea behind Grover's search algorithm, and gives rise to a family of quantum algorithms.
It was discovered by Gilles Brassard and Peter Høyer in 1997,
and indepen ...
, can be used to speed up a broad range of algorithms. In particular, algorithms for NP-complete problems which contain exhaustive search as a subroutine can be sped up by Grover's algorithm. The current theoretical best algorithm, in terms of worst-case complexity, for 3SAT
3sat (, ''Dreisat'') is a free-to-air German-language public service television channel. It is a generalist channel with a cultural focus and is jointly operated by public broadcasters from Germany ( ZDF, ARD), Austria ( ORF) and Switzerlan ...
is one such example. Generic constraint satisfaction problem
Constraint satisfaction problems (CSPs) are mathematical questions defined as a set of objects whose state must satisfy a number of constraints or limitations. CSPs represent the entities in a problem as a homogeneous collection of finite const ...
s also see quadratic speedups with Grover. These algorithms do not require that the input be given in the form of an oracle, since Grover's algorithm is being applied with an explicit function, e.g. the function checking that a set of bits satisfies a 3SAT instance. However, it is unclear whether Grover's algorithm could speed up best practical algorithms for these problems.
Grover's algorithm can also give provable speedups for black-box problems in quantum query complexity, including element distinctness and the collision problem (solved with the Brassard–Høyer–Tapp algorithm). In these types of problems, one treats the oracle function ''f'' as a database, and the goal is to use the quantum query to this function as few times as possible.
Cryptography
Grover's algorithm essentially solves the task of ''function inversion''. Roughly speaking, if we have a function that can be evaluated on a quantum computer, Grover's algorithm allows us to calculate when given . Consequently, Grover's algorithm gives broad asymptotic speed-ups to many kinds of brute-force attack
In cryptography, a brute-force attack or exhaustive key search is a cryptanalytic attack that consists of an attacker submitting many possible keys or passwords with the hope of eventually guessing correctly. This strategy can theoretically be ...
s on symmetric-key cryptography
Symmetric-key algorithms are algorithms for cryptography that use the same Key (cryptography), cryptographic keys for both the encryption of plaintext and the decryption of ciphertext. The keys may be identical, or there may be a simple transforma ...
, including collision attack
In cryptography, a collision attack on a cryptographic hash tries to find two inputs producing the same hash value, i.e. a hash collision. This is in contrast to a preimage attack where a specific target hash value is specified.
There are roughly ...
s and pre-image attacks. However, this may not necessarily be the most efficient algorithm since, for example, the Pollard's rho algorithm is able to find a collision in SHA-2
SHA-2 (Secure Hash Algorithm 2) is a set of cryptographic hash functions designed by the United States National Security Agency (NSA) and first published in 2001. They are built using the Merkle–Damgård construction, from a one-way compression ...
more efficiently than Grover's algorithm.
Limitations
Grover's original paper described the algorithm as a database search algorithm, and this description is still common. The database in this analogy is a table of all of the function's outputs, indexed by the corresponding input. However, this database is not represented explicitly. Instead, an oracle is invoked to evaluate an item by its index. Reading a full database item by item and converting it into such a representation may take a lot longer than Grover's search. To account for such effects, Grover's algorithm can be viewed as solving an equation or satisfying a constraint. In such applications, the oracle is a way to check the constraint and is not related to the search algorithm. This separation usually prevents algorithmic optimizations, whereas conventional search algorithms often rely on such optimizations and avoid exhaustive search. Fortunately, fast Grover's oracle implementation is possible for many constraint satisfaction and optimization problems.
The major barrier to instantiating a speedup from Grover's algorithm is that the quadratic speedup achieved is too modest to overcome the large overhead of near-term quantum computers. However, later generations of fault-tolerant
Fault tolerance is the ability of a system to maintain proper operation despite failures or faults in one or more of its components. This capability is essential for high-availability, mission-critical, or even life-critical systems.
Fault to ...
quantum computers with better hardware performance may be able to realize these speedups for practical instances of data.
Problem description
As input for Grover's algorithm, suppose we have a function . In the "unstructured database" analogy, the domain represent indices to a database, and if and only if the data that ''x'' points to satisfies the search criterion. We additionally assume that only one index satisfies , and we call this index ''ω''. Our goal is to identify ''ω''.
We can access ''f'' with a subroutine
In computer programming, a function (also procedure, method, subroutine, routine, or subprogram) is a callable unit of software logic that has a well-defined interface and behavior and can be invoked multiple times.
Callable units provide a ...
(sometimes called an oracle
An oracle is a person or thing considered to provide insight, wise counsel or prophetic predictions, most notably including precognition of the future, inspired by deities. If done through occultic means, it is a form of divination.
Descript ...
) in the form of a unitary operator
In functional analysis, a unitary operator is a surjective bounded operator on a Hilbert space that preserves the inner product.
Non-trivial examples include rotations, reflections, and the Fourier operator.
Unitary operators generalize unitar ...
''Uω'' that acts as follows:
This uses the -dimensional state space
In computer science, a state space is a discrete space representing the set of all possible configurations of a system. It is a useful abstraction for reasoning about the behavior of a given system and is widely used in the fields of artificial ...
, which is supplied by a register
Register or registration may refer to:
Arts, entertainment, and media
Music
* Register (music), the relative "height" or range of a note, melody, part, instrument, etc.
* ''Register'', a 2017 album by Travis Miller
* Registration (organ), ...
with qubit
In quantum computing, a qubit () or quantum bit is a basic unit of quantum information—the quantum version of the classic binary bit physically realized with a two-state device. A qubit is a two-state (or two-level) quantum-mechanical syste ...
s.
This is often written as
Grover's algorithm outputs ''ω'' with probability at least ''1/2'' using applications of ''Uω''. This probability can be made arbitrarily large by running Grover's algorithm multiple times. If one runs Grover's algorithm until ''ω'' is found, the expected number of applications is still , since it will only be run twice on average.
Alternative oracle definition
This section compares the above oracle with an oracle .
''Uω'' is different from the standard quantum oracle for a function ''f''. This standard oracle, denoted here as ''Uf'', uses an ancillary qubit system. The operation then represents an inversion (NOT gate
Not or NOT may also refer to:
Language
* Not, the general declarative form of "no", indicating a negation of a related statement that usually precedes
* ... Not!, a grammatical construction used as a contradiction, popularized in the early 1990 ...
) on the main system conditioned by the value of ''f''(''x'') from the ancillary system:
or briefly,
These oracles are typically realized using uncomputation.
If we are given ''Uf'' as our oracle, then we can also implement ''Uω'', since ''Uω'' is ''Uf'' when the ancillary qubit is in the state :
So, Grover's algorithm can be run regardless of which oracle is given.[ If ''Uf'' is given, then we must maintain an additional qubit in the state and apply ''Uf'' in place of ''Uω''.
]
Algorithm
The steps of Grover's algorithm are given as follows:
# Initialize the system to the uniform superposition over all states
# Perform the following "Grover iteration" times:
## Apply the operator
## Apply the ''Grover diffusion'' operator
# Measure the resulting quantum state in the computational basis.
For the correctly chosen value of , the output will be with probability approaching 1 for ''N'' ≫ 1. Analysis shows that this eventual value for satisfies .
Implementing the steps for this algorithm can be done using a number of gates linear in the number of qubits.[ Thus, the gate complexity of this algorithm is , or per iteration.
]
Geometric proof of correctness
There is a geometric interpretation of Grover's algorithm, following from the observation that the quantum state of Grover's algorithm stays in a two-dimensional subspace after each step. Consider the plane spanned by and ; equivalently, the plane spanned by and the perpendicular ket .
Grover's algorithm begins with the initial ket , which lies in the subspace. The operator is a reflection at the hyperplane orthogonal to for vectors in the plane spanned by and , i.e. it acts as a reflection across . This can be seen by writing in the form of a Householder reflection:
The operator is a reflection through . Both operators and take states in the plane spanned by and to states in the plane. Therefore, Grover's algorithm stays in this plane for the entire algorithm.
It is straightforward to check that the operator of each Grover iteration step rotates the state vector by an angle of . So, with enough iterations, one can rotate from the initial state to the desired output state . The initial ket is close to the state orthogonal to :
In geometric terms, the angle between and is given by
We need to stop when the state vector passes close to ; after this, subsequent iterations rotate the state vector ''away'' from , reducing the probability of obtaining the correct answer. The exact probability of measuring the correct answer is
where ''r'' is the (integer) number of Grover iterations. The earliest time that we get a near-optimal measurement is therefore .
Algebraic proof of correctness
To complete the algebraic analysis, we need to find out what happens when we repeatedly apply . A natural way to do this is by eigenvalue analysis of a matrix. Notice that during the entire computation, the state of the algorithm is a linear combination of and . We can write the action of and in the space spanned by as:
So in the basis (which is neither orthogonal nor a basis of the whole space) the action of applying followed by is given by the matrix
This matrix happens to have a very convenient Jordan form
\begin
\lambda_1 1\hphantom\hphantom\\
\hphantom\lambda_1 1\hphantom\\
\hphantom\lambda_1\hphantom\\
\hphantom\lambda_2 1\hphantom\hphantom\\
\hphantom\hphantom\lambda_2\hphantom\\
\hphantom\lambda_3\hphantom\\
\hphantom\ddots\hphantom\\
...
. If we define , it is
where
It follows that ''r''-th power of the matrix (corresponding to ''r'' iterations) is
Using this form, we can use trigonometric identities to compute the probability of observing ''ω'' after ''r'' iterations mentioned in the previous section,
Alternatively, one might reasonably imagine that a near-optimal time to distinguish would be when the angles 2''rt'' and −2''rt'' are as far apart as possible, which corresponds to , or . Then the system is in state
A short calculation now shows that the observation yields the correct answer ''ω'' with error .
Extensions and variants
Multiple matching entries
If, instead of 1 matching entry, there are ''k'' matching entries, the same algorithm works, but the number of iterations must be instead of
There are several ways to handle the case if ''k'' is unknown. A simple solution performs optimally up to a constant factor: run Grover's algorithm repeatedly for increasingly small values of ''k'', e.g., taking ''k'' = ''N'', ''N''/2, ''N''/4, ..., and so on, taking for iteration ''t'' until a matching entry is found.
With sufficiently high probability, a marked entry will be found by iteration for some constant ''c''. Thus, the total number of iterations taken is at most
Another approach if ''k'' is unknown is to derive it via the quantum counting algorithm prior.
If (or the traditional one marked state Grover's Algorithm if run with ), the algorithm will provide no amplification. If , increasing ''k'' will begin to increase the number of iterations necessary to obtain a solution. On the other hand, if , a classical running of the checking oracle on a single random choice of input will more likely than not give a correct solution.
A version of this algorithm is used in order to solve the collision problem.
Quantum partial search
A modification of Grover's algorithm called quantum partial search was described by Grover and Radhakrishnan in 2004. In partial search, one is not interested in finding the exact address of the target item, only the first few digits of the address. Equivalently, we can think of "chunking" the search space into blocks, and then asking "in which block is the target item?". In many applications, such a search yields enough information if the target address contains the information wanted. For instance, to use the example given by L. K. Grover, if one has a list of students organized by class rank, we may only be interested in whether a student is in the lower 25%, 25–50%, 50–75% or 75–100% percentile.
To describe partial search, we consider a database separated into blocks, each of size . The partial search problem is easier. Consider the approach we would take classically – we pick one block at random, and then perform a normal search through the rest of the blocks (in set theory language, the complement). If we do not find the target, then we know it is in the block we did not search. The average number of iterations drops from to .
Grover's algorithm requires iterations. Partial search will be faster by a numerical factor that depends on the number of blocks . Partial search uses global iterations and local iterations. The global Grover operator is designated and the local Grover operator is designated .
The global Grover operator acts on the blocks. Essentially, it is given as follows:
#Perform standard Grover iterations on the entire database.
#Perform local Grover iterations. A local Grover iteration is a direct sum of Grover iterations over each block.
#Perform one standard Grover iteration.
The optimal values of and are discussed in the paper by Grover and Radhakrishnan. One might also wonder what happens if one applies successive partial searches at different levels of "resolution". This idea was studied in detail by Vladimir Korepin and Xu, who called it binary quantum search. They proved that it is not in fact any faster than performing a single partial search.
Optimality
Grover's algorithm is optimal up to sub-constant factors. That is, any algorithm that accesses the database only by using the operator ''Uω'' must apply ''Uω'' at least a fraction as many times as Grover's algorithm. The extension of Grover's algorithm to ''k'' matching entries, (''N''/''k'')1/2/4, is also optimal. This result is important in understanding the limits of quantum computation.
If the Grover's search problem was solvable with ''N'' applications of ''Uω'', that would imply that NP is contained in BQP, by transforming problems in NP into Grover-type search problems. The optimality of Grover's algorithm suggests that quantum computers cannot solve NP-Complete
In computational complexity theory, NP-complete problems are the hardest of the problems to which ''solutions'' can be verified ''quickly''.
Somewhat more precisely, a problem is NP-complete when:
# It is a decision problem, meaning that for any ...
problems in polynomial time, and thus NP is not contained in BQP.
It has been shown that a class of non-local hidden variable quantum computers could implement a search of an -item database in at most steps. This is faster than the steps taken by Grover's algorithm.
See also
* Amplitude amplification
Amplitude amplification is a technique in quantum computing that generalizes the idea behind Grover's search algorithm, and gives rise to a family of quantum algorithms.
It was discovered by Gilles Brassard and Peter Høyer in 1997,
and indepen ...
* Brassard–Høyer–Tapp algorithm (for solving the collision problem)
* Shor's algorithm Shor's algorithm is a quantum algorithm for finding the prime factors of an integer. It was developed in 1994 by the American mathematician Peter Shor. It is one of the few known quantum algorithms with compelling potential applications and strong ...
(for factorization)
* Quantum walk search In the context of quantum computing, the quantum walk search is a quantum algorithm for finding a marked node in a graph.
The concept of a quantum walk is inspired by classical random walks, in which a walker moves randomly through a graph or Latti ...
Notes
References
* Grover L.K.:
A fast quantum mechanical algorithm for database search
', Proceedings, 28th Annual ACM Symposium on the Theory of Computing, (May 1996) p. 212
* Grover L.K.:
From Schrödinger's equation to quantum search algorithm
', American Journal of Physics, 69(7): 769–777, 2001. Pedagogical review of the algorithm and its history.
* Grover L.K.
''The Sciences'', July/August 1999, pp. 24–30.
* Nielsen, M.A. and Chuang, I.L. ''Quantum computation and quantum information''. Cambridge University Press, 2000. Chapter 6.
What's a Quantum Phone Book?
Lov Grover, Lucent Technologies
External links
*
*
*
*
*
*
*
{{DEFAULTSORT:Grover's Algorithm
Quantum algorithms
Search algorithms
Post-quantum cryptography>\omega \rang \, , s \rang\begin
-1 & 0 \\
2/\sqrt & 1 \end\begina\\b\end. \\
U_\omega : a , \omega \rang + b , s \rang &\mapsto \omega \rang \, , s \rang\begin
-1 & -2/\sqrt \\
0 & 1 \end\begina\\b\end.
\end
So in the basis (which is neither orthogonal nor a basis of the whole space) the action of applying followed by is given by the matrix
This matrix happens to have a very convenient Jordan form
\begin
\lambda_1 1\hphantom\hphantom\\
\hphantom\lambda_1 1\hphantom\\
\hphantom\lambda_1\hphantom\\
\hphantom\lambda_2 1\hphantom\hphantom\\
\hphantom\hphantom\lambda_2\hphantom\\
\hphantom\lambda_3\hphantom\\
\hphantom\ddots\hphantom\\
...
. If we define , it is
where
It follows that ''r''-th power of the matrix (corresponding to ''r'' iterations) is
Using this form, we can use trigonometric identities to compute the probability of observing ''ω'' after ''r'' iterations mentioned in the previous section,
Alternatively, one might reasonably imagine that a near-optimal time to distinguish would be when the angles 2''rt'' and −2''rt'' are as far apart as possible, which corresponds to , or . Then the system is in state
A short calculation now shows that the observation yields the correct answer ''ω'' with error .
Extensions and variants
Multiple matching entries
If, instead of 1 matching entry, there are ''k'' matching entries, the same algorithm works, but the number of iterations must be instead of
There are several ways to handle the case if ''k'' is unknown. A simple solution performs optimally up to a constant factor: run Grover's algorithm repeatedly for increasingly small values of ''k'', e.g., taking ''k'' = ''N'', ''N''/2, ''N''/4, ..., and so on, taking for iteration ''t'' until a matching entry is found.
With sufficiently high probability, a marked entry will be found by iteration for some constant ''c''. Thus, the total number of iterations taken is at most
Another approach if ''k'' is unknown is to derive it via the quantum counting algorithm prior.
If (or the traditional one marked state Grover's Algorithm if run with ), the algorithm will provide no amplification. If , increasing ''k'' will begin to increase the number of iterations necessary to obtain a solution. On the other hand, if , a classical running of the checking oracle on a single random choice of input will more likely than not give a correct solution.
A version of this algorithm is used in order to solve the collision problem.
Quantum partial search
A modification of Grover's algorithm called quantum partial search was described by Grover and Radhakrishnan in 2004. In partial search, one is not interested in finding the exact address of the target item, only the first few digits of the address. Equivalently, we can think of "chunking" the search space into blocks, and then asking "in which block is the target item?". In many applications, such a search yields enough information if the target address contains the information wanted. For instance, to use the example given by L. K. Grover, if one has a list of students organized by class rank, we may only be interested in whether a student is in the lower 25%, 25–50%, 50–75% or 75–100% percentile.
To describe partial search, we consider a database separated into blocks, each of size . The partial search problem is easier. Consider the approach we would take classically – we pick one block at random, and then perform a normal search through the rest of the blocks (in set theory language, the complement). If we do not find the target, then we know it is in the block we did not search. The average number of iterations drops from to .
Grover's algorithm requires iterations. Partial search will be faster by a numerical factor that depends on the number of blocks . Partial search uses global iterations and local iterations. The global Grover operator is designated and the local Grover operator is designated .
The global Grover operator acts on the blocks. Essentially, it is given as follows:
#Perform standard Grover iterations on the entire database.
#Perform local Grover iterations. A local Grover iteration is a direct sum of Grover iterations over each block.
#Perform one standard Grover iteration.
The optimal values of and are discussed in the paper by Grover and Radhakrishnan. One might also wonder what happens if one applies successive partial searches at different levels of "resolution". This idea was studied in detail by Vladimir Korepin and Xu, who called it binary quantum search. They proved that it is not in fact any faster than performing a single partial search.
Optimality
Grover's algorithm is optimal up to sub-constant factors. That is, any algorithm that accesses the database only by using the operator ''Uω'' must apply ''Uω'' at least a fraction as many times as Grover's algorithm. The extension of Grover's algorithm to ''k'' matching entries, (''N''/''k'')1/2/4, is also optimal. This result is important in understanding the limits of quantum computation.
If the Grover's search problem was solvable with ''N'' applications of ''Uω'', that would imply that NP is contained in BQP, by transforming problems in NP into Grover-type search problems. The optimality of Grover's algorithm suggests that quantum computers cannot solve NP-Complete
In computational complexity theory, NP-complete problems are the hardest of the problems to which ''solutions'' can be verified ''quickly''.
Somewhat more precisely, a problem is NP-complete when:
# It is a decision problem, meaning that for any ...
problems in polynomial time, and thus NP is not contained in BQP.
It has been shown that a class of non-local hidden variable quantum computers could implement a search of an -item database in at most steps. This is faster than the steps taken by Grover's algorithm.
See also
* Amplitude amplification
Amplitude amplification is a technique in quantum computing that generalizes the idea behind Grover's search algorithm, and gives rise to a family of quantum algorithms.
It was discovered by Gilles Brassard and Peter Høyer in 1997,
and indepen ...
* Brassard–Høyer–Tapp algorithm (for solving the collision problem)
* Shor's algorithm Shor's algorithm is a quantum algorithm for finding the prime factors of an integer. It was developed in 1994 by the American mathematician Peter Shor. It is one of the few known quantum algorithms with compelling potential applications and strong ...
(for factorization)
* Quantum walk search In the context of quantum computing, the quantum walk search is a quantum algorithm for finding a marked node in a graph.
The concept of a quantum walk is inspired by classical random walks, in which a walker moves randomly through a graph or Latti ...
Notes
References
* Grover L.K.:
A fast quantum mechanical algorithm for database search
', Proceedings, 28th Annual ACM Symposium on the Theory of Computing, (May 1996) p. 212
* Grover L.K.:
From Schrödinger's equation to quantum search algorithm
', American Journal of Physics, 69(7): 769–777, 2001. Pedagogical review of the algorithm and its history.
* Grover L.K.
''The Sciences'', July/August 1999, pp. 24–30.
* Nielsen, M.A. and Chuang, I.L. ''Quantum computation and quantum information''. Cambridge University Press, 2000. Chapter 6.
What's a Quantum Phone Book?
Lov Grover, Lucent Technologies
External links
*
*
*
*
*
*
*
{{DEFAULTSORT:Grover's Algorithm
Quantum algorithms
Search algorithms
Post-quantum cryptography>\omega \rang \, , s \rang\begin
-1 & -2/\sqrt \\
0 & 1 \end\begina\\b\end.
\end
So in the basis (which is neither orthogonal nor a basis of the whole space) the action of applying followed by is given by the matrix
This matrix happens to have a very convenient Jordan form
\begin
\lambda_1 1\hphantom\hphantom\\
\hphantom\lambda_1 1\hphantom\\
\hphantom\lambda_1\hphantom\\
\hphantom\lambda_2 1\hphantom\hphantom\\
\hphantom\hphantom\lambda_2\hphantom\\
\hphantom\lambda_3\hphantom\\
\hphantom\ddots\hphantom\\
...
. If we define , it is
where
It follows that ''r''-th power of the matrix (corresponding to ''r'' iterations) is
Using this form, we can use trigonometric identities to compute the probability of observing ''ω'' after ''r'' iterations mentioned in the previous section,
Alternatively, one might reasonably imagine that a near-optimal time to distinguish would be when the angles 2''rt'' and −2''rt'' are as far apart as possible, which corresponds to , or . Then the system is in state
So in the basis (which is neither orthogonal nor a basis of the whole space) the action of applying followed by is given by the matrix
This matrix happens to have a very convenient Jordan form
\begin
\lambda_1 1\hphantom\hphantom\\
\hphantom\lambda_1 1\hphantom\\
\hphantom\lambda_1\hphantom\\
\hphantom\lambda_2 1\hphantom\hphantom\\
\hphantom\hphantom\lambda_2\hphantom\\
\hphantom\lambda_3\hphantom\\
\hphantom\ddots\hphantom\\
...
. If we define , it is
where
It follows that ''r''-th power of the matrix (corresponding to ''r'' iterations) is
Using this form, we can use trigonometric identities to compute the probability of observing ''ω'' after ''r'' iterations mentioned in the previous section,
Alternatively, one might reasonably imagine that a near-optimal time to distinguish would be when the angles 2''rt'' and −2''rt'' are as far apart as possible, which corresponds to , or . Then the system is in state
A short calculation now shows that the observation yields the correct answer ''ω'' with error .
Extensions and variants
Multiple matching entries
If, instead of 1 matching entry, there are ''k'' matching entries, the same algorithm works, but the number of iterations must be instead of
There are several ways to handle the case if ''k'' is unknown. A simple solution performs optimally up to a constant factor: run Grover's algorithm repeatedly for increasingly small values of ''k'', e.g., taking ''k'' = ''N'', ''N''/2, ''N''/4, ..., and so on, taking for iteration ''t'' until a matching entry is found.
With sufficiently high probability, a marked entry will be found by iteration for some constant ''c''. Thus, the total number of iterations taken is at most
Another approach if ''k'' is unknown is to derive it via the quantum counting algorithm prior.
If (or the traditional one marked state Grover's Algorithm if run with ), the algorithm will provide no amplification. If , increasing ''k'' will begin to increase the number of iterations necessary to obtain a solution. On the other hand, if , a classical running of the checking oracle on a single random choice of input will more likely than not give a correct solution.
A version of this algorithm is used in order to solve the collision problem.
Quantum partial search
A modification of Grover's algorithm called quantum partial search was described by Grover and Radhakrishnan in 2004. In partial search, one is not interested in finding the exact address of the target item, only the first few digits of the address. Equivalently, we can think of "chunking" the search space into blocks, and then asking "in which block is the target item?". In many applications, such a search yields enough information if the target address contains the information wanted. For instance, to use the example given by L. K. Grover, if one has a list of students organized by class rank, we may only be interested in whether a student is in the lower 25%, 25–50%, 50–75% or 75–100% percentile.
To describe partial search, we consider a database separated into blocks, each of size . The partial search problem is easier. Consider the approach we would take classically – we pick one block at random, and then perform a normal search through the rest of the blocks (in set theory language, the complement). If we do not find the target, then we know it is in the block we did not search. The average number of iterations drops from to .
Grover's algorithm requires iterations. Partial search will be faster by a numerical factor that depends on the number of blocks . Partial search uses global iterations and local iterations. The global Grover operator is designated and the local Grover operator is designated .
The global Grover operator acts on the blocks. Essentially, it is given as follows:
#Perform standard Grover iterations on the entire database.
#Perform local Grover iterations. A local Grover iteration is a direct sum of Grover iterations over each block.
#Perform one standard Grover iteration.
The optimal values of and are discussed in the paper by Grover and Radhakrishnan. One might also wonder what happens if one applies successive partial searches at different levels of "resolution". This idea was studied in detail by Vladimir Korepin and Xu, who called it binary quantum search. They proved that it is not in fact any faster than performing a single partial search.
Optimality
Grover's algorithm is optimal up to sub-constant factors. That is, any algorithm that accesses the database only by using the operator ''Uω'' must apply ''Uω'' at least a fraction as many times as Grover's algorithm. The extension of Grover's algorithm to ''k'' matching entries, (''N''/''k'')1/2/4, is also optimal. This result is important in understanding the limits of quantum computation.
If the Grover's search problem was solvable with ''N'' applications of ''Uω'', that would imply that NP is contained in BQP, by transforming problems in NP into Grover-type search problems. The optimality of Grover's algorithm suggests that quantum computers cannot solve NP-Complete
In computational complexity theory, NP-complete problems are the hardest of the problems to which ''solutions'' can be verified ''quickly''.
Somewhat more precisely, a problem is NP-complete when:
# It is a decision problem, meaning that for any ...
problems in polynomial time, and thus NP is not contained in BQP.
It has been shown that a class of non-local hidden variable quantum computers could implement a search of an -item database in at most steps. This is faster than the steps taken by Grover's algorithm.
See also
* Amplitude amplification
Amplitude amplification is a technique in quantum computing that generalizes the idea behind Grover's search algorithm, and gives rise to a family of quantum algorithms.
It was discovered by Gilles Brassard and Peter Høyer in 1997,
and indepen ...
* Brassard–Høyer–Tapp algorithm (for solving the collision problem)
* Shor's algorithm Shor's algorithm is a quantum algorithm for finding the prime factors of an integer. It was developed in 1994 by the American mathematician Peter Shor. It is one of the few known quantum algorithms with compelling potential applications and strong ...
(for factorization)
* Quantum walk search In the context of quantum computing, the quantum walk search is a quantum algorithm for finding a marked node in a graph.
The concept of a quantum walk is inspired by classical random walks, in which a walker moves randomly through a graph or Latti ...
Notes
References
* Grover L.K.:
A fast quantum mechanical algorithm for database search
', Proceedings, 28th Annual ACM Symposium on the Theory of Computing, (May 1996) p. 212
* Grover L.K.:
From Schrödinger's equation to quantum search algorithm
', American Journal of Physics, 69(7): 769–777, 2001. Pedagogical review of the algorithm and its history.
* Grover L.K.
''The Sciences'', July/August 1999, pp. 24–30.
* Nielsen, M.A. and Chuang, I.L. ''Quantum computation and quantum information''. Cambridge University Press, 2000. Chapter 6.
What's a Quantum Phone Book?
Lov Grover, Lucent Technologies
External links
*
*
*
*
*
*
*
{{DEFAULTSORT:Grover's Algorithm
Quantum algorithms
Search algorithms
Post-quantum cryptography>\omega \rang \, , s \rang(U_sU_\omega)^r \begin0\\1\end \approx \omega \rang \, , s \rang\begin
-1 & -2/\sqrt \\
0 & 1 \end\begina\\b\end.
\end
So in the basis (which is neither orthogonal nor a basis of the whole space) the action of applying followed by is given by the matrix
This matrix happens to have a very convenient Jordan form
\begin
\lambda_1 1\hphantom\hphantom\\
\hphantom\lambda_1 1\hphantom\\
\hphantom\lambda_1\hphantom\\
\hphantom\lambda_2 1\hphantom\hphantom\\
\hphantom\hphantom\lambda_2\hphantom\\
\hphantom\lambda_3\hphantom\\
\hphantom\ddots\hphantom\\
...
. If we define , it is
where
It follows that ''r''-th power of the matrix (corresponding to ''r'' iterations) is
Using this form, we can use trigonometric identities to compute the probability of observing ''ω'' after ''r'' iterations mentioned in the previous section,
Alternatively, one might reasonably imagine that a near-optimal time to distinguish would be when the angles 2''rt'' and −2''rt'' are as far apart as possible, which corresponds to , or . Then the system is in state
A short calculation now shows that the observation yields the correct answer ''ω'' with error .
Extensions and variants
Multiple matching entries
If, instead of 1 matching entry, there are ''k'' matching entries, the same algorithm works, but the number of iterations must be instead of
There are several ways to handle the case if ''k'' is unknown. A simple solution performs optimally up to a constant factor: run Grover's algorithm repeatedly for increasingly small values of ''k'', e.g., taking ''k'' = ''N'', ''N''/2, ''N''/4, ..., and so on, taking for iteration ''t'' until a matching entry is found.
With sufficiently high probability, a marked entry will be found by iteration for some constant ''c''. Thus, the total number of iterations taken is at most
Another approach if ''k'' is unknown is to derive it via the quantum counting algorithm prior.
If (or the traditional one marked state Grover's Algorithm if run with ), the algorithm will provide no amplification. If , increasing ''k'' will begin to increase the number of iterations necessary to obtain a solution. On the other hand, if , a classical running of the checking oracle on a single random choice of input will more likely than not give a correct solution.
A version of this algorithm is used in order to solve the collision problem.
Quantum partial search
A modification of Grover's algorithm called quantum partial search was described by Grover and Radhakrishnan in 2004. In partial search, one is not interested in finding the exact address of the target item, only the first few digits of the address. Equivalently, we can think of "chunking" the search space into blocks, and then asking "in which block is the target item?". In many applications, such a search yields enough information if the target address contains the information wanted. For instance, to use the example given by L. K. Grover, if one has a list of students organized by class rank, we may only be interested in whether a student is in the lower 25%, 25–50%, 50–75% or 75–100% percentile.
To describe partial search, we consider a database separated into blocks, each of size . The partial search problem is easier. Consider the approach we would take classically – we pick one block at random, and then perform a normal search through the rest of the blocks (in set theory language, the complement). If we do not find the target, then we know it is in the block we did not search. The average number of iterations drops from to .
Grover's algorithm requires iterations. Partial search will be faster by a numerical factor that depends on the number of blocks . Partial search uses global iterations and local iterations. The global Grover operator is designated and the local Grover operator is designated .
The global Grover operator acts on the blocks. Essentially, it is given as follows:
#Perform standard Grover iterations on the entire database.
#Perform local Grover iterations. A local Grover iteration is a direct sum of Grover iterations over each block.
#Perform one standard Grover iteration.
The optimal values of and are discussed in the paper by Grover and Radhakrishnan. One might also wonder what happens if one applies successive partial searches at different levels of "resolution". This idea was studied in detail by Vladimir Korepin and Xu, who called it binary quantum search. They proved that it is not in fact any faster than performing a single partial search.
Optimality
Grover's algorithm is optimal up to sub-constant factors. That is, any algorithm that accesses the database only by using the operator ''Uω'' must apply ''Uω'' at least a fraction as many times as Grover's algorithm. The extension of Grover's algorithm to ''k'' matching entries, (''N''/''k'')1/2/4, is also optimal. This result is important in understanding the limits of quantum computation.
If the Grover's search problem was solvable with ''N'' applications of ''Uω'', that would imply that NP is contained in BQP, by transforming problems in NP into Grover-type search problems. The optimality of Grover's algorithm suggests that quantum computers cannot solve NP-Complete
In computational complexity theory, NP-complete problems are the hardest of the problems to which ''solutions'' can be verified ''quickly''.
Somewhat more precisely, a problem is NP-complete when:
# It is a decision problem, meaning that for any ...
problems in polynomial time, and thus NP is not contained in BQP.
It has been shown that a class of non-local hidden variable quantum computers could implement a search of an -item database in at most steps. This is faster than the steps taken by Grover's algorithm.
See also
* Amplitude amplification
Amplitude amplification is a technique in quantum computing that generalizes the idea behind Grover's search algorithm, and gives rise to a family of quantum algorithms.
It was discovered by Gilles Brassard and Peter Høyer in 1997,
and indepen ...
* Brassard–Høyer–Tapp algorithm (for solving the collision problem)
* Shor's algorithm Shor's algorithm is a quantum algorithm for finding the prime factors of an integer. It was developed in 1994 by the American mathematician Peter Shor. It is one of the few known quantum algorithms with compelling potential applications and strong ...
(for factorization)
* Quantum walk search In the context of quantum computing, the quantum walk search is a quantum algorithm for finding a marked node in a graph.
The concept of a quantum walk is inspired by classical random walks, in which a walker moves randomly through a graph or Latti ...
Notes
References
* Grover L.K.:
A fast quantum mechanical algorithm for database search
', Proceedings, 28th Annual ACM Symposium on the Theory of Computing, (May 1996) p. 212
* Grover L.K.:
From Schrödinger's equation to quantum search algorithm
', American Journal of Physics, 69(7): 769–777, 2001. Pedagogical review of the algorithm and its history.
* Grover L.K.
''The Sciences'', July/August 1999, pp. 24–30.
* Nielsen, M.A. and Chuang, I.L. ''Quantum computation and quantum information''. Cambridge University Press, 2000. Chapter 6.
What's a Quantum Phone Book?
Lov Grover, Lucent Technologies
External links
*
*
*
*
*
*
*
{{DEFAULTSORT:Grover's Algorithm
Quantum algorithms
Search algorithms
Post-quantum cryptography>\omega \rang \, , s \rangM \begin i & 0 \\ 0 & -i\end M^ \begin0\\1\end = , \omega \rang \frac - , s \rang \frac.
A short calculation now shows that the observation yields the correct answer ''ω'' with error .
Extensions and variants
Multiple matching entries
If, instead of 1 matching entry, there are ''k'' matching entries, the same algorithm works, but the number of iterations must be instead of
There are several ways to handle the case if ''k'' is unknown. A simple solution performs optimally up to a constant factor: run Grover's algorithm repeatedly for increasingly small values of ''k'', e.g., taking ''k'' = ''N'', ''N''/2, ''N''/4, ..., and so on, taking for iteration ''t'' until a matching entry is found.
With sufficiently high probability, a marked entry will be found by iteration for some constant ''c''. Thus, the total number of iterations taken is at most
Another approach if ''k'' is unknown is to derive it via the quantum counting algorithm prior.
If (or the traditional one marked state Grover's Algorithm if run with ), the algorithm will provide no amplification. If , increasing ''k'' will begin to increase the number of iterations necessary to obtain a solution. On the other hand, if , a classical running of the checking oracle on a single random choice of input will more likely than not give a correct solution.
A version of this algorithm is used in order to solve the collision problem.
Quantum partial search
A modification of Grover's algorithm called quantum partial search was described by Grover and Radhakrishnan in 2004. In partial search, one is not interested in finding the exact address of the target item, only the first few digits of the address. Equivalently, we can think of "chunking" the search space into blocks, and then asking "in which block is the target item?". In many applications, such a search yields enough information if the target address contains the information wanted. For instance, to use the example given by L. K. Grover, if one has a list of students organized by class rank, we may only be interested in whether a student is in the lower 25%, 25–50%, 50–75% or 75–100% percentile.
To describe partial search, we consider a database separated into blocks, each of size . The partial search problem is easier. Consider the approach we would take classically – we pick one block at random, and then perform a normal search through the rest of the blocks (in set theory language, the complement). If we do not find the target, then we know it is in the block we did not search. The average number of iterations drops from to .
Grover's algorithm requires iterations. Partial search will be faster by a numerical factor that depends on the number of blocks . Partial search uses global iterations and local iterations. The global Grover operator is designated and the local Grover operator is designated .
The global Grover operator acts on the blocks. Essentially, it is given as follows:
#Perform standard Grover iterations on the entire database.
#Perform local Grover iterations. A local Grover iteration is a direct sum of Grover iterations over each block.
#Perform one standard Grover iteration.
The optimal values of and are discussed in the paper by Grover and Radhakrishnan. One might also wonder what happens if one applies successive partial searches at different levels of "resolution". This idea was studied in detail by Vladimir Korepin and Xu, who called it binary quantum search. They proved that it is not in fact any faster than performing a single partial search.
Optimality
Grover's algorithm is optimal up to sub-constant factors. That is, any algorithm that accesses the database only by using the operator ''Uω'' must apply ''Uω'' at least a fraction as many times as Grover's algorithm. The extension of Grover's algorithm to ''k'' matching entries, (''N''/''k'')1/2/4, is also optimal. This result is important in understanding the limits of quantum computation.
If the Grover's search problem was solvable with ''N'' applications of ''Uω'', that would imply that NP is contained in BQP, by transforming problems in NP into Grover-type search problems. The optimality of Grover's algorithm suggests that quantum computers cannot solve NP-Complete
In computational complexity theory, NP-complete problems are the hardest of the problems to which ''solutions'' can be verified ''quickly''.
Somewhat more precisely, a problem is NP-complete when:
# It is a decision problem, meaning that for any ...
problems in polynomial time, and thus NP is not contained in BQP.
It has been shown that a class of non-local hidden variable quantum computers could implement a search of an -item database in at most steps. This is faster than the steps taken by Grover's algorithm.
See also
* Amplitude amplification
Amplitude amplification is a technique in quantum computing that generalizes the idea behind Grover's search algorithm, and gives rise to a family of quantum algorithms.
It was discovered by Gilles Brassard and Peter Høyer in 1997,
and indepen ...
* Brassard–Høyer–Tapp algorithm (for solving the collision problem)
* Shor's algorithm Shor's algorithm is a quantum algorithm for finding the prime factors of an integer. It was developed in 1994 by the American mathematician Peter Shor. It is one of the few known quantum algorithms with compelling potential applications and strong ...
(for factorization)
* Quantum walk search In the context of quantum computing, the quantum walk search is a quantum algorithm for finding a marked node in a graph.
The concept of a quantum walk is inspired by classical random walks, in which a walker moves randomly through a graph or Latti ...
Notes
References
* Grover L.K.:
A fast quantum mechanical algorithm for database search
', Proceedings, 28th Annual ACM Symposium on the Theory of Computing, (May 1996) p. 212
* Grover L.K.:
From Schrödinger's equation to quantum search algorithm
', American Journal of Physics, 69(7): 769–777, 2001. Pedagogical review of the algorithm and its history.
* Grover L.K.
''The Sciences'', July/August 1999, pp. 24–30.
* Nielsen, M.A. and Chuang, I.L. ''Quantum computation and quantum information''. Cambridge University Press, 2000. Chapter 6.
What's a Quantum Phone Book?
Lov Grover, Lucent Technologies
External links
*
*
*
*
*
*
*
{{DEFAULTSORT:Grover's Algorithm
Quantum algorithms
Search algorithms
Post-quantum cryptography