Logarithm of matrix

I have a Hermitian semi-definite matrix optimizataion. The problem is in fact a matrix entropy maximization with some other constraints which I don’t mention for simplicity.

\min_{N} \quad Tr\{N \ln(N/q_0)\} + Tr\{(\rho - N) \ln(\frac{\rho - N}{1 - q_0})\}

where 0 \leq q_0 \leq 1 and \rho (a Hermitian semi-definite matrix) are the
given parameters of optimization. And N is also a Hermitian semi-definite matrix which is variable of optimization. Note that the ln(X) is the matrix logarithm which is different from the element-wise logarithm applied to matrices. So matlab has a built-in function logm() which calculates this. But cvx does not support this logm function:

    variable N(2,2) hermitian semidefinite
    minimize(-trace(rho *logm(rho)) + trace(N*logm(N./q0)) +  trace((rho - N)*logm((rho - N)./(1 - q0))))

gives the following error

Error using logm (line 33)
Expected input to be one of these types:

double, single

Instead its type was cvx.

I appreciate any help on how to solve this optimization problem.

Install CVXQUAD https://github.com/hfawzi/cvxquad . Then use its quantum_entr function. There is no need to install CVXQUAD’s exponential.m replacement.

Also see the discussion of matrix log related functions in CVXQUAD at the end of CVXQUAD: How to use CVXQUAD's Pade Approximant instead of CVX's unreliable Successive Approximation for GP mode, log, exp, entr, rel_entr, kl_div, log_det, det_rootn, exponential cone. CVXQUAD's Quantum (Matrix) Entropy & Matrix Log related functions and the reference https://arxiv.org/abs/1705.00812 .

1 Like