Template Function Pennylane::Util::static_lookup¶
Defined in File ConstantUtil.hpp
Function Documentation¶
-
template<auto op, class T, size_t size>
constexpr auto Pennylane::Util::static_lookup(const std::array<std::pair<decltype(op), T>, size> &arr) -> T¶ For lookup from any array of pair whose first elements are GateOperation.
As Util::lookup can be used in constexpr context, this function is redundant (by the standard). But GCC 9 still does not accept Util::lookup in constexpr some cases.
As we now move to GCC>=10, this function is deprecated.
api/function_ConstantUtil_8hpp_1a069de44b95505d0ae845465fe8893007
Download Python script
Download Notebook
View on GitHub