Skip to content

Commit 01d8cbb

Browse files
committed
convert to complex states in TDVP
1 parent c58ee3c commit 01d8cbb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/algorithms/timestep/tdvp.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ $(TYPEDFIELDS)
2525
finalize::F = Defaults._finalize
2626
end
2727

28-
function timestep(ψ::InfiniteMPS, H, t::Number, dt::Number, alg::TDVP,
28+
function timestep(ψ_::InfiniteMPS, H, t::Number, dt::Number, alg::TDVP,
2929
envs::AbstractMPSEnvironments=environments(ψ, H);
3030
leftorthflag=true)
31+
ψ = complex(ψ_)
3132
temp_ACs = similar(ψ.AC)
3233
temp_Cs = similar(ψ.C)
3334

@@ -172,5 +173,5 @@ end
172173
function timestep(ψ::AbstractFiniteMPS, H, time::Number, timestep::Number,
173174
alg::Union{TDVP,TDVP2}, envs::AbstractMPSEnvironments=environments(ψ, H);
174175
kwargs...)
175-
return timestep!(copy(ψ), H, time, timestep, alg, envs; kwargs...)
176+
return timestep!(copy(complex(ψ)), H, time, timestep, alg, envs; kwargs...)
176177
end

0 commit comments

Comments
 (0)