Template Function Pennylane::LightningGPU::Util::NormalizeCastIndices

Function Documentation

template<typename IndexTypeIn, typename IndexTypeOut>
inline auto Pennylane::LightningGPU::Util::NormalizeCastIndices(const std::vector<IndexTypeIn> &indices, const std::size_t &num_qubits) -> std::vector<IndexTypeOut>

Normalize/Cast the index ordering to match PennyLane.

Template Parameters
  • IndexTypeIn – Integer value type.

  • IndexTypeOut – Integer value type.

Parameters
  • indices – Given indices to transform.

  • num_qubits – Number of qubits.