SyTen
tensor_misc.cpp File Reference

Implementation for inc/tensor/tensor_misc.h. More...

+ Include dependency graph for tensor_misc.cpp:

Namespaces

namespace  syten
 Syten namespace.
 

Functions

Vec< SDef > syten::diagonal (Tensor< 2 > const &m, bool const order=true)
 Returns a vector of diagonal values, repeated according to the multiplicities of the tensor blocks. More...
 
SRDef syten::invertDiagonal (Tensor< 2 > &m)
 Inverts a rank-two tensor in-place by inverting all reduced dense and CGC-space sparse blocks. More...
 
Tensor< 2 > syten::sqrt (Tensor< 2 > inp)
 Returns the square root of the diagonal input matrix. More...
 
SDef syten::trace (Tensor< 1 > const &a)
 Calculates the trace of a rank-1 tensor. More...
 
SDef syten::trace (Tensor< 2 > const &a)
 Calculates the trace of a rank-2 tensor. More...
 
SRDef syten::von_neumann_entropy (Tensor< 2 > const &s)
 Calculates the von Neumann entropy \( \sum_i s_{ii}^2 \mathrm{log}(s_{ii}^2) \). More...
 

Detailed Description

Implementation for inc/tensor/tensor_misc.h.