Loading examples/ftqc_qrt/repeat-until-success.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ __qpu__ void PrepareStateUsingRUS(qreg q, int maxIter) { // In order to measure in the PauliX basis, changes the basis. H(q[1]); Measure(q[1]); bool outcome = q.cReg(1); bool outcome = q.creg[1]; if (!outcome) { // Success (until (outcome == Zero)) std::cout << "Success after " << i + 1 << " iterations.\n"; Loading examples/ftqc_qrt/simple-demo.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -12,16 +12,16 @@ __qpu__ void bell(qreg q, int nbRuns) { CX(q[0], q[1]); Measure(q[0]); Measure(q[1]); if (q.cReg(0) == q.cReg(1)) { if (q.creg[0] == q.creg[1]) { std::cout << "Iter " << i << ": Matched!\n"; } else { std::cout << "Iter " << i << ": NOT Matched!\n"; } // Reset qubits if (q.cReg(0)) { if (q.creg[0]) { X(q[0]); } if (q.cReg(1)) { if (q.creg[1]) { X(q[1]); } } Loading Loading
examples/ftqc_qrt/repeat-until-success.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ __qpu__ void PrepareStateUsingRUS(qreg q, int maxIter) { // In order to measure in the PauliX basis, changes the basis. H(q[1]); Measure(q[1]); bool outcome = q.cReg(1); bool outcome = q.creg[1]; if (!outcome) { // Success (until (outcome == Zero)) std::cout << "Success after " << i + 1 << " iterations.\n"; Loading
examples/ftqc_qrt/simple-demo.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -12,16 +12,16 @@ __qpu__ void bell(qreg q, int nbRuns) { CX(q[0], q[1]); Measure(q[0]); Measure(q[1]); if (q.cReg(0) == q.cReg(1)) { if (q.creg[0] == q.creg[1]) { std::cout << "Iter " << i << ": Matched!\n"; } else { std::cout << "Iter " << i << ": NOT Matched!\n"; } // Reset qubits if (q.cReg(0)) { if (q.creg[0]) { X(q[0]); } if (q.cReg(1)) { if (q.creg[1]) { X(q[1]); } } Loading