Template Function Pennylane::Util::isApproxEqual(const std::vector<Data_t, AllocA>&, const std::vector<Data_t, AllocB>&, const typename Data_t::value_type)¶
Defined in File TestHelpers.hpp
Function Documentation¶
-
template<class Data_t, class AllocA, class AllocB>
inline bool Pennylane::Util::isApproxEqual(const std::vector<Data_t, AllocA> &data1, const std::vector<Data_t, AllocB> &data2, const typename Data_t::value_type eps = std::numeric_limits<typename Data_t::value_type>::epsilon() * 100)¶ Utility function to compare complex statevector data.
- Template Parameters
Data_t – Floating point data-type.
- Parameters
data1 – StateVector data 1.
data2 – StateVector data 2.
eps – The absolute tolerance parameter.
- Returns
true Data are approximately equal.
- Returns
false Data are not approximately equal.
api/function_TestHelpers_8hpp_1a6301ac20743c56d501fdc68eafdacba4
Download Python script
Download Notebook
View on GitHub