Skip to content

Stim decoder support #5

Description

@yuewuo

Summary

It would be nice to implement a sinter.SinterDecoder of BPOTF decoder so that people can invoke the decoder given arbitrary stim circuit.
This is done similarly for the SinterBpOsdDecoder, SinterLsdDecoder and SinterBeliefFindDecoder in the ldpc repo, as well as SinterMWPFDecoder and SinterHUFDecoder in the mwpf repo.

Basic example

import stim, sinter
from bpotf import SinterBPOTFDecoder   # to be developed

d = 3
p = 0.001
circuit = stim.Circuit.generated(
    "color_code:memory_xyz",
    rounds=d,
    distance=d,
    after_clifford_depolarization=p,
    before_round_data_depolarization=p,
    before_measure_flip_probability=p,
    after_reset_flip_probability=p,
)

task = sinter.Task(
    circuit=circuit,
    collection_options=sinter.CollectionOptions(max_shots=10, max_errors=10),
)

sinter.collect(
    num_workers=2,
    tasks=[task],
    decoders=["bpotf"],
    custom_decoders={"bpotf": SinterBPOTFDecoder(max_iter=..., other parameters...)},
)

Motivation

This will help people easily evaluate the decoder on their own QEC code and noise model, as well as for a fair comparison for future decoders.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions