CSS product code  0.1
C++ library to estimate distance of CSS codes. Some particular construction of CSS codes are implemented.
bp.h
Go to the documentation of this file.
1 #ifndef BP_H
2 #define BP_H
3 //Weilei Zeng, April 4, 2020
4 
5 
6 //#include <itpp/itbase.h>
7 #include <itpp/itcomm.h> //qllr_to_bvec
8 //#include <stdio.h>
9 //#include "weilei_lib.h"
10 //#include "lib.h"
11 
12 
13 
14 itpp::bvec reduce_weight(itpp::bvec e, itpp::GF2mat G);
15 //reduce the weight of en error vector e, G include all cycles (equivalent error). G is assument to be the generator matrix of an Quantum LDPC CSS code. such that rows of G correspond to the smallest cycles. It is assument that e is an effectively small/zero weight error, which contains many trivial cycles. This function will reduce most of those small individual cycles so that we can count the effective weight of e.
16 // complexity of this program: ~ G.rows() * weight(e)
17 
18 
19 itpp::bvec qllr_to_bvec(itpp::QLLRvec llr, int bound);
20  //find the appropriate bound value and return binary vector from this qllr.
21  //Its sign is the same as the sign of "bound"
22 
23 int check_matrices(itpp::GF2mat * G, itpp::GF2mat * H, itpp::GF2mat *U, itpp::GF2mat * W, itpp::mat * K);
24  //check if those matrices are valid
25 
26 //for partial sum decoder
27 //read those matrices in the folder
28 int read_matrices_for_partial_sum(char * filename_prefix, char * filename_suffix, itpp::GF2mat * G, itpp::GF2mat * H, itpp::GF2mat *U, itpp::GF2mat * W, itpp::mat * K);
29 
30 int remove_rows(itpp::GF2mat *G, itpp::bvec rows_to_remove);
31 
32 #endif
33 
reduce_weight
itpp::bvec reduce_weight(itpp::bvec e, itpp::GF2mat G)
Definition: bp.cpp:16
remove_rows
int remove_rows(itpp::GF2mat *G, itpp::bvec rows_to_remove)
Definition: bp.cpp:117
check_matrices
int check_matrices(itpp::GF2mat *G, itpp::GF2mat *H, itpp::GF2mat *U, itpp::GF2mat *W, itpp::mat *K)
Definition: bp.cpp:72
qllr_to_bvec
itpp::bvec qllr_to_bvec(itpp::QLLRvec llr, int bound)
Definition: bp.cpp:38
read_matrices_for_partial_sum
int read_matrices_for_partial_sum(char *filename_prefix, char *filename_suffix, itpp::GF2mat *G, itpp::GF2mat *H, itpp::GF2mat *U, itpp::GF2mat *W, itpp::mat *K)
Definition: bp.cpp:230