Template Struct ApplyCRZ

Struct Documentation

template<typename PrecisionT, size_t packed_size>
struct ApplyCRZ

Public Types

using Precision = PrecisionT
using PrecisionAVXConcept = AVXConceptType<PrecisionT, packed_size>

Public Static Functions

template<size_t control>
static inline consteval auto applyInternalImagPermutation()

Permutation for applying i when the control bit is 1.

template<size_t control, 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<size_t control, 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<size_t control, size_t target, class ParamT>
static inline void applyInternalInternal(std::complex<PrecisionT> *arr, size_t num_qubits, bool inverse, ParamT angle)
template<size_t control, typename ParamT>
static inline auto applyInternalExternalRealFactor(ParamT angle)

Factor for real parts when the target bit is 1.

template<size_t control, typename ParamT>
static inline auto applyInternalExternalImagFactor(ParamT angle)
template<size_t control, typename ParamT>
static inline void applyInternalExternal(std::complex<PrecisionT> *arr, size_t num_qubits, 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<size_t target, typename ParamT>
static inline auto applyExternalInternalRealFactor(ParamT angle)

Factor for real parts when the control bit is 1.

template<size_t target, typename ParamT>
static inline auto applyExternalInternalImagFactor(ParamT angle)

Factor for real parts when the control bit is 1.

template<size_t target, typename ParamT>
static inline void applyExternalInternal(std::complex<PrecisionT> *arr, size_t num_qubits, size_t control, bool inverse, ParamT angle)
template<typename ParamT>
static inline void applyExternalExternal(std::complex<PrecisionT> *arr, const size_t num_qubits, const size_t control, const size_t target, bool inverse, ParamT angle)

Public Static Attributes

static constexpr auto packed_size_ = packed_size
static constexpr bool symmetric = false