Template Function Pennylane::LightningQubit::Util::vecMatrixProd(const T *, const T *, T *, size_t, size_t)

Function Documentation

template<class T>
inline void Pennylane::LightningQubit::Util::vecMatrixProd(const T *v_in, const T *mat, T *v_out, size_t m, size_t n)

Calculates vector-matrix product.

Template Parameters

T – Floating point precision type.

Parameters
  • v_in – Data array repr. a vector of shape m * 1.

  • mat – Data array repr. a flatten (row-wise) matrix m * n.

  • v_out – Pre-allocated data array to store the result that is mat_t \times v_in where mat_t is transposed of mat.

  • m – Number of rows of mat.

  • n – Number of columns of mat.