Closed CharlieDerby closed 3 years ago
Looks like there were breaking changes introduced in CVXPY 1.1 that changed some sort of matrix handling? I think the entirely of the dnorm
function was written by Chris Granade about 5 years ago, and they're off at Microsoft now.
As an immediate workaround, you can pin the version of CVXPY in conda to 1.0 (conda install 'cvxpy=1.0'
) to fix it. Otherwise, probably there's a solution in swapping over a load of *
to @
in qutip/semidefinite.py
and qutip/metrics.py
, but that might be a bit nontrivial to solve. If you succeed, please do make a pull request.
The reason that the "simple" cases work is that QuTiP detects them as known results and has fast paths avoiding cvxpy
.
I think I have tracked down the problem to this issue https://github.com/cvxgrp/cvxpy/issues/1159, we could patch it using dense matrices instead of sparse ones.
Fixed in #1463.
I have noticed that when I try to use the
.dnorm()
method to calculate the diamond norm distance between two channels I am greeted with an error and the operation fails. Rather than an error I expected the output to be a number between 0 and 2. See the simple example below.Attempting to run either of the final two prints gives the following spiel:
qutip.about() outputs the following info