28 #ifndef TOMOGRAPHER_DENSEDM_DISTMEASURES_H 29 #define TOMOGRAPHER_DENSEDM_DISTMEASURES_H 39 #include <Eigen/Eigenvalues> 41 #include <unsupported/Eigen/MatrixFunctions> 55 template<
typename ValueType,
typename Derived1,
typename Derived2>
58 return boost::math::constants::half<ValueType>() *
59 (rho1 - rho2).template selfadjointView<Eigen::Lower>()
60 .eigenvalues().cwiseAbs().sum();
70 template<
typename ValueType,
typename Derived,
typename Derived2>
97 template<
typename ValueType,
typename Der1,
typename Der2>
Base namespace for the Tomographer project.
ValueType fidelityT(const Eigen::MatrixBase< Der1 > &T1, const Eigen::MatrixBase< Der2 > &T2)
Fidelity between two quantum states given by their T Parameterization.
ValueType traceDistance(const Eigen::MatrixBase< Derived1 > &rho1, const Eigen::MatrixBase< Derived2 > &rho2)
Calculate the trace distance between two density matrices.
MatrixType operatorSqrt() const
ValueType fidelity(const Eigen::MatrixBase< Derived > &rho, const Eigen::MatrixBase< Derived2 > &sigma)
Fidelity between two density matrices.
const AdjointReturnType adjoint() const