29 #ifndef TOMOGRAPHER_DENSEDM_TSPACEFIGOFMERIT_H 30 #define TOMOGRAPHER_DENSEDM_TSPACEFIGOFMERIT_H 33 #include <boost/serialization/serialization.hpp> 61 template<
typename DMTypes_,
typename ValueType_ =
double>
66 typedef DMTypes_ DMTypes;
84 inline ValueType
getValue(MatrixTypeConstRef T)
const 86 return fidelityT<ValueType>(T, _ref_T);
93 friend boost::serialization::access;
94 template<
typename Archive>
95 void serialize(Archive & a,
unsigned int )
114 template<
typename DMTypes_,
typename ValueType_ =
double>
119 typedef DMTypes_ DMTypes;
137 inline ValueType
getValue(MatrixTypeConstRef T)
const 139 ValueType F = fidelityT<ValueType>(T, _ref_T);
140 if (F >= ValueType(1)) {
150 friend boost::serialization::access;
151 template<
typename Archive>
152 void serialize(Archive & a,
unsigned int )
163 template<
typename DMTypes_,
typename ValueType_ =
double>
168 typedef DMTypes_ DMTypes;
186 inline ValueType
getValue(MatrixTypeConstRef T)
const 188 return traceDistance<ValueType>(T*T.adjoint(), _ref_rho);
194 friend boost::serialization::access;
195 template<
typename Archive>
196 void serialize(Archive & a,
unsigned int )
209 template<
typename DMTypes_>
214 typedef DMTypes_ DMTypes;
228 VectorParamType _A_x;
235 : _param_x(dmt), _A_x(_param_x.HermToX(A))
242 : _param_x(dmt), _A_x(A_x)
247 inline ValueType
getValue(MatrixTypeConstRef T)
const 249 return _A_x.transpose() * _param_x.
HermToX(T*T.adjoint());
256 friend boost::serialization::access;
257 template<
typename Archive>
258 void serialize(Archive & a,
unsigned int )
FidelityToRefCalculator()
Construct an invalid object – ONLY for use with Boost.serialization.
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.
ObservableValueCalculator()
Construct an invalid object – ONLY for use with Boost.serialization.
TrDistToRefCalculator()
Construct an invalid object – ONLY for use with Boost.serialization.
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.
PurifDistToRefCalculator()
Construct an invalid object – ONLY for use with Boost.serialization.
TrDistToRefCalculator(MatrixTypeConstRef rho_ref)
Constructor, the reference state is rho_ref.
RealScalar_ RealScalar
Real scalar type, given in template parameter. Usually double is fine.