ln_quantum_entropy_hypo_cone
¶
CVXPY constraints for the von Neumann entropy hypograph cone.
ln_quantum_entropy_hypo_cone
¶
ln_quantum_entropy_hypo_cone(
mat_x: Expression,
t: Expression,
*,
m: int = 3,
k: int = 3,
apx: int = 0,
hermitian: bool = False,
) -> list[Constraint]
Return CVXPY constraints for the hypograph of \(H(X) = -\operatorname{tr}(X \log X)\).
The constraints enforce
approximately via the operator relative entropy identity
\(H(X) = -\operatorname{tr} D_{\mathrm{op}}(X\|I)\). An auxiliary matrix
TAU is introduced internally with
The apx sign is flipped when calling
operator_relative_entropy_epi_cone so that upper/lower
bounds on entropy match CVXQUAD quantum_entr.m 1.
Parameters:
-
mat_x(Expression) –A CVXPY expression for a positive semidefinite matrix.
-
t(Expression) –A CVXPY scalar (or
1 x 1) hypograph variable. -
m(int, default:3) –The number of quadrature nodes to use.
-
k(int, default:3) –The number of square-roots to take.
-
apx(int, default:0) –Approximation mode for the entropy bound:
+1upper-bounds \(H(X)\),-1lower-bounds \(H(X)\), and0is the two-sided Padé / Gauss--Legendre approximation. -
hermitian(bool, default:False) –Whether the matrices are Hermitian or symmetric.
Raises:
-
ValueError–If
mat_xis not a square 2D expression. -
ValueError–If
morkis less than 1. -
ValueError–If
apxis not-1,0, or1.
Returns:
-
list[Constraint]–A list of CVXPY constraints.
Examples:
import cvxpy
import numpy as np
from toqito.cones import ln_quantum_entropy_hypo_cone
n = 2
mat_x = np.eye(n) / n
x_c = cvxpy.Constant(mat_x)
t = cvxpy.Variable()
cons = ln_quantum_entropy_hypo_cone(x_c, t, m=3, k=3, apx=0)
prob = cvxpy.Problem(cvxpy.Maximize(t), cons)
print(f"{prob.solve(solver=cvxpy.SCS, verbose=False):.4f}")
References
1 Fawzi, Hamza and Saunderson, James and Parrilo, Pablo. Semidefinite approximations of the matrix logarithm. Foundations of Computational Mathematics. vol. 19(2). (2019). doi:10.1007/s10208-018-9385-0.