The invention discloses a string optimization method and
system for a QC-QLDPC code and an SC-QLDPC code, and mainly solves the problem of low decoding performance caused by difficulty in suppressing a string structure from a topological structure level due to optimization only through a back-end decoding
algorithm in the prior art. According to the implementation scheme, the method comprises the following steps: executing six-ring and eight-ring chord search for a QC-QLDPC code; and in a vector space of the QC-QLDPC code protograph matrix, a breadth-first search strategy is adopted to screen an optimal parameter combination satisfying
quantum code structure constraints and having a minimized string number. The method comprises the following steps: for an SC-QLDPC code, dividing the SC-QLDPC code into a plurality of sub-blocks with a QC-QLDPC code structure, constructing a
processing window, and executing string search in parallel to obtain the number of strings; a subblock-by-subblock iterative optimization strategy is adopted, and global constraint is applied to suppress a cross-subblock chorded short ring generated in a space
coupling process, so that an SC-QLDPC code matrix parameter combination with the minimized number of chords is obtained under the condition that
quantum code structure constraint conditions are met. According to the method, the
frame error rate and
symbol error rate performance of the two codes are effectively improved, and the method can be used for
quantum error correction and quantum code string search and optimization of quantum chips and devices.