Template Function Pennylane::Util::Transpose(std::span<const T>, size_t, size_t, Allocator)¶
Defined in File LinearAlgebra.hpp
Function Documentation¶
-
template<class T, class Allocator = std::allocator<T>>
inline auto Pennylane::Util::Transpose(std::span<const T> mat, size_t m, 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_1a851cda25bf58beb1a148d1f5d26162eb
Download Python script
Download Notebook
View on GitHub