Hello,
I'm a quantum information theory PhD student working from Barcelona. I would to consult with you about whether I can define custom SDP matrices with python fusion or the python API.
The essence of the problem is as follows. I have a very big dense SDP variable where I know many of the elements of the matrix are exactly the same. For example, take the 4x4 symmetric matrix:
G =
[[var1 var2 var3 var4],
[var2 var5 var6 var7],
[var3 var6 var8 var9],
[var4 var7 var9 var10]]
In my problem I know that var2=var3=var6, var9=var10, var1=var5 and var4=var7. This becomes a problem with many variables and lots of constraints:
var1 = M.variable(...)
var2 = M.variable(...)
var3 = M.variable(...)
var5 = M.variable(...)
var6 = M.variable(...)
var7 = M.variable(...)
var8 = M.variable(...)
var9 = M.variable(...)
var10 = M.variable(...)
G =
[[var1 var2 var3 var4],
[var2 var5 var6 var7],
[var3 var6 var8 var9],
[var4 var7 var9 var10]]
s.t.
var1=var5
var2=var3=var6
var9=var10
var4=var7
I checked and Python fusion does not smartly eliminate unnecessary variables. That's ok, but I would like to know if there is the option of doing it myself by just using less variables from the start. If I could define my own variable G, I could have
var1 = M.variable(...)
var2 = M.variable(...)
var3 = M.variable(...)
var4 = M.variable(...)
G =
[[var1 var2 var2 var3],
[var2 var1 var2 var3],
[var2 var2 var4 var5],
[var3 var3 var5 var5]]
+ other constraints I didn't mention:
equality constraints: var_x = constant
proportionality constraints var_i = constant * var_j
PSD constraints: G is PSD (I prefer to implement this as G - lambda*Id >> 0 with lambda an unbounded variable)
This is possible with YALMIP for MATLAB and this gives solving times using MOSEK of the order of 10x faster. I would like to implement this in Python as most of my code is in Python, and currently I only use MATLAB to solve the SDP.
What would be the way to use the Python API or FUSION to achieve this?
I could provide the code for my problem, but I don't think that would be helpful necessarily.
I tried to look into the documentation and I couldn't find anything, sorry if it's already there but I missed it.
Thank you for your time and for reading this,
Cristian