Skip to content

fixedpoint improvements#337

Open
pbrehmer wants to merge 9 commits intomasterfrom
pb-fixedpoint-improvements
Open

fixedpoint improvements#337
pbrehmer wants to merge 9 commits intomasterfrom
pb-fixedpoint-improvements

Conversation

@pbrehmer
Copy link
Collaborator

As suggested by @leburgel in #336, here we improve a couple of things about the fixedpoint optimization routine:

  • We add a check_input(::typeof(fixedpoint), args...) method that verifies that the chosen inputs are compatible with the PEPS optimization algorithm
  • For any boundary contraction algorithm, its leading_boundary call should return an info named tuple which contains a contraction_metrics field that carries boundary-algorithm-specific information such as the truncation error, condition number, etc.
  • I added a boundary algorithm type parameter to PEPSOptimize and also loosened type restrictions of fixedpoint such that it is compatible with different environment types.

I'm not so sure yet about the name contraction_metrics, so let me know what you think. After the first round of reviews I will update the examples such that they match the new fixedpoint.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2026

Your PR no longer requires formatting changes. Thank you for your contribution!

@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/algorithms/ctmrg/c4v.jl 90.29% <100.00%> (+0.19%) ⬆️
src/algorithms/ctmrg/ctmrg.jl 90.27% <100.00%> (ø)
src/algorithms/ctmrg/sequential.jl 100.00% <100.00%> (ø)
src/algorithms/ctmrg/simultaneous.jl 100.00% <100.00%> (ø)
src/algorithms/optimization/peps_optimization.jl 98.66% <100.00%> (+0.01%) ⬆️
src/algorithms/select_algorithm.jl 78.57% <100.00%> (+2.57%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@leburgel leburgel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, I'm happy losing any restrictions on the contraction algorithm where possible. I don't know if contraction_metrics is the best name and whether this change will break things for many users, but I can't think of a better name and it shouldn't be too big of a change I guess.

Aside from the minor comments, can you update the changelog to record the fact that the truncation_error and condition_number have moved to a different place? We've been forgetting about that a bit, but I think this should definitely go in there at least.

Iterators.product([Float64, ComplexF64], [:c4v_eigh, :c4v_qr])
# initialize symmetric states
Random.seed!(123)
Random.seed!(23023952)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this giving trouble for some scalartype/projector alg combinations? Which ones?

Copy link
Collaborator Author

@pbrehmer pbrehmer Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Random.seed!(123) seed was leading to a lot of Arnoldi failures for the :eigsolver gradient algorithm so that for most LBFGS iteration it had to fall back to the linear solver. However, this led to a non-converging linear problem at some iteration which made the gradient blow up with NaNs showing up. This was for T=Float64 and projector_alg=:c4v_eigh.

Upon further testing with different seeds I found that :eigsolver gradient mode can actually run into more serious problems. With Random.seed!(12345) I get the following error for T=ComplexF64 and projector_alg=:c4v_eigh:

Details

[ Info: CTMRG init:     obj = +2.968157278708e-02       err = 1.0000e+00
[ Info: CTMRG conv 94:  obj = +3.116255128777e-01       err = 9.2671287293e-09  time = 0.26 sec
[ Info: LBFGS: initializing with f = -5.077375000812e-01, ‖∇f‖ = 3.0570e-01
[ Info: LBFGS: iter    1, Δt 132.2 ms: f = -5.091739052973e-01, ‖∇f‖ = 2.2195e-01, α = 1.00e+00, m = 0, nfg = 1
C4v AD optimization with scalartype T=ComplexF64 and projector_alg=c4v_eigh: Error During Test at /home/paul/repos/PEPSKit.jl/test/examples/heisenberg.jl:53
  Got exception outside of a @test
  MethodError: Cannot `convert` an object of type 
    InnerProductVec{typeof(KrylovKit._realinner),Tuple{CTMRGEnv{DiagonalTensorMap{ComplexF64,ComplexSpace,Array{ComplexF64,1}},TensorMap{Complex{Float64},ComplexSpace,3,1,Array{Complex{Float64},1}}},Complex{Float64}}} to an object of type 
    InnerProductVec{typeof(KrylovKit._realinner),Tuple{CTMRGEnv{DiagonalTensorMap{Float64,ComplexSpace,Array{Float64,1}},TensorMap{Complex{Float64},ComplexSpace,3,1,Array{Complex{Float64},1}}},Complex{Float64}}}
  The function `convert` exists, but no method is defined for this combination of argument types.
  
  Closest candidates are:
    (::Type{InnerProductVec{F, T}} where {F, T})(::Any, ::Any)
     @ KrylovKit ~/.julia/packages/KrylovKit/ZcdRg/src/innerproductvec.jl:19
    convert(::Type{T}, ::T) where T
     @ Base Base_compiler.jl:133
  
  Stacktrace:
    [1] setindex!
      @ ./array.jl:985 [inlined]
    [2] setindex!(b::KrylovKit.OrthonormalBasis{InnerProductVec{typeof(KrylovKit._realinner), Tuple{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, ComplexF64}}}, i::InnerProductVec{typeof(KrylovKit._realinner), Tuple{CTMRGEnv{DiagonalTensorMap{ComplexF64, ComplexSpace, Vector{ComplexF64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, ComplexF64}}, q::Int64)
      @ KrylovKit ~/.julia/packages/KrylovKit/ZcdRg/src/orthonormal.jl:42
    [3] basistransform!(b::KrylovKit.OrthonormalBasis{InnerProductVec{typeof(KrylovKit._realinner), Tuple{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, ComplexF64}}}, U::SubArray{Float64, 2, Matrix{Float64}, Tuple{UnitRange{Int64}, UnitRange{Int64}}, false})
      @ KrylovKit ~/.julia/packages/KrylovKit/ZcdRg/src/orthonormal.jl:317
    [4] _schursolve(A::Function, x₀::InnerProductVec{typeof(KrylovKit._realinner), Tuple{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, ComplexF64}}, howmany::Int64, which::Symbol, alg::Arnoldi{ModifiedGramSchmidt2, Float64})
      @ KrylovKit ~/.julia/packages/KrylovKit/ZcdRg/src/eigsolve/arnoldi.jl:444
    [5] realeigsolve(A::Function, x₀::Tuple{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, ComplexF64}, howmany::Int64, which::Symbol, alg::Arnoldi{ModifiedGramSchmidt2, Float64}; alg_rrule::Arnoldi{ModifiedGramSchmidt2, Float64})
      @ KrylovKit ~/.julia/packages/KrylovKit/ZcdRg/src/eigsolve/arnoldi.jl:294
    [6] realeigsolve(A::Function, x₀::Tuple{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, ComplexF64}, howmany::Int64, which::Symbol, alg::Arnoldi{ModifiedGramSchmidt2, Float64})
      @ KrylovKit ~/.julia/packages/KrylovKit/ZcdRg/src/eigsolve/arnoldi.jl:293
    [7] fpgrad(∂F∂x::CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, ∂f∂x::PEPSKit.var"#∂f∂x#_rrule##6"{Zygote.var"#ad_pullback#60"{Tuple{PEPSKit.var"#f#_rrule##4", InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Zygote.Pullback{Tuple{PEPSKit.var"#f#_rrule##4", InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Any}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, ∂f∂A::PEPSKit.var"#∂f∂A#_rrule##5"{InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, Zygote.var"#ad_pullback#60"{Tuple{PEPSKit.var"#f#_rrule##4", InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Zygote.Pullback{Tuple{PEPSKit.var"#f#_rrule##4", InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Any}}}, x₀::CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, alg::EigSolver{:fixed})
      @ PEPSKit ~/repos/PEPSKit.jl/src/algorithms/optimization/fixed_point_differentiation.jl:478
    [8] leading_boundary_fixed_pullback
      @ ~/repos/PEPSKit.jl/src/algorithms/optimization/fixed_point_differentiation.jl:312 [inlined]
    [9] #85
      @ ~/repos/PEPSKit.jl/src/utility/hook_pullback.jl:34 [inlined]
   [10] ZBack
      @ ~/.julia/packages/Zygote/55SqB/src/compiler/chainrules.jl:222 [inlined]
   [11] (::Zygote.var"#kw_zpullback#chain_rrule_kw##0"{PEPSKit.var"#85#86"{PEPSKit.var"#leading_boundary_fixed_pullback#_rrule##7"{EigSolver{:fixed}, PEPSKit.var"#∂f∂x#_rrule##6"{Zygote.var"#ad_pullback#60"{Tuple{PEPSKit.var"#f#_rrule##4", InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Zygote.Pullback{Tuple{PEPSKit.var"#f#_rrule##4", InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Any}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, PEPSKit.var"#∂f∂A#_rrule##5"{InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, Zygote.var"#ad_pullback#60"{Tuple{PEPSKit.var"#f#_rrule##4", InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Zygote.Pullback{Tuple{PEPSKit.var"#f#_rrule##4", InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Any}}}}}})(dy::Tuple{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, Nothing})
      @ Zygote ~/.julia/packages/Zygote/55SqB/src/compiler/chainrules.jl:248
   [12] (::Zygote.Pullback{Tuple{PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}}, Tuple{Zygote.var"#389#390"{Zygote.var"#back#back##9"{:alg, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}}}, Zygote.var"#248#249"{typeof(identity)}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:operator, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}}}, Zygote.Pullback{Tuple{typeof(Core._typeof_captured_variable), CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Any}, Zygote.var"#back#_pullback##1"{Zygote.var"#259#260"{Zygote.var"#back#back##0"{2, 2, Zygote.Context{false}, @NamedTuple{contraction_metrics::@NamedTuple{truncation_error::Float64, condition_number::Float64}, D::DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, V::TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}, D_full::DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, V_full::TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}, truncation_indices::TensorKit.SortedVectorDict{Trivial, Vector{Int64}}}}}}, Zygote.var"#kw_zpullback#chain_rrule_kw##0"{PEPSKit.var"#85#86"{PEPSKit.var"#leading_boundary_fixed_pullback#_rrule##7"{EigSolver{:fixed}, PEPSKit.var"#∂f∂x#_rrule##6"{Zygote.var"#ad_pullback#60"{Tuple{PEPSKit.var"#f#_rrule##4", InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Zygote.Pullback{Tuple{PEPSKit.var"#f#_rrule##4", InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Any}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, PEPSKit.var"#∂f∂A#_rrule##5"{InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, Zygote.var"#ad_pullback#60"{Tuple{PEPSKit.var"#f#_rrule##4", InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Zygote.Pullback{Tuple{PEPSKit.var"#f#_rrule##4", InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Any}}}}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:alg, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:contraction_metrics, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, Vector{NamedTuple}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:info, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, Core.Box}}, Zygote.var"#back#_pullback##0"{Zygote.var"#259#260"{Zygote.var"#back#back##0"{2, 1, Zygote.Context{false}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:env, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:gradient_alg, Zygote.Context{false}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, EigSolver{:fixed}}}, Zygote.Pullback{Tuple{Type{NamedTuple{(:alg_rrule,)}}, Tuple{EigSolver{:fixed}}}, Tuple{Zygote.var"#409#410"{Zygote.Jnew{@NamedTuple{alg_rrule::EigSolver{:fixed}}, Nothing, true}}, Zygote.ZBack{Returns{Tuple{ChainRulesCore.NoTangent, ChainRulesCore.NoTangent}}}}}, Zygote.Pullback{Tuple{typeof(Core._typeof_captured_variable), Vector{NamedTuple}}, Any}, Zygote.var"#259#260"{Zygote.var"#back#back##0"{2, 2, Zygote.Context{false}, Int64}}, Zygote.Pullback{Tuple{typeof(cost_function), InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}}, Tuple{Zygote.Pullback{Tuple{typeof(Core._typeof_captured_variable), ComplexF64}, Any}, Zygote.Pullback{Tuple{typeof(getproperty), Module, Symbol}, Tuple{Zygote.Pullback{Tuple{typeof(getglobal), Module, Symbol}, Tuple{typeof(getglobal)}}}}, Zygote.Pullback{Tuple{typeof(expectation_value), InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Tuple{Zygote.Pullback{Tuple{typeof(expectation_value), InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Tuple{Zygote.var"#377#378"{Zygote.var"#375#376"{Tuple{Tuple{Nothing}}, Zygote.ZBack{ChainRules.var"#vect_pullback#rrule##67"{1}}}}, Zygote.Pullback{Tuple{typeof(Core._typeof_captured_variable), InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}}, Any}, Zygote.var"#405#406"{Zygote.Jnew{PEPSKit.var"#650#651"{InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Nothing, false}}, Zygote.ZBack{PEPSKit.var"#dtmap_pullback#30"{OhMyThreads.Schedulers.DynamicScheduler{OhMyThreads.Schedulers.FixedCount, ChunkSplitters.Consecutive, :default}, Vector{typeof(identity)}, typeof(identity), Vector{Tuple{ComplexF64, Zygote.var"#ad_pullback#60"{Tuple{PEPSKit.var"#650#651"{InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, Zygote.Pullback{Tuple{PEPSKit.var"#650#651"{InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, Tuple{Zygote.Pullback{Tuple{typeof(PEPSKit.trmul), TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}, Tuple{Zygote.ZBack{Returns{Tuple{ChainRulesCore.NoTangent, ChainRulesCore.NoTangent, ChainRulesCore.NoTangent}}}, Zygote.Pullback{Tuple{typeof(scalartype), TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}, Tuple{Zygote.ZBack{Returns{Tuple{ChainRulesCore.NoTangent, ChainRulesCore.NoTangent}}}, Zygote.Pullback{Tuple{typeof(scalartype), Type{TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, Tuple{Zygote.Pullback{Tuple{typeof(scalartype), Type{ComplexF64}}, Tuple{}}}}}}, Zygote.ZBack{TensorOperationsChainRulesCoreExt.var"#tensorfree!_pullback#tensorfree!_pullback##0"}, Zygote.ZBack{Returns{NTuple{10, ChainRulesCore.NoTangent}}}, Zygote.Pullback{Tuple{typeof(scalartype), TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}, Tuple{Zygote.ZBack{Returns{Tuple{ChainRulesCore.NoTangent, ChainRulesCore.NoTangent}}}, Zygote.Pullback{Tuple{typeof(scalartype), Type{TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, Tuple{Zygote.Pullback{Tuple{typeof(scalartype), Type{ComplexF64}}, Tuple{}}}}}}, Zygote.ZBack{TensorKitChainRulesCoreExt.var"#pullback#pullback##15"{Tensor{ComplexF64, ComplexSpace, 0, Vector{ComplexF64}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}, Tuple{Tuple{}, NTuple{4, Int64}}, Bool, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}, Tuple{NTuple{4, Int64}, Tuple{}}, Bool, Tuple{Tuple{}, Tuple{}}, VectorInterface.One, VectorInterface.Zero, Tuple{}, ChainRulesCore.ProjectTo{Number, @NamedTuple{}}, ChainRulesCore.ProjectTo{Number, @NamedTuple{}}, ChainRulesCore.ProjectTo{Tensor{ComplexF64, ComplexSpace, 0, Vector{ComplexF64}}, @NamedTuple{}}, ChainRulesCore.ProjectTo{TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}, @NamedTuple{}}, ChainRulesCore.ProjectTo{TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}, @NamedTuple{}}}}, Zygote.ZBack{TensorOperationsChainRulesCoreExt.var"#tensorscalar_pullback#tensorscalar_pullback##0"{Tensor{ComplexF64, ComplexSpace, 0, Vector{ComplexF64}}}}}}, Zygote.Pullback{Tuple{typeof(Zygote.literal_indexed_iterate), Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}, Val{1}}, Tuple{Zygote.Pullback{Tuple{typeof(Base.indexed_iterate), Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}, Int64}, Tuple{Zygote.Pullback{Tuple{typeof(Base.indexed_iterate), Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}, Int64, Int64}, Tuple{Zygote.var"#248#249"{typeof(identity)}, Zygote.ZBack{Zygote.var"#plus_pullback#plus_pullback##0"{Tuple{Int64, Int64}}}, Zygote.var"#536#537"{Zygote.var"#pair_getfield_pullback#pair_getfield_pullback##0"{Int64}}}}}}, Zygote.Pullback{Tuple{typeof(getproperty), Module, Symbol}, Tuple{Zygote.Pullback{Tuple{typeof(getglobal), Module, Symbol}, Tuple{typeof(getglobal)}}}}}}, Zygote.Pullback{Tuple{typeof(reduced_densitymatrix), Tuple{CartesianIndex{2}, CartesianIndex{2}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Any}, Zygote.Pullback{Tuple{typeof(Zygote.literal_indexed_iterate), Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}, Val{2}, Int64}, Tuple{Zygote.Pullback{Tuple{typeof(Base.indexed_iterate), Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}, Int64, Int64}, Tuple{Zygote.var"#248#249"{typeof(identity)}, Zygote.ZBack{Zygote.var"#plus_pullback#plus_pullback##0"{Tuple{Int64, Int64}}}, Zygote.var"#536#537"{Zygote.var"#pair_getfield_pullback#pair_getfield_pullback##0"{Int64}}}}, Zygote.Pullback{Tuple{typeof(getproperty), Module, Symbol}, Tuple{Zygote.Pullback{Tuple{typeof(getglobal), Module, Symbol}, Tuple{typeof(getglobal)}}}}}}, Zygote.var"#259#260"{Zygote.var"#back#back##0"{2, 1, Zygote.Context{false}, Tuple{CartesianIndex{2}, CartesianIndex{2}}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:bra, Zygote.Context{false}, PEPSKit.var"#650#651"{InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}}}, Zygote.var"#259#260"{Zygote.var"#back#back##0"{2, 2, Zygote.Context{false}, Int64}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:ket, Zygote.Context{false}, PEPSKit.var"#650#651"{InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:env, Zygote.Context{false}, PEPSKit.var"#650#651"{InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}}, Zygote.var"#259#260"{Zygote.var"#back#back##0"{2, 1, Zygote.Context{false}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}}}}}}}}, Zygote.ZBack{Returns{NTuple{4, ChainRulesCore.NoTangent}}}, Zygote.ZBack{ChainRules.var"#sum_pullback#551"{Colon, Vector{ComplexF64}, ChainRulesCore.ProjectTo{AbstractArray, @NamedTuple{element::ChainRulesCore.ProjectTo{ComplexF64, @NamedTuple{}}, axes::Tuple{Base.OneTo{Int64}}}}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:terms, Zygote.Context{false}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}}}, Zygote.Pullback{Tuple{typeof(Core._typeof_captured_variable), CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Any}, Zygote.Pullback{Tuple{typeof(Core._typeof_captured_variable), InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}}, Any}}}}}, Zygote.ZBack{Returns{Tuple{ChainRulesCore.NoTangent, ChainRulesCore.NoTangent}}}, Zygote.ZBack{Zygote.var"#real_pullback#real_pullback##0"}, Zygote.var"#405#406"{Zygote.Jnew{PEPSKit.var"#cost_function##0#cost_function##1"{ComplexF64}, Nothing, false}}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:alg, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:boundary_alg, Zygote.Context{false}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}}}, Zygote.Pullback{Tuple{typeof(Core._typeof_captured_variable), CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Any}, Zygote.var"#405#406"{Zygote.Jnew{PEPSKit.var"#718#719"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, Nothing, false}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:env, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}}, Zygote.var"#259#260"{Zygote.var"#back#back##0"{2, 1, Zygote.Context{false}, @NamedTuple{contraction_metrics::@NamedTuple{truncation_error::Float64, condition_number::Float64}, D::DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, V::TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}, D_full::DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, V_full::TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}, truncation_indices::TensorKit.SortedVectorDict{Trivial, Vector{Int64}}}}}, Zygote.Pullback{Tuple{typeof(Core._typeof_captured_variable), PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}}, Any}, Zygote.ZBack{Returns{Tuple{ChainRulesCore.NoTangent, ChainRulesCore.NoTangent}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:contraction_metrics, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, Vector{NamedTuple}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:env, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}}, Zygote.var"#259#260"{Zygote.var"#back#back##0"{2, 1, Zygote.Context{false}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:info, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, Core.Box}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:alg, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}}}, Zygote.var"#401#402"{Zygote.var"#399#400"{Symbol, Base.RefValue{Any}}}}})(Δ::Float64)
      @ Zygote ~/.julia/packages/Zygote/55SqB/src/compiler/interface2.jl:100
   [13] (::Zygote.var"#pullback##0#pullback##1"{Zygote.Pullback{Tuple{PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}}, Tuple{Zygote.var"#389#390"{Zygote.var"#back#back##9"{:alg, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}}}, Zygote.var"#248#249"{typeof(identity)}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:operator, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}}}, Zygote.Pullback{Tuple{typeof(Core._typeof_captured_variable), CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Any}, Zygote.var"#back#_pullback##1"{Zygote.var"#259#260"{Zygote.var"#back#back##0"{2, 2, Zygote.Context{false}, @NamedTuple{contraction_metrics::@NamedTuple{truncation_error::Float64, condition_number::Float64}, D::DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, V::TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}, D_full::DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, V_full::TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}, truncation_indices::TensorKit.SortedVectorDict{Trivial, Vector{Int64}}}}}}, Zygote.var"#kw_zpullback#chain_rrule_kw##0"{PEPSKit.var"#85#86"{PEPSKit.var"#leading_boundary_fixed_pullback#_rrule##7"{EigSolver{:fixed}, PEPSKit.var"#∂f∂x#_rrule##6"{Zygote.var"#ad_pullback#60"{Tuple{PEPSKit.var"#f#_rrule##4", InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Zygote.Pullback{Tuple{PEPSKit.var"#f#_rrule##4", InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Any}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, PEPSKit.var"#∂f∂A#_rrule##5"{InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, Zygote.var"#ad_pullback#60"{Tuple{PEPSKit.var"#f#_rrule##4", InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Zygote.Pullback{Tuple{PEPSKit.var"#f#_rrule##4", InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Any}}}}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:alg, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:contraction_metrics, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, Vector{NamedTuple}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:info, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, Core.Box}}, Zygote.var"#back#_pullback##0"{Zygote.var"#259#260"{Zygote.var"#back#back##0"{2, 1, Zygote.Context{false}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:env, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:gradient_alg, Zygote.Context{false}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, EigSolver{:fixed}}}, Zygote.Pullback{Tuple{Type{NamedTuple{(:alg_rrule,)}}, Tuple{EigSolver{:fixed}}}, Tuple{Zygote.var"#409#410"{Zygote.Jnew{@NamedTuple{alg_rrule::EigSolver{:fixed}}, Nothing, true}}, Zygote.ZBack{Returns{Tuple{ChainRulesCore.NoTangent, ChainRulesCore.NoTangent}}}}}, Zygote.Pullback{Tuple{typeof(Core._typeof_captured_variable), Vector{NamedTuple}}, Any}, Zygote.var"#259#260"{Zygote.var"#back#back##0"{2, 2, Zygote.Context{false}, Int64}}, Zygote.Pullback{Tuple{typeof(cost_function), InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}}, Tuple{Zygote.Pullback{Tuple{typeof(Core._typeof_captured_variable), ComplexF64}, Any}, Zygote.Pullback{Tuple{typeof(getproperty), Module, Symbol}, Tuple{Zygote.Pullback{Tuple{typeof(getglobal), Module, Symbol}, Tuple{typeof(getglobal)}}}}, Zygote.Pullback{Tuple{typeof(expectation_value), InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Tuple{Zygote.Pullback{Tuple{typeof(expectation_value), InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Tuple{Zygote.var"#377#378"{Zygote.var"#375#376"{Tuple{Tuple{Nothing}}, Zygote.ZBack{ChainRules.var"#vect_pullback#rrule##67"{1}}}}, Zygote.Pullback{Tuple{typeof(Core._typeof_captured_variable), InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}}, Any}, Zygote.var"#405#406"{Zygote.Jnew{PEPSKit.var"#650#651"{InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Nothing, false}}, Zygote.ZBack{PEPSKit.var"#dtmap_pullback#30"{OhMyThreads.Schedulers.DynamicScheduler{OhMyThreads.Schedulers.FixedCount, ChunkSplitters.Consecutive, :default}, Vector{typeof(identity)}, typeof(identity), Vector{Tuple{ComplexF64, Zygote.var"#ad_pullback#60"{Tuple{PEPSKit.var"#650#651"{InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, Zygote.Pullback{Tuple{PEPSKit.var"#650#651"{InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, Tuple{Zygote.Pullback{Tuple{typeof(PEPSKit.trmul), TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}, Tuple{Zygote.ZBack{Returns{Tuple{ChainRulesCore.NoTangent, ChainRulesCore.NoTangent, ChainRulesCore.NoTangent}}}, Zygote.Pullback{Tuple{typeof(scalartype), TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}, Tuple{Zygote.ZBack{Returns{Tuple{ChainRulesCore.NoTangent, ChainRulesCore.NoTangent}}}, Zygote.Pullback{Tuple{typeof(scalartype), Type{TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, Tuple{Zygote.Pullback{Tuple{typeof(scalartype), Type{ComplexF64}}, Tuple{}}}}}}, Zygote.ZBack{TensorOperationsChainRulesCoreExt.var"#tensorfree!_pullback#tensorfree!_pullback##0"}, Zygote.ZBack{Returns{NTuple{10, ChainRulesCore.NoTangent}}}, Zygote.Pullback{Tuple{typeof(scalartype), TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}, Tuple{Zygote.ZBack{Returns{Tuple{ChainRulesCore.NoTangent, ChainRulesCore.NoTangent}}}, Zygote.Pullback{Tuple{typeof(scalartype), Type{TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, Tuple{Zygote.Pullback{Tuple{typeof(scalartype), Type{ComplexF64}}, Tuple{}}}}}}, Zygote.ZBack{TensorKitChainRulesCoreExt.var"#pullback#pullback##15"{Tensor{ComplexF64, ComplexSpace, 0, Vector{ComplexF64}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}, Tuple{Tuple{}, NTuple{4, Int64}}, Bool, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}, Tuple{NTuple{4, Int64}, Tuple{}}, Bool, Tuple{Tuple{}, Tuple{}}, VectorInterface.One, VectorInterface.Zero, Tuple{}, ChainRulesCore.ProjectTo{Number, @NamedTuple{}}, ChainRulesCore.ProjectTo{Number, @NamedTuple{}}, ChainRulesCore.ProjectTo{Tensor{ComplexF64, ComplexSpace, 0, Vector{ComplexF64}}, @NamedTuple{}}, ChainRulesCore.ProjectTo{TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}, @NamedTuple{}}, ChainRulesCore.ProjectTo{TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}, @NamedTuple{}}}}, Zygote.ZBack{TensorOperationsChainRulesCoreExt.var"#tensorscalar_pullback#tensorscalar_pullback##0"{Tensor{ComplexF64, ComplexSpace, 0, Vector{ComplexF64}}}}}}, Zygote.Pullback{Tuple{typeof(Zygote.literal_indexed_iterate), Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}, Val{1}}, Tuple{Zygote.Pullback{Tuple{typeof(Base.indexed_iterate), Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}, Int64}, Tuple{Zygote.Pullback{Tuple{typeof(Base.indexed_iterate), Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}, Int64, Int64}, Tuple{Zygote.var"#248#249"{typeof(identity)}, Zygote.ZBack{Zygote.var"#plus_pullback#plus_pullback##0"{Tuple{Int64, Int64}}}, Zygote.var"#536#537"{Zygote.var"#pair_getfield_pullback#pair_getfield_pullback##0"{Int64}}}}}}, Zygote.Pullback{Tuple{typeof(getproperty), Module, Symbol}, Tuple{Zygote.Pullback{Tuple{typeof(getglobal), Module, Symbol}, Tuple{typeof(getglobal)}}}}}}, Zygote.Pullback{Tuple{typeof(reduced_densitymatrix), Tuple{CartesianIndex{2}, CartesianIndex{2}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Any}, Zygote.Pullback{Tuple{typeof(Zygote.literal_indexed_iterate), Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}, Val{2}, Int64}, Tuple{Zygote.Pullback{Tuple{typeof(Base.indexed_iterate), Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}, Int64, Int64}, Tuple{Zygote.var"#248#249"{typeof(identity)}, Zygote.ZBack{Zygote.var"#plus_pullback#plus_pullback##0"{Tuple{Int64, Int64}}}, Zygote.var"#536#537"{Zygote.var"#pair_getfield_pullback#pair_getfield_pullback##0"{Int64}}}}, Zygote.Pullback{Tuple{typeof(getproperty), Module, Symbol}, Tuple{Zygote.Pullback{Tuple{typeof(getglobal), Module, Symbol}, Tuple{typeof(getglobal)}}}}}}, Zygote.var"#259#260"{Zygote.var"#back#back##0"{2, 1, Zygote.Context{false}, Tuple{CartesianIndex{2}, CartesianIndex{2}}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:bra, Zygote.Context{false}, PEPSKit.var"#650#651"{InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}}}, Zygote.var"#259#260"{Zygote.var"#back#back##0"{2, 2, Zygote.Context{false}, Int64}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:ket, Zygote.Context{false}, PEPSKit.var"#650#651"{InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:env, Zygote.Context{false}, PEPSKit.var"#650#651"{InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}}, Zygote.var"#259#260"{Zygote.var"#back#back##0"{2, 1, Zygote.Context{false}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}}}}}}}}, Zygote.ZBack{Returns{NTuple{4, ChainRulesCore.NoTangent}}}, Zygote.ZBack{ChainRules.var"#sum_pullback#551"{Colon, Vector{ComplexF64}, ChainRulesCore.ProjectTo{AbstractArray, @NamedTuple{element::ChainRulesCore.ProjectTo{ComplexF64, @NamedTuple{}}, axes::Tuple{Base.OneTo{Int64}}}}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:terms, Zygote.Context{false}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}}}, Zygote.Pullback{Tuple{typeof(Core._typeof_captured_variable), CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Any}, Zygote.Pullback{Tuple{typeof(Core._typeof_captured_variable), InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}}, Any}}}}}, Zygote.ZBack{Returns{Tuple{ChainRulesCore.NoTangent, ChainRulesCore.NoTangent}}}, Zygote.ZBack{Zygote.var"#real_pullback#real_pullback##0"}, Zygote.var"#405#406"{Zygote.Jnew{PEPSKit.var"#cost_function##0#cost_function##1"{ComplexF64}, Nothing, false}}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:alg, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:boundary_alg, Zygote.Context{false}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}}}, Zygote.Pullback{Tuple{typeof(Core._typeof_captured_variable), CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, Any}, Zygote.var"#405#406"{Zygote.Jnew{PEPSKit.var"#718#719"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, Nothing, false}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:env, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}}, Zygote.var"#259#260"{Zygote.var"#back#back##0"{2, 1, Zygote.Context{false}, @NamedTuple{contraction_metrics::@NamedTuple{truncation_error::Float64, condition_number::Float64}, D::DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, V::TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}, D_full::DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, V_full::TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}, truncation_indices::TensorKit.SortedVectorDict{Trivial, Vector{Int64}}}}}, Zygote.Pullback{Tuple{typeof(Core._typeof_captured_variable), PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}}, Any}, Zygote.ZBack{Returns{Tuple{ChainRulesCore.NoTangent, ChainRulesCore.NoTangent}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:contraction_metrics, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, Vector{NamedTuple}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:env, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}}, Zygote.var"#259#260"{Zygote.var"#back#back##0"{2, 1, Zygote.Context{false}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:info, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, Core.Box}}, Zygote.var"#389#390"{Zygote.var"#back#back##9"{:alg, Zygote.Context{false}, PEPSKit.var"#716#717"{CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{NamedTuple}}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}}}, Zygote.var"#401#402"{Zygote.var"#399#400"{Symbol, Base.RefValue{Any}}}}}})(Δ::Float64)
      @ Zygote ~/.julia/packages/Zygote/55SqB/src/compiler/interface.jl:97
   [14] withgradient(f::Function, args::InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}})
      @ Zygote ~/.julia/packages/Zygote/55SqB/src/compiler/interface.jl:219
   [15] (::PEPSKit.var"#714#715"{LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{Float64}, Vector{Matrix{Float64}}, Vector{NamedTuple}})(::Tuple{InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}})
      @ PEPSKit ~/repos/PEPSKit.jl/src/algorithms/optimization/peps_optimization.jl:208
   [16] takestep(iter::OptimKit.HagerZhangLineSearchIterator{Float64, PEPSKit.var"#714#715"{LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{Float64}, Vector{Matrix{Float64}}, Vector{NamedTuple}}, PEPSKit.var"#retract_then_symmetrize#symmetrize_retract_and_finalize!##1"{RotateReflect, typeof(PEPSKit.peps_retract)}, typeof(PEPSKit.real_inner), Tuple{InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, Rational{Int64}}, α::Float64)
      @ OptimKit ~/.julia/packages/OptimKit/OEwMx/src/linesearches.jl:281
   [17] iterate(iter::OptimKit.HagerZhangLineSearchIterator{Float64, PEPSKit.var"#714#715"{LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{Float64}, Vector{Matrix{Float64}}, Vector{NamedTuple}}, PEPSKit.var"#retract_then_symmetrize#symmetrize_retract_and_finalize!##1"{RotateReflect, typeof(PEPSKit.peps_retract)}, typeof(PEPSKit.real_inner), Tuple{InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, Rational{Int64}})
      @ OptimKit ~/.julia/packages/OptimKit/OEwMx/src/linesearches.jl:183
   [18] (::HagerZhangLineSearch{Rational{Int64}})(fg::PEPSKit.var"#714#715"{LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{Float64}, Vector{Matrix{Float64}}, Vector{NamedTuple}}, x₀::Tuple{InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, η₀::InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, fg₀::Tuple{Float64, InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}}; retract::Function, inner::typeof(PEPSKit.real_inner), initialguess::Float64, acceptfirst::Bool, maxiter::Int64, maxfg::Int64, verbosity::Int64)
      @ OptimKit ~/.julia/packages/OptimKit/OEwMx/src/linesearches.jl:134
   [19] optimize(fg::PEPSKit.var"#714#715"{LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}, Vector{Float64}, Vector{Matrix{Float64}}, Vector{NamedTuple}}, x::Tuple{InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}}, alg::LBFGS{Float64, HagerZhangLineSearch{Rational{Int64}}}; precondition::typeof(OptimKit._precondition), finalize!::PEPSKit.var"#symmetrize_then_finalize!#symmetrize_retract_and_finalize!##0"{RotateReflect, typeof(OptimKit._finalize!)}, shouldstop::OptimKit.DefaultShouldStop, hasconverged::OptimKit.DefaultHasConverged{Float64}, retract::Function, inner::typeof(PEPSKit.real_inner), transport!::typeof(PEPSKit.peps_transport!), scale!::typeof(OptimKit._scale!), add!::typeof(OptimKit._add!), isometrictransport::Bool)
      @ OptimKit ~/.julia/packages/OptimKit/OEwMx/src/lbfgs.jl:108
   [20] fixedpoint(operator::LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, peps₀::InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, env₀::CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}, alg::PEPSOptimize{C4vCTMRG{C4vEighProjector{EighAdjoint{MatrixAlgebraKit.LAPACK_QRIteration{@NamedTuple{}}, PEPSKit.FullEighPullback}, FixedSpaceTruncation}}, EigSolver{:fixed}}; finalize!::Function)
      @ PEPSKit ~/repos/PEPSKit.jl/src/algorithms/optimization/peps_optimization.jl:203
   [21] fixedpoint(operator::LocalOperator{Tuple{Pair{Tuple{CartesianIndex{2}, CartesianIndex{2}}, TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}}, ComplexSpace}, peps₀::InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}, env₀::CTMRGEnv{DiagonalTensorMap{Float64, ComplexSpace, Vector{Float64}}, TensorMap{ComplexF64, ComplexSpace, 3, 1, Vector{ComplexF64}}}; finalize!::Function, kwargs::@Kwargs{optimizer_alg::@NamedTuple{tol::Float64, maxiter::Int64}, boundary_alg::@NamedTuple{alg::Symbol, projector_alg::Symbol, maxiter::Int64}})
      @ PEPSKit ~/repos/PEPSKit.jl/src/algorithms/optimization/peps_optimization.jl:176
   [22] macro expansion
      @ ~/repos/PEPSKit.jl/test/examples/heisenberg.jl:66 [inlined]
   [23] macro expansion
      @ ~/.julia/juliaup/julia-1.12.5+0.x64.linux.gnu/share/julia/stdlib/v1.12/Test/src/Test.jl:1865 [inlined]
   [24] top-level scope
      @ ~/repos/PEPSKit.jl/test/examples/heisenberg.jl:53
   [25] eval(m::Module, e::Any)
      @ Core ./boot.jl:489
   [26] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
      @ Base ./loading.jl:2870
   [27] inlineeval(m::Module, code::String, code_line::Int64, code_column::Int64, file::String; softscope::Bool)
      @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.187.2/scripts/packages/VSCodeServer/src/eval.jl:292
   [28] (::VSCodeServer.var"#repl_runcode_request##6#repl_runcode_request##7"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
      @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.187.2/scripts/packages/VSCodeServer/src/eval.jl:202
   [29] withpath(f::VSCodeServer.var"#repl_runcode_request##6#repl_runcode_request##7"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams}, path::String)
      @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.187.2/scripts/packages/VSCodeServer/src/repl.jl:303
   [30] (::VSCodeServer.var"#repl_runcode_request##4#repl_runcode_request##5"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
      @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.187.2/scripts/packages/VSCodeServer/src/eval.jl:200
   [31] hideprompt(f::VSCodeServer.var"#repl_runcode_request##4#repl_runcode_request##5"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})
      @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.187.2/scripts/packages/VSCodeServer/src/repl.jl:38
   [32] #repl_runcode_request##2
      @ ~/.vscode/extensions/julialang.language-julia-1.187.2/scripts/packages/VSCodeServer/src/eval.jl:171 [inlined]
   [33] with_logstate(f::VSCodeServer.var"#repl_runcode_request##2#repl_runcode_request##3"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams}, logstate::Base.CoreLogging.LogState)
      @ Base.CoreLogging ./logging/logging.jl:542
   [34] with_logger
      @ ./logging/logging.jl:653 [inlined]
   [35] (::VSCodeServer.var"#repl_runcode_request##0#repl_runcode_request##1"{VSCodeServer.ReplRunCodeRequestParams})()
      @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.187.2/scripts/packages/VSCodeServer/src/eval.jl:284
   [36] (::VSCodeServer.var"#start_eval_backend##0#start_eval_backend##1")()
      @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.187.2/scripts/packages/VSCodeServer/src/eval.jl:34
Test Summary:                                                               | Error  Total  Time
C4v AD optimization with scalartype T=ComplexF64 and projector_alg=c4v_eigh |     1      1  2.1s
RNG of the outermost testset: Xoshiro(0x46bb51f5d75b41b1, 0x65f6f8c539c2d8f8, 0xe802e1c72c8de3e7, 0x8ce4901dd678fe7f, 0xdaee95fa40b83595)
ERROR: Some tests did not pass: 0 passed, 0 failed, 1 errored, 0 broken.

I don't know where this comes from and how severe this is. For now, everything works when using a :linsolver gradient algorithm.

EDIT: It probably makes sense to default to :linsolver gradient mode when using C4vCTMRG for now until we understand why :eigsolver seems to be more unstable than with asymmetric CTMRG.

Comment on lines +42 to +44
if isnothing(symmetrization)
symmetrization = RotateReflect()
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed this before, but again I would rather throw an error here rather than changing settings behind the scene. For this one, I think we could add the symmetrization to _check_algorithm_combination(boundary_alg, gradient_alg, symmetrization), what do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again this is a default setting, i.e. if one optimizes with a C4vCTMRG boundary algorithm then by default we will symmetrize the state and gradient. So if the user specifies a symmetrization then this will not act. Of course we could think about prohibiting any other kind of symmetrization than RotateReflect but I think that would be too restrictive.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, if this is changing the default it's fine to leave this. However, I still think it would be good to additionally error out for any symmetrization other than RotateReflect. We really assume rotation and Hermitian reflection invariance in the implementation, so I don't actually think this would be too restrictive, no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I do agree, I thought that a user might want to implement their own style of RotateReflect that might do an additional thing or something. I just wanted to avoid being too restrictive which would render the entire fixedpoint machinery useless to an external user in that case. What if we throw a warning that highlights the fact that any custom symmetrization needs to assume rotation and Hermitian reflection in order for C4v optimization to work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants