You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expected that mpa.compress() without arguments would not perform compression except maybe ensure normalization. This would be useful in order to make compression optional: No arguments cause no compression to be performed.
However, both mpa.compress() and mpa.compression() perform SVD compression without bdim and relerr, i.e. they truncate singular values which are equal to zero. This does not occur frequently. In many cases, this will not reduce the bond dimension by more than a simple mpa.normalize() and CPU time is wasted.
I suggest to change change the two methods to not run SVD compression if method='SVD' is not specified. @dseuss, do you agree?
The text was updated successfully, but these errors were encountered:
But why would you want to call compress in the first place if you don't want to compress?
I actually think that the current behavior makes sense: It compresses as much as it can without altering the actual tensor. I sometimes use it to get rid of an unnecesarrily high rank:
In [1]: import mpnum as mp
In [2]: a = mp.random_mpa(4, 2, 10, force_bdim=True)
In [3]: a.bdims
Out[3]: (10, 10, 10)
In [4]: a.compression()[0].bdims
Out[4]: (2, 4, 2)
I like your off-line suggestion of using compression(method='none') to provide an easy means of replacing compression by a no-op and keeping the current behaviour of compression(). I should implement it soon.
I expected that
mpa.compress()
without arguments would not perform compression except maybe ensure normalization. This would be useful in order to make compression optional: No arguments cause no compression to be performed.However, both
mpa.compress()
andmpa.compression()
perform SVD compression withoutbdim
andrelerr
, i.e. they truncate singular values which are equal to zero. This does not occur frequently. In many cases, this will not reduce the bond dimension by more than a simplempa.normalize()
and CPU time is wasted.I suggest to change change the two methods to not run SVD compression if
method='SVD'
is not specified. @dseuss, do you agree?The text was updated successfully, but these errors were encountered: