Template Function Pennylane::LightningQubit::Util::Transpose(std::span<const T>, std::size_t, std::size_t, Allocator)¶
Defined in File LinearAlgebra.hpp
Function Documentation¶
-
template<class T, class Allocator = std::allocator<T>>
inline auto Pennylane::LightningQubit::Util::Transpose(std::span<const T> mat, std::size_t m, std::size_t n, Allocator allocator = std::allocator<T>()) -> std::vector<T, Allocator>¶ Transpose a matrix of shape m * n to n * m using the best available method.
- 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_1a73e6548a26f5532c2067211d16add5af
Download Python script
Download Notebook
View on GitHub