SyTen

◆ von_neumann_entropy()

SRDef syten::von_neumann_entropy ( Tensor< 2 > const &  s)

Calculates the von Neumann entropy \( \sum_i s_{ii}^2 \mathrm{log}(s_{ii}^2) \).

References syten::STensorImpl::log2(), overThreshold(), std::pow(), real(), SYTEN_ASSERT, and SYTEN_ZERO_THRESHOLD.

Referenced by syten::Pyten::init_tensor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: