33 template<
bool isOperator>
class TTNetwork;
36 template<
bool isOperator>
41 static constexpr
const size_t N = isOperator?2:1;
47 explicit TTStack(
const bool _canno,
const size_t _corePos = 0);
Header file for CHECK and REQUIRE macros.
Internal representation of an read and write and moveable indexed Tensor or TensorNetwork.
const bool cannonicalization_required
static void contract_stack(IndexedTensorWritable< TensorNetwork > &&_me)
Header file for the IndexedTensorMoveable class.
Very general class used to represent arbitary tensor networks.
Internal representation of an readable indexed Tensor or TensorNetwork.
Specialized TensorNetwork class used to represent TTTensor and TToperators.
The main namespace of xerus.
virtual bool specialized_sum(std::unique_ptr< IndexedTensorMoveable< TensorNetwork >> &_out, IndexedTensorReadOnly< TensorNetwork > &&_me, IndexedTensorReadOnly< TensorNetwork > &&_other) const override
(Internal) Calculates the sum between _me and _other and stores the result in _out. Requires that *this is the tensorObjectReadOnly of _me.
virtual void specialized_evaluation(IndexedTensorWritable< TensorNetwork > &&, IndexedTensorReadOnly< TensorNetwork > &&) override
(Internal) Evaluates _other into _me. Requires that *this is the tensorObjectReadOnly of _me...
const size_t futureCorePosition
Abstract internal representation of an read and writeable indexed Tensor or TensorNetwork.
double value_t
The type of values to be used by xerus.
virtual void operator/=(const value_t _divisor) override
Performs the entrywise divison by a constant _divisor.
TTStack & operator=(const TTStack &_other)=delete
virtual void operator*=(const value_t _factor) override
Performs the entrywise multiplication with a constant _factor.
static constexpr const size_t N
The number of external links in each node, i.e. one for TTTensors and two for TTOperators.
virtual value_t frob_norm() const override
Calculates the frobenious norm of the TensorNetwork.
virtual TensorNetwork * get_copy() const override
Returns a new copy of the network.
virtual bool specialized_contraction(std::unique_ptr< IndexedTensorMoveable< TensorNetwork >> &_out, IndexedTensorReadOnly< TensorNetwork > &&_me, IndexedTensorReadOnly< TensorNetwork > &&_other) const override
(Internal) Calculates the contraction between _me and _other and stores the result in _out...
Header file for the TensorNetwork class.
Internal class used to represent stacks of (possibly multiply) applications of TTOperators to either ...
TTStack(const bool _canno, const size_t _corePos=0)