kosmos.dqc_scheduling.utils.protocol_scheduling_utils

Functions

schedule_circuit_execution(step: kosmos.dqc_scheduling.execution_scheduler.ExecutionStep, event_queue: kosmos.dqc_scheduling.event_queue.EventQueue, network: kosmos.topology.net.Network, circuit_runner: kosmos.circuit_runner.qiskit_runner.QiskitRunner) None[source]

Schedule a circuit execution protocol.

Parameters:
  • step (ExecutionStep) – Execution step containing circuit and dependencies.

  • event_queue (EventQueue) – Event queue to add the protocol to.

  • network (Network) – The quantum network topology.

  • circuit_runner (QiskitRunner) – Circuit runner for execution.

schedule_remote_operation(step: kosmos.dqc_scheduling.execution_scheduler.ExecutionStep, event_queue: kosmos.dqc_scheduling.event_queue.EventQueue, network: kosmos.topology.net.Network, quantum_manager: kosmos.quantum_logic.quantum_register_manager.QuantumRegisterManager, eg_protocol_cls: type[kosmos.protocols.eg_protocol.EGProtocol], eg_protocol_config: kosmos.protocols.eg_protocol.EGProtocolConfig, last_remote_op_per_node_pair: dict[tuple[kosmos.topology.node.NodeId, kosmos.topology.node.NodeId], kosmos.dqc_scheduling.event.EventId], node_comm_usage: dict[kosmos.topology.node.NodeId, dict[int, list[kosmos.dqc_scheduling.event.EventId]]]) None[source]

Schedule entanglement generation and remote operation protocols.

Parameters:
compute_eg_dependencies(node_pair: tuple[kosmos.topology.node.QuantumNode, kosmos.topology.node.QuantumNode], gate_time: int, last_remote_op_per_node_pair: dict[tuple[kosmos.topology.node.NodeId, kosmos.topology.node.NodeId], kosmos.dqc_scheduling.event.EventId], node_comm_usage: dict[kosmos.topology.node.NodeId, dict[int, list[kosmos.dqc_scheduling.event.EventId]]]) list[kosmos.dqc_scheduling.event.EventId][source]

Compute dependencies for entanglement generation.

Parameters:
Returns:

Dependencies that must complete before EG can start.

Return type:

list[EventId]

schedule_eg_protocol(node_pair: tuple[kosmos.topology.node.QuantumNode, kosmos.topology.node.QuantumNode], step_event_id: kosmos.dqc_scheduling.event.EventId, eg_dependencies: list[kosmos.dqc_scheduling.event.EventId], event_queue: kosmos.dqc_scheduling.event_queue.EventQueue, network: kosmos.topology.net.Network, quantum_manager: kosmos.quantum_logic.quantum_register_manager.QuantumRegisterManager, eg_protocol_cls: type[kosmos.protocols.eg_protocol.EGProtocol], eg_protocol_config: kosmos.protocols.eg_protocol.EGProtocolConfig) kosmos.dqc_scheduling.event.EventId[source]

Schedule entanglement generation protocol.

Parameters:
Returns:

Event ID of the scheduled EG protocol.

Return type:

EventId

schedule_remote_op_protocol(step: kosmos.dqc_scheduling.execution_scheduler.ExecutionStep, eg_event_id: kosmos.dqc_scheduling.event.EventId, event_queue: kosmos.dqc_scheduling.event_queue.EventQueue, network: kosmos.topology.net.Network, quantum_manager: kosmos.quantum_logic.quantum_register_manager.QuantumRegisterManager) kosmos.dqc_scheduling.event.EventId[source]

Schedule remote operation protocol (gate or teleportation).

Parameters:
  • step (ExecutionStep) – Execution step containing remote operation info.

  • eg_event_id (EventId) – Event ID of the EG protocol dependency.

  • event_queue (EventQueue) – Event queue to add protocol to.

  • network (Network) – The quantum network topology.

  • quantum_manager (QuantumRegisterManager) – Quantum register manager.

Returns:

Event ID of the scheduled remote operation.

Return type:

EventId

get_ordered_node_pair_key(node_pair: tuple[kosmos.topology.node.QuantumNode, kosmos.topology.node.QuantumNode]) tuple[kosmos.topology.node.NodeId, kosmos.topology.node.NodeId][source]

Ensure consistent ordering for node pair keys.

Parameters:

node_pair (tuple[QuantumNode, QuantumNode]) – Tuple of source_node and target_node.

Returns:

Ordered node IDs for use as dict key.

Return type:

tuple[NodeId, NodeId]