Skip to content

Commit

Permalink
small formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos committed Oct 30, 2023
1 parent 228af5a commit 5ef7237
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/algorithms/approximate/fvomps.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
function approximate(state, toapprox, alg::Union{DMRG,DMRG2}, envs...)
return approximate!(copy(state), toapprox, alg, envs...)
# dispatch to in-place method
function approximate(ψ, toapprox, alg::Union{DMRG,DMRG2}, envs...)
return approximate!(copy(ψ), toapprox, alg, envs...)
end

function approximate!(init::AbstractFiniteMPS, sq, alg, envs=environments(init, sq))
Expand Down
5 changes: 3 additions & 2 deletions src/algorithms/derivatives.jl
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ function c_proj(row, col, below, envs::PerMPOInfEnv)
)
end

# TODO: rewrite this to not use operator from cache?
function ac_proj(pos, below, envs)
le = leftenv(envs, pos, below)
re = rightenv(envs, pos, below)
Expand Down Expand Up @@ -316,12 +317,12 @@ end

function ∂∂AC(pos::Int, state, opp::ProjectionOperator, env)
return AC_EffProj(opp.ket.AC[pos], leftenv(env, pos, state), rightenv(env, pos, state))
end;
end
function ∂∂AC2(pos::Int, state, opp::ProjectionOperator, env)
return AC2_EffProj(
opp.ket.AC[pos],
opp.ket.AR[pos + 1],
leftenv(env, pos, state),
rightenv(env, pos + 1, state),
)
end;
end

0 comments on commit 5ef7237

Please sign in to comment.