|
Dist m4ri 0.16.1
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).
lower bound certified by CC rounds only if all weights below w_start are known to be absent (not with noscan=1, unless the supplied dmin equals wmax)
expert start list: unlimited clusters from the listed columns
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
noscan=1: lower weights not scanned, only the supplied dmin (may be 0)
prescribed way to clean the hashing table
Definition at line 173 of file dist_cc.c.
References codeword_add_maybe(), codeword_maxc_reached(), csr_t::cols, csr_dump(), csr_free(), csr_max_row_wght(), csr_transpose(), CW_SRC_OTHER, DBG_CODEWORDS, DBG_LARGE, DBG_PROGRESS, DBG_SUMMARY, ERROR, errors, HASH_DEL, HASH_ITER, p, csr_t::rows, start_CC_recurs(), ONE_VEC_T::vec, and ONE_VEC_T::wei.
| 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, except with the expert start list (unlimited clusters, unless start_scan=1; columns already in err are skipped below)
not there
classical code
update p_swei if not in hash yet
nothing found
Definition at line 55 of file dist_cc.c.
References codeword_add_maybe(), codeword_maxc_reached(), CW_SRC_OTHER, DBG_LEGACY, errors, csr_t::i, one_vec_print(), csr_t::p, p, start_CC_recurs(), ONE_VEC_T::vec, and ONE_VEC_T::wei.
Referenced by do_CC_dist(), and start_CC_recurs().