Quantum counting algorithm

Last updated

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.

Contents

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 of size and a set of "solutions" (that is a subset of ). Define:

In other words, is the indicator function of .

Calculate the number of solutions . [1]

Classical solution

Without any prior knowledge on the set of solutions (or the structure of the function ), a classical deterministic solution cannot perform better than , because all the elements of must be inspected (consider a case where the last element to be inspected is a solution).

The algorithm

Quantum counting circuit CountingCircuit.svg
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

an equal superposition state in the computational basis.

Grover operator

Because the size of the space is and the number of solutions is , we can define the normalized states: [2] :252

Note that

which is the state of the second register after the 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 orthonormal basis . [2] :252 [3] :149

From the properties of rotation matrices we know that is a unitary matrix with the two eigenvalues . [2] :253

Estimating the value of

From here onwards, we follow the quantum phase estimation algorithm scheme: we apply controlled Grover operations followed by inverse quantum Fourier transform; and according to the analysis, we will find the best -bit approximation to the real number (belonging to the eigenvalues of the Grover operator) with probability higher than . [4] :348 [3] :157

Note that the second register is actually in a superposition of the eigenvectors of the Grover operator (while in the original quantum phase estimation algorithm, the second register is the required eigenvector). This means that with some probability, we approximate , and with some probability, we approximate ; those two approximations are equivalent. [2] :224–225

Analysis

Assuming that the size of the space is at least twice the number of solutions (namely, assuming that ), a result of the analysis of Grover's algorithm is: [2] :254

Thus, if we find , we can also find the value of (because is known).

The error

is determined by the error within estimation of the value of . The quantum phase estimation algorithm finds, with high probability, the best -bit approximation of ; this means that if is large enough, we will have , hence . [2] :263

Uses

Grover's search algorithm for an initially-unknown number of solutions

In Grover's search algorithm, the number of iterations that should be done is . [2] :254 [3] :150

Thus, if is known and is calculated by the quantum counting algorithm, the number of iterations for Grover's algorithm is easily calculated.

Speeding up NP-complete problems

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

An example of an NP-complete problem is the Hamiltonian cycle problem, which is the problem of determining whether a graph has a Hamiltonian cycle.

A simple solution to the Hamiltonian cycle problem is checking, for each ordering of the vertices of , whether it is a Hamiltonian cycle or not. Searching through all the possible orderings of the graph's vertices can be done with quantum counting followed by Grover's algorithm, achieving a speedup of the square root, similar to Grover's algorithm. [2] :264 This approach finds a Hamiltonian cycle (if exists); for determining whether a Hamiltonian cycle exists, the quantum counting algorithm itself is sufficient (and even the quantum existence algorithm, described below, is sufficient).

Quantum existence problem

Quantum existence problem is a special case of quantum counting where we do not want to calculate the value of , but we only wish to know whether or not. [5] :147

A trivial solution to this problem is directly using the quantum counting algorithm: the algorithm yields , so by checking whether we get the answer to the existence problem. This approach involves some overhead information because we are not interested in the value of . Quantum phase estimation can be optimized to eliminate this overhead. [5] :148

If you are not interested in the control of error probability then 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 determine whether equals zero or not. [2] :263

Quantum relation testing problem

Quantum relation testing . is an extension of quantum existence testing, it decides whether at least one entry can be found in the data base which fulfils the relation to a certain reference value. [6] E.g. gives back YES if the data base contains any value larger than 5 else it returns NO. Quantum relation testing combined with classical logarithmic search forms an efficient quantum min/max searching algorithm. [5] :152 [7]

See also

Related Research Articles

Shor's algorithm is a quantum computer algorithm for finding the prime factors of an integer. It was developed in 1994 by the American mathematician Peter Shor.

<span class="mw-page-title-main">Quantum harmonic oscillator</span> Important, well-understood quantum mechanical model

