Refactor the approach from feature/exact_state so that GeneralState is the top level class, making the API closer to the upcoming version of cuTensorNet and also more similar to the approach in structured_state submodule. In particular:
configure().prepare().compute() from GeneralState are combined into a get_statevector() which will free the scratch space at the end of the computation.
GeneralExpectationValue is also removed and its corresponding chain of methods configure().prepare().compute() is combined into a expectation_value() method within GeneralState.
GeneralOperator is removed since it's too low-level and only relevant for expectation value calculations. The cuTensorNet NetworkOperator only needs to survive during the application of the new method expectation_value().
Refactor the approach from
feature/exact_state
so thatGeneralState
is the top level class, making the API closer to the upcoming version of cuTensorNet and also more similar to the approach instructured_state
submodule. In particular:configure().prepare().compute()
fromGeneralState
are combined into aget_statevector()
which will free the scratch space at the end of the computation.GeneralExpectationValue
is also removed and its corresponding chain of methodsconfigure().prepare().compute()
is combined into aexpectation_value()
method withinGeneralState
.GeneralOperator
is removed since it's too low-level and only relevant for expectation value calculations. The cuTensorNetNetworkOperator
only needs to survive during the application of the new methodexpectation_value()
.