Template Function Pennylane::Util::transpose_state_tensor¶
Defined in File Util.hpp
Function Documentation¶
-
template<typename T>
auto Pennylane::Util::transpose_state_tensor(const std::vector<T> &tensor, const std::vector<std::size_t> &new_axes) -> std::vector<T>¶ Template for the transposition of state tensors, axes are assumed to have a length of 2 (|0>, |1>).
- Template Parameters
T – Tensor data type.
- Parameters
tensor – Tensor to be transposed.
new_axes – new axes distribution.
- Returns
Transposed Tensor.
api/function_Util_8hpp_1a27024d6912f17b87afd55b730921a559
Download Python script
Download Notebook
View on GitHub