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
isTrue
orNone
, or only the singular values ifcompute_uv
isFalse
- Return type
\(S\), \(U\) and \(V_h\) or \(S\)
code/api/pennylane.math.svd
Download Python script
Download Notebook
View on GitHub