You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To test BpOsdDecoder in ldpc_v2 branch, I sampled and decoded some surface code circuits with sinter.
For the baseline, I used stimbposd.sinter_decoders()(which internally used ldpc.bposd_decoder in v1) to decode the samplings. For v2, awared of #32 , I added the SinterCompiledBpOsdDecoder as below to use with sinter:
The MAX_BP_ITERS/BP_METHOD/OSD_ORDER were selected to be consistent with the default ones in stimbposd.
Then, I ran the sampling with the following script:
importstimimportsinterimportstimbposdimportbposdtest# where I defined the sinter decoder for bposd v2defgenerate_example_tasks():
forpin [0.004, 0.006, 0.008, 0.01, 0.012]:
fordin [3, 5, 7]:
circuit=stim.Circuit.generated(
code_task="surface_code:rotated_memory_x",
rounds=d,
distance=d,
after_clifford_depolarization=p,
after_reset_flip_probability=p,
before_measure_flip_probability=p,
before_round_data_depolarization=p,
)
yieldsinter.Task(
circuit=circuit,
json_metadata={"p": p, "d": d},
)
if__name__=="__main__":
sinter.collect(
num_workers=120, # I ran the simulation on a servermax_shots=500_000,
max_errors=500,
tasks=generate_example_tasks(),
# decoders=["bposd"],# custom_decoders=stimbposd.sinter_decoders(),decoders=["bposd2"],
custom_decoders=bposdtest.bposd_sinter_decoder(),
print_progress=True,
save_resume_filepath="bposd.csv",
)
I compared the decoding accuracy and time per shot with v1/v2 implementations, and here is the result:
We can clearly see for the surface code with distance > 3, the decoding time of v2 implementation is slower than v1. I'm not sure whether all the conditions/arguments were equally set in this benchmark for v1 and v2 and I might missed something important.
The environment I used for the test is Ubuntu22.04LTS and Python3.11.4.
The text was updated successfully, but these errors were encountered:
Hi. Could you try setting the bp_method='ps_log' for the simulations in v1? I think the speed of the two versions should be more comparable once this change has been made.
The bp_method='ps' method uses a version of BP where the messages are computed using probability ratios, rather than log probability ratios. This is quicker, as you can avoid computing the archtanh(x) function need for the LLR version. I haven't implemented the optimised version of product sum for V2, but it is on my todo list.
To test
BpOsdDecoder
inldpc_v2
branch, I sampled and decoded some surface code circuits withsinter
.For the baseline, I used
stimbposd.sinter_decoders()
(which internally usedldpc.bposd_decoder
in v1) to decode the samplings. For v2, awared of #32 , I added theSinterCompiledBpOsdDecoder
as below to use withsinter
:The
MAX_BP_ITERS
/BP_METHOD
/OSD_ORDER
were selected to be consistent with the default ones instimbposd
.Then, I ran the sampling with the following script:
I compared the decoding accuracy and time per shot with v1/v2 implementations, and here is the result:
We can clearly see for the surface code with distance > 3, the decoding time of v2 implementation is slower than v1. I'm not sure whether all the conditions/arguments were equally set in this benchmark for v1 and v2 and I might missed something important.
The environment I used for the test is Ubuntu22.04LTS and Python3.11.4.
The text was updated successfully, but these errors were encountered: