You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I define the following function to evaluate the energy and the gradient by naively using the 10 ctmrg steps to avoid the divergent gradient in the fixed-point method. I don't think I need fix the truncation space and then implement truncdim(χenv) for trscheme.
boundary_alg=SimultaneousCTMRG(;projector_alg=FullInfiniteProjector,trscheme=truncdim(χenv))
functionengrad(peps, env, operator,boundary_alg)
E, gs =withgradient(peps) do ψ
for _ in1:10
env, _ =ctmrg_iteration(InfiniteSquareNetwork(ψ), env, boundary_alg)
endreturncost_function(ψ, env, operator)
endreturn E, only(gs)
end
# Functions used for FP differentiation and by KrylovKit.linsolvefunction Base.:+(e₁::CTMRGEnv, e₂::CTMRGEnv)
returnCTMRGEnv(e₁.corners + e₂.corners, e₁.edges + e₂.edges)
end
I want to know where the add function for the environment tensors is called in my defined function. I even don't think it is a well defined operation for adding two environment tensors.
The text was updated successfully, but these errors were encountered:
This is a Zygote thing: we are representing the cotangents of the CTMRGEnv as CTMRGEnv objects (similar to how the cotangent of a Vector is again a Vector).
In other words, Zygote is trying to "retract" the environment here.
I define the following function to evaluate the energy and the gradient by naively using the 10 ctmrg steps to avoid the divergent gradient in the fixed-point method. I don't think I need fix the truncation space and then implement
truncdim(χenv)
fortrscheme
.However, I got the error
due to the call of the function
I want to know where the add function for the environment tensors is called in my defined function. I even don't think it is a well defined operation for adding two environment tensors.
The text was updated successfully, but these errors were encountered: