ExaTN
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
exatn::numerics::TensorExpansion Class Reference

Classes

struct  ExpansionComponent
 

Public Types

using Iterator = typename std::vector< ExpansionComponent >::iterator
 
using ConstIterator = typename std::vector< ExpansionComponent >::const_iterator
 

Public Member Functions

 TensorExpansion ()
 
 TensorExpansion (const TensorExpansion &expansion, const TensorOperator &tensor_operator)
 
 TensorExpansion (const TensorExpansion &left_expansion, const TensorExpansion &right_expansion)
 
 TensorExpansion (const TensorExpansion &left_expansion, const TensorExpansion &right_expansion, const TensorOperator &tensor_operator)
 
 TensorExpansion (const TensorExpansion &)=default
 
TensorExpansionoperator= (const TensorExpansion &)=default
 
 TensorExpansion (TensorExpansion &&) noexcept=default
 
TensorExpansionoperator= (TensorExpansion &&) noexcept=default
 
Iterator begin ()
 
Iterator end ()
 
ConstIterator cbegin () const
 
ConstIterator cend () const
 
bool isKet () const
 
bool isBra () const
 
int getRank () const
 
std::size_t getNumComponents () const
 
const ExpansionComponentgetComponent (std::size_t component_num)
 
bool appendComponent (std::shared_ptr< TensorNetwork > network, const std::complex< double > coefficient)
 
void conjugate ()
 
void printIt () const
 

Protected Attributes

bool ket_
 
std::vector< ExpansionComponentcomponents_
 

Constructor & Destructor Documentation

◆ TensorExpansion() [1/4]

exatn::numerics::TensorExpansion::TensorExpansion ( )
inline

Constructs an empty ket tensor expansion.

◆ TensorExpansion() [2/4]

exatn::numerics::TensorExpansion::TensorExpansion ( const TensorExpansion expansion,
const TensorOperator tensor_operator 
)

Constructs a tensor expansion by applying a tensor network operator to another tensor network expansion.

◆ TensorExpansion() [3/4]

exatn::numerics::TensorExpansion::TensorExpansion ( const TensorExpansion left_expansion,
const TensorExpansion right_expansion 
)

Either constructs the inner product tensor network expansion by closing one tensor network expansion with another tensor network expansion from the dual tensor space or constructs the direct product tensor network expansion from two tensor network expansions from the same space.

◆ TensorExpansion() [4/4]

exatn::numerics::TensorExpansion::TensorExpansion ( const TensorExpansion left_expansion,
const TensorExpansion right_expansion,
const TensorOperator tensor_operator 
)

Constructs the inner product tensor network expansion by applying a tensor network operator to a tensor network expansion (right_expansion) and then closing the resulting tensor network expansion with another tensor network expansion from the dual tensor space.

Member Function Documentation

◆ appendComponent()

bool exatn::numerics::TensorExpansion::appendComponent ( std::shared_ptr< TensorNetwork network,
const std::complex< double >  coefficient 
)

Appends a new component to the tensor network expansion.

◆ conjugate()

void exatn::numerics::TensorExpansion::conjugate ( )

Conjugates the tensor network expansion: All constituting tensors are complex conjugated, all tensor legs reverse their direction, complex linear expansion coefficients are conjugated: The ket tensor network expansion becomes a bra, and vice versa.

◆ getComponent()

const ExpansionComponent& exatn::numerics::TensorExpansion::getComponent ( std::size_t  component_num)
inline

Returns a specific component of the tensor network expansion.

◆ getNumComponents()

std::size_t exatn::numerics::TensorExpansion::getNumComponents ( ) const
inline

Returns the total number of components in the tensor network expansion.

◆ getRank()

int exatn::numerics::TensorExpansion::getRank ( ) const
inline

Returns the rank of the tensor expansion (number of legs per component). If the expansion is empty, returns -1.

◆ isKet()

bool exatn::numerics::TensorExpansion::isKet ( ) const
inline

Returns whether the tensor network expansion is ket or not.

◆ printIt()

void exatn::numerics::TensorExpansion::printIt ( ) const

Prints.

Member Data Documentation

◆ ket_

bool exatn::numerics::TensorExpansion::ket_
protected

Data members:


The documentation for this class was generated from the following files: