# How to solve the following SDP with cvxpy in Python?

The SDP problem is $$\min_{Z \in S^{n},Y \in S^{m}} {\rm trace}(Z) +{\rm trace}(Y)\\ {\rm s.t.} \begin{bmatrix} Y & X\\ X^T & Z \end{bmatrix} \succeq 0\\ X \in C$$ Where $$C$$ is a convex set.But I have some difficulty in transforming it to the standard form: $$\min_{X}\operatorname{trace}(CX) \\ \text{s.t.} \ \operatorname{trace}(A_{i}X)=b_i,i=1,...,p \\ X\succeq 0$$ If let $$\overline X= \begin{bmatrix} Y & X\\ X^T & Z \end{bmatrix}$$ ,then the problem transform to $$\min_{\overline X} {\rm trace}(\overline X)\\ {\rm s.t.} \overline X \succeq 0\\ \overline{X}_{m+i,j} =\overline{X}_{j,m+i},i=1,...,n,j=1,...,m$$ But $$\overline{X}_{m+i,j} =\overline{X}_{j,m+i}$$ seems can not writen as $${\rm trace}(A_i\overline{X})=b$$,where $$A_i$$ symmetric matrice This question comes form pape: A Rank Minimization Heuristic with Application to Minimum Order System Approximation

• Perhaps you need a numerical method to create an X-bar that is diagonalizeable ? Meaning you need to create A with a linear technique within a tolerance you choose, like SVD. I'm out of my depth here but I like to try and see the bigger picture.
– wbg
Jun 11 at 16:14
• SDP Solvers have an implicit constraint that the SDP matrix is symmetric, so no additional constraints are needed. Your problem seems to be incomplete though, since the solutions is obviously $\bar{X}=0$. Jun 11 at 17:33
• @BrianBorchers If I add additional constraint $X \in C$,the solution seems is $\overline X =0$ too
– Kim
Jun 12 at 1:37
• In the complex case, the matrix is constrained to be Hermitian positive semidefinite. Jun 12 at 3:52