Template Class getProbsNQubitOpFunctor¶
Defined in File MeasuresFunctors.hpp
Class Documentation¶
-
template<class PrecisionT, class DeviceType, std::size_t num_wires>
class getProbsNQubitOpFunctor¶ Compute probability distribution from StateVector.
- Template Parameters
PrecisionT – StateVector precision.
DeviceType – Kokkos execution space.
num_wires – Number of wires (0 is used for a dynamic number of wires).
- Param arr_
StateVector data.
- Param num_qubits_
Number of qubits.
- Param wires_
Wires for which the probability is computed.
Public Types
-
using execution_space = DeviceType¶
-
using value_type = PrecisionT[]¶
-
using UnmanagedSizeTHostView = Kokkos::View<std::size_t*, Kokkos::HostSpace, Kokkos::MemoryTraits<Kokkos::Unmanaged>>¶
-
using ComplexT = Kokkos::complex<PrecisionT>¶
Public Functions
-
inline getProbsNQubitOpFunctor(const Kokkos::View<ComplexT*> &arr_, const std::size_t num_qubits_, const std::vector<std::size_t> &wires_)¶
- inline KOKKOS_INLINE_FUNCTION void init (PrecisionT dst[]) const
- inline KOKKOS_INLINE_FUNCTION void join (PrecisionT dst[], const PrecisionT src[]) const
- inline KOKKOS_INLINE_FUNCTION void apply0 (const std::size_t i0, const std::size_t rev_wire, const std::size_t offset, PrecisionT dst[]) const
- inline KOKKOS_INLINE_FUNCTION void apply1 (const std::size_t i0, const std::size_t rev_wire_0, const std::size_t rev_wire_1, const std::size_t offset, PrecisionT dst[]) const
- inline KOKKOS_INLINE_FUNCTION void apply2 (const std::size_t i0, const std::size_t rev_wire_0, const std::size_t rev_wire_1, const std::size_t rev_wire_2, const std::size_t offset, PrecisionT dst[]) const
- inline KOKKOS_INLINE_FUNCTION void apply3 (const std::size_t i0, const std::size_t rev_wire_0, const std::size_t rev_wire_1, const std::size_t rev_wire_2, const std::size_t rev_wire_3, const std::size_t offset, PrecisionT dst[]) const
- inline KOKKOS_INLINE_FUNCTION void apply4 (const std::size_t i0, const std::size_t rev_wire_0, const std::size_t rev_wire_1, const std::size_t rev_wire_2, const std::size_t rev_wire_3, const std::size_t rev_wire_4, const std::size_t offset, PrecisionT dst[]) const
- inline KOKKOS_INLINE_FUNCTION void apply5 (const std::size_t i0, const std::size_t rev_wire_0, const std::size_t rev_wire_1, const std::size_t rev_wire_2, const std::size_t rev_wire_3, const std::size_t rev_wire_4, const std::size_t rev_wire_5, const std::size_t offset, PrecisionT dst[]) const
- inline KOKKOS_INLINE_FUNCTION void apply6 (const std::size_t i0, const std::size_t rev_wire_0, const std::size_t rev_wire_1, const std::size_t rev_wire_2, const std::size_t rev_wire_3, const std::size_t rev_wire_4, const std::size_t rev_wire_5, const std::size_t rev_wire_6, const std::size_t offset, PrecisionT dst[]) const
- inline KOKKOS_INLINE_FUNCTION void apply7 (const std::size_t i0, const std::size_t rev_wire_0, const std::size_t rev_wire_1, const std::size_t rev_wire_2, const std::size_t rev_wire_3, const std::size_t rev_wire_4, const std::size_t rev_wire_5, const std::size_t rev_wire_6, const std::size_t rev_wire_7, const std::size_t offset, PrecisionT dst[]) const
- inline KOKKOS_INLINE_FUNCTION void apply8 (const std::size_t i0, const std::size_t rev_wire_0, const std::size_t rev_wire_1, const std::size_t rev_wire_2, const std::size_t rev_wire_3, const std::size_t rev_wire_4, const std::size_t rev_wire_5, const std::size_t rev_wire_6, const std::size_t rev_wire_7, const std::size_t rev_wire_8, const std::size_t offset, PrecisionT dst[]) const
- inline KOKKOS_INLINE_FUNCTION void operator() (std::size_t k, PrecisionT dst[]) const
Public Members
-
const std::size_t value_count¶
-
const std::size_t n_wires¶
-
Kokkos::View<std::size_t*> parity¶
-
Kokkos::View<std::size_t*> rev_wires¶
-
std::size_t rev_wire_0¶
-
std::size_t rev_wire_1¶
-
std::size_t rev_wire_2¶
-
std::size_t rev_wire_3¶
-
std::size_t rev_wire_4¶
-
std::size_t rev_wire_5¶
-
std::size_t rev_wire_6¶
-
std::size_t rev_wire_7¶
-
std::size_t rev_wire_8¶
-
std::size_t parity_0¶
-
std::size_t parity_1¶
-
std::size_t parity_2¶
-
std::size_t parity_3¶
-
std::size_t parity_4¶
-
std::size_t parity_5¶
-
std::size_t parity_6¶
-
std::size_t parity_7¶
-
std::size_t parity_8¶
-
std::size_t parity_9¶
api/classPennylane_1_1LightningKokkos_1_1Functors_1_1getProbsNQubitOpFunctor
Download Python script
Download Notebook
View on GitHub