From b6029af498c04a593b67f7c484180e66e8e80f96 Mon Sep 17 00:00:00 2001 From: Yue Wu Date: Sat, 18 Jan 2025 20:12:17 -0500 Subject: [PATCH] add `cluster_node_limit` for file decode interface --- glue/sample/src/sinter/_decoding/_decoding_mwpf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/glue/sample/src/sinter/_decoding/_decoding_mwpf.py b/glue/sample/src/sinter/_decoding/_decoding_mwpf.py index 441b62f5..50dc9283 100644 --- a/glue/sample/src/sinter/_decoding/_decoding_mwpf.py +++ b/glue/sample/src/sinter/_decoding/_decoding_mwpf.py @@ -103,12 +103,15 @@ def decode_via_files( obs_predictions_b8_out_path: pathlib.Path, tmp_dir: pathlib.Path, decoder_cls: Any = None, + cluster_node_limit: int = 50, ) -> None: import mwpf error_model = stim.DetectorErrorModel.from_file(dem_path) solver, fault_masks = detector_error_model_to_mwpf_solver_and_fault_masks( - error_model, decoder_cls=decoder_cls + error_model, + decoder_cls=decoder_cls, + cluster_node_limit=cluster_node_limit, ) num_det_bytes = math.ceil(num_dets / 8) with open(dets_b8_in_path, "rb") as dets_in_f: