-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix VQC training with warm_start=True (#312)
* fixes #296 warm_start with vqc extract the initial_point in TrainableModel from the final point of the minimization in the existing OptimizerResult object. * update copyright * add units tests to check vqc warm_start * fix grammar * fix grammar * initialise -> initialize * fix typo in test docstring * add a reno for fix of #296 * fix quotes in reno report Co-authored-by: Anton Dekusar <62334182+adekusar-drl@users.noreply.github.com> (cherry picked from commit 5a02c76)
- Loading branch information
1 parent
912439d
commit cdd1450
Showing
3 changed files
with
77 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
releasenotes/notes/fix-vqc-warm-start-1c15d3f5742c5e84.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
fixes: | ||
- | | ||
Fixes an issue where ``VQC`` would fail with ``warm_start=True``. | ||
The extraction of the ``initial_point`` in ``TrainableModel`` from the final | ||
point of the minimization had not been updated to reflect the refactor | ||
of optimizers in ``qiskit-terra``; the old ``optimize`` method, that returned | ||
a tuple was deprecated and new method ``minimize`` was created that returns | ||
an ``OptimizerResult`` object. We now correctly recover the final point of | ||
the minimization from previous fits to use for a warm start in subsequent | ||
fits. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters