picos.expressions.exp_powtrace

Implements PowerTrace.

Classes

class picos.expressions.exp_powtrace.PowerTrace(x, p, m=None, denominator_limit=1000)[source]

Bases: Expression

The trace of the p-th power of a hermitian matrix.

Definition

Let p \in \mathbb{Q}.

  1. If the base expressions is a real scalar x and no additional constant m is given, then this is the power x^p.

  2. If the base expressions is a real scalar x, p \in [0, 1], and a positive scalar constant m is given, then this is the scaled power m x^p.

  3. If the base expression is a hermitian matrix X and no additional constant M is given, then this is the trace of power \operatorname{tr}(X^p).

  4. If the base expression is a hermitian matrix X, p \in [0, 1], and a hermitian positive semidefinite constant matrix M of same shape as X is given, then this is the trace of a scaled power \operatorname{tr}(M X^p).

No other case is supported. In particular, if p \not\in [0, 1], then m/M must be undefined (None).

Warning

  1. For a constraint of the form x^p \leq t with p < 1 and p \neq 0, PICOS enforces x \geq 0 during solution search.

  2. For a constraint of the form \operatorname{tr}(X^p) \leq t or \operatorname{tr}(M X^p) \leq t with p < 1 and p \neq 0, PICOS enforces X \succeq 0 during solution search.

  3. For a constraint of the form \operatorname{tr}(X^p) \leq t or \operatorname{tr}(M X^p) \leq t with p > 1, PICOS enforces t \geq 0 during solution search.

__ge__(other)[source]

Return a constraint that the expression is lower-bounded.

__init__(x, p, m=None, denominator_limit=1000)[source]

Construct a PowerTrace.

Parameters
  • x (AffineExpression) – The scalar or symmetric matrix to form a power of.

  • p (float) – The value for p, which is cast to a limited precision fraction.

  • m (AffineExpression or anything recognized by load_data) – An additional positive semidefinite constant to multiply the power with.

  • denominator_limit (int) – The largest allowed denominator when casting p to a fraction. Higher values can yield a greater precision at reduced performance.

__le__(other)[source]

Return a constraint that the expression is upper-bounded.

__mul__(other)[source]

Denote multiplication with another expression on the right.

__rmul__(other)[source]

Denote multiplication with another expression on the left.

property den

The limited precision fraction denominator of p.

property m

An additional factor to multiply the power with.

property n

Diagonal length of x.

property num

The limited precision fraction numerator of p.

property p

The parameter p.

This is a limited precision version of the parameter used when the expression was constructed.

property x

The matrix concerned.