Template Function Pennylane::Util::isApproxEqual(const Data_t *, const std::size_t, const Data_t *, const std::size_t, typename Data_t::value_type)¶
Defined in File TestHelpers.hpp
Function Documentation¶
-
template<class Data_t>
inline bool Pennylane::Util::isApproxEqual(const Data_t *data1, const std::size_t length1, const Data_t *data2, const std::size_t length2, 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 array pointer 1.
length1 – StateVector data array pointer 1.
data2 – StateVector data array pointer 2.
length2 – StateVector data array pointer 1.
- Returns
true Data are approximately equal.
- Returns
false Data are not approximately equal.
api/function_TestHelpers_8hpp_1a9999e23c9c963f6b18a968a9f7f4005b
Download Python script
Download Notebook
View on GitHub