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

Function Documentation

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

Calculates the matrix-matrix product using the best available method.

See also

void 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, std::size_t nthreads = 1, bool transpose = false)

Note

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