Algorithms (qiskit.algorithms
)¶
It contains a collection of quantum algorithms, for use with quantum computers, to carry out research and investigate how to solve problems in different domains on nearterm quantum devices with short depth circuits.
Algorithms configuration includes the use of optimizers
which
were designed to be swappable subparts of an algorithm. Any component and may be exchanged for
a different implementation of the same component type in order to potentially alter the behavior
and outcome of the algorithm.
Quantum algorithms are run via a QuantumInstance
which must be set with the
desired backend where the algorithm's circuits will be executed and be configured with a number of
compile and runtime parameters controlling circuit compilation and execution. It ultimately uses
Terra for the actual compilation and execution of the quantum
circuits created by the algorithm and its components.
Algorithms¶
It contains a variety of quantum algorithms and these have been grouped by logical function such as minimum eigensolvers and amplitude amplifiers.
Amplitude Amplifiers¶
The amplification problem is the input to amplitude amplification algorithms, like Grover. 

The interface for amplification algorithms. 

Grover's Search algorithm. 

Grover Result. 
Amplitude Estimators¶
The Amplitude Estimation interface. 

The results object for amplitude estimation algorithms. 

The Quantum Phase Estimationbased Amplitude Estimation algorithm. 

The 

The estimation problem is the input to amplitude estimation algorithm. 

The Faster Amplitude Estimation algorithm. 

The result object for the Faster Amplitude Estimation algorithm. 

The Iterative Amplitude Estimation algorithm. 

The 

The Maximum Likelihood Amplitude Estimation algorithm. 

The 
Eigen Solvers¶
Algorithms to find eigenvalues of an operator. For chemistry these can be used to find excited states of a molecule, and qiskitnature has some algorithms that leverage chemistry specific knowledge to do this in that application domain. These algorithms are pending deprecation. One should instead make use of the Eigensolver classes in the section below, which leverage Runtime primitives.
Pending deprecation: Eigensolver Interface. 

Pending deprecation: Eigensolver Result. 
Pending deprecation: NumPy Eigensolver algorithm. 

Pending deprecation: Variational Quantum Deflation algorithm. 

Pending deprecation: VQD Result. 
Eigensolvers¶
Algorithms to find eigenvalues of an operator. For chemistry these can be used to find excited states of a molecule, and qiskitnature has some algorithms that leverage chemistry specific knowledge to do this in that application domain.
Eigensolvers Package (qiskit.algorithms.eigensolvers) 
Evolvers¶
Pending deprecation: This package has been superseded by the package below. It will be deprecated in a future release and subsequently removed after that:
Algorithms to evolve quantum states in time. Both real and imaginary time evolution is possible with algorithms that support them. For machine learning, Quantum Imaginary Time Evolution might be used to train Quantum Boltzmann Machine Neural Networks for example.
Pending deprecation: Interface for Quantum Real Time Evolution. 

Pending deprecation: Interface for Quantum Imaginary Time Evolution. 

Pending deprecation: Quantum Real Time Evolution using Trotterization. 

Pending deprecation: Class for holding evolution result. 

Pending deprecation: Evolution problem class. 
Time Evolvers¶
Primitivesenabled algorithms to evolve quantum states in time. Both real and imaginary time evolution is possible with algorithms that support them. For machine learning, Quantum Imaginary Time Evolution might be used to train Quantum Boltzmann Machine Neural Networks for example.
Interface for Quantum Real Time Evolution. 

Interface for Quantum Imaginary Time Evolution. 

The projected Variational Quantum Dynamics (pVQD) Algorithm. 

The result object for the pVQD algorithm. 

Class for holding time evolution result. 

Time evolution problem class. 
Trotterizationbased Quantum Real Time Evolution¶
Package for primitivesenabled Trotterizationbased quantum time evolution algorithm  TrotterQRTE.
This package contains Trotterizationbased Quantum Real Time Evolution algorithm. 
Factorizers¶
Algorithms to find factors of a number.
The deprecated Shor's factoring algorithm. 

The deprecated Shor Result. 
Gradients¶
Algorithms to calculate the gradient of a quantum circuit.
Gradients (qiskit.algorithms.gradients) 
Linear Solvers¶
Algorithms to solve linear systems of equations.
The deprecated Linear solvers (qiskit.algorithms.linear_solvers) It contains classical and quantum algorithms to solve systems of linear equations such as HHL. Although the quantum algorithm accepts a general Hermitian matrix as input, Qiskit's default Hamiltonian evolution is exponential in such cases and therefore the quantum linear solver will not achieve an exponential speedup. Furthermore, the quantum algorithm can find a solution exponentially faster in the size of the system than their classical counterparts (i.e. logarithmic complexity instead of polynomial), meaning that reading the full solution vector would kill such speedup (since this would take linear time in the size of the system). Therefore, to achieve an exponential speedup we can only compute functions from the solution vector (the so called observables) to learn information about the solution. Known efficient implementations of Hamiltonian evolutions or observables are contained in the following subfolders: 
Minimum Eigen Solvers¶
Algorithms that can find the minimum eigenvalue of an operator. These algorithms are pending deprecation. One should instead make use of the Minimum Eigensolver classes in the section below, which leverage Runtime primitives.
Pending deprecation: Minimum Eigensolver Interface. 

Pending deprecation: Minimum Eigensolver Result. 
Pending deprecation: Numpy Minimum Eigensolver algorithm. 

Pending deprecation: Quantum Approximate Optimization Algorithm. 

Pending deprecation: Variational Quantum Eigensolver algorithm. 
Minimum Eigensolvers¶
Algorithms that can find the minimum eigenvalue of an operator and leverage primitives.
Minimum Eigensolvers Package (qiskit.algorithms.minimum_eigensolvers) 
Optimizers¶
Classical optimizers for use by quantum variational algorithms.
Optimizers (qiskit.algorithms.optimizers) It contains a variety of classical optimizers for use by quantum variational algorithms, such as VQE. Logically, these optimizers can be divided into two categories: 
Phase Estimators¶
Algorithms that estimate the phases of eigenstates of a unitary.
Run the Quantum Phase Estimation algorithm to find the eigenvalues of a Hermitian operator. 

Store and manipulate results from running HamiltonianPhaseEstimation. 

Set and use a bound on eigenvalues of a Hermitian operator in order to ensure phases are in the desired range and to convert measured phases into eigenvectors. 

Run the Quantum Phase Estimation (QPE) algorithm. 

Store and manipulate results from running PhaseEstimation. 

Run the Iterative quantum phase estimation (QPE) algorithm. 
State Fidelities¶
Algorithms that compute the fidelity of pairs of quantum states.
State Fidelity Interfaces (qiskit.algorithms.state_fidelities) 
Exceptions¶

For Algorithm specific errors. 
Utility methods¶
Utility methods used by algorithms.

Pending deprecation: Accepts a list or a dictionary of operators and calculates their expectation values  means and standard deviations. 

Accepts a sequence of operators and calculates their expectation values  means and metadata. 
Utility classes¶
Utility classes used by algorithms (mainly for typehinting purposes).

This empty class is introduced for typing purposes. 