integral_relative_entropy_lower_cone(
mat_x: Expression,
mat_y: Expression,
t: Expression,
*,
epsilon_dec: float = 0.01,
mu: float | None = None,
lam: float | None = None,
hermitian: bool = False,
) -> list[Constraint]
Return CVXPY constraints for the integral lower approximation of \(D(X\|Y)\).
Discretizes the integral representation of quantum relative entropy
1 and enforces
\[
t \geqslant L_{\varepsilon}(X, Y),
\]
where \(L_{\varepsilon}\) is the lower SDP bound (with \(n \times n\) auxiliaries,
not the \(n^2\) Kronecker lift of quantum_relative_entropy_epi_cone).
Sandwich endpoints \(\mu, \lambda\) are taken from mu / lam when provided;
otherwise they are computed from mat_x.value and mat_y.value.
Parameters:
-
mat_x
(Expression)
–
A CVXPY expression for an n x n PSD matrix \(X\).
-
mat_y
(Expression)
–
A CVXPY expression for an n x n PSD matrix \(Y\).
-
t
(Expression)
–
A CVXPY scalar (or 1 x 1) epigraph variable.
-
epsilon_dec
(float, default:
0.01
)
–
Grid refinement parameter \(\varepsilon\).
-
mu
(float | None, default:
None
)
–
Optional sandwich lower endpoint.
-
lam
(float | None, default:
None
)
–
Optional sandwich upper endpoint.
-
hermitian
(bool, default:
False
)
–
Whether the matrices are Hermitian or symmetric.
Raises:
-
ValueError
–
If mat_x or mat_y is not square 2D.
-
ValueError
–
If shapes differ, sandwich is degenerate, or numeric values
are missing when mu / lam are omitted.
Returns:
-
list[Constraint]
–
A list of CVXPY constraints.
References
1 {Ko{\ss}mann}, Gereon and Schwonnek, Ren{\'e}. Optimising the relative entropy under semidefinite constraints. npj Quantum Information. (2026). doi:10.1038/s41534-026-01184-4.
Source code in toqito/cones/integral_relative_entropy_lower_cone.py
| def integral_relative_entropy_lower_cone(
mat_x: cvxpy.Expression,
mat_y: cvxpy.Expression,
t: cvxpy.Expression,
*,
epsilon_dec: float = 1e-2,
mu: float | None = None,
lam: float | None = None,
hermitian: bool = False,
) -> list[cvxpy.Constraint]:
r"""Return CVXPY constraints for the integral lower approximation of \(D(X\|Y)\).
Discretizes the integral representation of quantum relative entropy
[@kossmann2024optimisingrelativeentropy] and enforces
\[
t \geqslant L_{\varepsilon}(X, Y),
\]
where \(L_{\varepsilon}\) is the lower SDP bound (with \(n \times n\) auxiliaries,
not the \(n^2\) Kronecker lift of ``quantum_relative_entropy_epi_cone``).
Sandwich endpoints \(\mu, \lambda\) are taken from ``mu`` / ``lam`` when provided;
otherwise they are computed from ``mat_x.value`` and ``mat_y.value``.
Args:
mat_x: A CVXPY expression for an ``n x n`` PSD matrix \(X\).
mat_y: A CVXPY expression for an ``n x n`` PSD matrix \(Y\).
t: A CVXPY scalar (or ``1 x 1``) epigraph variable.
epsilon_dec: Grid refinement parameter \(\varepsilon\).
mu: Optional sandwich lower endpoint.
lam: Optional sandwich upper endpoint.
hermitian: Whether the matrices are Hermitian or symmetric.
Raises:
ValueError: If ``mat_x`` or ``mat_y`` is not square 2D.
ValueError: If shapes differ, sandwich is degenerate, or numeric values
are missing when ``mu`` / ``lam`` are omitted.
Returns:
A list of CVXPY constraints.
"""
_require_square_2d(mat_x, "mat_x")
_require_square_2d(mat_y, "mat_y")
if mat_x.shape != mat_y.shape:
raise ValueError("mat_x and mat_y must have the same shape")
if mu is None or lam is None:
if mu is not None or lam is not None:
raise ValueError("mu and lam must both be provided or both omitted")
x_val, y_val = _numeric_pair_for_sandwich(mat_x, mat_y)
mu, lam = _sandwich_parameters(x_val, y_val)
_require_valid_sandwich(mu, lam)
grid = _make_grid(mu, lam, epsilon_dec)
r = len(grid)
alpha = [float(np.log(grid[k] / grid[k + 1])) for k in range(r - 1)]
beta = [float(grid[k + 1] - grid[k]) for k in range(r - 1)]
n = int(mat_x.shape[0])
mu_vars = [_symmetric_like_variable(n, hermitian=hermitian) for _ in range(r - 1)]
constraints: list[cvxpy.Constraint] = [mu_vars[k] >> 0 for k in range(r - 1)]
constraints.extend(mu_vars[k] - alpha[k] * mat_x - beta[k] * mat_y >> 0 for k in range(r - 1))
bound = cvxpy.sum([cvxpy.trace(mu_vars[k]) for k in range(r - 1)]) + _integral_correction(lam)
if hermitian:
bound = cvxpy.real(bound)
constraints.append(t >= bound)
return constraints
|