Complex Variables and SOCP

Hello to all.

I’ve just started working with CVX, and try to deal with a SOCP formulation involving a complex design vector. Although I’ve noticed that cvx supports complex data types by defining accordingly the variables, i wonder how this is handled internally. In other words does cvx extends the original complex design vector (let’s say of dimension n) to a new vector with dimension 2n, stacking the real and imaginary parts of the variables x(n) as [Re{x(1}…Re{x(n)}Im{x(1)}…Im{x(n)}] and then solves a real-valued problem? So, if this is the case, could one apply this transformation by him/herself and get the same results?

Thank you very much for your help!

That’s a very good question. Indeed, CVX transforms all problems to real form before solving them. So do the solvers under the hood, incidentally. The “stacking”, as you call it, is performed on an element-by-element basis. In other words, the internal structure alternates real and imaginary elements.

This conversion is exactly equivalent for LP and SOCP. However, for complex SDPs, the conversion to real form does sacrifice a bit of efficiency. But none of the solvers implement complex Hermitian SDPs natively, so there really is no choice.