From 2058a84af9bad8631b47c74838a8cbd46977ca26 Mon Sep 17 00:00:00 2001 From: Aleks Kissinger Date: Thu, 28 Nov 2024 12:47:07 +0000 Subject: [PATCH] fixed bug in extractor when there is a single vertex in the frontier --- pyzx/linalg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyzx/linalg.py b/pyzx/linalg.py index 994bfea7..bf4587b7 100644 --- a/pyzx/linalg.py +++ b/pyzx/linalg.py @@ -355,7 +355,7 @@ def to_cnots(self, optimize: bool = False, use_log_blocksize: bool = False) -> L else: best = 1000000 best_cn = None - for size in range(1,self.rows()): + for size in range(1,self.rows() + 1): cn = CNOTMaker() assert cn is not None self.copy().gauss(full_reduce=True,x=cn, blocksize=size)