Function Pennylane::LightningGPU::Util::generateTrivialPermutation

Function Documentation

inline std::vector<custatevecIndex_t> Pennylane::LightningGPU::Util::generateTrivialPermutation(const std::size_t ctrl_size, const std::size_t tgt_size)

Fill permutation vector of size 2^(ctrl_size + tgt_size) with trivial permutation [0, 1, 2…].

Parameters
  • ctrl_size – Number of control wires

  • tgt_size – Number of target wires

Returns

permutations Vector of trivial permutations