Function Pennylane::Util::transposed_state_index¶
Defined in File Util.hpp
Function Documentation¶
-
inline auto Pennylane::Util::transposed_state_index(std::size_t ind, const std::vector<std::size_t> &new_axes) -> std::size_t¶
Determines the transposed index of a tensor stored linearly. This function assumes each axis will have a length of 2 (|0>, |1>).
- Parameters
ind – index after transposition.
new_axes – new axes distribution.
- Returns
unsigned int with the new transposed index.
api/function_Util_8hpp_1a0e44b45cd34841cfa4d0d85de744e021
Download Python script
Download Notebook
View on GitHub