block-hczhai / pyblock3-preview

pyblock3: an efficient python block-sparse tensor library
GNU General Public License v3.0
21 stars 12 forks source link

pyblock3 Usage possible typos #10

Closed bartandrews closed 8 months ago

bartandrews commented 8 months ago

I have recently gone through the pyblock3 Usage tutorial step-by-step, and I have identified 2 cells which didn't run for me. I am new to the package, so I may be missing something trivial.

(i) In the section https://pyblock3.readthedocs.io/en/latest/Documentation/mpo.html#from-pyscf , I believe that a few variables are not defined, e.g. mpg, PointGroup. I think that I can set mpg to a point group string, e.g. mpg = "D2h", but I'm not sure about the PointGroup array. Are there some definitions missing here?

(ii) In the section https://pyblock3.readthedocs.io/en/latest/Documentation/det.html#determinants , I think that the line smps = mps.to_sliceable() needs to be changed to smps = mps.to_non_flat().to_sliceable() to avoid the error "FlatSparseTensor" object has no attribute 'to_sliceable'.

hczhai commented 8 months ago

Hi, thanks very much for pointing out the issue!

(i) and (ii) should now be fixed in https://github.com/block-hczhai/pyblock3-preview/commit/cf94427407de6dc9865158192390ee76b1a78b0b. The documentation pages are updated if you reload.

Please let me know if you have any additional requests.

bartandrews commented 8 months ago

Thank you, everything works great now.