ITensor / ITensorMPS.jl

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

Start reexporting ITensorTDVP and ITensors.ITensorMPS #1

Closed mtfishman closed 4 months ago

mtfishman commented 4 months ago

See also https://github.com/ITensor/ITensors.jl/pull/1410, there you can see a list of exports that will be left in ITensors.jl if these are removed from there and moved here.

@emstoudenmire curious what you think about this list of exports.

My thinking is that we should try to move any exports that are primarily used for MPS code here, so that we can then remove them as exports from ITensors.jl (which has way too many exports right now).

The idea is that if users type using ITensors, ITensorMPS we make sure there code still "just works", so a way of doing that would be to divide the current exports of ITensors into ones we plan to continue exporting from ITensors and ones we plan to only export from ITensorMPS (there could be an overlap but I don't see a need for that).

mtfishman commented 4 months ago

@emstoudenmire once this is merged I think we can go ahead and register v0.1 of this package and start advertising it, i.e.:

  1. Add using ITensorMPS throughout the ITensors.jl docs and examples, anywhere these exports are being used.
  2. Make an announcement to add using ITensorMPS to scripts that use MPS functionality on the Julia discourse and Slack.
  3. Put a deprecation warning on the README of ITensorTDVP.jl telling users to use ITensorMPS.jl.
mtfishman commented 4 months ago

I'll go ahead and merge this. Since our official recommendation at first will just be to change using ITensors to using ITensors, ITensorMPS, this export list can be reassessed over time.

emstoudenmire commented 4 months ago

Looks good. I commented on the other PR. I couldn't see any issues with how you split the exports. The only non-obvious thing to me was the SiteType system, but if I understand correctly the status would now be:

  1. if you do using ITensors, ITensorMPS you'd get all the stuff you would previously get including the SiteType system
  2. now if you only do using ITensors you would not get the SiteType system, but you could still optionally get it (without any MPS code) by adding another using statement, maybe using ITensors.SiteTypes ?
mtfishman commented 4 months ago

Thanks for looking it over, it is helpful to get a sanity check on this. Yes that's a good summary. For now the official recommendation will be to do using ITensors, ITensorMPS, but we can discuss other ways to get certain exports without having to load the entire ITensorMPS package.

As you say, one option could be using ITensors.SiteTypes. Alternatively, we may split off SiteTypes (or some iteration on that design) into a separate package in which case we could tell users that they can load that package explicitly.