INNER CODE UNIT · C++
b
aromanro/QCSim · QCSim/CliffordTests.cpp:884
const size_t b = (a + 1) % n;
actual.ApplySwap(a, b);
expected.ApplyCX(a, b);
expected.ApplyCX(b, a);
expected.ApplyCX(a, b);
if (!CliffordCheck(actual.SameTableau(expected), "SWAP must equal three CNOTs"))
return false;
actual.ApplySwap(a, a);
if (!CliffordCheck(actual.SameTableau(expected), "SWAP on one index must be the identity"))
return false;
}
}
}
return true;
}
bool CliffordMeasurementRegression()
{