Template Struct ApplyCRZ¶
Defined in File ApplyCRZ.hpp
Struct Documentation¶
-
template<typename PrecisionT, std::size_t packed_size>
struct ApplyCRZ¶ Public Types
-
using Precision = PrecisionT¶
-
using PrecisionAVXConcept = AVXConceptType<PrecisionT, packed_size>¶
Public Static Functions
-
template<std::size_t control>
static inline consteval auto applyInternalImagPermutation()¶ Permutation for applying
i
when the control bit is 1.
-
template<std::size_t control, std::size_t target, class ParamT>
static inline auto applyInternalInternalRealFactor(ParamT angle)¶ Factor for real parts [1, 1, 1, 1, cos(phi/2), cos(phi/2), cos(phi/2), cos(phi/2)].
-
template<std::size_t control, std::size_t target, class ParamT>
static inline auto applyInternalInternalImagFactor(ParamT angle)¶ Factor for imaginary parts [0, 0, 0, 0, sin(phi/2), -sin(phi/2), -sin(phi/2), sin(phi/2)].
-
template<std::size_t control, std::size_t target, class ParamT>
static inline void applyInternalInternal(std::complex<PrecisionT> *arr, std::size_t num_qubits, bool inverse, ParamT angle)¶
-
template<std::size_t control, typename ParamT>
static inline auto applyInternalExternalRealFactor(ParamT angle)¶ Factor for real parts when the target bit is 1.
-
template<std::size_t control, typename ParamT>
static inline auto applyInternalExternalImagFactor(ParamT angle)¶
-
template<std::size_t control, typename ParamT>
static inline void applyInternalExternal(std::complex<PrecisionT> *arr, std::size_t num_qubits, std::size_t target, bool inverse, ParamT angle)¶ Implementation for the case where the control qubit acts on internal wires (inside of packed bytes) but the target acts on external wires.
-
template<std::size_t target, typename ParamT>
static inline auto applyExternalInternalRealFactor(ParamT angle)¶ Factor for real parts when the control bit is 1.
-
template<std::size_t target, typename ParamT>
static inline auto applyExternalInternalImagFactor(ParamT angle)¶ Factor for real parts when the control bit is 1.
-
template<std::size_t target, typename ParamT>
static inline void applyExternalInternal(std::complex<PrecisionT> *arr, std::size_t num_qubits, std::size_t control, bool inverse, ParamT angle)¶
-
template<typename ParamT>
static inline void applyExternalExternal(std::complex<PrecisionT> *arr, const std::size_t num_qubits, const std::size_t control, const std::size_t target, bool inverse, ParamT angle)¶
Public Static Attributes
-
static constexpr auto packed_size_ = packed_size¶
-
static constexpr bool symmetric = false¶
-
using Precision = PrecisionT¶
api/structPennylane_1_1LightningQubit_1_1Gates_1_1AVXCommon_1_1ApplyCRZ
Download Python script
Download Notebook
View on GitHub