Function Pennylane::Util::transposed_state_index¶
Defined in File Util.hpp
Function Documentation¶
-
inline auto Pennylane::Util::transposed_state_index(size_t ind, const std::vector<size_t> &new_axes) -> 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_1ae8e868d6fb904652e18517ad12b9b979
Download Python script
Download Notebook
View on GitHub