Template Struct ApplyCY

Struct Documentation

template<typename PrecisionT, std::size_t packed_size>
struct ApplyCY

Public Types

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

Public Static Functions

template<std::size_t control, std::size_t target>
static inline consteval auto applyInternalInternalPermuation()

Permutation for multiplying i and flip the target bit if control is 1.

template<std::size_t control, std::size_t target>
static inline consteval auto applyInternalInternalFactor()

Factor to applying -i and i

template<std::size_t control, std::size_t target>
static inline void applyInternalInternal(std::complex<PrecisionT> *arr, std::size_t num_qubits, [[maybe_unused]] bool inverse)
template<std::size_t control>
static inline consteval auto applyInternalExternalMask()

Mask for blending. Using this mask, blending v0 and v1 will output v0 if the control bit is 0 v1 otherwise.

template<std::size_t control>
static inline consteval auto applyInternalExternalPermutation()

Permutation when the target bit is 1.

template<std::size_t control>
static inline consteval auto applyInternalExternalSign_target0()

Sign factor when the target bit is 0.

template<std::size_t control>
static inline consteval auto applyInternalExternalSign_target1()

Sign factor when the target bit is 1.

template<std::size_t control>
static inline void applyInternalExternal(std::complex<PrecisionT> *arr, std::size_t num_qubits, std::size_t target, [[maybe_unused]] bool inverse)

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>
static inline consteval auto applyExternalInternalSign()

Sign factor when the control bit is 1.

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

Public Static Attributes

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