ITensor / ITensorNetworks.jl

A package with general tools for working with higher-dimensional tensor networks based on ITensor.
MIT License
51 stars 12 forks source link

OpSum to TTN refactor #166

Closed emstoudenmire closed 1 month ago

emstoudenmire commented 2 months ago

This PR refactors the ttn_svd function into three functions, make_sparse_ttn, svd_bond_coefs, and compress_ttn.

Also the calc_qn function and associated cache has been turned into a "function object" called TermQN.

Other changes include:

emstoudenmire commented 1 month ago

Ok so the status of this PR is that I've made all the changes you recommended.

I have not done the following. I.e. these will be for future PR's:

mtfishman commented 1 month ago

Sounds like a reasonable place to leave things, I'll merge once tests pass.

emstoudenmire commented 1 month ago

Great. Yes this PR was mostly just about splitting the functions. The excessive arguments ought to come down once the data structures and graph analysis patterns are better (in future PR's).