Taking integration paths seriously #325
Merged
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.
We introduce submodule
Paths
that contain different possible integration paths fordensitymatrix
andjosephson
. The defaultdensitymatrix(gs, ω0; kw...)
corresponds todensitymatrix(gs, Paths.radial(ω0, π/4); kw...)
. This no longer an integral from-ω0
toω0
, but rather along a path as shown in the figure, where the angle in orange is set toϕ = π/4
, and the outer arcs are taken to infinity. (The angle can of course be changed by using the fulldensitymatrix(gs, Paths.radial(ω0, ϕ); kw...)
syntax)The integral over the arcs is analytic (thanks to spectral weight normalization), so only the radial parts need to be computed numerically. Along these radial parts the path is parametrized as
ω = x * ω0 * cis(sign(x)*ϕ)
withx
from-Inf
toInf
, so thatω0
has the meaning of a radial speed. This method is often faster than the old sawtooth path default, and does not require precomputingω0
precisely as we did before (where it needed to be greater than the system half-bandwidth): the integral will converge to the same value regardless ofω0
, only integration time will change, making this a much more robust default.The old sawtooth path is available through
Paths.sawtooth(reak_ω_points...; slope = 1, imshift = true)
and we also have a generalPaths.polygon(complex_ω_points...)
. Note thatjosephson(gs, ωs::Tuple)
defaults tojosephson(gs, Paths.sawtooth(ωs...))
, and the same fordensitymatrix
.The old
path_override
hack is no longer necessary, since we now also havePaths.polygon((µ, kBT; params...) -> ωpoints)
as a possible path, which changes depending on chemical potential, temperature or system parameters.As this is a breaking change, I summarize what needs to be done to old codebases to adapt:
josephson(gs, ωmax)
will now use a different (often faster) algorithm, andωmax
may be replaced with any estimatedω0
energy scale that dominates the contribution to the Josephson current (no need to compute a band range explicitly). This parameter only affects integration speed, not the result. To get the old behavior usejosephson(gs, (-ωmax, ωmax))
instead. Same story fordensitymatrix
J(kBT, ωpoints; params...)
as syntax to overrideωpoints
should now be replace withJ = josephson(gs, Paths.polygon((µ, kBT; params...) -> ωpoints)
, and then simplyJ(kBT; params...)
. Note the use of µ in the polygon function signature, which is simply ignored in thejosephson
case, asµ = 0
there. Same story fordensitymatrix
, although in that case ωpoints can depend onµ
too.