I noticed just now that the Julia code has this AbstractObserver data type (defined at https://github.com/ITensor/ITensors.jl under ITensors.jl/src/mps/observer.jl). It seems to have methods to call early termination if a nonzero imaginary part is detected in the expectation values for certain specified operators on the MPS, or if convergence has occurred to within a certain allowed error. To understand this better, I have a few questions:
(1) Can this observer feature be adapted to some broader set of reasons for early termination, or can it realistically only be used for these two things?
(2) What exactly is the point of specifically detecting imaginary parts of these expectations? I'm guessing it's because one can specify an operator representing an observable, meaning its expectation must be real. But could this functionality be expanded to, say, terminating early if any nonnegligible expectation (real or imaginary) shows up for a local operator?
(3) Suppose one detects one of these nonneglible imaginary parts in some operator. Is there a viable way to "correct" this, or is early termination the only practical answer here?
(4) If one terminates DMRG in the middle of a sweep, are there "side effects" that one should be aware of, since this isn't normally the way DMRG works?