Qiskit Optimization 0.4.0
Changelog
New Features
-
Adds a method prettyprint() to QuadraticProgram to generate a pretty-printed string of the object.
-
Adds informative text formats to str and repr functions of the following objects. The formats are IDE friendly, i.e., the text is one line.
LinearConstraint LinearExpression QuadraticConstraint QuadraticExpression QuadraticObjective Variable
-
Adds a method prettyprint() to OptimizationResult to display the result in a multi-line text format.
Upgrade Notes
-
If users set an empty variable name "" with binary_var(), integer_var(), and continuous_var(), they set the default variable name (e.g., x0) while they used to set the empty name as variable name.
-
Added support for running with Python 3.10. At the the time of the release, Cplex didn’t have a python 3.10 version and Docplex failed inside docplex.mp.model.Model.binary_var_list().
-
Updates the text format of str and repr of the following objects so that the output is one line.
QuadraticProgram
OptimizationResult -
The previously deprecated BaseBackend class has been removed. It was originally deprecated in the Qiskit Terra 0.18.0 release.
-
Enable installation of CPLEX for Python 3.10.
-
Support for running with Python 3.6 has been removed. To run Optimization you need a minimum Python version of 3.7.
Bug Fixes
- Fixed an issue that from_ising() raises an error when Pauli I is given.
- Fixed an issue that to_ising() returns a wrong operator when there is no variable in an input problem.
Other Notes
- Shows a warning message if non-printable strings are set to QuadraticProgram as problem name, variable name, or constraint name.
- Updated the documentation of SUCCESS of OptimizationResultStatus. SUCCESS means the obtained solution is feasible, but not always optimal because some algorithms do not guarantee the optimality.
- Reword the documentation of all methods and the multi-line text format of OptimizationResult as follows because some algorithms do not guarantee the optimality.
“optimal function value” → “objective function value”
“optimal value” → “variable values”