PICOS for Quantum Information Science

PICOS was among the first convex optimization interfaces to natively support Hermitian semidefinite programming and subsystem manipulation operations such as the partial trace and partial transpose, which were implemented with feedback from the QIS community. This note outlines the features most relevant for the field and links to examples.

Cheat sheet

Complex expression manipulation

on paper

in picos

A \in \mathbb{C}^{m \times n}

A = pc.ComplexVariable("A", (m, n))

A = B + iC

A = B + 1j*C

\overline{A}

A.conj

A^\dagger

A.H

\Re(A)

A.real

\Im(A)

A.imag

\frac{1}{2} \left( A + A^\dagger \right)

A.opreal / A.hermitianized

\frac{1}{2i} \left( A - A^\dagger \right)

A.opimag

\langle \phi \vert \psi \rangle

phi.H * psi / (phi | psi)

\rvert \phi \rangle \langle \psi \lvert

phi * psi.H

Hermitian semidefinite programming

on paper

in picos

\rho \in \mathbb{S}^n

rho = pc.HermitianVariable("ρ", n)

\rho \succeq 0

rho >> 0

\rho \succeq I

rho >> 1 / rho >> pc.I(n)

\operatorname{Tr}(\rho) = 1

rho.tr == 1

\begin{bmatrix}A & B \\ C & D\end{bmatrix} \succeq 0

pc.block([[A, B], [C, D]]) >> 0

Schatten norms

on paper

in picos

note / aka

{\lVert A \rVert}_1 = \operatorname{Tr}\left( \sqrt{A^\dagger A} \right)

pc.NuclearNorm(A)

trace norm

{\lVert A \rVert}_\infty = \sqrt{\lambda_{\max}(A^\dagger A)}

pc.SpectralNorm(A)

\lambda_{\max}(A) for A \in \mathbb{H}^n

Subsystem manipulation (partial trace, partial transpose, realignment)

on paper

in picos

note / docs

A = B \otimes C

A = B @ C

A_1 \otimes \cdots \otimes \operatorname{Tr}(A_i) \otimes \cdots \otimes A_n

A.partial_trace([i-1], shapes)

partial_trace

A_1 \otimes \cdots \otimes A_i^T \otimes \cdots \otimes A_n

A.partial_tranpose([i-1], shapes)

partial_transpose

A_{ij\;\mapsto\;ji} = A^T

A.reshuffled("ji")

reshuffled

A_{ijkl\;\mapsto\;kjil} = \operatorname{T}_1(A)

A.reshuffled("kjil")

reshuffled

\operatorname{Tr}_1(A),\;\ldots{},\;\operatorname{Tr}_4(A),\;\operatorname{Tr}_\text{last}(A)

A.tr0, …, A.tr3, A.trl

A \in \mathbb{H}^2 \otimes \cdots \otimes \mathbb{H}^2

\operatorname{T}_1(A),\;\ldots{},\;\operatorname{T}_4(A),\;\operatorname{T}_\text{last}(A)

A.T0, …, A.T3, A.Tl

A \in \mathbb{H}^2 \otimes \cdots \otimes \mathbb{H}^2

(\operatorname{Tr}_i and \operatorname{T}_i denote the partial trace and transpose of the i-th 2 \times 2 subsystem, counted from zero)

Hermitian semidefinite programming

PICOS makes use of the following identity to allow standard solvers to deal with hermitian LMIs:

A \succeq 0
\qquad
\Longleftrightarrow
\qquad
\begin{bmatrix}
  \Re(A) & \Im(A) \\
  -\Im(A) & \Re(A)
\end{bmatrix} \succeq 0

Hermitian variables are vectorized such that \rho \in \mathbb{S}^n is passed to solvers via n^2 real scalar variables. Alternatively, the QICS solver is able to directly handle hermitian variables.

Quantum relative entropy programming

As of version 2.5.0, PICOS supports solving quantum relative entropy programs with the solver QICS. A list of new expressions supported by PICOS and QICS is summarized below.

Quantum entropies and non-commutative perspectives

on paper                                                

in picos

docs

S(X) = -\operatorname{Tr}(X\log(X))

pc.quantentr(X)

QuantumEntropy

S(X \| Y) = \operatorname{Tr}(X\log(X) - X\log(Y))

pc.quantrelentr(X, Y)

NegativeQuantumEntropy

S(X) - S(\operatorname{Tr}_i(X))

pc.quantcondentr(X, [i-1], shapes)

QuantumConditionalEntropy

S(\mathcal{G}(X) \| \mathcal{Z}(\mathcal{G}(X)))

