Dear ITensors (really, ITensorMPS.jl) team,
I wish to perform something similar to the code in example 4 in the ITensorMPS.jl code (ITensorMPS.jl/examples/04_tdvp_observers.jl at main · ITensor/ITensorMPS.jl · GitHub).
However, I wish to compute observables from the state only at each k’th time step (with k some integer). Do you have a recommendation on how to implement this in code?
More explicitly, I am talking about this line:
state = tdvp(
H, -1.0im, init; time_step=-0.1im, cutoff=1e-12, (step_observer!)=obs, outputlevel=1
)
- Is it possible to wrap the step_observer function in a way that will compute the obs at, say, times [0, 0.5, 1]?
- An example for a solution- split the tdvp time evolution to separate intervals and compute the observables at the end of each one, i.e.,
However, this solution does not utilize the convenient Observer.jl package.measurements = [] for measure_time in [0 0.5, 1] state = tdvp( H, -im*measure_time, init; time_step=-0.1im, cutoff=1e-12, outputlevel=1 ) push!(measurements, measure_state(state)) end
Thanks,
Yotam