@@ -42,7 +42,7 @@ function process_sweeps(; kwargs...)
42
42
return (; maxdim, mindim, cutoff, noise)
43
43
end
44
44
45
- function tdvp (solver, PH, t:: Number , psi0:: MPS ; kwargs... )
45
+ function tdvp (solver, PH, t:: Number , psi0:: IsTreeState ; kwargs... )
46
46
reverse_step = get (kwargs, :reverse_step , true )
47
47
48
48
nsweeps = _tdvp_compute_nsweeps (t; kwargs... )
@@ -124,37 +124,37 @@ function tdvp(solver, PH, t::Number, psi0::MPS; kwargs...)
124
124
end
125
125
126
126
"""
127
- tdvp(H::MPO ,psi0::MPS ,t::Number; kwargs...)
128
- tdvp(H::MPO ,psi0::MPS ,t::Number; kwargs...)
127
+ tdvp(H::MPS ,psi0::MPO ,t::Number; kwargs...)
128
+ tdvp(H::TTNS ,psi0::TTNO ,t::Number; kwargs...)
129
129
130
130
Use the time dependent variational principle (TDVP) algorithm
131
131
to compute `exp(t*H)*psi0` using an efficient algorithm based
132
- on alternating optimization of the MPS tensors and local Krylov
132
+ on alternating optimization of the state tensors and local Krylov
133
133
exponentiation of H.
134
134
135
135
Returns:
136
- * `psi::MPS ` - time-evolved MPS
136
+ * `psi` - time-evolved state
137
137
138
138
Optional keyword arguments:
139
139
* `outputlevel::Int = 1` - larger outputlevel values resulting in printing more information and 0 means no output
140
140
* `observer` - object implementing the [Observer](@ref observer) interface which can perform measurements and stop early
141
141
* `write_when_maxdim_exceeds::Int` - when the allowed maxdim exceeds this value, begin saving tensors to disk to free memory in large calculations
142
142
"""
143
- function tdvp (solver, H:: MPO , t:: Number , psi0:: MPS ; kwargs... )
143
+ function tdvp (solver, H:: IsTreeOperator , t:: Number , psi0:: IsTreeState ; kwargs... )
144
144
check_hascommoninds (siteinds, H, psi0)
145
145
check_hascommoninds (siteinds, H, psi0' )
146
146
# Permute the indices to have a better memory layout
147
147
# and minimize permutations
148
148
H = ITensors. permute (H, (linkind, siteinds, linkind))
149
- PH = ProjMPO (H)
149
+ PH = proj_operator (H)
150
150
return tdvp (solver, PH, t, psi0; kwargs... )
151
151
end
152
152
153
- function tdvp (solver, t:: Number , H, psi0:: MPS ; kwargs... )
153
+ function tdvp (solver, t:: Number , H, psi0:: IsTreeState ; kwargs... )
154
154
return tdvp (solver, H, t, psi0; kwargs... )
155
155
end
156
156
157
- function tdvp (solver, H, psi0:: MPS , t:: Number ; kwargs... )
157
+ function tdvp (solver, H, psi0:: IsTreeState , t:: Number ; kwargs... )
158
158
return tdvp (solver, H, t, psi0; kwargs... )
159
159
end
160
160
@@ -177,12 +177,14 @@ each step of the algorithm when optimizing the MPS.
177
177
Returns:
178
178
* `psi::MPS` - time-evolved MPS
179
179
"""
180
- function tdvp (solver, Hs:: Vector{MPO} , t:: Number , psi0:: MPS ; kwargs... )
180
+ function tdvp (
181
+ solver, Hs:: Vector{<:IsTreeOperator} , t:: Number , psi0:: IsTreeState ; kwargs...
182
+ )
181
183
for H in Hs
182
184
check_hascommoninds (siteinds, H, psi0)
183
185
check_hascommoninds (siteinds, H, psi0' )
184
186
end
185
187
Hs .= ITensors. permute .(Hs, Ref ((linkind, siteinds, linkind)))
186
- PHs = ProjMPOSum (Hs)
188
+ PHs = proj_operator_sum (Hs)
187
189
return tdvp (solver, PHs, t, psi0; kwargs... )
188
190
end
0 commit comments