# 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 -th power of a hermitian matrix.

Definition

Let .

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

2. If the base expressions is a real scalar , , and a positive scalar constant is given, then this is the scaled power .

3. If the base expression is a hermitian matrix and no additional constant is given, then this is the trace of power .

4. If the base expression is a hermitian matrix , , and a hermitian positive semidefinite constant matrix of same shape as is given, then this is the trace of a scaled power .

No other case is supported. In particular, if , then / must be undefined (None).

Warning

1. For a constraint of the form with and , PICOS enforces during solution search.

2. For a constraint of the form or with and , PICOS enforces during solution search.

3. For a constraint of the form or with , PICOS enforces 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 , 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 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 .

property m

An additional factor to multiply the power with.

property n

Diagonal length of x.

property num

The limited precision fraction numerator of .

property p

The parameter .

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

property x

The matrix concerned.