quantumgizmos / bp_osd

BP+OSD: Belief propagation with ordered statistics post-processing for decoding quantum LDPC codes
MIT License
65 stars 19 forks source link

Hz logical check #5

Closed Magalame closed 4 years ago

Magalame commented 4 years ago

From #4

It should be good, but please double check everything is ok

quantumgizmos commented 4 years ago

Hi. I downloaded the PR and ran on a test on the demo script. Unfortunately, I'm not getting the same results for both methods. Could you check whether you get the same output as me? I made just have made a mistake somewhere with the input variables.

I used the following input file (mkmn_input_test.json):

{ "hx_filename": "codes/random/mkmn/hgp_mkmn_16_4_6_hx.alist", "lx_filename": "codes/random/mkmn/hgp_mkmn_16_4_6_lx.alist", "code_label": "hgp_mkmn_16_4_6", "input_seed": 149, "bit_error_rate": 0.05, "target_runs": 1000, "osd_order": 40, "max_iter": 50, "osd_method": "combination_sweep" }

The commands +output I ran were as follows:

  1. Lx method
$ build/bp_osd_decode sim_scripts/mkmn_input_test.json sim_scripts/output -lx

Simulating 1000 error correction cycles...
Runs: 267; OSDW_LER: 0.0973783; OSD0_LER: 0.277154; BP_LER: 0.460674; Runtime: "0h:0m:3s"
Runs: 569; OSDW_LER: 0.0949033; OSD0_LER: 0.253076; BP_LER: 0.434095; Runtime: "0h:0m:6s"
Runs: 853; OSDW_LER: 0.0937866; OSD0_LER: 0.248535; BP_LER: 0.427902; Runtime: "0h:0m:9s"
Runs: 1000; OSDW_LER: 0.095; OSD0_LER: 0.251; BP_LER: 0.428; Runtime: "0h:0m:10s"
  1. Hz method
$ build/bp_osd_decode sim_scripts/mkmn_input_test.json sim_scripts/output -hz

Simulating 1000 error correction cycles...
Runs: 242; OSDW_LER: 0.136364; OSD0_LER: 0.322314; BP_LER: 0.46281; Runtime: "0h:0m:3s"
Runs: 519; OSDW_LER: 0.136802; OSD0_LER: 0.300578; BP_LER: 0.445087; Runtime: "0h:0m:6s"
Runs: 778; OSDW_LER: 0.152956; OSD0_LER: 0.312339; BP_LER: 0.458869; Runtime: "0h:0m:9s"
Runs: 1000; OSDW_LER: 0.149; OSD0_LER: 0.307; BP_LER: 0.453; Runtime: "0h:0m:11s"
quantumgizmos commented 4 years ago

Ok sorry my mistake. I forgot to change the input file so that it is reading in the hz rather the lx file. Seems to be working now! I think I'll add some safeguards to the sim script to make sure others don't make the same mistake as me. Otherwise I think it's good to go.

quantumgizmos commented 4 years ago

Hi. Now merged! Many thanks for contributing! Please get in touch (joschka@roffe.eu) if you'd like to contribute more or collaborate on a QLDPC project :)

Magalame commented 4 years ago

Hi, sounds great thanks a lot! :)