qml.math.svd

svd(tensor, like=None, **kwargs)[source]

Compute the singular value decomposition of a tensor in each interface.

The singular value decomposition for a matrix \(A\) consist of three matrices \(S\), \(U\) and \(V_h\), such that:

\[A = U \cdot Diag(S) \cdot V_h\]
Parameters
  • tensor (tensor_like) – input tensor

  • compute_uv (bool) – if True, the full decomposition is returned

Returns

full decomposition if compute_uv is True or None, or only the singular values if compute_uv is False

Return type

\(S\), \(U\) and \(V_h\) or \(S\)

Contents

Using PennyLane

Release news

Development

API

Internals