Template Function Pennylane::LightningQubit::Gates::AVXCommon::Permutation::flip

Function Documentation

template<std::size_t packed_size>
constexpr auto Pennylane::LightningQubit::Gates::AVXCommon::Permutation::flip(const std::array<uint8_t, packed_size> &perm, std::size_t rev_wire) -> std::array<uint8_t, packed_size>

Create a permutation that flip a bit in rev_wire. This is same as applying Pauli X gate to rev_wire.

Template Parameters

packed_size – Number of elements in a packed type

Parameters
  • perm – Previous permutation

  • rev_wire – Reverse wire