Function Pennylane::LightningGPU::MPI::createWirePairs(const int, const int, std::vector<int>&, std::vector<int>&, std::vector<int>&)

Function Documentation

inline std::vector<int2> Pennylane::LightningGPU::MPI::createWirePairs(const int numLocalQubits, const int numTotalQubits, std::vector<int> &ctrls, std::vector<int> &tgts, std::vector<int> &statusWires)

Create wire pairs for bit index swap and transform all control and target wires to local ones.

Parameters
  • numLocalQubits – Number of local qubits.

  • numTotalQubits – Number of total qubits.

  • ctrls – Vector of control wires.

  • tgts – Vector of target wires.

Returns

wirePairs Wire pairs to be passed to SV bit index swap worker.