$ \newcommand{\RR}{\mathbb{R}} \newcommand{\cX}{\mathcal{X}} \newcommand{\cY}{\mathcal{Y}} \newcommand{\tr}{\text{tr}} $

Convex matrix functions

Update: The new package CVXQUAD implements better approximation strategies for quantum relative entropy and related functions.

This webpage contains CVX implementations for several convex/concave functions on
positive semidefinite matrices discussed in the paper:

Lieb's concavity theorem, matrix geometric means and semidefinite optimization
Hamza Fawzi, James Saunderson

Download code

The zip file contains CVX definitions for the convex sets as well as convex/concave functions listed below.

Sets

matrix_geo_mean_hypo_cone $\{(A,B,T) : A\#_t B \succeq T\}$ $t \in [0,1]$
matrix_geo_mean_epi_cone $\{(A,B,T) : A\#_t B \preceq T\}$ $t \in [-1,0]\cup [1,2]$
lieb_hypo_cone $\{(A,B,T) : A^{1-t} \otimes B^t \succeq T\}$ $t \in [0,1]$
ando_epi_cone $\{(A,B,T) : A^{1-t} \otimes B^t \preceq T\}$ $t \in [-1,0]\cup [1,2]$

Usage example:
% The following line constrains matrices A,B,T to satisfy A #_{3/4} B >= T
{A,B,T} == matrix_geo_mean_hypo_cone(4,3/4);

Functions

lieb_ando $(A,B)\mapsto \tr\left[K^* A^{1-t} K B^t\right]$ Concave for $t \in [0,1]$
Convex for $t \in [-1,0]\cup [1,2]$
tsallis_entr $A \mapsto \frac{1}{t} \tr\left[A^{1-t} - A\right]$ Concave
Converges to von Neumann entropy
$S(A) = -\tr[A \log A]$ when $t\rightarrow 0$
tsallis_rel_entr $(A,B) \mapsto \frac{1}{t} \tr\left[A - A^{1-t} B^t\right]$ Convex
Converges to relative entropy
$S(A,B) = \tr[A (\log A - \log B)]$ when $t\rightarrow 0$
trace_mpower $A\mapsto \tr\left[A^t\right]$ Convex for $t \in [0,1]$
Concave for $t \in [-1,0]\cup [1,2]$
trace_KAK $A\mapsto \tr\left[(K^* A^t K)^{1/t}\right]$ Concave for $t \in [-1,1]\setminus \{0\}$
Convex for $t \in [1,2]$

Note on approximating entropy functions using tsallis_entr and tsallis_rel_entr: The functions tsallis_entr and tsallis_rel_entr can be used to approximate the von Neumann entropy and the relative entropy respectively by choosing $t$ close to 0. However it is important to keep in mind that choosing $t$ very small may result in a semidefinite program that is very ill-conditioned. We encourage the user to try different values of $t$ and check the resulting approximation (note that our constructions are optimized for powers of two, $t = 2^{-k}$). A value of $t$ that seemed to work in our examples is $t=2^{-6}$.
We are currently working on more sophisticated methods to approximate von Neumann entropy and quantum relative entropy. See the paper for more information.

Example

Computing capacity of a classical-quantum channel

The CVX code below solves the following optimization problem ($\rho_1$ and $\rho_2$ are fixed positive semidefinite matrices) \[ \begin{array}{ll} \underset{p}{\text{maximize}} & S_t(p_1 \rho_1 + p_2 \rho_2) - p_1 S(\rho_1) - p_2 S(\rho_2)\\ \text{subject to} & p \geq 0, p_1 + p_2 = 1 \end{array} \] where $S_t(A) = \frac{1}{t} \tr\left[A^{1-t} - A\right]$ is the Tsallis entropy. When $t$ is small, the solution of this optimization problem approximates the capacity of a classical-quantum channel (see e.g., the paper Efficient Approximation of Quantum Channel Capacities by Sutter et al.). We use the value $t = 1/2^6$ in the code below.

% Example 2.16 in 
%   "Efficient Approximation of Quantum Channel Capacities" by Sutter et al. (arXiv:1407.8202)
rho1 = [1 0; 0 0];
rho2 = (1/2) * [1 1; 1 1];
Srho1 = sum(entr(eig(rho1)));
Srho2 = sum(entr(eig(rho2)));

cvx_begin
    variable p(2,1)
    maximize ((tsallis_entr(p(1)*rho1 + p(2)*rho2,2^(-6)) - p(1)*Srho1 - p(2)*Srho2)/log(2));
    subject to
        p >= 0;
        sum(p) == 1;
cvx_end