Open
Conversation
| gradalg = LBFGS(10; verbosity = 0, gradtol = 6.0e-7, maxiter = 40000), | ||
| finalize = (finalize!), | ||
| ) | ||
| return new(T, T, gradalg, finalize) |
Owner
There was a problem hiding this comment.
If S is a three-leg tensor, why is it instantiated as a four-leg one?
| end | ||
|
|
||
| function cost_looptnr(S, T) | ||
| function to_const_TT(T) |
Owner
There was a problem hiding this comment.
What does this function do?
|
Your PR requires formatting changes to meet the project's style guidelines. Click here to view the suggested changes.diff --git a/src/schemes/symmetric_looptnr.jl b/src/schemes/symmetric_looptnr.jl
index 9b4d9bb..1948dea 100644
--- a/src/schemes/symmetric_looptnr.jl
+++ b/src/schemes/symmetric_looptnr.jl
@@ -28,10 +28,10 @@ mutable struct SLoopTNR <: TNRScheme
gradalg::OptimKit.LBFGS
finalize!::Function
function SLoopTNR(
- T::TensorMap;
- gradalg = LBFGS(10; verbosity = 0, gradtol = 6.0e-7, maxiter = 40000),
- finalize = (finalize!),
- )
+ T::TensorMap;
+ gradalg = LBFGS(10; verbosity = 0, gradtol = 6.0e-7, maxiter = 40000),
+ finalize = (finalize!),
+ )
return new(T, T, gradalg, finalize)
end
end
@@ -43,8 +43,8 @@ function classical_ising_inv(β)
S = ℤ₂Space(0 => 1, 1 => 1)
T = zeros(Float64, S ⊗ S ← S' ⊗ S')
- block(T, Irrep[ℤ₂](0)) .= [2x^2 2x*y; 2x*y 2y^2]
- block(T, Irrep[ℤ₂](1)) .= [2x*y 2x*y; 2x*y 2x*y]
+ block(T, Irrep[ℤ₂](0)) .= [2x^2 2x * y; 2x * y 2y^2]
+ block(T, Irrep[ℤ₂](1)) .= [2x * y 2x * y; 2x * y 2x * y]
return permute(T, (1, 2, 3, 4))
end
@@ -171,7 +171,7 @@ function ef_oneloop(T, trunc::TensorKit.TruncationScheme)
ΨA = Ψ_center(T)
ΨB = []
- for i = 1:4
+ for i in 1:4
s1, s2 = SVD12(ΨA[i], truncdim(trunc.dim * 2))
push!(ΨB, s1)
push!(ΨB, s2)
@@ -188,8 +188,8 @@ function ef_oneloop(T, trunc::TensorKit.TruncationScheme)
)
ΨB_disentangled = []
- for i = 1:1
- @tensor B1[-2 -1; -3] := ΨB[i][-1; -2 2] * PR_list[mod(i, 8)+1][2; -3]
+ for i in 1:1
+ @tensor B1[-2 -1; -3] := ΨB[i][-1; -2 2] * PR_list[mod(i, 8) + 1][2; -3]
push!(ΨB_disentangled, B1)
end
S = ΨB_disentangled[1]
@@ -218,14 +218,14 @@ function step!(scheme, trunc, oneloop; ef_trunc = truncbelow(1.0e-14))
end
function run!(
- scheme::SLoopTNR,
- trscheme::TensorKit.TruncationScheme,
- criterion::TNRKit.stopcrit;
- finalize_beginning = true,
- oneloop = true,
- verbosity = 1,
- ef_trunc = truncbelow(1.0e-14),
-)
+ scheme::SLoopTNR,
+ trscheme::TensorKit.TruncationScheme,
+ criterion::TNRKit.stopcrit;
+ finalize_beginning = true,
+ oneloop = true,
+ verbosity = 1,
+ ef_trunc = truncbelow(1.0e-14),
+ )
data = []
LoggingExtras.withlevel(; verbosity) do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Save the three leg tensor S as well to access interesting information