Validate Operators

validate_operator is a module allowing one to check properties of operators or matrices.

is_square_matrix(matrix) Checks if a matrix is square.
is_symmetric_matrix(matrix, rtol, atol) Checks if a square matrix A is symmetric, \(A = A ^T\), where \(^T\) denotes transpose.
is_identity_matrix(matrix, rtol, atol) Checks if a square matrix is the identity matrix.
is_idempotent_matrix(matrix, rtol, atol) Checks if a square matrix A is idempotent, \(A^2 = A\).
is_normal_matrix(matrix, rtol, atol) Checks if a square matrix A is normal, \(A^\dagger A = A A^\dagger\), where \(^\dagger\) denotes conjugate transpose.
is_hermitian_matrix(matrix, rtol, atol) Checks if a square matrix A is Hermitian, \(A = A^\dagger\), where \(^\dagger\) denotes conjugate transpose.
is_unitary_matrix(matrix, rtol, atol) Checks if a square matrix A is unitary, \(A^\dagger A = A A^\dagger = Id\), where \(^\dagger\) denotes conjugate transpose and Id denotes the identity.
is_positive_definite_matrix(matrix, rtol, atol) Checks if a square Hermitian matrix A is positive definite, \(eig(A) > 0\).
is_positive_semidefinite_matrix(matrix, …) Checks if a square Hermitian matrix A is positive semi-definite \(eig(A) \geq 0\).