The quantum harmonic oscillator is the quantum-mechanical analog of the classical harmonic oscillator. Because an arbitrary smooth potential can usually be approximated as a harmonic potential at the vicinity of a stable equilibrium point, it is one of the most important model systems in quantum mechanics. Furthermore, it is one of the few quantum-mechanical systems for which an exact, analytical solution is known.

In quantum computing, Grover's algorithm, also known as the quantum search algorithm, refers to a quantum algorithm for unstructured search that finds with high probability the unique input to a black box function that produces a particular output value, using just evaluations of the function, where is the size of the function's domain. It was devised by Lov Grover in 1996.

<span class="mw-page-title-main">Schrödinger equation</span> Description of a quantum-mechanical system

The Schrödinger equation is a linear partial differential equation that governs the wave function of a quantum-mechanical system. Its discovery was a significant landmark in the development of quantum mechanics. The equation is named after Erwin Schrödinger, who postulated the equation in 1925 and published it in 1926, forming the basis for the work that resulted in his Nobel Prize in Physics in 1933.

In physics, the CHSH inequality can be used in the proof of Bell's theorem, which states that certain consequences of entanglement in quantum mechanics cannot be reproduced by local hidden-variable theories. Experimental verification of the inequality being violated is seen as confirmation that nature cannot be described by such theories. CHSH stands for John Clauser, Michael Horne, Abner Shimony, and Richard Holt, who described it in a much-cited paper published in 1969. They derived the CHSH inequality, which, as with John Stewart Bell's original inequality, is a constraint on the statistical occurrence of "coincidences" in a Bell test which is necessarily true if there exist underlying local hidden variables, an assumption that is sometimes termed local realism. In practice, the inequality is routinely violated by modern experiments in quantum mechanics.

<span class="mw-page-title-main">Hamiltonian mechanics</span> Formulation of classical mechanics using momenta

Hamiltonian mechanics emerged in 1833 as a reformulation of Lagrangian mechanics. Introduced by Sir William Rowan Hamilton, Hamiltonian mechanics replaces (generalized) velocities used in Lagrangian mechanics with (generalized) momenta. Both theories provide interpretations of classical mechanics and describe the same physical phenomena.

The Deutsch–Jozsa algorithm is a deterministic quantum algorithm proposed by David Deutsch and Richard Jozsa in 1992 with improvements by Richard Cleve, Artur Ekert, Chiara Macchiavello, and Michele Mosca in 1998. Although of little current practical use, it is one of the first examples of a quantum algorithm that is exponentially faster than any possible deterministic classical algorithm.

<span class="mw-page-title-main">Rabi cycle</span> Quantum mechanical phenomenon

In physics, the Rabi cycle is the cyclic behaviour of a two-level quantum system in the presence of an oscillatory driving field. A great variety of physical processes belonging to the areas of quantum computing, condensed matter, atomic and molecular physics, and nuclear and particle physics can be conveniently studied in terms of two-level quantum mechanical systems, and exhibit Rabi flopping when coupled to an optical driving field. The effect is important in quantum optics, magnetic resonance and quantum computing, and is named after Isidor Isaac Rabi.

In quantum computing and specifically the quantum circuit model of computation, a quantum logic gate is a basic quantum circuit operating on a small number of qubits. They are the building blocks of quantum circuits, like classical logic gates are for conventional digital circuits.

In theoretical physics, supersymmetric quantum mechanics is an area of research where supersymmetry are applied to the simpler setting of plain quantum mechanics, rather than quantum field theory. Supersymmetric quantum mechanics has found applications outside of high-energy physics, such as providing new methods to solve quantum mechanical problems, providing useful extensions to the WKB approximation, and statistical mechanics.

<span class="mw-page-title-main">Jaynes–Cummings model</span> Model in quantum optics

The Jaynes–Cummings model is a theoretical model in quantum optics. It describes the system of a two-level atom interacting with a quantized mode of an optical cavity, with or without the presence of light. It was originally developed to study the interaction of atoms with the quantized electromagnetic field in order to investigate the phenomena of spontaneous emission and absorption of photons in a cavity.

