29 #ifndef TOMOGRAPHER_DENSEDM_TSPACEFIGOFMERIT_H 30 #define TOMOGRAPHER_DENSEDM_TSPACEFIGOFMERIT_H 57 template<
typename DMTypes_,
typename ValueType_ =
double>
62 typedef DMTypes_ DMTypes;
80 inline ValueType
getValue(MatrixTypeConstRef T)
const 82 return fidelityT<ValueType>(T, _ref_T);
96 template<
typename DMTypes_,
typename ValueType_ =
double>
101 typedef DMTypes_ DMTypes;
119 inline ValueType
getValue(MatrixTypeConstRef T)
const 121 ValueType F = fidelityT<ValueType>(T, _ref_T);
122 if (F >= ValueType(1)) {
132 template<
typename DMTypes_,
typename ValueType_ =
double>
137 typedef DMTypes_ DMTypes;
155 inline ValueType
getValue(MatrixTypeConstRef T)
const 157 return traceDistance<ValueType>(T*T.adjoint(), _ref_rho);
166 template<
typename DMTypes_>
171 typedef DMTypes_ DMTypes;
185 VectorParamType _A_x;
190 : _param_x(dmt), _A_x(_param_x.HermToX(A))
195 : _param_x(dmt), _A_x(A_x)
200 inline ValueType
getValue(MatrixTypeConstRef T)
const 202 return _A_x.transpose() * _param_x.
HermToX(T*T.adjoint());
ValueType getValue(MatrixTypeConstRef T) const
Calculate the trace distance of the state represented by T to the reference state.
Base namespace for the Tomographer project.
ObservableValueCalculator(DMTypes dmt, MatrixTypeConstRef A)
Constructor directly accepting A as a hermitian matrix.
ValueType getValue(MatrixTypeConstRef T) const
Calculate the purified distance of the state represented by T to the reference state.
C++ types for describing dense density matrices in various parameterizations.
ValueType_ ValueType
For ValueCalculator interface : value type.
Calculate the trace distance to a reference state for each sample.
Distance measures in quantum information for states represented as dense matrices.
ValueType getValue(MatrixTypeConstRef T) const
Calculate the fidelity of the state represented by T to the reference state.
PurifDistToRefCalculator(MatrixTypeConstRef T_ref)
Constructor, the reference state is T_ref (in T Parameterization)
Calculate expectation value of an observable for each sample.
DMTypes::RealScalar ValueType
For ValueCalculator interface : value type.
ObservableValueCalculator(DMTypes dmt, VectorParamTypeConstRef A_x)
Constructor directly accepting the X parameterization of A.
ValueType getValue(MatrixTypeConstRef T) const
Calculate the expectation value of the observable for the state represented by T. ...
FidelityToRefCalculator(MatrixTypeConstRef T_ref)
Constructor, the reference state is T_ref (in T Parameterization)
Calculate the "purified distance" to a reference state for each sample.
Tools for parameterizing hermitian matrices with the X Parameterization.
VectorParamType HermToX(MatrixTypeConstRef Herm) const
Get the X-parameterization corresponding to a given hermitian matrix.
Calculate the fidelity to a reference state for each sample.
Managing the need for specific overrides to operator new() for some types (especially Eigen types) ...
ValueType_ ValueType
For ValueCalculator interface : value type.
ValueType_ ValueType
For ValueCalculator interface : value type.
TrDistToRefCalculator(MatrixTypeConstRef rho_ref)
Constructor, the reference state is rho_ref.
RealScalar_ RealScalar
Real scalar type, given in template parameter. Usually double is fine.