Skip to content

Commit

Permalink
edited comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Asa-Kosto-QTM committed Oct 17, 2023
1 parent bc31b85 commit d6c41cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pytket/phir/placement.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]) & (
Expand Down

0 comments on commit d6c41cf

Please sign in to comment.