pc.quantkeydist(X, [i-1], shapes, K_list)

QuantumKeyDistribution

P_{\log}(X, Y) = X^{1/2} \log(X^{1/2} Y^{-1} X^{1/2}) X^{1/2}

pc.oprelentr(X, Y)

OperatorRelativeEntropy

X\,\#_t\,Y = X^{1/2} (X^{1/2} Y^{-1} X^{1/2})^t X^{1/2}

pc.mtxgeomean(X, Y, t)

MatrixGeometricMean

\Psi_{\alpha}(X, Y) = \operatorname{Tr}[ X^\alpha Y^{1-\alpha} ]

pc.quasientr(X, Y)

QuasiEntropy

\hat{\Psi}_{\alpha}(X, Y) = \operatorname{Tr}[ (Y^\frac{1-\alpha}{2\alpha} X Y^\frac{1-\alpha}{2\alpha} )^\alpha ]

pc.sandquasientr(X, Y)

SandQuasiEntropy

D_\alpha(X \| Y) = \frac{1}{\alpha - 1} \log(\Psi_\alpha(X, Y))

pc.renyientr(X, Y)

RenyiEntropy

\hat{D}_\alpha(X \| Y) = \frac{1}{\alpha - 1} \log(\hat{\Psi}_\alpha(X, Y))

pc.sandrenyientr(X, Y)

SandRenyiEntropy

Some examples for how to solve quantum relative entropy programs using PICOS can be found here. Note that these functions are supported for both real symmetric and complex hermitian matrices X and Y.

Course material

Jupyter notebooks for a hands-on workshop on practical semidefinite programming aimed at quantum information students are available on GitLab. The fourth notebook is based on [2], which also comes with Python/PICOS notebooks.

Recent articles

The following are peer-reviewed articles relating to quantum information that cite PICOS and were published within the last four years (last update: October 2024).

  • Vikesh Siddhu and John Smolin.

    Maximum expectation of observables with restricted purity states.

    Quantum 8, 2024. [pdf] [doi] [arXiv]

  • Aby Philip, Soorya Rethinasamy,Vincent Russo, and M. Wilde.

    Schrödinger as a quantum programmer: estimating entanglement via steering.

    Quantum 8, 2024. [pdf] [doi] [arXiv]

  • Piotr Mironowicz.

    Semi-definite programming and quantum information.

    Journal of Physics A: Mathematical and Theoretical 57, 2024. [pdf] [doi] [arXiv]

  • Yu Shi and Edo Waks.

    Error metric for non-trace-preserving quantum operations.

    Physical Review A 108, 2023. [pdf] [doi] [arXiv]

  • Vincent Russo and Jamie Sikora.

    Inner products of pure states and their antidistinguishability.

    Physical Review A 107, 2023. [pdf] [doi] [arXiv] [code]

  • Armin Tavakoli, Alejandro Pozas-Kerstjens, Ming-Xing Luo, and Marc-Olivier Renou.

    Bell nonlocality in networks.

    Reports on Progress in Physics 85, 2022. [pdf] [doi] [arXiv]

  • Feng-Jui Chan et al.

    Maxwell’s two-demon engine under pure dephasing noise.

    Physical Review A 106, 2022. [pdf] [doi] [arXiv]

  • Viktor Nordgren et al.

    Certifying emergent genuine multipartite entanglement with a partially blind witness.

    Physical Review A 106, 2022. [pdf] [doi] [arXiv]

  • Vikesh Siddhu and Sridhar Tayur.

    Five starter pieces: quantum information science via semidefinite programs.

    Tutorials in Operations Research, 2022. [pdf] [doi] [arXiv]

  • Ulysse Chabaud, Pierre-Emmanuel Emeriau, and Frédéric Grosshans.

    Witnessing Wigner negativity.

    Quantum 5, 2021. [pdf] [doi] [arXiv] [code]

Ncpol2sdpa

Ncpol2sdpa [1] exposes SDP relaxations of (non-commutative) polynomial optimization problems as PICOS problem instances, see here.

References

  1. Peter Wittek. Algorithm 950: Ncpol2sdpa—sparse semidefinite programming relaxations for polynomial optimization problems of noncommuting Variables. ACM Transactions on Mathematical Software, 41(3), 21, 2015. DOI: 10.1145/2699464. arXiv: 1308.6029.

  2. Vikesh Siddhu and Sridhar Tayur. Five starter pieces: quantum information science via semi-definite programs. Tutorials in Operations Research, 2022. DOI: 10.1287/educ.2022.0243. arXiv: 2112.08276.