Skip to content

Commit

Permalink
add reno
Browse files Browse the repository at this point in the history
  • Loading branch information
t-imamichi committed Nov 18, 2022
1 parent 666e663 commit b76fe7f
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 14 deletions.
3 changes: 2 additions & 1 deletion qiskit_optimization/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
(:class:`~qiskit.algorithms.minimum_eigensolver.QAOA`), to
`Grover Adaptive Search <https://arxiv.org/abs/quant-ph/9607014>`_
(:class:`~algorithms.GroverOptimizer`), leveraging
fundamental :mod:`~qiskit.algorithms.minimum_eigensolver` provided by Qiskit Terra. Furthermore, the modular design
fundamental :mod:`~qiskit.algorithms.minimum_eigensolver` provided by Qiskit Terra.
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.
Expand Down
3 changes: 2 additions & 1 deletion qiskit_optimization/algorithms/warm_start_qaoa_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import numpy as np
from qiskit import QuantumCircuit
from qiskit.algorithms import QAOA as LegacyQAOA
from qiskit.algorithms.minimum_eigensolvers import QAOA
from qiskit.circuit import Parameter

Expand Down Expand Up @@ -202,7 +203,7 @@ def __init__(
self,
pre_solver: OptimizationAlgorithm,
relax_for_pre_solver: bool,
qaoa: QAOA,
qaoa: Union[QAOA, LegacyQAOA],
epsilon: float = 0.25,
num_initial_solutions: int = 1,
warm_start_factory: Optional[WarmStartQAOAFactory] = None,
Expand Down
2 changes: 1 addition & 1 deletion qiskit_optimization/deprecation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This code is part of Qiskit.
#
# (C) Copyright IBM 2021.
# (C) Copyright IBM 2021, 2022.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
Expand Down
24 changes: 24 additions & 0 deletions releasenotes/notes/add-primitives-support-31af39549b5e66e3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
features:
- |
The :class:`~.GroverOptimizer` class has a new keyword argument, ``sampler`` which is
used to run the algorithm using an instance of the :class:`~.BaseSampler`
interface to calculate the results. This new argument supersedes
the ``quantum_instance`` argument and accordingly, ``quantum_instance``
is pending deprecation and will be deprecated and subsequently removed in
future releases.
- |
The :class:`~.MinimumEigenOptimizer` class takes the primitives-based algorithms
(``qiskit.algorithms.minimum_eigensolvers.SamplingVQE`` and
``qiskit.algorithms.minimum_eigensolvers.NumPyMinimumEigensolver``)
as ``min_eigen_solver`` argument.
The conventional algorithms ``qiskit.algorithms.minimum_eigen_solvers.MinimumEigensolver``
is pending deprecation and will be deprecated and subsequently removed in future releases.
Note that ``qiskit.algorithms.minimum_eigensolvers.SamplingVQE`` supersedes
``qiskit.algorithms.VQE`` for :class:`~.MinimumEigenOptimizer`.
- |
The :class:`~.WarmStartQAOAOptimizer` class takes the primitives-based QAOA
(``qiskit.algorithms.minimum_eigensolvers.QAOA``) as ``qaoa`` argument.
The conventional algorithm ``qiskit.algorithms.minimum_eigen_solvers.QAOA``
is pending deprecation and will be deprecated
and subsequently removed in future releases.
9 changes: 0 additions & 9 deletions releasenotes/notes/grover-opt-primitive-de82d051d6cee2e4.yaml

This file was deleted.

1 change: 0 additions & 1 deletion test/algorithms/legacy/test_min_eigen_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
)
from qiskit_optimization.problems import QuadraticProgram
from qiskit_optimization.runtime import VQEProgram, QAOAProgram
from qiskit_optimization.deprecation import clear_deprecated_objects


@ddt
Expand Down
2 changes: 1 addition & 1 deletion test/algorithms/legacy/test_warm_start_qaoa.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" Test warm start QAOA optimizer with legacy MinimumEigensolver. """
""" Test warm start QAOA optimizer with legacy QAOA. """

import unittest
from test import QiskitOptimizationTestCase
Expand Down

0 comments on commit b76fe7f

Please sign in to comment.