From 1e545d731108dfc44d5245a459466d623be1f086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20M=C3=BCller?= Date: Tue, 14 Apr 2026 14:47:49 +0200 Subject: [PATCH 1/3] Fix unpacking of bits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tristan Müller --- examples/RotatedSurfaceCodeAnalysis.ipynb | 2 +- src/relay_bp/stim/sinter/decoders.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/RotatedSurfaceCodeAnalysis.ipynb b/examples/RotatedSurfaceCodeAnalysis.ipynb index 28a3388..e1c68f0 100644 --- a/examples/RotatedSurfaceCodeAnalysis.ipynb +++ b/examples/RotatedSurfaceCodeAnalysis.ipynb @@ -1014,7 +1014,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.13" + "version": "3.14.3" } }, "nbformat": 4, diff --git a/src/relay_bp/stim/sinter/decoders.py b/src/relay_bp/stim/sinter/decoders.py index 76edaea..ba0c171 100644 --- a/src/relay_bp/stim/sinter/decoders.py +++ b/src/relay_bp/stim/sinter/decoders.py @@ -43,8 +43,12 @@ def decode_shots_bit_packed( bit_packed_detection_event_data: "np.ndarray", ) -> "np.ndarray": + num_detectors = self.check_matricies.check_matrix.shape[0] syndromes = np.unpackbits( - bit_packed_detection_event_data, bitorder="little", axis=1 + bit_packed_detection_event_data, + bitorder="little", + axis=1, + count=num_detectors, ).astype(np.uint8) if self.check_matrices.syndrome_bias is not None: From 1ba2c7bed24778d0bd1f809010b9972b0d436335 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20M=C3=BCller?= Date: Tue, 14 Apr 2026 15:00:38 +0200 Subject: [PATCH 2/3] Fix typo.. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tristan Müller --- src/relay_bp/stim/sinter/decoders.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/relay_bp/stim/sinter/decoders.py b/src/relay_bp/stim/sinter/decoders.py index ba0c171..35f5d35 100644 --- a/src/relay_bp/stim/sinter/decoders.py +++ b/src/relay_bp/stim/sinter/decoders.py @@ -43,7 +43,7 @@ def decode_shots_bit_packed( bit_packed_detection_event_data: "np.ndarray", ) -> "np.ndarray": - num_detectors = self.check_matricies.check_matrix.shape[0] + num_detectors = self.check_matrices.check_matrix.shape[0] syndromes = np.unpackbits( bit_packed_detection_event_data, bitorder="little", From fc281ae7243286411e9f6bbc477b799d95607258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20M=C3=BCller?= Date: Tue, 14 Apr 2026 15:03:20 +0200 Subject: [PATCH 3/3] Do not touch example.. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tristan Müller --- examples/RotatedSurfaceCodeAnalysis.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/RotatedSurfaceCodeAnalysis.ipynb b/examples/RotatedSurfaceCodeAnalysis.ipynb index e1c68f0..28a3388 100644 --- a/examples/RotatedSurfaceCodeAnalysis.ipynb +++ b/examples/RotatedSurfaceCodeAnalysis.ipynb @@ -1014,7 +1014,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.14.3" + "version": "3.11.13" } }, "nbformat": 4,