Skip to content
Snippets Groups Projects
Commit 1ee024d5 authored by Nico Hendrickx's avatar Nico Hendrickx
Browse files

fix error in index selection on non-square matrices.

parent 998d11f2
No related branches found
No related tags found
1 merge request!29Index selection on non-square virtual/combi gate matrices
......@@ -47,8 +47,8 @@ class VirtualGateMatrix:
if self._invert:
matrix = np.linalg.inv(matrix)
if self._valid_indices:
matrix = matrix[:,self._valid_indices]
matrix = matrix[self._valid_indices, :]
if self._square:
matrix = matrix[self._valid_indices]
matrix = matrix[:, self._valid_indices]
return matrix
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment