-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change cvxpy solver #11002
Change cvxpy solver #11002
Conversation
One or more of the the following people are requested to review this:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also relax the constraint in constraints.txt
, if this is a valid solution?
sol = prob.solve(**kwargs) | ||
sol = prob.solve(solver="SCS", **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this works, we should specify the solver
as a direct kwarg
in the diamond_norm
function with a default of "SCS"
so that users can continue to override it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I updated the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming this passes tests, this looks good to me, thanks for the fix! I hadn't actually spotted in the release notes that there'd been a change in the default solver away from SCS this version, but I just tried it locally and it all seems correct.
Thanks for solving the problem properly!
* change cvxpy solver * apply review comments (cherry picked from commit 4f5d90d)
* change cvxpy solver * apply review comments (cherry picked from commit 4f5d90d) Co-authored-by: Takashi Imamichi <[email protected]>
### Summary Similar to Qiskit/qiskit#11002, this PR fixes the default solver for cvxpy to SCS. The 1.4.0 release changing the default solver to Clarabel breaks tomography experiments because Clarabel expects `max_iter` instead of `max_iters`. Also fixes a new lint error in `test_drag.py`.
### Summary Similar to Qiskit/qiskit#11002, this PR fixes the default solver for cvxpy to SCS. The 1.4.0 release changing the default solver to Clarabel breaks tomography experiments because Clarabel expects `max_iter` instead of `max_iters`. Also fixes a new lint error in `test_drag.py`.
### Summary Similar to Qiskit/qiskit#11002, this PR fixes the default solver for cvxpy to SCS. The 1.4.0 release changing the default solver to Clarabel breaks tomography experiments because Clarabel expects `max_iter` instead of `max_iters`. Also fixes a new lint error in `test_drag.py` and reduces `test_ef_update`'s runtime.
### Summary Similar to Qiskit/qiskit#11002, this PR fixes the default solver for cvxpy to SCS. The 1.4.0 release changing the default solver to Clarabel breaks tomography experiments because Clarabel expects `max_iter` instead of `max_iters`. Also fixes a new lint error in `test_drag.py` and reduces `test_ef_update`'s runtime.
### Summary Similar to Qiskit/qiskit#11002, this PR fixes the default solver for cvxpy to SCS. The 1.4.0 release changing the default solver to Clarabel breaks tomography experiments because Clarabel expects `max_iter` instead of `max_iters`. Also fixes a new lint error in `test_drag.py` and reduces `test_ef_update`'s runtime.
Details of the solver change. cvxpy/cvxpy#2257 |
### Summary Similar to Qiskit/qiskit#11002, this PR fixes the default solver for cvxpy to SCS. The 1.4.0 release changing the default solver to Clarabel breaks tomography experiments because Clarabel expects `max_iter` instead of `max_iters`. Also fixes a new lint error in `test_drag.py` and reduces `test_ef_update`'s runtime.
Summary
CVXPY 1.4.0 has been released recently and it changed the default solver from SCS to CLARABEL.
https://www.cvxpy.org/updates/index.html#cvxpy-1-4
But the new solver took so long time to converge, and the following unit test fails.
test.python.quantum_info.operators.test_measures.TestOperatorMeasures.test_diamond_norm_3
CI log example https://dev.azure.com/qiskit-ci/qiskit/_build/results?buildId=50270&view=logs&j=047b33e0-32e5-58f1-0c38-5f1e11815a2c&t=0892c657-33d9-5456-4eb8-9e7ebbe33ddf
This PR specifies the old solver to pass the unit test.
Details and comments