We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 534e6f9 commit ea46eb2Copy full SHA for ea46eb2
1 file changed
src/algorithms/ctmrg/projectors.jl
@@ -57,13 +57,11 @@ Projector algorithm implementing projectors from SVDing the full 4x4 CTMRG envir
57
end
58
59
# TODO: add `LinearAlgebra.cond` to TensorKit
60
-# Compute condition number σ_max / σ_min for diagonal singular value TensorMap
+# Compute condition number smax / smin for diagonal singular value TensorMap
61
function _condition_number(S::AbstractTensorMap)
62
- # Take maximal condition number over all blocks
63
- return maximum(blocks(S)) do (_, b)
64
- b_diag = diag(b)
65
- return maximum(b_diag) / minimum(b_diag)
66
- end
+ smax = maximum(first, last.(values(blocks(S))))
+ smin = minimum(last, last.(values(blocks(S))))
+ return smax / smin
67
68
@non_differentiable _condition_number(S::AbstractTensorMap)
69
0 commit comments