diff --git a/pyzx/routing/parity_maps.py b/pyzx/routing/parity_maps.py index f14c8856..72a4d1d7 100644 --- a/pyzx/routing/parity_maps.py +++ b/pyzx/routing/parity_maps.py @@ -38,7 +38,8 @@ class CNOT_tracker(Circuit): def __init__(self, n_qubits: int, **kwargs): super().__init__(n_qubits, **kwargs) - self.matrix = Mat2(np.identity(n_qubits, dtype=np.int32).tolist()) + #self.matrix = Mat2(np.identity(n_qubits, dtype=np.int32).tolist()) + self.matrix = Mat2.id(n_qubits) self.row_perm = np.arange(n_qubits) self.col_perm = np.arange(n_qubits) self.n_qubits = n_qubits diff --git a/requirements.txt b/requirements.txt index fc08f5e7..e3f6c3f3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,4 +11,4 @@ types-tqdm~=4.66 mypy>=0.990 nbsphinx~=0.9.3 sphinxcontrib-svg2pdfconverter>=1.2.2 -lark~=1.1.7 \ No newline at end of file +lark>=1.2.2 diff --git a/setup.py b/setup.py index ec10a7b6..2f214183 100644 --- a/setup.py +++ b/setup.py @@ -39,6 +39,6 @@ "pyperclip>=1.8.1", "tqdm>=4.56.0", "ipywidgets>=7.5,<8", - "lark~=1.1.7"], + "lark>=1.2.2"], include_package_data=True, )