Ensure PSD operators are being optimized over proper space
Refer to this comment (and the linked thread as well for context): https://github.com/vprusso/toqito/issues/420#issuecomment-1898068088
I came here to report the same problem, but I see that you are already working on it and it is probably solved now.
Even if this should be solved in your picos code, I suspect the current cvxpy code contains a bug:
measurements.append(cvxpy.Variable((dim_x, dim_x), PSD=True))I think this creates PSD symmetric real-valued matrix variables, not complex hermitian matrices, so the optimization is over the wrong set. To obtain the correct solution I think one should create hermitian variables with
hermitian=Trueand then add themeasurements[i] >> 0constraint for each.Ah, out of curiosity, may I ask the reason to prefer picos over cvxpy? I'm old-school and I come from MATLAB's CVX plus QETLAB, but it seems they have comparable performances now: https://cgois.github.io/posts/cvx_vs_picos/
Specifically, anywhere that we use the pattern of cvxpy.Variable(... PSD=True) instead of hermitian=True and >> 0 needs to be replaced.
Thanks to falbarelli for bringing this up.