diff --git a/result/README.md b/result/README.md new file mode 100644 index 0000000..b5dd72c --- /dev/null +++ b/result/README.md @@ -0,0 +1,8 @@ +min_weight_logical: change check condition for logical error from simple convergence +checked: checked/verified results with random window decoder +unchecked: unchecked ... +input-data: copy of input matrices of selected codes +min_weight unchecked results with min weight decoder +outdated trash/recycle + +run log saved in ../../data/CSS-Codes/README.md diff --git a/verification.cpp b/verification.cpp index d7d2be7..3920f60 100644 --- a/verification.cpp +++ b/verification.cpp @@ -24,18 +24,18 @@ bool verify(std::string code_prefix){ } bool verify(std::string code_prefix, double & rho_x, double & rho_z, int & n_Gx, int & n_Gz){ + std::ifstream jsonfile(code_prefix+".json"); + json data = json::parse(jsonfile); + jsonfile.close(); + CSSCode code; code.load(code_prefix); - rho_x = code.Gx.density(); rho_z = code.Gz.density(); n_Gx = code.Gx.rows()*code.Gx.cols(); n_Gz = code.Gz.rows()*code.Gz.cols(); - code.dist(); - std::ifstream jsonfile(code_prefix+".json"); - json data = json::parse(jsonfile); - jsonfile.close(); + return code.d == data["d"]; } @@ -120,8 +120,8 @@ int main(int args, char ** argv){ }// if (file.is_open()) std::cout<<"Gx density:"<