Commit 68955173 authored by Nguyen, Thien Minh's avatar Nguyen, Thien Minh
Browse files

Fixed typos in code comments and removed a stale comment



Signed-off-by: default avatarThien Nguyen <nguyentm@ornl.gov>
parent 9b404984
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ int main() {
  // Retrieve "bit-flip" code:
  auto [stabilizers, encodeFunc, recoverFunc] = getQecCode("bit_flip");
  encodeFunc(q, 0, {1, 2});  
  // If using a perfec simulator, apply a random X error to observe syndrome changes.
  // If using a perfect simulator, apply a random X error to observe syndrome changes.
  applyError(q, 0);
  
  std::vector<int> syndromes;
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ int main() {
  // Test all possible *single-qubit* error
  for (int qId = 0; qId < 5; ++qId) {
    for (int opId = 1; opId <= 3; ++opId) {
      // If using a perfec simulator, apply a random error to observe syndrome
      // If using a perfect simulator, apply a random error to observe syndrome
      // changes.
      applyError(q, qId, opId);
      std::vector<int> syndromes;
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ int main() {
  // Test all possible *single-qubit* error
  for (int opId = 1; opId <= 3; ++opId) {
    for (int qId = 0; qId < 7; ++qId) {
      // If using a perfec simulator, apply a random error to observe syndrome
      // If using a perfect simulator, apply a random error to observe syndrome
      // changes.
      applyError(q, qId, opId);
      std::vector<int> syndromes;
+0 −1
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ __qpu__ void measure_stabilizer_generators(
    std::vector<int> &out_syndromes) {
  for (auto &stabilizer : stabilizerGroup) {
    for (auto &op : stabilizer) {
      // TODO: generalize for all codes
      std::map<int, int> bitMap;
      for (int i = 0; i < logicalReg.size(); ++i) {
        bitMap[i] = logicalReg[i];