|
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 <time.h>#include <m4ri/m4ri.h>#include "mmio.h"#include "uthash.h"#include "util_hash.h"#include "util_m4ri.h"#include "util_io.h"#include "dist_cc.h"
Go to the source code of this file.
Functions | |
| void | one_vec_print (const one_vec_t *const pvec) |
| distance of a classical or quantum CSS code | |
| 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) |
Variables | |
| two_vec_t * | errors =NULL |
| 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.
| void one_vec_print | ( | const one_vec_t *const | pvec | ) |
distance of a classical or quantum CSS code
Print a one_vec_t structure (indices and weight) to stdout.
The program implements two methods:
A. Dumer, A. A. Kovalev, and L. P. Pryadko "Distance verification..." in IEEE Trans. Inf. Th., vol. 63, p. 4675 (2017). doi: 10.1109/TIT.2017.2690381
author: Leonid Pryadko leoni.nosp@m.d.pr.nosp@m.yadko.nosp@m.@ucr.nosp@m..edu, Weilei Zeng
print entire one_vec_t structure by pointer
Definition at line 32 of file dist_cc.c.
References ONE_VEC_T::vec, and ONE_VEC_T::wei.
Referenced by start_CC_recurs().
| 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().
| two_vec_t* errors =NULL |
Definition at line 39 of file dist_cc.c.
Referenced by do_CC_dist(), and start_CC_recurs().