Template Function Pennylane::LightningKokkos::Functors::probs_bitshift_generic

Function Documentation

template<class DeviceType, class PrecisionT>
auto Pennylane::LightningKokkos::Functors::probs_bitshift_generic(const Kokkos::View<Kokkos::complex<PrecisionT>*> arr, const std::size_t num_qubits, const std::vector<std::size_t> &wires) -> std::vector<PrecisionT>

Compute probability distribution from StateVector.

Note: From Kokkos 5.1 onwards, the MDRangePolicy selects larger block sizes for parallel_reduce, which can exceed CUDA/HIP shared memory limits. For GPU execution, probs will not dispatch to this functor for more than GPU_SHARED_NWIRES_MAX (4) wires.

Template Parameters:
  • DeviceType – Kokkos execution space.

  • PrecisionT – StateVector precision.

Parameters:
  • arr – StateVector data.

  • num_qubits – Number of qubits.

  • wires – Wires for which the probability is computed.