Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions sequence/entanglement_management/swapping/swapping_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ def set_others(self, protocol: str, node: str, memories: list[str]) -> None:
node (str): other node name.
memories (list[str]): the list of memories name used on other node.
"""
# `memories` is intentionally unused here: the swapping protocol keys off the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move the comments into the set_others docstring. Also, please shorten the comments. Thanks!

# left/right memos it already holds. It is kept to match the shared
# EntanglementProtocol.set_others() interface (ResourceManager calls it
# positionally, and the generation protocols do use it). See issue #170.
if node == self.left_memo.entangled_memory["node_id"]:
self.left_protocol_name = protocol
elif node == self.right_memo.entangled_memory["node_id"]:
Expand Down Expand Up @@ -359,6 +363,8 @@ def set_others(self, protocol: str, node: str, memories: list[str]) -> None:
node (str): other node name.
memories (list[str]): the list of memory names used on other node.
"""
# `memories` is intentionally unused here (as in EntanglementSwappingA): kept to
# match the shared EntanglementProtocol.set_others() interface. See issue #170.
self.remote_node_name = node
self.remote_protocol_name = protocol

Expand Down