Template Class ObservableTNCudaOperator¶
Defined in File ObservablesTNCudaOperator.hpp
Class Documentation¶
-
template<class TensorNetT>
class ObservableTNCudaOperator¶ ObservableTNCudaOperator Class.
This class creates
custatenetTensorNetwork
fromObservablesTNCuda
objects for measurement purpose. Since the NamedObs, HermitianObs, TensorProdObs and Hamiltionian objects can be encapsulated in acutensornetNetworkOperator_t
instance, only one ObservableTNCudaOperator class is designed here. Note that acutensornetNetworkOperator_t
object can only be created and destroyed by creating a new ObservableTNCudaOperator object, which ensures its lifetime is aligned with that of data associated to it.- Template Parameters
TensorNetT – tensor network class.
Public Types
-
using PrecisionT = typename TensorNetT::PrecisionT¶
-
using CFP_t = typename TensorNetT::CFP_t¶
-
using ComplexT = typename TensorNetT::ComplexT¶
-
using MetaDataT = std::tuple<std::string, std::vector<PrecisionT>, std::vector<ComplexT>>¶
-
using obs_key = std::tuple<std::string, std::vector<PrecisionT>, std::size_t>¶
Public Functions
-
inline ObservableTNCudaOperator(const TensorNetT &tensor_network, ObservableTNCuda<TensorNetT> &obs, const bool var_cal = false)¶
Construct a new ObservableTNCudaOperator object.
- Parameters
tensor_network – Tensor network object.
obs – ObservableTNCuda object.
var_cal – If true, calculate the variance of the observable.
-
inline ~ObservableTNCudaOperator()¶
-
inline auto getTNOperator() const -> cutensornetNetworkOperator_t¶
Get the
cutensornetNetworkOperator_t
object.- Returns
cutensornetNetworkOperator_t