From 231c17a4ee867024a4d8a89617e8c991f956ee45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20M=C3=BCller?= Date: Mon, 29 Sep 2025 11:34:45 +0200 Subject: [PATCH] Update example in readme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tristan Müller --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0d6b5d6..6333da0 100644 --- a/README.md +++ b/README.md @@ -114,14 +114,17 @@ Giving: The Relay-BP package includes optional integration with [`stim`](https://github.com/quantumlib/Stim) and [`sinter`](https://github.com/quantumlib/Stim/tree/main/glue/sample) for constructing and running decoding experiments. Install with `pip install ".[stim]"`. -We include reference circuits for a variety of codes in [`testdata/`](./src/relay_bp/stim/testdata/) along with utility method to load these. +We include reference circuits for a variety of codes in [`testdata/`](tests/testdata/) along with utility methods to load these. Below is an example of decoding the gross code with Stim + Sinter. ```python import sinter import multiprocessing from relay_bp.stim import sinter_decoders -from relay_bp.stim.testdata import get_test_circuit, filter_detectors_by_basis +import sys +from pathlib import Path +sys.path.append(str(Path("tests").resolve())) +from testdata import filter_detectors_by_basis, get_test_circuit num_workers = multiprocessing.cpu_count()