# Optimizing over the quantum entropy cone natively in JuMP

**URL:** <https://discourse.julialang.org/t/optimizing-over-the-quantum-entropy-cone-natively-in-jump/59833>\
**Category:** Optimization (Mathematical)\
**Created:** [April 22, 2021, 11:42pm UTC](https://discourse.julialang.org/t/optimizing-over-the-quantum-entropy-cone-natively-in-jump/59833 "2021-04-22T23:42:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryancorywright](https://avatars.discourse-cdn.com/v4/letter/r/6a8cbe/32.png) [@ryancorywright](https://discourse.julialang.org/u/ryancorywright)\
**Post date:** [April 22, 2021, 11:42pm UTC](https://discourse.julialang.org/t/optimizing-over-the-quantum-entropy-cone-natively-in-jump/59833/1 "2021-04-22T23:42:30Z")

</div>

Hi everyone,

I was wondering if it was possible to optimize over the [quantum entropy cone](https://link.springer.com/article/10.1007/s10208-018-9385-0) natively in JuMP.

If you need a reminder, the cone is  
\{(X\_1, X\_2, X\_3): X\_1 \preceq X\_2^{\frac{1}{2}} \log(X\_2^{\frac{-1}{2}}X\_3 X\_2^{\frac{-1}{2}})X\_2^\frac{1}{2}\},  
where \log(X) denotes the matrix logarithm and X^\frac{1}{2} denotes the square root of a matrix. I would also be ok with a way of optimizing over the trace of X\_1, since this seems to be considerably cheaper and would suit for the problem I have in mind.

As far as I can tell, the two ways of doing this are (a) to use the package [CVXQUAD](https://github.com/hfawzi/cvxquad) in Matlab, or (b) to use the [Domain Driven Solver](https://arxiv.org/abs/1908.03075) package in Matlab. This means that it is possible to optimize over this cone in Julia using MATLAB.jl to call Matlab, but I can’t find a native Julia solution in the docs.

Thanks!

---

<div class="post-metadata">

**Author:** ![mtanneau](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mtanneau/32/17787_2.png) [@mtanneau](https://discourse.julialang.org/u/mtanneau)\
**Post date:** [April 22, 2021, 11:54pm UTC](https://discourse.julialang.org/t/optimizing-over-the-quantum-entropy-cone-natively-in-jump/59833/2 "2021-04-22T23:54:33Z")

</div>

Your best guess for Julia-native optimization over non-standard cones is the [Hypatia.jl](https://github.com/chriscoey/Hypatia.jl) conic solver (see [this paper](https://arxiv.org/pdf/2005.01136.pdf) for the math and [here](https://raw.githubusercontent.com/wiki/chriscoey/Hypatia.jl/files/coneref.pdf) for a list of supported cones).

If your cone is not already there, the solver is flexible enough that you can add it directly. You’ll need a primal or dual barrier function (ideally a self-concordant one).

---

<div class="post-metadata">

**Author:** ![chriscoey](https://avatars.discourse-cdn.com/v4/letter/c/3ab097/32.png) [@chriscoey](https://discourse.julialang.org/u/chriscoey)\
**Post date:** [April 23, 2021, 12:05am UTC](https://discourse.julialang.org/t/optimizing-over-the-quantum-entropy-cone-natively-in-jump/59833/3 "2021-04-23T00:05:23Z")

</div>

From table 1 of OP’s reference, that looks like the operator relative entropy cone `op_rel_entr_epi_cone`. We have tentative plans to support that in Hypatia in future. Currently we only support the `quantum_rel_entr` cone.

---

<div class="post-metadata">

**Author:** ![ryancorywright](https://avatars.discourse-cdn.com/v4/letter/r/6a8cbe/32.png) [@ryancorywright](https://discourse.julialang.org/u/ryancorywright)\
**Post date:** [April 23, 2021, 12:27am UTC](https://discourse.julialang.org/t/optimizing-over-the-quantum-entropy-cone-natively-in-jump/59833/4 "2021-04-23T00:27:58Z")

</div>

Thanks for confirming, I’ll run with CVXQuad or DDS for now then.

FWIW there is a barrier for this cone (when minimizing tr(X1)) on page 23 of [https://arxiv.org/pdf/1908.03075.pdf](https://arxiv.org/pdf/1908.03075.pdf).

---

<div class="post-metadata">

**Author:** ![chriscoey](https://avatars.discourse-cdn.com/v4/letter/c/3ab097/32.png) [@chriscoey](https://discourse.julialang.org/u/chriscoey)\
**Post date:** [April 23, 2021, 12:57am UTC](https://discourse.julialang.org/t/optimizing-over-the-quantum-entropy-cone-natively-in-jump/59833/5 "2021-04-23T00:57:53Z")

</div>

Yes thanks we are aware of that barrier, we actually independently came up with the same one and implemented it in Hypatia last year (it’s a pretty obvious guess). However I don’t think anyone is aware whether it is self-concordant.

---

<div class="post-metadata">

**Author:** ![marklstone](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marklstone/32/43748_2.png) [@marklstone](https://discourse.julialang.org/u/marklstone)\
**Post date:** [October 21, 2022, 7:28am UTC](https://discourse.julialang.org/t/optimizing-over-the-quantum-entropy-cone-natively-in-jump/59833/6 "2022-10-21T07:28:32Z")

</div>

The semidefinite approximation to the matrix logarithm/CVXQUAD developers have proven that DDS barrier is self-concordant. Posted on arXiv in May 2022.

> **[Optimal self-concordant barriers for quantum relative entropies](https://arxiv.org/abs/2205.04581)**
>
> Quantum relative entropies are jointly convex functions of two positive definite matrices that generalize the Kullback-Leibler divergence and arise naturally in quantum information theory. In this paper, we prove self-concordance of natural barrier...

I am not a Julia user as of yet, so can’t try myself. But what is the status of being able to actually formulate and solve a `quantum_relative_entropy`problem in /Convex.jl? Can they be solved by COSMO.jl? If so, does anyone have experience with memory and speed relative to matrix size? Hopefully oodles better than CVXQUAD.

Just to confirm, quantum relative entropy problems can now be solved in JuMP using Hypatia? Same question about experience with memory and speed relative to matrix size.

---

<div class="post-metadata">

**Author:** ![lkapelevich](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lkapelevich/32/5672_2.png) [@lkapelevich](https://discourse.julialang.org/u/lkapelevich)\
**Post date:** [October 21, 2022, 12:33pm UTC](https://discourse.julialang.org/t/optimizing-over-the-quantum-entropy-cone-natively-in-jump/59833/7 "2022-10-21T12:33:31Z")

</div>

Yes quantum relative entropy problems can be solved in JuMP using Hypatia. The Hypatia cone type is called `EpiTrRelEntropyTriCone` (epigraph-trace-relative-entropy-triangle-cone). An example for the syntax is [Hypatia.jl/JuMP.jl at master · chriscoey/Hypatia.jl · GitHub](https://github.com/chriscoey/Hypatia.jl/blob/master/examples/nearestcorrelation/JuMP.jl#L35) or [Hypatia.jl/JuMP.jl at 5bf412e36c69d6f990af2cf6ecad1aafed7b3006 · chriscoey/Hypatia.jl · GitHub](https://github.com/chriscoey/Hypatia.jl/blob/5bf412e36c69d6f990af2cf6ecad1aafed7b3006/examples/relentrentanglement/JuMP.jl#L39).

I am not qualified to answer for COSMO.jl but note that it relies on projection oracles [Custom Cone Constraint · COSMO.jl](https://oxfordcontrol.github.io/COSMO.jl/stable/literate/build/custom_cone/) and additional information for checking infeasibility.
