Template Function Pennylane::LightningQubit::Util::omp_matrixVecProd

Function Documentation

template<class T>
static inline void Pennylane::LightningQubit::Util::omp_matrixVecProd(const std::complex<T> *mat, const std::complex<T> *v_in, std::complex<T> *v_out, std::size_t m, std::size_t n, Trans transpose)

Calculates the matrix-vector product using OpenMP.

Template Parameters

T – Floating point precision type.

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

  • v_in – Complex data array repr. a vector of shape n * 1.

  • v_out – Pre-allocated complex data array to store the result.

  • m – Number of rows of mat.

  • n – Number of columns of mat.

  • transpose – Whether use a transposed version of m_right. row-wise.