With Mathematica 12.2, ConvexOptimization
was introduced, which, as its name suggests, can solve arbitrary convex optimization problems over matrices [Language Reference]. Using ConvexOptimization
can help me get around reformulating my problem into SemidefiniteOptimization
, a step that is cumbersome but otherwise works fine.
Hence, to get started, I'm attempting to solve a trial optimization problem with ConvexOptimization
.
The following code works as intended.
A = RandomVariate[NormalDistribution[], {4, 4}]
ConvexOptimization[-Log[Det[A.X.Transpose[A]]], {Tr[X] <= 1, VectorGreaterEqual[{X, 0}, {"SemidefiniteCone", 4}]}, {X \[Element] Matrices[{4, 4}, Complexes]}]
However, when I replace the objective function -Log[Det[A.X.Transpose[A]]]
with -Log[Det[IdentityMatrix[4] + A.X.Transpose[A]]]
to obtain the following optimization problem:
A = RandomVariate[NormalDistribution[], {4, 4}]
ConvexOptimization[-Log[Det[IdentityMatrix[4] + A.X.Transpose[A]]], {Tr[X] <= 1, VectorGreaterEqual[{X, 0}, {"SemidefiniteCone", 4}]}, {X \[Element] Matrices[{4, 4}, Complexes]}]
and evaluate it, Mathematica produces the following error: The argument [...] should not be scalar valued.
I interpret the resulting stack trace on my PC to mean that Mathematica is likely (erroneously) considering the argument to Det
a scalar. However, I'm stuck with debugging here.
Would anyone know what might be going wrong? Any suggestions for solving the second optimization problem with ConvexOptimization
will be very helpful.