ITensor / ITensorMPS.jl

MPS and MPO methods based on ITensor (ITensors.jl)
Apache License 2.0
20 stars 3 forks source link

Make more ITensorMPS internals visible #7

Closed emstoudenmire closed 6 months ago

emstoudenmire commented 6 months ago

This PR makes a few more ITensorMPS internal types and methods visible, in order for the ITensorQTT package tests to pass. They now pass so this should be all of these needed for that package.

mtfishman commented 6 months ago

@emstoudenmire I would prefer rewriting whatever part of ITensorQTT.jl is using ITensors.ITensorMPS.makeL! and ITensors.ITensorMPS.makeR!, those seem so internal that they probably shouldn't be used in the first place.

mtfishman commented 6 months ago

If that seems too involved I'm ok going ahead with this PR as it is, but we can use this as an opportunity to reassess what ITensorQTT.jl is doing.

mtfishman commented 6 months ago

I see that it is being used in ITensorQTT to define a MPS linsolve function, maybe all of that code can be deleted since MPS-based linsolve is defined in ITensorTDVP/ITensorMPS. I think I was playing around with some variations of MPS linear solving but that was pretty experimental and can be removed.

emstoudenmire commented 6 months ago

It's a good point. There are actually some other issues with that ITensorQTT linsolve code conflicting with ITensorTDVP.

I would not mind rewriting it along the lines you mentioned. But then deleting it is even easier and then we can close this PR.

So, delete it? (The ITensorQTT linsolve.jl file?)

mtfishman commented 6 months ago

Perhaps this is good to do anyway since makeL! and makeR! are part of the interface of AbstractProjMPO so probably some advanced users are overloading those, so we should try to make the transition to ITensorMPS easier for those users.

emstoudenmire commented 6 months ago

It's true – we might get some bug reports from a few users otherwise.

mtfishman commented 6 months ago

Ok, I'll merge this as it is, and let's also keep ITensorQTT.jl as it is for now (besides the minimal updates needed to move to using ITensorMPS.jl) but have a longer term goal of simplifying it to not use ITensorMPS internals.