Broadcast scalar and vectorial constants to diagonal matrices when used with the Loewner order.
Hello,
I'd expect the expression P.add_constraint(E[0] << 1)
to be equivalent to P.add_constraint(E[0] << pic.Constant([[1,0],[0,1]]))
, i.e. I would expect the 1 here to be treated as the identity matrix I (and similar, for any scalar k
, I expect E[0] << k
to be equivalent to E[0] << k * I
.
However, it's obviously not the case, for example here the variable E0 is definitely not smaller than 1:
-----------------------------
Complex Semidefinite Program
maximize pmax
over
2×2 hermitian variable E0
1×1 real variable pmax
subject to
E0 ≽ 0
pmax ≤ plusᵀ·E0·plus
E0 ≼ [1]
-----------------------------
Solving...
Solved!
E0 [ 1.00e+00-j0.00e+00 1.00e+00-j7.92e-26]
[ 1.00e+00+j7.92e-26 1.00e+00-j0.00e+00]
Would it be possible to correct this behaviour, or at least to display a warning saying that this does not do what people expect?
Thanks!
Edited by Maximilian Stahlberg