Skip to content

Commit

Permalink
fix clifford tests
Browse files Browse the repository at this point in the history
  • Loading branch information
renatomello committed Mar 8, 2024
1 parent 099a4c9 commit 884ff4a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/qibo/backends/clifford.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,9 @@ def symplectic_matrix_to_generators(
for x, z in zip(X, Z):
paulis = [bits_to_gate[f"{zz}{xx}"] for xx, zz in zip(x, z)]
if return_array:
paulis = [self.cast(getattr(gates, p)(0).matrix()) for p in paulis]
from qibo import matrices # pylint: disable=C0415

paulis = [self.cast(getattr(matrices, p)) for p in paulis]
matrix = reduce(self.np.kron, paulis)
generators.append(matrix)
else:
Expand Down

0 comments on commit 884ff4a

Please sign in to comment.