# What are quantum algorithms? 5 important algorithms

H Hannan

Updated on:

Quantum algorithms are a set of computational procedures designed to be executed on quantum computers, these algorithms harness the principles of quantum mechanics to perform specific tasks more efficiently than classical algorithms. In this post, we will explore five notable quantum algorithms: Grover’s Algorithm, Shor’s Algorithm, Deutsch-Jozsa Algorithm, Quantum Phase Estimation (QPE), and Quantum Approximate Optimization Algorithm (QAOA).

## Grover’s Quantum Algorithm

Grover’s algorithm is a quantum algorithm devised by Lov Grover in 1996, and it is widely known for its ability to search through an unsorted database or find an item in an unstructured list significantly faster than classical algorithms. The algorithm works because Grover’s algorithm utilizes quantum superposition and interference to amplify the probability of finding the correct solution in fewer steps than classical methods. By applying a quantum operation, it narrows down the search space to the desired solution with high probability.

The key to Grover’s algorithm’s efficiency lies in quantum interference. With each iteration of the amplification step, the amplitude of the target item increases, and the amplitude of incorrect items decreases. The algorithm is designed in such a way that the amplitude of the target item becomes more pronounced after each iteration. When we measure the qubits, we are more likely to find the target item with a high probability.

It’s important to note that Grover’s algorithm provides a quadratic speedup compared to classical search algorithms, but it does not provide an exponential speedup like Shor’s algorithm for factoring large numbers. Grover’s algorithm is valuable for a variety of search and optimization problems, and it demonstrates the potential of quantum algorithms to outperform classical counterparts in specific domains.

## Shor’s Algorithm

Shor’s algorithm is a quantum algorithm developed by mathematician Peter Shor in 1994. It is a groundbreaking algorithm due to its ability to efficiently factorise large numbers into their prime factors. The ability of Shor’s algorithm to factorize large numbers has significant implications for cryptography, as it can break certain widely-used public-key encryption schemes, such as RSA, which rely on the difficulty of factoring large composite numbers. The problem that Shor’s algorithm addresses is the factorization of a large composite number, N, into its prime factors. Given a large N, the task for classical computers becomes exponentially difficult as N grows, making it infeasible to factorize large numbers using classical algorithms for cryptographic purposes.

Shor’s algorithm combines classical and quantum components to efficiently find the factors of a number by exploiting quantum parallelism. It uses modular exponentiation and quantum Fourier transform to identify periodic properties, leading to factorization.

## Deutsch-Jozsa Algorithm

The Deutsch-Jozsa algorithm is one of the earliest quantum algorithms, designed by David Deutsch and Richard Jozsa in 1992. It serves as a demonstration of the power of quantum computing compared to classical computing for specific problems. The algorithm aims to determine whether a given function is constant or balanced in a much faster and more efficient manner than classical algorithms. While only a few practical applications exist for this specific algorithm, it serves as a fundamental building block for other quantum algorithms.

The algorithm evaluates the function on quantum superposition states, allowing it to determine whether the function is constant (always returns the same value) or balanced (returns half 0s and half 1s) with just a single query.

## Quantum Phase Estimation (QPE)

Quantum Phase Estimation is a quantum algorithm that is used to estimate the eigenvalues of a unitary operator. It is a fundamental subroutine for various quantum algorithms, including Shor’s algorithm for factoring large numbers and some quantum simulation tasks.

QPE uses quantum parallelism to approximate the phase of an eigenstate, and by extension, the eigenvalue. By applying a series of quantum operations, it extracts the eigenphase information, which can then be used for further computations. Classically, finding these eigenvalues can be computationally expensive and slow. However, QPE exploits quantum properties to estimate these values much more efficiently, leading to a potential speedup for certain problems.

## Quantum Approximate Optimization Algorithm (QAOA)

The Quantum Approximate Optimization Algorithm (QAOA) is a quantum algorithm designed to solve combinatorial optimization problems. It was proposed by Farhi, Goldstone, and Gutmann in 2014. QAOA is a hybrid algorithm that combines both classical and quantum components to find approximate solutions for optimization problems.

The QAOA algorithm uses quantum superposition to explore potential solutions and gradually improves the optimization using a classical computing feedback loop. By adjusting certain parameters, it navigates through the solution space to find near-optimal solutions to the given problem. Combinatorial optimization problems involve finding the best solution from a finite set of possible solutions. Examples include the travelling salesman problem (finding the shortest route to visit a set of cities), graph colouring (assigning colours to vertices in a graph), and portfolio optimization (selecting the best combination of assets to maximize returns).

By combining quantum exploration with classical optimization, QAOA can tackle complex optimization problems more efficiently than classical optimization algorithms alone. However, it’s essential to note that QAOA provides approximate solutions rather than exact solutions. The quality of the solution depends on various factors, such as the number of quantum mixing steps, the number of repetitions, and the optimization technique used. As with other quantum algorithms, the current practical implementations are limited by the available quantum hardware and noise in quantum computations.

Quantum algorithms represent a cutting-edge field of research, however, their practical implementations are subject to the development of scalable quantum computers. Nevertheless, these algorithms showcase the significant potential of quantum computation in tackling complex problems in various domains. As quantum technology continues to advance, these algorithms may become instrumental in revolutionizing fields like cryptography, optimisation, database searching, and many others.

Find out more about QAOA Here.