positive_semidefinite_rank
¶
Calculates the positive semidefinite rank of a nonnegative matrix.
positive_semidefinite_rank
¶
Compute the positive semidefinite rank (PSD rank) of a nonnegative matrix.
The definition of PSD rank is defined in 1. Finds the PSD rank of an input matrix by checking feasibility for increasing rank.
Parameters:
-
mat(ndarray) –Matrix of interest.
-
max_rank(int, default:10) –The maximum rank to check (default is 10).
Returns:
-
int | None–The positive semidefinite rank if found within
max_rank, orNoneotherwise.
Examples:
As an example (Equation 21 from 2), the PSD rank of the following matrix
is known to be \(\text{rank}_{\text{PSD}}(A) = 2\).
import numpy as np
from toqito.matrix_props import positive_semidefinite_rank
A = 1/2 * np.array([[0, 1, 1], [1, 0, 1], [1, 1, 0]])
print(positive_semidefinite_rank(A))
The PSD rank of the identity matrix is the dimension of the matrix 1.
import numpy as np
from toqito.matrix_props import positive_semidefinite_rank
print(positive_semidefinite_rank(np.identity(3)))
References
1 Fawzi, Hamza and Gouveia, Jo{\~a}o and Parrilo, Pablo and Robinson, Richard and Thomas, Rekha. Positive semidefinite rank. Mathematical Programming. vol. 153. (2015). link.
2 Heinosaari, Teiko and Hillery, Mark. Can a qudit carry more information than a dit?. arXiv preprint arXiv:2406.16566. (2024). link.