File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,17 @@ LinearAlgebra.svdvals!(t::AbstractTensorMap) = diagview(svd_vals!(t))
6161# --------------------------------------------------#
6262# Checks for hermiticity and positive definiteness #
6363# --------------------------------------------------#
64- function LinearAlgebra. ishermitian (t:: AbstractTensorMap )
65- domain (t) == codomain (t) || return false
66- InnerProductStyle (t) === EuclideanInnerProduct () || return false # hermiticity only defined for euclidean
67- for (c, b) in blocks (t)
68- ishermitian (b) || return false
69- end
70- return true
64+ function MAK. ishermitian (t:: AbstractTensorMap ; kwargs... )
65+ return InnerProductStyle (t) === EuclideanInnerProduct () &&
66+ domain (t) == codomain (t) &&
67+ all (cb -> MatrixAlgebraKit. ishermitian (cb[2 ]; kwargs... ), blocks (t))
68+ end
69+ function MAK. isantihermitian (t:: AbstractTensorMap ; kwargs... )
70+ return InnerProductStyle (t) === EuclideanInnerProduct () &&
71+ domain (t) == codomain (t) &&
72+ all (cb -> MatrixAlgebraKit. isantihermitian (cb[2 ]; kwargs... ), blocks (t))
7173end
74+ LinearAlgebra. ishermitian (t:: AbstractTensorMap ) = MAK. ishermitian (t)
7275
7376function LinearAlgebra. isposdef (t:: AbstractTensorMap )
7477 return isposdef! (copy_oftype (t, factorisation_scalartype (isposdef, t)))
You can’t perform that action at this time.
0 commit comments