Implements SquaredNorm.


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

Bases: picos.expressions.exp_quadratic.QuadraticExpression

A squared Euclidean or Frobenius norm.

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


Create a squared Euclidean or Frobenius norm.


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

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.