14 #include "catch2/catch.hpp" 29 std::vector<std::size_t> reg, aux;
32 else{ aux.push_back(i); }
34 std::cout << reg.size() <<
" | "<< aux.size() << std::endl;
37 auto& r =
sim.getQubitRegister();
49 SECTION(
"Group to right |010000>|10> + |011000>|10> -> |000001>|10> + |000011>|10>"){
51 sim.applyGateX(reg[1]);
52 sim.applyGateH(reg[2]);
54 sim.applyGateX(aux[0]);
57 sim.PrintStates(
"PostSuper");
Class definition for IntelSimulator. The purpose of this class is to map the functionality of the und...
static void bit_group(SimulatorType &qSim, const std::vector< std::size_t > &qreg_idx, const std::vector< std::size_t > &qaux_idx, bool lsb=true)
Swaps all qubits in register indices given by qreg_idx to their right-most positions....
Class definition for bit-wise grouping in register.
TEST_CASE("Test bit grouping","[bitgroup]")
Test BitGroup.
Implements grouping of bits to LSB side of register.