qnetbench.trace¶
The versioned JSONL event schema and its I/O. This package and
qnetbench.api are the two frozen contracts of the suite.
Narrative guide: Traces; the versioned contract itself is in the spec.
Events¶
qnetbench.trace.events
¶
The versioned trace event schema — the frozen wire contract.
A run is a stream of these, one JSON object per line. Metrics are computed from
traces, never inline, so any third-party tool can consume a run without importing
qnetbench. Bump SCHEMA_VERSION (semver) on any change to these models.
Event
module-attribute
¶
Event = Annotated[
RunHeader
| EntanglementRequested
| EntanglementDelivered
| ContractViolation
| ClassicalMessage
| Measurement
| QubitSent
| AppOutcomeEvent,
Field(discriminator="kind"),
]
RunHeader
¶
Bases: _Event
EntanglementRequested
¶
EntanglementDelivered
¶
ClassicalMessage
¶
Measurement
¶
QubitSent
¶
Bases: _Event
A single qubit transmitted over a quantum channel (prepare-and-measure protocols such as BB84), rather than a shared entangled pair.
I/O¶
qnetbench.trace.io
¶
Read and write traces as JSONL. One event per line.