Why is my convex problem unbounded?

Here is my code:

variable mat(2,2) complex semidefinite
subject to
trace(mat) <= 1;

which is definitely a convex problem with a solution. However what I get is always as follows:

Successive approximation method to be employed.
SDPT3 will be called several times to refine the solution.
Original size: 49 variables, 11 equality constraints
1 exponentials add 7 variables, 4 equality constraints

Cones | Errors |
Mov/Act | Centering Exp cone Poly cone | Status
0/ 0 | 0.000e+00 0.000e+00 0.000e+00 | Unbounded

Status: Unbounded
Optimal value (cvx_optval): +Inf

PS:my cvx version is 3.0beta. I tried the code on other PC with 3.0beta but get a right solution !!
I don’t know where the problem is.

This appears to be due to a bug in CVX 3.0beta. I got the same results as you using 3.0beta, even when using the SCS solver, which avoids CVX’s successive approximation method. Changing the variable name mat, which CVX 2.1 warns could cause a problem, to a different name, such as m, did not help.

However, it did solve correctly using SDPT3 under CVX 2.1. But all iterations of CVX’s successive approximation method failed using sedumi under CVX 2.1 (that’s not necessarily a bug, but could be due to the non-guaranteed nature of CVX"s successive approximation method).

CVX 3.0beta is called beta for a reason :slight_smile:

I recommend using det_rootn instead of log_det. This will provide an equivalent formulation but without the logarithm, which tends to give CVX fits.

Using det_rootn in CVX 3.0beta also results in

Status: Unbounded
Optimal value (cvx_optval): +Inf

for sdpt3, sedumi, and scs, which are the 3 solvers I tried. So there appears to be a bug in 3.0beta resulting in incorrect results for log_det or det_rootn in the above program.

Ah, that’s good to know. Thanks! My advice still applies to 2.1 of course!

OK! I’ll try cvx 2.1