From c1c6d445e902b1544af1ebb599466c948bd18908 Mon Sep 17 00:00:00 2001 From: PabloAndresCQ Date: Fri, 24 Jan 2025 15:53:21 +0000 Subject: [PATCH] Removed unnecessary extra steps in canonicalisationfor non-adjacent two-qubit gate application --- pytket/extensions/cutensornet/structured_state/mps_gate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytket/extensions/cutensornet/structured_state/mps_gate.py b/pytket/extensions/cutensornet/structured_state/mps_gate.py index 0ca7bed..22b38a8 100644 --- a/pytket/extensions/cutensornet/structured_state/mps_gate.py +++ b/pytket/extensions/cutensornet/structured_state/mps_gate.py @@ -234,7 +234,7 @@ def _apply_2q_unitary_nonadjacent( # Always canonicalise. Even in the case of exact simulation (no truncation) # canonicalisation may reduce the bond dimension (thanks to reduced QR). - self.canonicalise(l_pos, l_pos) + self.canonicalise(l_pos, r_pos) # Reshape into a rank-4 tensor gate_tensor = cp.reshape(unitary, (2, 2, 2, 2))