Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nealerickson-qtm committed Sep 27, 2023
1 parent b13d489 commit 3f52976
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pytket/phir/sharding/sharder.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def _process_command(self, command: Command) -> None:
msg = f"OpType {command.op.type} not supported!"
raise NotImplementedError(msg)

if self._is_op_schedulable(command.op):
if self.is_op_schedulable(command.op):
print(f"Scheduling command: {command}")
self._build_shard(command)
else:
Expand Down Expand Up @@ -79,7 +79,7 @@ def _add_pending_command(self, command: Command) -> None:
self._pending_commands[command.args[0]].append(command)

@staticmethod
def _is_op_schedulable(op: Op) -> bool:
def is_op_schedulable(op: Op) -> bool:
"""
Returns `True` if the operation is one that should be scheduled, that is,
that will have a shard created for it. This includes non-gate operations
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sharder.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ def test_ctor(self) -> None:

output = sharder.shard()

assert len(output) == 2 # noqa: PLR2004
assert len(output) == 3 # noqa: PLR2004

0 comments on commit 3f52976

Please sign in to comment.