LocalOperator internally using sparse matrices
Created by: VolodyaCO
The conclusion of #907 is that saving operators in a special low-memory-footprint object to store operators only saved about half of the memory. A much better solution was to internally use sparse matrices within LocalOperator
.
This PR presents modifications to the code in LocalOperator
, so that sparse matrices are supported internally.
I have not tested the code locally (apart from the Heisenberg example) so I hope I didn't break any code.
I guess I have not missed any internal numpy->scipy.sparse conversion. But I still need to run some memory profiling just to check that indeed nothing is converted to dense arrays within the LocalOperator
code.
UPDATE
Simple memory profiling indicates that indeed there are no noticeable undesired dense operators withi LocalOperator
Closes #457 (closed)