Template Function Pennylane::LightningQubit::Util::matrixMatProd(const std::complex<T> *, const std::complex<T> *, std::complex<T> *, size_t, size_t, size_t, Trans)

Function Documentation

template<class T>
inline void Pennylane::LightningQubit::Util::matrixMatProd(const std::complex<T> *m_left, const std::complex<T> *m_right, std::complex<T> *m_out, size_t m, size_t n, size_t k, Trans transpose = Trans::NoTranspose)

Calculates matrix-matrix product using the best available method.

Note

Consider transpose=true, to get a better performance. To transpose a matrix efficiently, check Util::Transpose

Template Parameters

T – Floating point precision type.

Parameters
  • m_left – Row-wise flatten matrix of shape m * k.

  • m_right – Row-wise flatten matrix of shape k * n.

  • m_out – Pre-allocated row-wise flatten matrix of shape m * n.

  • m – Number of rows of m_left.

  • n – Number of columns of m_right.

  • k – Number of rows of m_right.

  • transpose – Whether use a transposed version of m_right.