picos.expressions.exp_sqnorm

Implements SquaredNorm.

Classes

class picos.expressions.exp_sqnorm.SquaredNorm(x)[source]

Bases: QuadraticExpression

A squared Euclidean or Frobenius norm.

This is a lightweight wrapper around QuadraticExpression that can handle common constraint formulations more efficiently.

__add__(other)[source]

Denote addition from the right hand side.

__init__(x)[source]

Create a squared Euclidean or Frobenius norm.

Parameters

x – The (complex) affine expression under the squared norm.

__le__(other)[source]

Return a constraint that the expression is upper-bounded.

__mul__(other)[source]

Denote scaling from the right hand side.

__rmul__(other)[source]

Denote scaling from the left hand side.

__truediv__(other)[source]

Denote division by a constant scalar.

property argdim

Number of nonzero elements of the expression under the norm.

property fullroot[source]

Affine expression whose squared norm equals the expression.

Overrides fullroot of QuadraticExpression.

property is0

Whether the expression is zero.

Overrides is0 of QuadraticExpression.

property is_squared_norm

Always True for squared norm instances.

Overrides is_squared_norm of QuadraticExpression.