Template Function Pennylane::LightningQubit::Util::Transpose(const std::vector<T, Allocator>&, size_t, size_t)¶
Defined in File LinearAlgebra.hpp
Function Documentation¶
-
template<class T, class Allocator>
inline auto Pennylane::LightningQubit::Util::Transpose(const std::vector<T, Allocator> &mat, size_t m, size_t n) -> std::vector<T, Allocator>¶ Transpose a matrix of shape m * n to n * m using the best available method.
This version may be merged with the above one when std::ranges is well supported.
- Template Parameters
T – Floating point precision type.
- Parameters
mat – Row-wise flatten matrix of shape m * n.
m – Number of rows of
mat
.n – Number of columns of
mat
.
- Returns
mat transpose of shape n * m.
api/function_LinearAlgebra_8hpp_1a249c0c467fc202594c2aa016a8b175f5
Download Python script
Download Notebook
View on GitHub