Warning

This part of the documentation has not been touched for a while. It might be incomplete, reference deprecated functions or make a claim that does not apply to the latest version of PICOS any more. On the bright side, code listings are validated and still work. Watch your step!

Cheat Sheet

Manipulate expressions

Operator

Interpretation

+

addition

+=

inplace addition

-

substraction

*

multiplication

^

Hadamard (elementwise) product

@

Kronecker product

|

scalar product

/

division

**

exponentiation

abs()

Euclidean (or Frobenius) norm

[]

slicing

&

horizontal concatenation

//

vertical concatenation

.T

transposition

.H

Hermitian transposition

.Tx

partial transposition

.conj

complex conjugate

.real

real part

.imag

imaginary part

Create constraints

Operator

Interpretation

< or <=

less or equal

> or >=

larger or equal

==

equal

<<

Löwner ordering \preceq, or set membership \in

>>

Löwner ordering \succeq, or set membership \ni

Create affine expressions

function

short doc

sum

sums a list of affine expressions

diag

diagonal matrix defined by its diagonal

diag_vect

vector of diagonal elements of a matrix

new_param

constant affine expression

trace

trace of a square affine expression

partial_transpose

partial transposition

partial_trace

partial trace

Create convex expressions

function

short doc

geomean

geometric mean

norm

(generalized) L_p- norm

tracepow

trace of a p-th matrix power

detrootn

n-th root of determinant

sum_k_largest

sum of k largest elements

sum_k_smallest

sum of k smallest elements

sum_k_largest_lambda

sum of k largest eigenvalues

sum_k_smallest_lambda

sum of k smallest eigenvalues

lambda_max

largest eigenvalue

lambda_min

smallest eigenvalue

Create sets

function

short doc

ball(r,p)

a L_p- ball of radius r

simplex(a)

a standard simplex \{x\geq 0: \Vert x \Vert_1 \leq a \}

truncated_simplex(a)

a set of the form \{ 0\leq x\leq 1: \Vert x \Vert_1 \leq a\}, or \{x: \Vert x \Vert_\infty \leq 1; \Vert x \Vert_1 \leq a\}

Get information on a problem

function

short doc

get_variable(name)

gets the variable object name

get_valued_variable(name)

gets the value of the variable name

check_current_value_feasibility()

are the current variable value feasible?

obj_value()

objective for the current variable values

.type

returns problem’s type

Miscellaneous

function

short doc

available_solvers()

lists installed solvers

import_cbf()

imports data from a .cbf file

write_to_file()

writes problem to a file