seemps.analysis.factories.mps_heaviside#

seemps.analysis.factories.mps_heaviside(interval: TypeAliasForwardRef('~seemps.analysis.mesh.QuantizedInterval') | tuple[float, float, int], x0: float = 0.0) MPS[source]#

MPS quantization of the Heaviside function \(\Theta(x)\).

Creates an MPS representation of a function

\[\begin{split}\Theta(x) = \left\{\begin{array}{ll} 0, & x < x_0\\ 1, & \mbox{else.} \end{array}\right.\end{split}\]
Parameters:
interval: QuantizedInterval | IntervalTuple

The interval over which the function is defined.

x0float

Position of the step (defaults to 0.0)

Returns:
MPS

The MPS encoding of the function.