unitaria.Scale

class unitaria.Scale(A: Node, scale: float = 1, remove_efficiency: None | float = None, absolute: bool = False)[source]

Bases: Node

Node representing the product of a scalar and another node

Parameters:
  • A – The node to scale.

  • scale – The scalar factor (default: 1).

  • remove_efficiency – If not None, must be a number larger or equal to 1. Increases the normalization of the encoding, while keeping the encoded matrix the same.

  • absolute – If True, A is divided by its normalization first (default: False).

Raises:

AssertionError – If remove_efficiency is a float smaller than 1.