Migrate from qiskit-optimization to qiskit-addon-opt-mapper¶
This migration guide summarizes the steps required to migrate a workflow built using the qiskit-optimization library to the new and improved qiskit-addon-opt-mapper library.
TL;DR¶
The qiskit-addon-opt-mapper library shares a lot of common structure and design with qiskit-optimization, with a few key differences that should be taken into account when migrating from one package to the other:
The core data structure of
qiskit-optimizationis theQuadraticProgram, inqiskit-addon-opt-mapper, this structure is now calledOptimizationProblem. The core methods and attributes remain consistent with theQuadraticProgram, but the class is now extended to support higher order terms in variables, objective function and constraints.The new
qiskit-addon-opt-mapperpackage is focused on the optimization problem modeling and mapping step, which means there isn’t a migration path for the formerqiskit-optimizationmodules:algorithms,optimizersandminimum_eigensolvers.The subset of classical solvers from
qiskit-optimization’salgorithmsmodule are now exposed inqiskit-addon-opt-mapperin a newsolversmodule.
Tables¶
General migration guidelines¶
|
|
|---|---|
|
|
any class that contains |
|
any |
|
any |
|
Migrate classical solvers¶
|
|
|---|---|
|
|
|
|
|
|
|
|
|
|
Any other class in this module |
Not part of this package |