Function Pennylane::LightningKokkos::Util::reverseWires

Function Documentation

inline auto Pennylane::LightningKokkos::Util::reverseWires(const std::size_t num_qubits, const std::vector<std::size_t> &wires, const std::vector<std::size_t> &controlled_wires) -> std::pair<KokkosIntVector, KokkosIntVector>

Compute parity and reverse wires for multi-qubit control operations.

Parameters
  • num_qubits – Number of qubits in the state vector.

  • wires – List of target wires.

  • controlled_wires – List of control wires.

Returns

std::pair<KokkosIntVector, KokkosIntVector> Parities and reverse wires for control multi-qubit operations