From d6c41cfe8bc8a76e9eb77aea05a3dba0b9dd794b Mon Sep 17 00:00:00 2001 From: Asa Kosto Date: Tue, 17 Oct 2023 11:27:22 -0600 Subject: [PATCH] edited comments --- pytket/phir/placement.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pytket/phir/placement.py b/pytket/phir/placement.py index 1a2bef5..f028dfa 100644 --- a/pytket/phir/placement.py +++ b/pytket/phir/placement.py @@ -211,8 +211,9 @@ def optimized_place( # noqa: PLR0912 order = place_tq_ops(tq_ops_sorted, placed_qubits, order, tq_zones, sq_zones) # run a check to avoid unnecessary swaps for zone in tq_zones: - # this condition will be true if there was a swap due to the order of qubits_used # noqa: E501 - # in the shard creating the TQ op, even if those two qubits were already in a TQ zone # noqa: E501 + # this condition is true if there was a swap due to the order of qubits_used + # in the shard creating the TQ op, + # even if those two qubits were already in a TQ zone # example: ops = [[0,1]] prev_state = [0,1,2,3] new order = [1,0,2,3] # this check s to prevent the above situation if (order[zone] == prev_state[zone + 1]) & (