qnetbench.policies¶
The arbitration seam and its three baseline policies.
Narrative guide: Arbitration and policies.
qnetbench.policies.base
¶
The arbitration seam.
A Policy orders contending entanglement requests. It is only consulted in
policy:<name> arbitration mode; in native mode the backend uses its own
default (FIFO on the reference backend, the simulator's own layer on
SeQUeNCe/NetSquid). Routing is a single hop in Phase 0's topologies and is added
to this Protocol when multi-hop swapping lands.
PendingRequest
dataclass
¶
PendingRequest(
req_id: int,
src: NodeId,
dst: NodeId,
n: int,
demand: Demand,
request_time: SimTime,
)
effective_deadline
¶
Absolute time this request must be served by, or +inf if unbounded.
Source code in qnetbench/policies/base.py
Policy
¶
Bases: Protocol
order
¶
order(
pending: list[PendingRequest], now: SimTime
) -> list[int]
The baseline policies¶
qnetbench.policies.builtin
¶
The three published-style baseline policies used for the cross-policy evaluation. Their ranking is expected to invert across workload classes.
Fifo
¶
First-in, first-out: order by request time. The common default.
order
¶
order(
pending: list[PendingRequest], now: float
) -> list[int]
FidelityFirst
¶
Serve the highest fidelity demand first — favours fidelity-thresholded workloads (QKD) at the expense of deadline-critical ones.
order
¶
order(
pending: list[PendingRequest], now: float
) -> list[int]
Edf
¶
Earliest-deadline-first — favours deadline-critical workloads (distributed gates) at the expense of steady rate-hungry ones.
order
¶
order(
pending: list[PendingRequest], now: float
) -> list[int]