Network Manager

Definition of the Network Manager.

This module defines the NetworkManager class, an implementation of the SeQUeNCe network management module. Also included in this module is the message type used by the network manager and a function for generating network managers with default protocols.

class src.network_management.network_manager.NetworkManager(owner: QuantumRouter, protocol_stack: List[StackProtocol])

Network manager implementation class.

The network manager is responsible for the operations of a node within a broader quantum network. This is done through a protocol_stack of protocols, which messages are passed and packaged through.

name

name of the network manager instance.

Type:

str

owner

node that protocol instance is attached to.

Type:

QuantumRouter

protocol_stack

network manager protocol stack.

Type:

List[StackProtocol]

load_stack(stack: List[StackProtocol])

Method to load a defined protocol stack.

Parameters:

stack (List[StackProtocol]) – new protocol stack.

pop(**kwargs)

Method to receive pops from highest protocol in protocol stack.

Will get reservation from message and attempt to meet it.

Keyword Arguments:

msg (any) – message containing reservation.

push(**kwargs)

Method to receive pushes from lowest protocol in protocol stack.

Will create message to send to another node.

Keyword Arguments:
  • msg (any) – message to deliver.

  • dst (str) – name of destination node.

received_message(src: str, msg: NetworkManagerMessage)

Method to receive transmitted network reservation method.

Will pop message to lowest protocol in protocol stack.

Parameters:
Side Effects:

Will invoke pop method of 0 indexed protocol in protocol_stack.

request(responder: str, start_time: int, end_time: int, memory_size: int, target_fidelity: float) None

Method to make an entanglement request.

Will defer request to top protocol in protocol stack.

Parameters:
  • responder (str) – name of node to establish entanglement with.

  • start_time (int) – simulation start time of entanglement.

  • end_time (int) – simulation end time of entanglement.

  • memory_size (int) – number of entangled memory pairs to create.

  • target_fidelity (float) – desired fidelity of entanglement.

Side Effects:

Will invoke push method of -1 indexed protocol in protocol_stack.

class src.network_management.network_manager.NetworkManagerMessage(msg_type: Enum, receiver: str, payload: Message)

Message used by the network manager.

msg_type

message type required by base message type.

Type:

Enum

receiver

name of destination protocol instance.

Type:

str

payload

message to be passed through destination network manager.

Type:

Message

src.network_management.network_manager.NewNetworkManager(owner: QuantumRouter, memory_array_name: str) NetworkManager

Function to create a new network manager.

Will create a network manager with default protocol stack. This stack inclused a reservation and routing protocol.

Parameters:
  • owner (QuantumRouter) – node to attach network manager to.

  • memory_array_name (str) – name of the memory array component on owner.

Returns:

network manager object created.

Return type:

NetworkManager