Remove IDMRG logging incorrect energy#315
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
The docs failing is probably because TensorOperations moved to the QuantumKitHub, right? |
|
I'm not super happy with simply removing this, because this can actually still be useful information for debugging purposes. I do agree that the current solution needs some work though. The problem is a bit that indeed, during the IDMRG procedure, we are effectively growing the environments by a single site every iteration, so the actual expectation value that is being printed is the current total energy, which therefore scales as the number of iterations. This could be achieved manually, but an alternative might be to actually properly normalize the IDMRG environments as well, simply by subtracting the fixedpoint contribution at the beginning of every iteration. All of this being said though, I'd be okay with removing the result here, if we add a debug verbosity option that prints the (dominant) eigenvalue of the local eigenvalue solvers, which might also be a good feature to have anyways. (I'll try fix the docs asap) |
During the IDMRG iterations, the objective which is supposed to represent the expectation value of the Hamiltonian is completely incorrect. This is because the environment only gets recalculated with
recalculate!at the end of the sweeps, so these intermediate values are irrelevant.I chose to remove showing these values, but another option is to calculate the expectation value without passing the environments, thus recalculating at every step. I don't know how costly this step is, so I chose to do it like in
IDMRG2.