This repository has been archived by the owner on Dec 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 376
Fix QSVM problem wit non-positive semi-definite kernel matrices #1190
Merged
Conversation
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
fetch from origin
fetch from origin
fetch from origin
fetch from origin
fetch from origin
Fetch from origin
fetch from origin
fetch from origin
added LinearEqualityToPenalty._auto_define_penalty() function (qiskit-community#1043)
fetch from origin
fetch from origin
Move functionality QuadraticProgramToNegativeValueOracle to circuit l…
fetch from origin
stefan-woerner
requested review from
manoelmarques and
woodsp-ibm
as code owners
August 13, 2020 06:31
Will you add a test case, that is like the tutorial which exposed this issue, so we will have this aspect covered now by testing (which was not the case up until now it seems) in case anything arises in the future. |
stefan-woerner
changed the title
[WIP] Fix QSVM problem wit non-positive semi-definite kernel matrices
Fix QSVM problem wit non-positive semi-definite kernel matrices
Aug 27, 2020
Hello, I notice that everything works fine using Python 3.7.7 BUT using the newest python 3.8.5 only the jupyter version of this code is working. If I run it as a code, the qsvm.run instance create n subprocesses of the same instances going into a endless loop...the code recall itself.... |
Cryoris
reviewed
Sep 1, 2020
Co-authored-by: Julien Gacon <gaconju@gmail.com>
woodsp-ibm
approved these changes
Sep 2, 2020
woodsp-ibm
added
the
Changelog: Bugfix
Include in the Fixed section of the changelog
label
Sep 2, 2020
pbark
pushed a commit
to pbark/qiskit-aqua
that referenced
this pull request
Sep 16, 2020
…it-community#1190) * Update _qsvm_binary.py * move psd approx to static method for kernel matrix creation * only apply PSD approximation for symmetric matrices * remove `print(mat)` from qsvm.py `get_kernel_matrix` * Add unit test to check enforce_psd Co-authored-by: Manoel Marques <Manoel.Marques@ibm.com> Co-authored-by: woodsp <woodsp@us.ibm.com> Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com> Co-authored-by: Julien Gacon <gaconju@gmail.com>
manoelmarques
added a commit
to qiskit-community/qiskit-machine-learning
that referenced
this pull request
Feb 27, 2021
…it-community/qiskit-aqua#1190) * Update _qsvm_binary.py * move psd approx to static method for kernel matrix creation * only apply PSD approximation for symmetric matrices * remove `print(mat)` from qsvm.py `get_kernel_matrix` * Add unit test to check enforce_psd Co-authored-by: Manoel Marques <Manoel.Marques@ibm.com> Co-authored-by: woodsp <woodsp@us.ibm.com> Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com> Co-authored-by: Julien Gacon <gaconju@gmail.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Noisy estimation of the kernel matrix in QSVM can lead to non positive semi-definite matrices, which cause the convex solver to fail.
Thus, this change replaces the resulting kernel matrix by the closest PSD approximation.
Fixes #1106,
Fixes Qiskit/qiskit-tutorials#932