Template Struct ApplyCY

Struct Documentation

template<typename PrecisionT, size_t packed_size>
struct ApplyCY

Public Types

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

Public Static Functions

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

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

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

Factor to applying -i and i

template<size_t control, size_t target>
static inline void applyInternalInternal(std::complex<PrecisionT> *arr, size_t num_qubits, [[maybe_unused]] bool inverse)
template<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<size_t control>
static inline consteval auto applyInternalExternalPermutation()

Permutation when the target bit is 1.

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

Sign factor when the target bit is 0.

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

Sign factor when the target bit is 1.

template<size_t control>
static inline void applyInternalExternal(std::complex<PrecisionT> *arr, size_t num_qubits, 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<size_t target>
static inline consteval auto applyExternalInternalSign()

Sign factor when the control bit is 1.

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

Public Static Attributes

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