Template Function Pennylane::LightningQubit::Util::matrixMatProd(const std::complex<T> *, const std::complex<T> *, std::complex<T> *, std::size_t, std::size_t, std::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, std::size_t m, std::size_t n, std::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.