Template Class SingleQubitGateWithoutParamHelper

Class Documentation

template<SingleQubitGateWithoutParam AVXImpl>
class SingleQubitGateWithoutParamHelper

A Helper class for single-qubit gates without parameters.

Public Types

using Precision = typename AVXImpl::Precision
using ReturnType = typename FuncReturn<decltype(AVXImpl::applyExternal)>::Type
using FuncType = ReturnType (*)(std::complex<Precision>*, size_t, const std::vector<size_t>&, bool)

Public Functions

inline explicit SingleQubitGateWithoutParamHelper(FuncType fallback_func)
inline auto operator()(std::complex<Precision> *arr, const size_t num_qubits, const std::vector<size_t> &wires, bool inverse) const -> ReturnType

This function calls corresponding AVX2/512 kernel functions by finding the correct one based on wires.

Parameters
  • arr – Pointer to a statevector array

  • num_qubits – Number of qubits

  • wires – Wires the gate applies to

  • inverse – Apply the inverse of the gate when true

Public Static Attributes

static constexpr size_t packed_size = AVXImpl::packed_size_