File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -57,13 +57,11 @@ Projector algorithm implementing projectors from SVDing the full 4x4 CTMRG envir
5757end
5858
5959# TODO : add `LinearAlgebra.cond` to TensorKit
60- # Compute condition number σ_max / σ_min for diagonal singular value TensorMap
60+ # Compute condition number smax / smin for diagonal singular value TensorMap
6161function _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
62+ smax = maximum(first, last.(values(blocks(S))))
63+ smin = minimum(last, last.(values(blocks(S))))
64+ return smax / smin
6765end
6866@non_differentiable _condition_number(S:: AbstractTensorMap )
6967
You can’t perform that action at this time.
0 commit comments