52 lines
6.0 KiB
Plaintext
52 lines
6.0 KiB
Plaintext
---
|
||
title: optimization (v0.26)
|
||
description: API reference for qiskit.optimization in qiskit v0.26
|
||
in_page_toc_min_heading_level: 2
|
||
python_api_type: module
|
||
python_api_name: qiskit.optimization
|
||
---
|
||
|
||
<span id="module-qiskit.optimization" />
|
||
|
||
<span id="qiskit-optimization" />
|
||
|
||
<span id="qiskit-s-optimization-module-qiskit-optimization" />
|
||
|
||
# Qiskit’s optimization module
|
||
|
||
`qiskit.optimization`
|
||
|
||
Qiskit’s optimization module covers the whole range from high-level modeling of optimization problems, with automatic conversion of problems to different required representations, to a suite of easy-to-use quantum optimization algorithms that are ready to run on classical simulators, as well as on real quantum devices via Qiskit.
|
||
|
||
This module enables easy, efficient modeling of optimization problems using [docplex](https://developer.ibm.com/docloud/documentation/optimization-modeling/modeling-for-python/). A uniform interface as well as automatic conversion between different problem representations allows users to solve problems using a large set of algorithms, from variational quantum algorithms, such as the Quantum Approximate Optimization Algorithm ([`QAOA`](qiskit.aqua.algorithms.QAOA "qiskit.aqua.algorithms.QAOA")), to [Grover Adaptive Search](https://arxiv.org/abs/quant-ph/9607014) ([`GroverOptimizer`](qiskit.optimization.algorithms.GroverOptimizer "qiskit.optimization.algorithms.GroverOptimizer")), leveraging fundamental [`algorithms`](qiskit.aqua.algorithms#module-qiskit.aqua.algorithms "qiskit.aqua.algorithms") provided by Qiskit Aqua. Furthermore, the modular design of the optimization module allows it to be easily extended and facilitates rapid development and testing of new algorithms. Compatible classical optimizers are also provided for testing, validation, and benchmarking.
|
||
|
||
Qiskit’s optimization module supports Quadratically Constrained Quadratic Programs – for simplicity we refer to them just as Quadratic Programs – with binary, integer, and continuous variables, as well as equality and inequality constraints. This class of optimization problems has a vast amount of relevant applications, while still being efficiently representable by matrices and vectors. This class covers some very interesting sub-classes, from Convex Continuous Quadratic Programs, which can be solved efficiently by classical optimization algorithms, to Quadratic Unconstrained Binary Optimization QUBO) problems, which cover many NP-complete, i.e., classically intractable, problems.
|
||
|
||
| | |
|
||
| ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
|
||
| [`QuadraticProgram`](qiskit.optimization.QuadraticProgram "qiskit.optimization.QuadraticProgram") | Quadratically Constrained Quadratic Program representation. |
|
||
|
||
Representation of a Quadratically Constrained Quadratic Program supporting inequality and equality constraints as well as continuous, binary, and integer variables.
|
||
|
||
| | |
|
||
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
|
||
| [`QiskitOptimizationError`](qiskit.optimization.QiskitOptimizationError "qiskit.optimization.QiskitOptimizationError") | Class for errors returned by Qiskit’s optimization module. |
|
||
|
||
In addition to standard Python errors the optimization module will raise this error if circumstances are that it cannot proceed to completion.
|
||
|
||
| | |
|
||
| ------------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||
| [`INFINITY`](qiskit.optimization.INFINITY "qiskit.optimization.INFINITY") | Convert a string or number to a floating point number, if possible. |
|
||
|
||
A constant for infinity.
|
||
|
||
## Submodules
|
||
|
||
| | |
|
||
| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||
| [`algorithms`](qiskit.optimization.algorithms#module-qiskit.optimization.algorithms "qiskit.optimization.algorithms") | Optimization algorithms ([`qiskit.optimization.algorithms`](qiskit.optimization.algorithms#module-qiskit.optimization.algorithms "qiskit.optimization.algorithms")) |
|
||
| [`applications`](qiskit.optimization.applications#module-qiskit.optimization.applications "qiskit.optimization.applications") | Optimization applications ([`qiskit.optimization.applications`](qiskit.optimization.applications#module-qiskit.optimization.applications "qiskit.optimization.applications")) |
|
||
| [`converters`](qiskit.optimization.converters#module-qiskit.optimization.converters "qiskit.optimization.converters") | Optimization converters ([`qiskit.optimization.converters`](qiskit.optimization.converters#module-qiskit.optimization.converters "qiskit.optimization.converters")) |
|
||
| [`problems`](qiskit.optimization.problems#module-qiskit.optimization.problems "qiskit.optimization.problems") | Optimization problems ([`qiskit.optimization.problems`](qiskit.optimization.problems#module-qiskit.optimization.problems "qiskit.optimization.problems")) |
|
||
|