Skip to content

Commit

Permalink
fixed odd initialisation of Mat2 in parity_maps
Browse files Browse the repository at this point in the history
  • Loading branch information
akissinger committed Dec 16, 2024
1 parent bd2d157 commit 3a94eb8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pyzx/routing/parity_maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ types-tqdm~=4.66
mypy>=0.990
nbsphinx~=0.9.3
sphinxcontrib-svg2pdfconverter>=1.2.2
lark~=1.1.7
lark>=1.2.2
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

0 comments on commit 3a94eb8

Please sign in to comment.