This repo contains the source code of the paper Improved Logical Error Rate via List Decoding of Quantum Polar Codes, where the Polarization Weight family of Quantum Polar Code is considered.
Update 2023/7/4: Decoding for depolarizing channel is added to the repo. Try it with the option -dep 1
. I will update the paper with details of the algorithm later. As an overview, the decoding complexity is still
This repo also contains some codes the classical error correction community could use. See the directory layout below for where the files are located at. Also see the commented lines in main.cpp
.
My (classical) polar code implementation is a simplified version of aff3ct. I also reimplemented the Dumer's list decoder ECCLab for the Reed-Muller code. Alternatively, people can use the polar code with the Reed-Muller construction. They give very similar FER performance.
Clone this repo, then build and run as:
make
mkdir logs
./build/apps/program -N 128 -Kx 65 -Kz 65 -l 16 -px 0.1 -n 10000 -con PW -seed 42 &> logs/Polar_N128_Kx65_Kz65_l16_pz10_n10000_conPW_seed42.log
Alternatively, you can run the executable by interacting with the run_SCL.py script.
The independent bit- and phase-flip error model is used, hence only independent X and Z decoding is implemented.
By default, it simulates an (
The possible options are
-
-N
- The length of the code, use a power of two. -
-Kx
,-Kz
- The number of information bits in X and Z basis.$K_x+K_z$ should be larger than$N$ . -
-l
- The list size. -
-n
- The number of samples. -
-px
- The probability of bit-flip error happening on each bit (independently). Or the error probability for the depolarizing channel. -
-con
- The construction method. Can choose fromPW
(default),HPW
,RM
,Q1
,BEC
. Note that the quantum polar code constructed fromBEC
is not guaranteed to be CSS. -
-seed
- The random seed used to generate the noise. -
-version
- Choose from0
codeword decoding (default).1
syndrome decoding. -
-interval
- The printing interval for showing intermediate results. Default value is$1000$ . -
-beta
- The$\beta$ used in thePW
construction. Default value is$2^{1/4}$ . -
-dep
- Choose from0
independent bit and phase channel (default).1
depolarizing channel, set error probabilty using-px
.
For
.
├── run_SCL.py # run ./build/apps/program
├── distance.py # determine the distance of the code
└── src
├── Util
│ └── Frozen_bits_generator.cpp # construction methods
├── Decoder
│ ├── Decoder_polar.cpp # polar code SCL decoder
│ ├── Decoder_depolarize.cpp # QPC quaternary decoder for depolarizing channel
│ └── Decoder_RM_SCL.cpp # Dumer's list decoder
└── Simulation
├── Simulation_polar_SCL.cpp # classical polar code decoded using SCL
├── Simulation_RM_SCL.cpp # classical RM code decoded using Dumer's list decoder
├── Simulation_polar_codeword.cpp # QPC codeword decoder (a lot of comments here)
├── Simulation_polar_depolarize.cpp # QPC codeword decoder for depolarizing channel
└── Simulation_polar_syndrome.cpp # QPC syndrome decoder