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.
This pr is breaking because it makes all parameters into keyword arguments. The usage is reflected in tests and the docs, and the main advantage is that all parameters are treated in the same way, whereas before there was a distinction between positional and keyword parameters. They can be optionally provided to the integrand constructor and handled consistently with clear precedence relations, which ends up simplifying lots of code.
I did this so that the self energy could be a parameter instead of a positional argument, which clarified how canonical initialization parameters have lower precedence than constructor parameters, which are already lower precedence than the solve-time parameters.
The previous behavior could not cope with mixed canonical parameters and constructor parameters, which made the implementation less robust to different types of user input and less flexible since the order of parameters was fixed.
However, users now have to call their solvers with keyword arguments all of the time. This includes calls to
batchsolve
for which the keyword parameter vectors can be constructed withparamzip
andparamproduct
.This pr also allows the user to pass in an auxiliary function to the auxiliary integrand constructor to control the behavior.
Also, the step size for AutoPTR is now computed more rigorously by estimating the strip of analyticity as
2pi*eta/v/T
wherev
is the L2 norm of the gradient ofH
andT
is the period of the Hamiltonian. The estimate is always performed for the scattering,eta
determined from self energy at the Fermi energy