Template Function Pennylane::LightningQubit::Util::count_unique¶
Defined in File ConstantTestHelpers.hpp
Function Documentation¶
-
template<typename T, std::size_t size>
constexpr std::size_t Pennylane::LightningQubit::Util::count_unique(const std::array<T, size> &arr)¶ Count the number of unique elements in the array.
This is O(n^2) version for all T
- Template Parameters
T – Type of array elements
size – Size of the array
- Returns
std::size_t
api/function_ConstantTestHelpers_8hpp_1ab107ffd7d8dd3023374f2a366a3ca7f1
Download Python script
Download Notebook
View on GitHub