support_projection
¶
Constructs the orthogonal projector onto the support of a PSD matrix.
support_projection
¶
Return the orthogonal projector onto the support of a PSD matrix.
The support is the span of the eigenvectors whose eigenvalues exceed tol.
If no eigenvalue exceeds tol (for instance, the zero matrix), the zero
projector is returned.
Parameters:
-
mat(ndarray) –A positive semidefinite matrix.
-
tol(float, default:1e-12) –Eigenvalues at or below this threshold are treated as zero.
Returns:
-
ndarray–The orthogonal projector onto the support of
mat.
Examples:
The support projector of a rank-one PSD matrix is the projector onto its range:
import numpy as np
from toqito.matrix_ops import support_projection
mat = np.array([[2.0, 0.0], [0.0, 0.0]])
print(support_projection(mat))