26 #ifndef EXATN_NUMERICS_TENSOR_EXPANSION_HPP_
27 #define EXATN_NUMERICS_TENSOR_EXPANSION_HPP_
29 #include "tensor_basic.hpp"
30 #include "tensor_network.hpp"
31 #include "tensor_operator.hpp"
48 std::shared_ptr<TensorNetwork> network;
50 std::complex<double> coefficient;
53 using Iterator =
typename std::vector<ExpansionComponent>::iterator;
54 using ConstIterator =
typename std::vector<ExpansionComponent>::const_iterator;
85 inline Iterator begin() {
return components_.begin();}
86 inline Iterator end() {
return components_.end();}
87 inline ConstIterator cbegin()
const {
return components_.cbegin();}
88 inline ConstIterator cend()
const {
return components_.cend();}
95 inline bool isBra()
const{
102 if(!(components_.empty()))
return components_[0].network->getRank();
108 return components_.size();
113 assert(component_num < components_.size());
114 return components_[component_num];
119 const std::complex<double> coefficient);
132 void constructDirectProductTensorExpansion(
const TensorExpansion & left_expansion,
134 void constructInnerProductTensorExpansion(
const TensorExpansion & left_expansion,
137 const std::vector<std::pair<unsigned int, unsigned int>> & new_legs);
143 std::vector<ExpansionComponent> components_;
150 #endif //EXATN_NUMERICS_TENSOR_EXPANSION_HPP_