Consistent environments signature: below, operator, above argument order#268
Consistent environments signature: below, operator, above argument order#268
environments signature: below, operator, above argument order#268Conversation
Codecov ReportAttention: Patch coverage is
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
lkdvos
left a comment
There was a problem hiding this comment.
Great changes, thanks!
Indeed, when I previously looked at this I realized there were definitely some issues but didn't feel like untangling that mess, but this looks relatively contained.
Slightly off-topic, but I wanted to share my view anyways:
For the transfer stuff, I'm a bit on the fence whether or not we should also change that (definitely not in this PR). Especially for the actual structs it seems like top middle bottom is not a strange order of the fields.
I think I would for that case prefer to just introduce a function transfermatrix that has similar syntax to our other functions which returns the object, and as usual the fields of that object are considered implementation details so that should work out.
environments calling syntax for inifinite MPSenvironments signature: below, operator, above argument order
Changes the syntax convention for infinite MPS environment-related methods to
(below, operator, above=below), in line with the finite MPS convention. Sinceaboveis always the optional one from the point of view of boundary MPS algorithms, this made more sense. I didn't change any of theTransferMatrixrelated code, which still assumes(above, operator, below=above)for its arguments. I suspect changing this would cause a lot more downstream issues.In the process I noticed that
calc_galerkinwould have been wrong when used inapproximatefor finite MPS, and after that noticed that we don't actually use the proper Galerkin error in the finite approximate. I think we could, and probably should? But this can be addressed in a follow-up I think.Fixes #267.