Quick reference¶
This page aims to serve as a reference point for how to initialize and use the cone, model, and solver classes provided by QICS. Further details about these classes can be found in the API reference.
Modelling¶
QICS solves conic programs of the form
where \(c\in\mathbb{R}^n\), \(b\in\mathbb{R}^p\),
\(h\in\mathbb{R}^q\), \(A\in\mathbb{R}^{p\times n}\),
\(G\in\mathbb{R}^{q\times n}\), and
\(\mathcal{K} \subset \mathbb{R}^{q}\) is a Cartesian product of convex
cones. This is representing using the qics.Model
class, which is
initialized using the following parameters.
Parameter |
Description |
Default |
---|---|---|
|
|
n/a |
|
|
|
|
|
|
|
|
|
|
|
|
|
List of |
|
|
Constant offset term to add to the objective function. |
|
Note
When the parameters G
and h
are not specified when initializing a
qics.Model
, QICS instead solves the simplified conic program
Cones¶
Users define the Cartesian product of cones \(\mathcal{K}\) by defining a
list
of cone classes from the qics.cones
module. We list the
definitions and interfaces to all of the cones QICS currently support below.
Cone |
QICS class |
Description |
---|---|---|
Nonnegative orthant |
\(\{ x \in \mathbb{R}^n : x \geq 0 \}\) |
|
Positive semidefinite |
\(\{ X \in \mathbb{H}^n : X \succeq 0 \}\) |
|
Second order cone |
\(\{(t, x) \in \mathbb{R} \times \mathbb{R}^{n} : t \geq \|x\|_2\}.\) |
Cone |
QICS class |
Description |
---|---|---|
Classical entropy |
\(\text{cl}\{ (t, u, x) \in \mathbb{R} \times \mathbb{R}_{++} \times \mathbb{R}^n_{++} : t \geq -u H(u^{-1} x) \}\) |
|
Classical relative entropy |
\(\text{cl}\{ (t, x, y) \in \mathbb{R} \times \mathbb{R}^n_{++} \times \mathbb{R}^n_{++} : t \geq H(x \| y) \}\) |
Cone |
QICS class |
Description |
---|---|---|
Quantum entropy |
\(\text{cl}\{ (t, u, X) \in \mathbb{R} \times \mathbb{R}_{++} \times \mathbb{H}^n_{++} : t \geq -u S(u^{-1} X) \}\) |
|
Quantum relative entropy |
\(\text{cl}\{ (t, X, Y) \in \mathbb{R} \times \mathbb{H}^n_{++} \times \mathbb{H}^n_{++} : t \geq S(X \| Y) \}\) |
|
Quantum conditional entropy |
\(\text{cl}\{ (t, X) \in \mathbb{R}\times\mathbb{H}^{\Pi_in_i}_{++}: t \geq -S(X) + S(\text{tr}_i(X)) \}\) |
|
Quantum key distribution |
\(\text{cl}\{ (t, X) \in \mathbb{R} \times \mathbb{H}^n_{++} : t \geq -S(\mathcal{G}(X)) + S(\mathcal{Z}(\mathcal{G}(X))) \}\) |
Cone |
QICS class |
Description |
---|---|---|
Operator perspective trace |
\(\text{cl}\{ (t, X, Y) \in \mathbb{R} \times \mathbb{H}^n_{++} \times \mathbb{H}^n_{++} : t \geq \text{tr}[P_g(X, Y)] \}\) |
|
Operator perspective epigraph |
\(\text{cl}\{ (T, X, Y) \in \mathbb{H}^n \times \mathbb{H}^n_{++} \times \mathbb{H}^n_{++} : T \succeq P_g(X, Y) \}\) |
Cone |
QICS class |
Range of \(\alpha\) |
Description |
---|---|---|---|
Renyi entropy |
\([0,1)\) |
\(\text{cl} \{ (t, u, X, Y) \in \mathbb{R} \times \mathbb{R}_{++} \times \mathbb{H}^n_{++} \times \mathbb{H}^n_{++} : t \geq u D_\alpha(u^{-1}X \| u^{-1}Y) \}\) |
|
Sandwiched Renyi entropy |
\([1/2,1)\) |
\(\text{cl} \{ (t, u, X, Y) \in \mathbb{R} \times \mathbb{R}_{++} \times \mathbb{H}^n_{++} \times \mathbb{H}^n_{++} : t \geq u \hat{D}_\alpha(u^{-1}X \| u^{-1}Y) \}\) |
|
Quasi-relative entropy |
\([-1,0]\cup[1,2]\) |
\(\text{cl} \{ (t, X, Y) \in \mathbb{R} \times \mathbb{H}^n_{++} \times \mathbb{H}^n_{++} : t \geq \text{tr}[ X^\alpha Y^{1-\alpha} ] \}\) |
|
\([0,1]\) |
\(\text{cl} \{ (t, X, Y) \in \mathbb{R} \times \mathbb{H}^n_{++} \times \mathbb{H}^n_{++} : t \geq -\text{tr}[ X^\alpha Y^{1-\alpha} ] \}\) |
||
Sandwiched quasi-relative entropy |
\([1,2]\) |
\(\text{cl} \{ (t, X, Y) \in \mathbb{R} \times \mathbb{H}^n_{++} \times \mathbb{H}^n_{++} : t \geq \text{tr}[ ( Y^{\frac{1-\alpha}{2\alpha}} X Y^{\frac{1-\alpha}{2\alpha}} )^\alpha ] \}\) |
|
\([1/2,1]\) |
\(\text{cl} \{ (t, X, Y) \in \mathbb{R} \times \mathbb{H}^n_{++} \times \mathbb{H}^n_{++} : t \geq -\text{tr}[ ( Y^{\frac{1-\alpha}{2\alpha}} X Y^{\frac{1-\alpha}{2\alpha}} )^\alpha ] \}\) |
Solving¶
Input parameters¶
Once a conic program has been defined by a qics.Model
, the problem is
solved using a qics.Solver
class. This can be initialized with the
following settings.
Parameter |
Description |
Default |
---|---|---|
|
|
n/a |
|
Maximum number of solver iterations before terminating. |
|
|
Maximum time elapsed, in seconds, before terminating. |
|
|
Stopping tolerance for (relative) optimality gap. |
|
|
Stopping tolerance for (relative) primal and dual feasibility. |
|
|
Tolerance for detecting infeasible problem. |
|
|
Tolerance for detecting ill-posed problem. |
|
|
Allowable margin for certifying near optimality when solver is stopped early. |
|
|
Verbosity level of the solver, where
|
|
|
Whether to use iterative refinement when solving the KKT system. |
|
|
Whether to use third-order adjustments to improve the stepping directions. |
|
|
|
|
|
Whether to avoid using inverse Hessian product oracles by solving a modified cone program with \(G^{-1}(\mathcal{K})=\{x:Gx\in\mathcal{K}\}\). |
|
Output parameters¶
Once a qics.Solver
has been initialized, the conic program can be
solved with qics.Solver.solve()
. This returns a
dictionary which summarizes the solution of the conic program, and has the
following keys.
Parameter |
Description |
---|---|
|
Optimal primal and dual variables \(x^*\), \(y^*\), \(z^*\), and \(s^*\). |
|
Solution status. Can either be
|
|
Solver exit status. Can either be
|
|
Number of solver iterations. |
|
Total time elapsed by solver (in seconds). |
|
Optimal primal objective \(c^\top x^*\) and dual objective \(-b^\top y^* - h^\top z^*\). |
|
Relative optimality gap. |
|
Relative primal feasibility and dual feasiblity. |