Function Pennylane::LightningGPU::Util::controlPermutationMatrixIndex¶
Defined in File cuStateVec_helpers.hpp
Function Documentation¶
-
inline std::size_t Pennylane::LightningGPU::Util::controlPermutationMatrixIndex(const std::size_t ctrl_size, const std::size_t tgt_size, const std::vector<bool> &ctrl_values)¶
Calculate the starting index for target in controlled-operations for permutation matrix.
- Parameters
ctrl_size – Number of control wires
tgt_size – Number of target wires
ctrl_values – Control values
- Returns
index starting index for target in combined control/target wires
api/function_cuStateVec__helpers_8hpp_1ae532903ff24ec4e609b7ed9728fc7e8c
Download Python script
Download Notebook
View on GitHub