From cb44f99895ab9b60d920e28e3902e0c9909c8ea8 Mon Sep 17 00:00:00 2001 From: lkdvos Date: Thu, 30 May 2024 14:27:50 +0200 Subject: [PATCH 1/4] Actually fix degenerate singular value check --- src/algorithms/ctmrg.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/ctmrg.jl b/src/algorithms/ctmrg.jl index 0bc9b714..d4a1de53 100644 --- a/src/algorithms/ctmrg.jl +++ b/src/algorithms/ctmrg.jl @@ -336,7 +336,7 @@ function left_move(state, env::CTMRGEnv{C,T}, alg::CTMRG) where {C,T} # Compute SVD truncation error and check for degenerate singular values ignore_derivatives() do if alg.verbosity > 0 && is_degenerate_spectrum(S) - svals = SectorDict{sectortype(S)}(c => diag(b) for (c, b) in blocks(S)) + svals = TensorKit.SectorDict{sectortype(S)}(c => diag(b) for (c, b) in blocks(S)) @warn("degenerate singular values detected: ", svals) end end From 1cdf82f733c2cf1f5a26f7e644259febe4b0e5aa Mon Sep 17 00:00:00 2001 From: lkdvos Date: Thu, 30 May 2024 14:36:14 +0200 Subject: [PATCH 2/4] Fix attempt III --- src/algorithms/ctmrg.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/algorithms/ctmrg.jl b/src/algorithms/ctmrg.jl index d4a1de53..8e368eaa 100644 --- a/src/algorithms/ctmrg.jl +++ b/src/algorithms/ctmrg.jl @@ -336,7 +336,9 @@ function left_move(state, env::CTMRGEnv{C,T}, alg::CTMRG) where {C,T} # Compute SVD truncation error and check for degenerate singular values ignore_derivatives() do if alg.verbosity > 0 && is_degenerate_spectrum(S) - svals = TensorKit.SectorDict{sectortype(S)}(c => diag(b) for (c, b) in blocks(S)) + svals = TensorKit.SectorDict{sectortype(S)}( + (c => diag(b) for (c, b) in blocks(S))... + ) @warn("degenerate singular values detected: ", svals) end end From f7987d0ac1fa2ee4e3838baeee61a73ace705b28 Mon Sep 17 00:00:00 2001 From: lkdvos Date: Thu, 30 May 2024 14:47:30 +0200 Subject: [PATCH 3/4] attempt IV --- src/algorithms/ctmrg.jl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/algorithms/ctmrg.jl b/src/algorithms/ctmrg.jl index 8e368eaa..e10f7bd5 100644 --- a/src/algorithms/ctmrg.jl +++ b/src/algorithms/ctmrg.jl @@ -336,9 +336,7 @@ function left_move(state, env::CTMRGEnv{C,T}, alg::CTMRG) where {C,T} # Compute SVD truncation error and check for degenerate singular values ignore_derivatives() do if alg.verbosity > 0 && is_degenerate_spectrum(S) - svals = TensorKit.SectorDict{sectortype(S)}( - (c => diag(b) for (c, b) in blocks(S))... - ) + svals = TensorKit.SectorDict(c => diag(b) for (c, b) in blocks(S)) @warn("degenerate singular values detected: ", svals) end end From e72444d3db98dea5eaf78df21a2616301ee55588 Mon Sep 17 00:00:00 2001 From: lkdvos Date: Thu, 30 May 2024 15:01:48 +0200 Subject: [PATCH 4/4] Add empty tensor check infinitepeps constructor --- src/states/infinitepeps.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/states/infinitepeps.jl b/src/states/infinitepeps.jl index b0636137..168c0e35 100644 --- a/src/states/infinitepeps.jl +++ b/src/states/infinitepeps.jl @@ -13,6 +13,7 @@ struct InfinitePEPS{T<:PEPSTensor} <: AbstractPEPS ) space(A[d, w], 3) == space(A[d, _next(w, end)], 5)' || throw(SpaceMismatch("East virtual space at site $((d, w)) does not match.")) + dim(space(A[d, w])) > 0 || @warn "no fusion channels at site ($d, $w)" end return new{T}(A) end