Closed t-imamichi closed 4 years ago
It may be because matrix P is not positive semidefinite due to sampling error of qasm_simulator. The code works fine with statevector_simulator, but raises the error with qasm_simulator. https://github.com/Qiskit/qiskit-aqua/blob/d45f689cc7b8cc4509ceeb43fd7da78baa01a49a/qiskit/aqua/utils/qp_solver.py#L87
We maybe need to correct P to be positive semidefinite. E.g., https://stackoverflow.com/questions/10939213/how-can-i-calculate-the-nearest-positive-semi-definite-matrix
Information
What is the current behavior?
When I execute a notebook https://github.com/Qiskit/qiskit-tutorials/blob/master/legacy_tutorials/aqua/machine_learning/qsvm_classification.ipynb,
qsvm.run
raisesDQCPError
1083 might not be enough to fix this issue.
It is mentioned in a tutorial issue https://github.com/Qiskit/qiskit-tutorials/issues/932
Steps to reproduce the problem
Run https://github.com/Qiskit/qiskit-tutorials/blob/master/legacy_tutorials/aqua/machine_learning/qsvm_classification.ipynb
Notebook cell
What is the expected behavior?
No error
Suggested solutions