Qiskit Algorithms (qiskit_algorithms)#

Qiskit Algorithms is a library of quantum algorithms for quantum computing with Qiskit. These algorithms can be used to carry out research and investigate how to solve problems in different domains on simulators and near-term real quantum devices using shallow circuits.

The library includes some algorithms, for example the NumPyMinimumEigensolver, which take the same input as their quantum counterpart but solve the problem classically. This has utility in the near-term, where problems are still tractable classically, to validate and/or act as a reference. There are also classical optimizers for use with variational algorithms such as VQE.

This package also provides common building blocks for algorithms, such quantum circuit gradients (gradients) and fidelities of quantum states (state_fidelities). These elements are frequently used in a variety of applications, such as variational optimization, time evolution and quantum machine learning.

The quantum algorithms here all use Primitives to execute quantum circuits. This can be an Estimator, which computes expectation values, or a Sampler which computes probability distributions. Refer to the specific algorithm for more information in this regard.

Algorithms#

The algorithms now presented are grouped by logical function, such as minimum eigensolvers, amplitude amplifiers, time evolvers etc. Within each group, the algorithms conform to an interface that allows them to be used interchangeably by different applications. E.g. a Qiskit Nature application may take a minimum eigensolver to solve a ground state problem, and require it to conform to the MinimumEigensolver interface. Any algorithm that conforms to the interface, for example VQE, can be used by this application.

Amplitude Amplifiers#

Algorithms based on amplitude amplification.

AmplificationProblem

The amplification problem is the input to amplitude amplification algorithms, like Grover.

AmplitudeAmplifier

The interface for amplification algorithms.

Grover

Grover's Search algorithm.

GroverResult

Grover Result.

Amplitude Estimators#

Algorithms based on amplitude estimation.

AmplitudeEstimator

The Amplitude Estimation interface.

AmplitudeEstimatorResult

The results object for amplitude estimation algorithms.

AmplitudeEstimation

The Quantum Phase Estimation-based Amplitude Estimation algorithm.

AmplitudeEstimationResult

The AmplitudeEstimation result object.

EstimationProblem

The estimation problem is the input to amplitude estimation algorithm.

FasterAmplitudeEstimation

The Faster Amplitude Estimation algorithm.

FasterAmplitudeEstimationResult

The result object for the Faster Amplitude Estimation algorithm.

IterativeAmplitudeEstimation

The Iterative Amplitude Estimation algorithm.

IterativeAmplitudeEstimationResult

The IterativeAmplitudeEstimation result object.

MaximumLikelihoodAmplitudeEstimation

The Maximum Likelihood Amplitude Estimation algorithm.

MaximumLikelihoodAmplitudeEstimationResult

The MaximumLikelihoodAmplitudeEstimation result object.

Eigensolvers#

Algorithms to find eigenvalues of an operator. For chemistry these can be used to find excited states of a molecule, and qiskit-nature has some algorithms that leverage chemistry specific knowledge to do this in that application domain.

Eigensolver

The eigensolver interface.

EigensolverResult

Eigensolver result.

NumPyEigensolver

The NumPy eigensolver algorithm.

NumPyEigensolverResult

NumPy eigensolver result.

VQD

The Variational Quantum Deflation algorithm.

VQDResult

VQD Result.

Gradients#

Algorithms to calculate the gradient of a quantum circuit.

gradients

Gradients (qiskit_algorithms.gradients) Algorithms to calculate the gradient of a quantum circuit.

Minimum Eigensolvers#

Algorithms to find the minimum eigenvalue of an operator.

This set of these algorithms take an Estimator primitive and can solve for a general Hamiltonian.

MinimumEigensolver

The minimum eigensolver interface.

MinimumEigensolverResult

Minimum eigensolver result.

NumPyMinimumEigensolver

The NumPy minimum eigensolver algorithm.

NumPyMinimumEigensolverResult

NumPy minimum eigensolver result.

VQE

The Variational Quantum Eigensolver (VQE) algorithm.

VQEResult

The Variational Quantum Eigensolver (VQE) result.

AdaptVQE

The Adaptive Variational Quantum Eigensolver algorithm.

AdaptVQEResult

AdaptVQE Result.

This set of algorithms take a Sampler primitive and can only solve for a diagonal Hamiltonian, such as an Ising Hamiltonian of an optimization problem.

SamplingMinimumEigensolver

The Sampling Minimum Eigensolver Interface.

SamplingMinimumEigensolverResult

Sampling Minimum Eigensolver Result.

SamplingVQE

The Variational Quantum Eigensolver algorithm, optimized for diagonal Hamiltonians.

SamplingVQEResult

The SamplingVQE Result.

QAOA

The Quantum Approximate Optimization Algorithm (QAOA).

Optimizers#

Classical optimizers designed for use by quantum variational algorithms.

optimizers

Optimizers (qiskit_algorithms.optimizers) Classical Optimizers.

Phase Estimators#

Algorithms that estimate the phases of eigenstates of a unitary.

HamiltonianPhaseEstimation

Run the Quantum Phase Estimation algorithm to find the eigenvalues of a Hermitian operator.

HamiltonianPhaseEstimationResult

Store and manipulate results from running HamiltonianPhaseEstimation.

PhaseEstimationScale

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.

PhaseEstimation

Run the Quantum Phase Estimation (QPE) algorithm.

PhaseEstimationResult

Store and manipulate results from running PhaseEstimation.

IterativePhaseEstimation

Run the Iterative quantum phase estimation (QPE) algorithm.

State Fidelities#

Algorithms that compute the fidelity of pairs of quantum states.

state_fidelities

State Fidelities (qiskit_algorithms.state_fidelities) Algorithms that compute the fidelity of pairs of quantum states.

Time Evolvers#

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.

RealTimeEvolver

Interface for Quantum Real Time Evolution.

ImaginaryTimeEvolver

Interface for Quantum Imaginary Time Evolution.

TimeEvolutionResult

Class for holding time evolution result.

TimeEvolutionProblem

Time evolution problem class.

PVQD

The projected Variational Quantum Dynamics (p-VQD) Algorithm.

PVQDResult

The result object for the p-VQD algorithm.

SciPyImaginaryEvolver

Classical Evolver for imaginary time evolution.

SciPyRealEvolver

Classical Evolver for real time evolution.

TrotterQRTE

Quantum Real Time Evolution using Trotterization.

VarQITE

Variational Quantum Imaginary Time Evolution algorithm.

VarQRTE

Variational Quantum Real Time Evolution algorithm.

VarQTEResult

The result object for the variational quantum time evolution algorithms.

Variational Quantum Time Evolution#

Classes used by variational quantum time evolution algorithms - VarQITE and VarQRTE.

time_evolvers.variational

Time Evolvers, Variational (qiskit_algorithms.time_evolvers.variational)

Miscellaneous#

Various classes used by qiskit-algorithms that are part of and exposed by the public API.

Exceptions#

AlgorithmError

For Algorithm specific errors.

Utility classes#

Utility classes and function used by algorithms.

AlgorithmJob

This class is introduced for typing purposes and provides no additional function beyond that inherited from its parents.

utils.algorithm_globals

Global properties for algorithms.