Prelude
Qiskit Optimization 0.7 introduces significant architectural improvements focused on enhanced independence and modern primitives support. This release eliminates the dependency on qiskit-algorithms by migrating essential components directly into qiskit-optimization, ensuring better long-term stability and reducing external dependencies. The most notable change is comprehensive support for Qiskit’s V2 Primitives (BaseEstimatorV2 and BaseSamplerV2), which are the foundation for future quantum computing workflows. All minimum eigensolvers including VQE, QAOA, SamplingVQE, and specialized algorithms like QRAO and GroverOptimizer now seamlessly support both V1 and V2 primitives with automatic detection. Key migrated components from qiskit-algorithms include essential optimizers (COBYLA, NELDER_MEAD, SciPyOptimizer, SPSA), minimum eigensolvers (VQE, QAOA, SamplingVQE, NumPyMinimumEigensolver), and utility functions (algorithm_globals). These components are now maintained directly within qiskit-optimization, ensuring consistent updates and optimization-specific enhancements. While V1 Primitive usage remains functional, with deprecation warnings, users are strongly encouraged to migrate to V2 Primitives for optimal performance. The migration is straightforward but requires attention to pass manager requirements for hardware and simulator backends. A comprehensive migration guides is provided to assist users in updating their code. This release maintains full backward compatibility while positioning Qiskit Optimization for future developments in the quantum optimization ecosystem.
New Features
- Added support for using Qiskit Optimization with Python 3.12 and Python 3.13.
- Added support for using Qiskit Optimization with Qiskit version 2.X.
- Added support for non-complete graphs for the TSP problem.
- Improved the performance of QuadraticExpression.coefficients setter, resulting in faster execution across various converters - particularly in LinearEqualityToPenalty.
- Improved the performance of LinearEqualityToPenalty.convert().
- Added QAOA (Quantum Approximate Optimization Algorithm), VQE (Variational Quantum Eigensolver), and NumPyMinimumEigensolver migrated from qiskit-algorithms. This migration includes the core implementations and their essential dependencies, following the same migration pattern established in qiskit-machine-learning#817.
- Change qiskit_algorithms.minimum_eigensolvers to qiskit_optimization.minimum_eigensolvers.
- Added algorithm_globals migrated from qiskit-algorithms.
- Change qiskit_algorithms.utils.algorithm_globals to qiskit_optimization.utils.algorithm_globals.
- Added the following optimizers migrated from qiskit-algorithms.
- Change qiskit_algorithms.optimizers to qiskit_optimization.optimizers.
- Note that qiskit-optimization does not include all optimizers of qiskit-algorithms.
Upgrade Notes
- Support for running with Qiskit version 0.X has been removed. To run Qiskit Optimization you need a minimum Qiskit version of 1.1.0.
- Support for running with Python 3.8 has been removed. To run Qiskit Optimization you need a minimum Python version of 3.9.
- Removed the dependency on qiskit-algorithms.
Deprecation Notes
- Deprecated support for using Qiskit Optimization with V1 Primitives. To run Qiskit Optimization you need V2 Primitives instead.
- Deprecates the methods QuadraticProgram.export_as_lp_string(), QuadraticProgram.read_from_lp_file(), and QuadraticProgram.write_to_lp_file() in order to remove the dependency on cplex package, which has seen limited maintenance and updates in recent years.
- Users can read models from LP files and write models in LP format using functions to_docplex_mp(), from_docplex_mp(), to_gurobipy(), and from_gurobipy().
- Users can print out QuadraticProgram model with the method QuadraticProgram.prettyprint().
Bug Fixes
- Fixed a bug of MagicRounding.round() that may return a wrong decision variable order.