PICOS interface¶
The easiest way to use QICS is by using the optimization modelling software PICOS, which provides a high-level interface to parse convex optimization problems to a solver. Notably, PICOS supports the following functions, which can be used to formulate conic problems to be solved using QICS.
Function |
PICOS expression |
Convexity |
Description |
---|---|---|---|
Quantum entropy |
Concave |
\(S(X) = -\text{tr}[X\log(X)]\) |
|
Quantum relative entropy |
Convex |
\(S(X \| Y) = \text{tr}[X\log(X) - X\log(Y)]\) |
|
Quantum conditional entropy |
Concave |
\(S(X) - S(\text{tr}_i(X))\) |
|
Quantum key distribution |
Convex |
\(-S(\mathcal{G}(X)) + S(\mathcal{Z}(\mathcal{G}(X)))\) |
|
Operator relative entropy |
Operator convex |
\(-P_{\log}(X, Y) = X^{1/2} \log(X^{1/2} Y^{-1} X^{1/2}) X^{1/2}\) |
|
Matrix geometric mean |
Operator convex if \(t\in[-1, 0]\cup[1, 2]\) Operator concave if \(t\in[0, 1]\) |
\(X\,\#_t\,Y = X^{1/2} (X^{-1/2} Y^{-1} X^{-1/2})^t X^{1/2}\) |
|
Renyi entropy |
Operator convex for \(\alpha\in[0, 1)\) |
\(D_\alpha(X \| Y) = \frac{1}{1-\alpha} \log(\text{tr}[X^\alpha Y^{1-\alpha}])\) |
|
Sandwiched Renyi entropy |
Operator convex for \(\alpha\in[1/2, 1)\) |
\(\hat{D}_\alpha(X \| Y) = \frac{1}{1-\alpha} \log(\text{tr}[ (Y^{\frac{1-\alpha}{2\alpha}} X Y^{\frac{1-\alpha}{2\alpha}})^\alpha ])\) |
|
Quasi-relative entropy |
Concave for \(\alpha\in[0, 1]\) Convex for \(\alpha\in[-1, 0]\cup[1, 2]\) |
\(\text{tr}[ X^\alpha Y^{1-\alpha} ]\) |
|
Sandwiched quasi-relative entropy |
Concave for \(\alpha\in[1/2, 1]\) Convex for \(\alpha\in[1, 2]\) |
\(\text{tr}[ ( Y^{\frac{1-\alpha}{2\alpha}} X Y^{\frac{1-\alpha}{2\alpha}} )^\alpha ]\) |
Scalar functions (i.e., quantum entropy, quantum relative entropy, quantum conditional entropy, and quantum key distribution) can be used by either incorporating them in the objective function, e.g.,
P.set_objective("min", picos.quantrelentr(X, Y))
or as an inequality constraint, e.g.,
P.add_constraint(t > picos.quantrelentr(X, Y))
Matrix-valued functions (i.e., operator relative entropy and matrix geometric mean) can be used in a matrix inequality expression, e.g.,
P.add_constraint(T >> picos.oprelentr(X, Y))
or composed with a trace function to represent the corresponding scalar valued function
P.set_objective("min", picos.trace(picos.oprelentr(X, Y)))
Note that these expressions need to define a convex optimization problem. Once a PICOS problem has been defined, it can be solved using QICS by calling
P.solve(solver="qics")
Example¶
Below, we show an example of how we can solve the same problem nearest correlation matrix problem introduced in Getting started, i.e.,
where
import picos
# Define the conic program
P = picos.Problem()
X = picos.Constant("X", [[2., 1.], [1., 2.]])
Y = picos.SymmetricVariable("Y", 2)
P.set_objective("min", picos.quantrelentr(X, Y))
P.add_constraint(picos.maindiag(Y) == 1)
print(P)
# Solve the conic program
P.solve(solver="qics")
print("\nOptimal matrix variable Y is:")
print(Y)
Quantum Relative Entropy Program
minimize S(X‖Y)
over
2×2 symmetric variable Y
subject to
maindiag(Y) = [1]
Optimal matrix variable Y is:
[ 1.00e+00 5.00e-01]
[ 5.00e-01 1.00e+00]
Further examples for how PICOS can be used with QICS to solve problems arising in quantum information theory can be found in Quantum relative entropy programming.