ngnrsaa / qflex

Flexible Quantum Circuit Simulator (qFlex) implements an efficient tensor network, CPU-based simulator of large quantum circuits.
Apache License 2.0
97 stars 24 forks source link

improve python quality #195

Closed alexandrupaler closed 4 years ago

alexandrupaler commented 4 years ago

solves #191

alexandrupaler commented 4 years ago

should solve #174 and #177, too . This PR also prepares the way to remove temp files. Added data_storage_interface.py

alexandrupaler commented 4 years ago

174 and 177 are solved only because of the yield in the destructor. Please keep the PR like this, if it is not too much to ask, because there is already another PR to remove temp files by Salvatore, and we would duplicate/overlap too much for simple things.

alexandrupaler commented 4 years ago

I am not in favour of removing files altogether, but I think I am not the one to decide. However, the version of the code three weeks ago had no temp files, then temp files appeared and introduced very strange behaviours which took days to debug and understand, and I had to write my code around them. Now I find actually temp files useful for debugging, and that is the reason I introduced the data interface.

s-mandra commented 4 years ago

If we are removing temp files entirely {...}

Leaving to @alexandrupaler to verify with @s-mandra what the intent is here (relevant PR is #210).

See my comment on #210.