Template Struct ApplyPhaseShift¶
Defined in File ApplyPhaseShift.hpp
Struct Documentation¶
-
template<typename PrecisionT, std::size_t packed_size>
struct ApplyPhaseShift¶ Public Types
-
using Precision = PrecisionT¶
-
using PrecisionAVXConcept = typename AVXConcept<PrecisionT, packed_size>::Type¶
Public Static Functions
-
static inline constexpr auto applyInternalPermutation(std::size_t rev_wire)¶
Permutation for applying
i
if a bit is 1.FIXME: clang++-12 currently does not accept consteval here.
-
static inline auto cosFactor(std::size_t rev_wire, PrecisionT angle) -> AVXIntrinsicType<PrecisionT, packed_size>¶
Factor for applying [1, 1, cos(phi/2), cos(phi/2)].
-
static inline auto isinFactor(std::size_t rev_wire, PrecisionT angle) -> AVXIntrinsicType<PrecisionT, packed_size>¶
Factor for applying [0, 0, -sin(phi/2), sin(phi/2)].
-
template<std::size_t rev_wire, typename ParamT>
static inline void applyInternal(std::complex<PrecisionT> *arr, const std::size_t num_qubits, bool inverse, ParamT angle)¶
-
template<typename ParamT>
static inline void applyExternal(std::complex<PrecisionT> *arr, const std::size_t num_qubits, const std::size_t rev_wire, bool inverse, ParamT angle)¶
Public Static Attributes
-
static constexpr std::size_t packed_size_ = packed_size¶
-
using Precision = PrecisionT¶
api/structPennylane_1_1LightningQubit_1_1Gates_1_1AVXCommon_1_1ApplyPhaseShift
Download Python script
Download Notebook
View on GitHub