Skip to content

Commit

Permalink
polish printing
Browse files Browse the repository at this point in the history
  • Loading branch information
Weilei Zeng at qlab01 committed Sep 21, 2023
1 parent ba988a9 commit 7391f9c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
8 changes: 8 additions & 0 deletions result/README.md
Original file line number Diff line number Diff line change
@@ -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
14 changes: 7 additions & 7 deletions verification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
}

Expand Down Expand Up @@ -120,8 +120,8 @@ int main(int args, char ** argv){
}// if (file.is_open())

std::cout<<"Gx density:"<<rho_x_total /n_Gx_total
<<",\tGz density:"<<rho_z_total /n_Gz_total
<<std::endl;
<<",\tGz density:"<<rho_z_total /n_Gz_total;
// <<std::endl;
std::cout<<code_count<<" codes checked, "
<<code_mistake<<" mistakes found"<<std::endl;
return 0;
Expand Down

0 comments on commit 7391f9c

Please sign in to comment.