Template Function Pennylane::Util::ConstSum

Function Documentation

template<class T, class U = T>
static inline constexpr auto Pennylane::Util::ConstSum(std::complex<U> a, std::complex<T> b) -> std::complex<T>

Compile-time scalar complex summation.

Template Parameters
  • T – Precision of complex value a and result.

  • U – Precision of complex value b.

Parameters
  • a – Complex scalar value.

  • b – Complex scalar value.

Returns

constexpr std::complex<T>