Skip to content

Commit

Permalink
more suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Asa-Kosto-QTM committed Feb 7, 2024
1 parent 89becb4 commit d413f70
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pytket/phir/phirgen_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,12 @@
def exec_order_preserved(
group_exec_order: list[int], group_number: int, qubit_last_group: int
) -> bool:
"""A helper to determine whether current group number a qubit is eligible
or is later in execution than the last group in which a qubit was used.
""" # noqa: D205
"""Determine whether order is preserved when adding qubits to groups."""
if (group_number not in group_exec_order) or (
qubit_last_group not in group_exec_order
):
return True
group_eligible = group_number > qubit_last_group
if not group_eligible:
if group_number <= qubit_last_group:
return False
# if the group that the qubit is eligible for is later in the exec_order list than
# the last group in which it was used, it can be parallelized
Expand Down

0 comments on commit d413f70

Please sign in to comment.