Template Struct ApplySWAP

Struct Documentation

template<typename PrecisionT, size_t packed_size>
struct ApplySWAP

Public Types

using Precision = PrecisionT
using PrecisionAVXConcept = typename AVXConcept<PrecisionT, packed_size>::Type

Public Static Functions

template<size_t rev_wire0, size_t rev_wire1>
static inline consteval auto applyInternalInternalPermutation()

Permutation that swaps bits in two wires.

template<size_t rev_wire0, size_t rev_wire1>
static inline void applyInternalInternal(std::complex<PrecisionT> *arr, size_t num_qubits, [[maybe_unused]] bool inverse)
template<size_t min_rev_wire>
static inline consteval auto createMask0()

Setting a mask. Mask is 1 if bits in min_rev_wire is set.

template<size_t min_rev_wire>
static inline consteval auto createMask1()

Setting a mask. Mask is 1 if bits in min_rev_wire is unset.

template<size_t min_rev_wire>
static inline void applyInternalExternal(std::complex<PrecisionT> *arr, size_t num_qubits, size_t max_rev_wire, [[maybe_unused]] bool inverse)
static inline void applyExternalExternal(std::complex<PrecisionT> *arr, const size_t num_qubits, const size_t rev_wire0, const size_t rev_wire1, [[maybe_unused]] bool inverse)

Public Static Attributes

static constexpr size_t packed_size_ = packed_size
static constexpr bool symmetric = true