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

Classes

struct  OperatorComponent
 

Public Types

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

Public Member Functions

 TensorOperator (const std::string &name)
 
 TensorOperator (const TensorOperator &)=default
 
TensorOperatoroperator= (const TensorOperator &)=default
 
 TensorOperator (TensorOperator &&) noexcept=default
 
TensorOperatoroperator= (TensorOperator &&) noexcept=default
 
Iterator begin ()
 
Iterator end ()
 
ConstIterator cbegin () const
 
ConstIterator cend () const
 
const std::string & getName () const
 
int getRank () const
 
std::size_t getNumComponents () const
 
const OperatorComponentgetComponent (std::size_t component_num)
 
bool appendComponent (std::shared_ptr< TensorNetwork > network, const std::vector< std::pair< unsigned int, unsigned int >> &ket_pairing, const std::vector< std::pair< unsigned int, unsigned int >> &bra_pairing, const std::complex< double > coefficient)
 
void conjugate ()
 
void printIt () const
 

Protected Attributes

std::string name_
 
std::vector< OperatorComponentcomponents_
 

Member Function Documentation

◆ appendComponent()

bool exatn::numerics::TensorOperator::appendComponent ( std::shared_ptr< TensorNetwork network,
const std::vector< std::pair< unsigned int, unsigned int >> &  ket_pairing,
const std::vector< std::pair< unsigned int, unsigned int >> &  bra_pairing,
const std::complex< double >  coefficient 
)

Appends a new component to the tensor operator linear expansion. The new component can either be a tensor network or just a single tensor expressed as a tensor network of size 1. The ket and bra pairing arguments specify which legs of the network output tensor act on a ket vector and which on a bra vector, together with their mapping onto the global modes of the tensor space the tensor operator is supposed to act upon.

◆ conjugate()

void exatn::numerics::TensorOperator::conjugate ( )

Conjugates the tensor operator: All constituting tensors are complex conjugated, all tensor legs reverse their direction, bra legs and ket legs are swapped, complex linear expansion coefficients are complex conjugated.

◆ getComponent()

const OperatorComponent& exatn::numerics::TensorOperator::getComponent ( std::size_t  component_num)
inline

Returns a specific component of the tensor operator.

◆ getName()

const std::string& exatn::numerics::TensorOperator::getName ( ) const
inline

Returns the name of the tensor network operator.

◆ getNumComponents()

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

Returns the total number of components in the tensor operator.

◆ getRank()

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

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

◆ printIt()

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

Prints.


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