Separating Direct and Indirect Measurement of Two Body Green Function #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Misawa-sensei, Ido-san and other collaborators of this repository,
Greetings.
Previously I complained to Misawa-sensei that mVMC's measurement of Lanczos 2-body Green's function is inconsistent with that without 1-step Lanczos. This is caused by that mVMC uses direct calculation in doing normal Green's function while indirect calculation in computing Green's function with Lanczos:
While indirect calculation is much faster than the direct one, it only works in a few cases. (e.g. non-exchange terms in spin systems and "SpinGC" with sufficient number of samples) This is because in indirect calculation, samples with <x|psi>=0 might have non-zero contribution to the measured Green's function. Hence, the routine needed in most cases is direct calculation.
In fact, there is a keyword called "TwoBodyGEx" intended for indirect calculation of normal (non-Lanczos) Green's functions. I think it might be a good idea to make the interface consistent.
In this pull request routines related to "TwoBodyGEx" keyword is debugged to work properly. After specifying
NLanczosMode=1
, the program will use direct method to calculate "TwoBodyG" for both normal and Lanczos Green's functions and indirect method to calculate "TwoBodyGEx" for normal and Lanczos Green's functions.The pull request is benchmarked agains some previous results to ensure it doesn't create new bugs. For a possibility of indirect Green's function calculation of Itinerant Fermion systems, maybe I can refer to Charlebois who is apparently more experienced.
Best,
RuQing