I have an objective function as obj = \mbox{tr} (XA) \mbox{tr} (X^H A^H), which the diagonal complex matrix X \in C^{M \times M} has to be optimized in, and A \in C^{M \times M} is a known matrix. The second derivative of the objective can be proven that is zero, hence the objective is convex. However, using CVX, I came across a DCP error, “Invalid quadratic form(s): not a square”. How should I reformulate the objective function, so the error would be resolved?

Best Regards,

Sadjad