ITensors.jl
ITensors.jl copied to clipboard
[ITensorMPS] Added option for MPO-MPS zipup
Description
Minimal changes necessary to extend the "zipup" algorithm for MPO-MPO products to MPO-MPS products. The main request I foresee is to bring it inline with the "naive" algorithm which also has a single implementation for MPO-MPO(S) products. Once those details are worked out I'll add docs and tests.
How Has This Been Tested?
It has not.
Checklist:
- [x] My code follows the style guidelines of this project. Please run
using JuliaFormatter; format(".")in the base directory of the repository (~/.julia/dev/ITensors) to format your code according to our style guidelines. - [x] I have performed a self-review of my own code.
- [x] I have commented my code, particularly in hard-to-understand areas.
- [x] I have added tests that verify the behavior of the changes I made.
- [x] I have made corresponding changes to the documentation.
- [x] My changes generate no new warnings.
- [x] Any dependent changes have been merged and published in downstream modules.
Looks good, thanks @corbett5. Could you add a test for the new functionality? Also could you add something about truncate_kwargs in the docstring?
@mtfishman I updated the docs and tests, but I seem to be having trouble with the formatting. For one the formatter updated 100+ files which I did not touch, but I also can't get the format check to pass. It passes for me locally with the same JuliaFormatter version (v2.0.0).
Also now none of the other tests pass after the extensive format changes.
@corbett5 it looks like JuliaFormatter.jl v2 either accidentally or deliberately changed certain formatting rules, including introducing some bugs into the code by erroneously changing positional arguments to keyword arguments.
Please format the code using JuliaFormatter.jl v1 (i.e. revert to the previous formatting), and I can change the formatting CI checks to use JuliaFormatter.jl v1 for now while those issues get worked out.
See: https://github.com/domluna/JuliaFormatter.jl/pull/870 https://github.com/domluna/JuliaFormatter.jl/issues/878 https://github.com/domluna/JuliaFormatter.jl/issues/879 https://github.com/domluna/JuliaFormatter.jl/issues/880
All passing 🎉
Thanks for fixing the formatting problems.
I actually didn't do anything, it looks like the JuliaFormatter.jl v2 release was reverted ("yanked" in the Julia registry parlance) because there were too many bugs (https://github.com/domluna/JuliaFormatter.jl/issues/878).
@corbett5 could you move this PR over to: https://github.com/ITensor/ITensorMPS.jl?
I'll close this since it needs to be moved to the ITensorMPS.jl repository.