deq-runtime 0.3.0

deq: Real-time Quantum Error Correction Decoding System
// This file is @generated by prost-build.
/// Trace of all window coordinator events across multiple shots.
/// Written to file on reset() when trace_filepath is configured.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WindowCoordinatorTrace {
    #[prost(message, repeated, tag = "1")]
    pub shots: ::prost::alloc::vec::Vec<Shot>,
}
/// A single shot: all events between two consecutive reset() calls.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Shot {
    #[prost(message, repeated, tag = "1")]
    pub events: ::prost::alloc::vec::Vec<Event>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Event {
    #[prost(uint64, tag = "1")]
    pub timestamp_ns: u64,
    #[prost(oneof = "event::Event", tags = "2, 3, 4, 5, 6, 7, 8")]
    pub event: ::core::option::Option<event::Event>,
}
/// Nested message and enum types in `Event`.
pub mod event {
    #[allow(clippy::large_enum_variant)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Event {
        #[prost(message, tag = "2")]
        ExecuteGadget(super::ExecuteGadgetEvent),
        #[prost(message, tag = "3")]
        ExecuteCheckModel(super::ExecuteCheckModelEvent),
        #[prost(message, tag = "4")]
        ExecuteErrorModel(super::ExecuteErrorModelEvent),
        #[prost(message, tag = "5")]
        Decode(super::DecodeEvent),
        #[prost(message, tag = "6")]
        DecodeFinished(super::DecodeFinishedEvent),
        #[prost(message, tag = "7")]
        WindowExplore(super::WindowExploreEvent),
        #[prost(message, tag = "8")]
        SyndromeReady(super::SyndromeReadyEvent),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteGadgetEvent {
    /// The gadget instruction being executed (from deq_bin.proto).
    #[prost(message, optional, tag = "1")]
    pub gadget: ::core::option::Option<super::super::bin::Gadget>,
    /// Number of output ports (trace-specific, not in the instruction).
    #[prost(uint32, tag = "2")]
    pub num_outputs: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteCheckModelEvent {
    /// The check model instruction being executed (from deq_bin.proto).
    #[prost(message, optional, tag = "1")]
    pub check_model: ::core::option::Option<super::super::bin::CheckModel>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteErrorModelEvent {
    /// The error model instruction being executed (from deq_bin.proto).
    #[prost(message, optional, tag = "1")]
    pub error_model: ::core::option::Option<super::super::bin::ErrorModel>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DecodeEvent {
    #[prost(uint64, tag = "1")]
    pub gid: u64,
    #[prost(bool, tag = "3")]
    pub is_leader: bool,
    #[prost(uint64, tag = "4")]
    pub leader_gid: u64,
    /// The full window: committing_gids + buffer region (neighboring gadgets
    /// expanded by buffer_radius, with free-hop gadgets as free hops).
    #[prost(uint64, repeated, tag = "6")]
    pub window: ::prost::alloc::vec::Vec<u64>,
    /// The gadgets whose corrections are committed by this decode call.
    /// Includes both hop-counted gadgets (with boundary_dist >= buffer_radius)
    /// and free-hop gadgets absorbed into the commit region.
    /// The leader (center GID) always drives the decode.
    #[prost(uint64, repeated, tag = "7")]
    pub committing_gids: ::prost::alloc::vec::Vec<u64>,
    /// The check model CIDs owned by committing_gids gadgets.
    #[prost(uint64, repeated, tag = "8")]
    pub committing_cids: ::prost::alloc::vec::Vec<u64>,
}
/// Emitted after the decoder call returns for a leader window.
/// Use timestamp_ns together with the DecodeEvent timestamp to measure
/// decoder wall-clock time per window.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DecodeFinishedEvent {
    #[prost(uint64, tag = "1")]
    pub leader_gid: u64,
}
/// Emitted once per decode call, after the five-step exploration completes
/// and before the actual decoder invocation.  Records which gadgets belong
/// to each exploration phase so that tools can visualize the window
/// construction process step by step.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WindowExploreEvent {
    /// The center gadget that triggered this exploration.
    #[prost(uint64, tag = "1")]
    pub center_gid: u64,
    /// Step 1: mandatory-zone gadgets (blocking BFS up to buffer_radius).
    #[prost(uint64, repeated, tag = "2")]
    pub mandatory_zone_gids: ::prost::alloc::vec::Vec<u64>,
    /// Step 3: lookahead-zone gadgets (non-blocking BFS, lookahead_radius
    /// additional hops beyond the mandatory zone).
    #[prost(uint64, repeated, tag = "3")]
    pub lookahead_zone_gids: ::prost::alloc::vec::Vec<u64>,
    /// Step 4: gadgets selected for commit (boundary_dist >= buffer_radius).
    #[prost(uint64, repeated, tag = "4")]
    pub commit_region_gids: ::prost::alloc::vec::Vec<u64>,
    /// Step 5: the trimmed decoder window (commit region + buffer).
    #[prost(uint64, repeated, tag = "5")]
    pub decoder_window_gids: ::prost::alloc::vec::Vec<u64>,
}
/// Emitted when a check model's syndrome computation finishes.
/// This marks the moment when the gadget's physical measurement outcomes
/// have been fully processed into syndrome bits and are ready for decoding.
/// Only emitted for gadgets that have a binding check model (i.e., gadgets
/// with physical measurements — syndrome extraction, preparation, and
/// final measurement gadgets).  Free-hop/unitary gadgets do not emit this.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SyndromeReadyEvent {
    /// The check model CID whose syndrome is now ready.
    #[prost(uint64, tag = "1")]
    pub cid: u64,
    /// The gadget GID that owns this check model.
    #[prost(uint64, tag = "2")]
    pub gid: u64,
}