Closed pbrehmer closed 1 year ago
Why not have overlap_matrix take a function, which is applied to the ket in the inner loop before computing the overlap one at a time (a bit like what sum does if you pass a function as first arg). Sonds to me likea useful primitive to have.
That sounds like a good idea! I'll open a PR in the next few days.
This was addressed and implemented in PR #46, so I will close the issue.
In its current implementation, the compression of
AffineDecomposition
s can suffer from a sharp increase in memory usage since inthe operators are applied to the snapshots all at once, which basically doubles the memory usage in this step because the snapshots are the largest objects in memory.
We should improve this by applying
op
to one element ofsnapshots
at a time, to cut down the memory usage. A naive implementation would be something like:Again, what would be the best way to avoid the
promote_type.(matrixel)
business, i.e. inferring the type before computing the elements ofmatrixel
?