Skip to content

Commit 6d98a2a

Browse files
author
Corey Ostrove
committed
Switch diamond distance solver
Switches to using Clarabel as the solver for diamond distance and adds a minimum version pin for cvxpy.
1 parent 3944ca5 commit 6d98a2a

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

pygsti/tools/optools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def diamonddist(a, b, mx_basis='pp', return_x=False):
323323
prob, vars = _diamond_norm_model(dim, smallDim, J)
324324

325325
try:
326-
prob.solve(solver='CVXOPT')
326+
prob.solve(solver='Clarabel')
327327
except _cvxpy.error.SolverError as e:
328328
_warnings.warn("CVXPY failed: %s - diamonddist returning -2!" % str(e))
329329
return (-2, _np.zeros((dim, dim))) if return_x else -2

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ classifiers=[
5252

5353
[project.optional-dependencies]
5454
diamond_norm = [
55-
'cvxopt',
56-
'cvxpy'
55+
'cvxpy>=1.4.0'
5756
]
5857
evolutionary_optimization = ['deap']
5958
extensions = ['cython']

0 commit comments

Comments
 (0)