|
Dist m4ri 0.0.1.alpha
Computing distance of a classical or quantum CSS code
|
#include <inttypes.h>#include <strings.h>#include <stdlib.h>#include <stdio.h>#include <time.h>#include <m4ri/m4ri.h>#include "mmio.h"#include "uthash.h"#include "util_hash.h"#include "util_m4ri.h"#include "util_io.h"

Go to the source code of this file.
Functions | |
| int | start_CC_recurs (one_vec_t *err, one_vec_t *urr, one_vec_t *const syn[], const int w_limit, const int max_col_wt, const csr_t *const mH, const csr_t *const mHT, params_t *const p) |
| recursively construct codewords | |
| int | do_CC_dist (params_t *const p) |
| int do_CC_dist | ( | params_t *const | p | ) |
rewrite of the cluster method function using only sparse matrices try recursive version first p_swei[]: min syndrome weight distribution to return (confinement).
prepare the 1st error vector and the syndrome
go up
verify the vector
classical code
update p_swei if not in hash yet
codeword weight found
not found a codeword up to wmax
prescribed way to clean the hashing table
Definition at line 159 of file dist_cc.c.
References params_t::cbeg, params_t::cend, codeword_add_maybe(), params_t::codewords, csr_t::cols, csr_free(), csr_max_row_wght(), csr_print(), csr_transpose(), params_t::debug, params_t::dmax, params_t::dmin, params_t::dW, ERROR, errors, HASH_DEL, HASH_ITER, params_t::maxC, params_t::min_w, params_t::noscan, params_t::num_cws, params_t::outC, p, csr_t::rows, params_t::smax, params_t::spaH, params_t::spaL, start_CC_recurs(), params_t::swei, ONE_VEC_T::vec, ONE_VEC_T::wei, and params_t::wmax.
| int start_CC_recurs | ( | one_vec_t * | err, |
| one_vec_t * | urr, | ||
| one_vec_t *const | syn[], | ||
| const int | w_limit, | ||
| const int | max_col_wt, | ||
| const csr_t *const | mH, | ||
| const csr_t *const | mHT, | ||
| params_t *const | p | ||
| ) |
recursively construct codewords
| err | error vector with sorted components |
| urr | unsorted vector so far |
| syn | array of syndrome vectors with sorted components (indexed by weight of error) |
| wmax | max recursion level (max weight of an error to process) |
| max_col_wt | maximum column weight (used to predict early termination) |
| mH | matrix H (check matrix of the code or Hx for a CSS code) |
| mHT | matrix H transposed |
| mL | matrix L=Lx for a CSS code, or NULL for a classical binary code, used to check whether zero-syndrome error is trivial or not |
| p_swei | minimum syndrome weight array |
| debug | bitmap |
row with the first non-zero syndrome bit
all valid positions should be to the right of here
not there
go up
classical code
update p_swei if not in hash yet
nothing found
Definition at line 54 of file dist_cc.c.
References codeword_add_maybe(), params_t::codewords, params_t::debug, params_t::dW, errors, csr_t::i, params_t::maxC, params_t::min_w, params_t::num_cws, one_vec_print(), params_t::outC, p, csr_t::p, params_t::smax, params_t::spaL, start_CC_recurs(), params_t::swei, ONE_VEC_T::vec, and ONE_VEC_T::wei.
Referenced by do_CC_dist(), and start_CC_recurs().