You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there might be a problem with the interpolation for imaginary time Green's functions. The interpolation result seems not to be time-translational invariant. I was expecting that
$$
G(\tau_1, \tau_2) = G(\tau_1 - \tau_2, 0)
$$
In this pull request is a test that checks for this by calling the interpolation routine for the two cases above, comparing the result.
For me the test fails with:
% j time_gf.jl
Test Summary:| Pass Total
time_gf |88
t0 =BranchPoint(0.0+0.0im, 0.0, imaginary_branch)
t12 =BranchPoint(0.0-0.4im, 0.4, imaginary_branch)
t1 =BranchPoint(0.0-0.5im, 0.5, imaginary_branch)
t2 =BranchPoint(0.0-0.1im, 0.1, imaginary_branch)
d_12 =0.0-0.16222222222222224im
d_120 =0.0-0.16000000000000003im
imtime interpolation: Test Failed at /.../dev/Keldysh.jl/test/time_gf.jl:127
Expression: diff < tol
Evaluated:0.0022222222222222088<1.0e-12
Stacktrace:
[1] macro expansion
@ /.../julia/share/julia/stdlib/v1.7/Test/src/Test.jl:445 [inlined]
[2] macro expansion
@ ~/dev/Keldysh.jl/test/time_gf.jl:127 [inlined]
[3] macro expansion
@ /.../julia/share/julia/stdlib/v1.7/Test/src/Test.jl:1283 [inlined]
[4] top-level scope
@ ~/dev/Keldysh.jl/test/time_gf.jl:93
Test Summary:| Fail Total
imtime interpolation |11
ERROR: LoadError: Some tests did not pass:0 passed, 1 failed, 0 errored, 0 broken.
in expression starting at /.../dev/Keldysh.jl/test/time_gf.jl:91
I believe this is because the interpolation function is doing bilinear interpolation on $G(\tau_1, \tau_2)$ rather than linear interpolation on $G(\tau_1 - \tau_2, 0)$. The reason for this is that the interpolation function is generic so it is doing the same thing in imaginary time as in real time and doesn't know anything about the symmetries of the problem. All of the symmetries are implemented at the level of discrete indexing. I believe the invariance should hold up to the same accuracy as the interpolation scheme overall.
In #13 I implement the imaginary time invariance symmetry exactly.
Ok, I understand. I think you are right that the error difference is only linear in $\Delta \tau$. Thank you for the fix in #13 it is good to exploit the simplification in imaginary time here.
I found this behaviour while trying to debug some other code and was a bit puzzled. I think the difference is not a big deal in the end. It turned out that I had bigger problems like time differences that should be $0^+$ but that were rounded to $0^-$ and wrapped to $\beta$ with a fermi sign.
Cheers, Hugo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Dear Joseph,
I think there might be a problem with the interpolation for imaginary time Green's functions. The interpolation result seems not to be time-translational invariant. I was expecting that
In this pull request is a test that checks for this by calling the interpolation routine for the two cases above, comparing the result.
For me the test fails with:
Could this be a bug?
Best, Hugo