Template Struct ApplyCNOT

Struct Documentation

template<typename PrecisionT, size_t packed_size>
struct ApplyCNOT

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 applyInternalInternalPermutation()
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()
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 applyExternalInternalPermutation()

Permutation that flip the target bit.

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