Make connections node-independent

Currently physlayer connections require the nodes they will connect to be given as inputs upon initialization. This is inconvenient for the blueprint team's network configuration efforts, as it complicates the goal of having only one builder. I went through the physlayer Connection class and its subclasses and found that the nodes connected by a connection are used in the following methods:

  • register_handler, put_from and get_as. These methods are used for getting/putting data from/to channels and they need only the node's ID.
  • channel_from_node and channel_to_node. Methods of HeraldedConnection (subclassed from physlayer Connection) that take a node and return the channel connecting it from/to the midpoint. They also need only the node's ID.
  • set_timings of. Method of HeraldedConnection that computes trigger times given cycle times as input. This makes use of the nodes' qmemory's photon emission delay and duration of INSTR_MEASURE. i.e. it needs access to the quantum memory of the relevant nodes.

In order to make physlayer Connections node-independent, I suggest:

  • Remove nodes as inputs (or make them optional? probably breaks less stuff) and instead give their IDs. This should not be a problem for network configuration, because when configuring a connection in a config file we must anyway include some identifier of the nodes it is meant to connect as input. This solves everything except for the set_timings method.

  • Make the relevant quantum memories be required as inputs for the set_timings method. This might break someone's code, though.

@adahlberg @GuusAvis , I believe you were in favor of changes to physlayer connections. Does this seem like an acceptable solution to you?

Edited by Axel Dahlberg