Jump to content

Quantum counting algorithm

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Rotemliss (talk | contribs) at 15:00, 12 February 2017 (Simplifying the motivation). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Quantum counting algorithm is a quantum algorithm for efficiently counting the number of solutions for a given search problem. The algorithm is based on the quantum phase estimation algorithm and on Grover's search algorithm.

Counting problems are common in diverse fields such as statistical estimation, statistical physics, networking, etc. As for quantum computing, the ability to perform quantum counting efficiently is needed in order to use Grover's search algorithm (because running Grover's search algorithm requires knowing how many solutions exist). Moreover, this algorithm solves the quantum existence problem (namely, deciding whether any solution exists) as a special case.

The algorithm was devised by Gilles Brassard, Peter Høyer and Alain Tapp in 1998.

The problem

Consider a finite set in the size of and a set of solutions.

Let such that .

Calculate the number of solutions .[1]

Classical solution

Without any prior knowledge on the data structure or any other exploits in the problem, the classical solution can't perform better than (consider a case where the last element to be inspected is a solution).

The algorithm

Quantum counting circuit

Setup

The input consists of two registers (namely, two parts): the upper qubits comprise the first register, and the lower qubits are the second register.

Create superposition

The initial state of the system is . After applying multiple bit Hadamard gate operation on each of the registers separately, the state of the first register is and the state of the second register is - equal superposition state in the computational basis.

Grover operator

For an size search space with solutions , we can define the following normalized states and .[2]: 252 

Note that i.e. the state of the second register after Hadamard transform.

Geometric visualization of Grover's algorithm shows that in the two dimensional space spanned by and , the Grover operator is a counterclockwise rotation,hence, it can be expressed as in the basis of and .[2]: 252 [3]: 149 

Using the trigonometric identity we see that , meaning is unitary with eigenvalues of .[2]: 253 

Estimating the value of

From here onwards, we can follow the quantum phase estimation algorithm scheme - apply controlled Grover operations followed by inverse quantum fourier transform and we will measure the correct value of with probability larger than .[4]: 348 [3]: 157 

Analysis

Assuming that we've doubled the search space so that , we have as a result from Grover's algorithm analysis.

The error is determined by the error in the estimation of the value of , meaning that for a large enough we will have hence .[2]: 263 


A known result of Grover's search algorithm is that the number of iterations that should be done can be calculated by .[2]: 254  [3]: 150 

If is known and is evaluated correctly, using the result of the Quantum counting algorithm , it is possible to determine how many iterations should be done in Grover's search algorithm.

Additional uses

Speeding up NP-complete problems

The Quantum counting algorithm can be used to speed up solution to problems which are NP-complete.

An Hamiltonian cycle is a simple cycle that visits all vertices in a graph. The Hamiltonian cycle problem is determining whether a graph has an Hamiltonian cycle. This problem is NP-complete.

A simple solution to the Hamiltonian cycle problem is to check for each ordering of the vertices of whether it is an hamiltonian cycle or not until such ordering is found. Searching through all the possible combinations of the graph's vertices can be done with Quantum counting followed by Grover's algorithm, achieving a speed up of square root, similar to Grover's algorithm.[2]: 264 

Quantum existence problem

Quantum existence problem is a special case of quantum counting where we don't want to calculate the value of but we only wish to decide whether or not. Trivially it is possible to use the quantum counting algorithm and if it yields then we have an answer to the existence problem. This approach involves some overhead information because we are not interested in the value of .

Using a setup with small number of qubits in the upper register will not produce an accurate estimation of the value of but will suffice to realize whether equals zero or not.[2]: 263 

See also

Quantum phase estimation algorithm

Grover's algorithm

Counting problem (complexity)

References

  1. ^ Brassard, Gilles; Hoyer, Peter; Tapp, Alain (July 13–17, 1998). Automata, Languages and Programming (25th International Colloquium ed.). ICALP'98 Aalborg, Denmark: Springer Berlin Heidelberg. pp. 820–831. arXiv:quant-ph/9805082. ISBN 978-3-540-64781-2.{{cite book}}: CS1 maint: location (link)
  2. ^ a b c d e f g Chuang, Michael A. Nielsen & Isaac L. (2001). Quantum computation and quantum information (Repr. ed.). Cambridge [u.a.]: Cambridge Univ. Press. ISBN 978-0521635035.
  3. ^ a b c Benenti, Guiliano; Strini, Giulio Casati, Giuliano (2004). Principles of quantum computation and information (Reprinted. ed.). New Jersey [u.a.]: World Scientific. ISBN 978-9812388582.{{cite book}}: CS1 maint: multiple names: authors list (link)
  4. ^ Cleve, R.; Ekert, A.; Macchiavello, C.; Mosca, M. (8 January 1998). "Quantum algorithms revisited". Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences. 454 (1969). doi:10.1098/rspa.1998.0164.