The time-evolving block decimation (TEBD) algorithm is a numerical scheme used to simulate one-dimensional quantum many-body systems, characterized by at most nearest-neighbour interactions. It is dubbed Time-evolving Block Decimation because it dynamically identifies the relevant low-dimensional Hilbert subspaces of an exponentially larger original Hilbert space. The algorithm, based on the Matrix Product States formalism, is highly efficient when the amount of entanglement in the system is limited, a requirement fulfilled by a large class of quantum many-body systems in one dimension.

Amplitude amplification is a technique in quantum computing which generalizes the idea behind the 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 independently rediscovered by Lov Grover in 1998.

Entanglement distillation is the transformation of N copies of an arbitrary entangled state into some number of approximately pure Bell pairs, using only local operations and classical communication.

<span class="mw-page-title-main">Kicked rotator</span>

The kicked rotator, also spelled as kicked rotor, is a paradigmatic model for both Hamiltonian chaos and quantum chaos. It describes a free rotating stick in an inhomogeneous "gravitation like" field that is periodically switched on in short pulses. The model is described by the Hamiltonian

In quantum computing, the quantum phase estimation algorithm, is a quantum algorithm to estimate the phase of an eigenvector of a unitary operator. More precisely, given a unitary matrix and a quantum state such that , the algorithm estimates the value of with high probability within additive error , using qubits and controlled-U operations. The algorithm was initially introduced by Alexei Kitaev in 1995.

In pure and applied mathematics, quantum mechanics and computer graphics, a tensor operator generalizes the notion of operators which are scalars and vectors. A special class of these are spherical tensor operators which apply the notion of the spherical basis and spherical harmonics. The spherical basis closely relates to the description of angular momentum in quantum mechanics and spherical harmonic functions. The coordinate-free generalization of a tensor operator is known as a representation operator.

The quantum algorithm for linear systems of equations, also called HHL algorithm, designed by Aram Harrow, Avinatan Hassidim, and Seth Lloyd, is a quantum algorithm published in 2008 for solving linear systems. The algorithm estimates the result of a scalar measurement on the solution vector to a given linear system of equations.

The Peierls substitution method, named after the original work by Rudolf Peierls is a widely employed approximation for describing tightly-bound electrons in the presence of a slowly varying magnetic vector potential.

The quantum Fisher information is a central quantity in quantum metrology and is the quantum analogue of the classical Fisher information. The quantum Fisher information of a state with respect to the observable is defined as

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 . doi:10.1007/BFb0055105. ISBN   978-3-540-64781-2. S2CID   14147978.{{cite book}}: CS1 maint: location (link)
  2. 1 2 3 4 5 6 7 8 9 Chuang, Michael A. Nielsen & Isaac L. (2001). Quantum computation and quantum information (Repr. ed.). Cambridge [u.a.]: Cambridge Univ. Press. ISBN   978-0521635035.
  3. 1 2 3 Benenti, Guiliano; Strini, Giulio Casati, Giuliano (2004). Principles of quantum computation and information (Reprinted. ed.). New Jersey [u.a.]: World Scientific. ISBN   978-9812388582.
  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): 339–354. arXiv: quant-ph/9708016 . Bibcode:1998RSPSA.454..339C. doi:10.1098/rspa.1998.0164. S2CID   16128238.
  5. 1 2 3 Imre, Sandor; Balazs, Ferenc (January 2005). Quantum Computing and Communications - An Engineering Approach. Wiley. ISBN   978-0470869024.
  6. Elgaily, Sara; Imre, Sandor (2021). "Constrained Quantum Optimization for Resource Distribution Management". International Journal of Advanced Computer Science and Applications. 12 (8).
  7. Imre, Sandor (2007). "Quantum Existence Testing and its Application for Finding Extreme Values in Unsorted Databases". IEEE Transactions on Computers. 56 (5): 706–710. doi:10.1109/TC.2007.1032. S2CID   29588344.