This PR does a cleanup of the SparseState and SparseOperator classes (note the renaming). It also introduces two useful classes:
Buffer, basically a std::vector to which we can push_back without incurring the cost of copying and that can be reset without deallocating memory. Useful if we need to repeatedly store some temporary data without worrying about storage and cost.
VectorSpace (and VectorSpaceList), two templated classes to handle objects that behave like vector spaces (CI states, operators, etc). This provides a unified interface and uses std::unorderd_map for storage.
Some sprinkle of new functionality that is too early to be considered stable.
User Notes
[x] Improved the performance of the SparseExp and SparseFactExp classes (+ some renaming)
[x] Introduces Buffer and VectorSpace templated classes.
Checklist
[x] Added/updated tests of new features and included a reference output.ref file
[x] Removed comments in code and input files
[x] Documented source code
[x] Checked for redundant headers
[x] Checked for consistency in the formatting of the output file
Description
This PR does a cleanup of the
SparseState
andSparseOperator
classes (note the renaming). It also introduces two useful classes:Buffer
, basically astd::vector
to which we canpush_back
without incurring the cost of copying and that can be reset without deallocating memory. Useful if we need to repeatedly store some temporary data without worrying about storage and cost.VectorSpace
(andVectorSpaceList
), two templated classes to handle objects that behave like vector spaces (CI states, operators, etc). This provides a unified interface and usesstd::unorderd_map
for storage.User Notes
SparseExp
andSparseFactExp
classes (+ some renaming)Buffer
andVectorSpace
templated classes.Checklist
output.ref
file