unitaria.Pseudoinverse¶
- class unitaria.Pseudoinverse(A: Node, condition: float, tolerance: float, guaranteed: bool = False)[source]¶
Bases:
ProxyNodeThis node implements the Moore-Penrose pseudoinverse of
Awith the given tolerance, ifconditionis the ratio betweenA.normalizationandAs smallest singular value.Implements Theorem 41 from https://arxiv.org/abs/1806.01838
- Parameters:
A – The node to be inverted
condition – An upper bound on the inverse of nonzero singular values of A. This is the same as the usual definition of the condition of a matrix iff the largest singular value is its normalization, i.e. if the block-encoding has optimal subnormalization.
tolerance – The absolute error tolerance
guaranteed – Determines if the accuracy should be guaranteed using analytical bounds (ignoring numerical errors). If this is set to false, this function will use a heuristic which will result in polynomials of lower degrees while usually still providing the requested precision.