Template Function Pennylane::Util::isApproxEqual(const Data_t&, const Data_t&, typename Data_t::value_type)

Function Documentation

template<class Data_t>
inline bool Pennylane::Util::isApproxEqual(const Data_t &data1, const Data_t &data2, 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.

Returns

true Data are approximately equal.

Returns

false Data are not approximately equal.