deq_runtime/proto/deq.simulator.rs
1// This file is @generated by prost-build.
2/// One sampled shot from a simulator.
3///
4///
5/// Carries only the flat physical-measurement record. Callers that want
6/// per-gadget chunks can slice `outcomes` themselves using the
7/// per-gadget measurement counts from the JIT library — the
8/// : class:`deq.runtime.Sampler` wrapper exposes a `split_outcomes`
9/// helper and a `partition` property for that.
10#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
11pub struct ShotSample {
12 #[prost(message, optional, tag = "1")]
13 pub outcomes: ::core::option::Option<super::util::BitVector>,
14 /// Optional per-measurement loss flags, one bit per measurement in
15 /// `outcomes`. A set bit means the corresponding qubit was lost
16 /// during that measurement, so the bit in `outcomes` is a randomized
17 /// substitute filled in by the simulator and should be treated as
18 /// unreliable. Absent (or zero-length) when the sampler cannot
19 /// distinguish loss from a regular outcome — which is the case for
20 /// every Stim-native sampler today; only loss-aware samplers such as
21 /// `--simulator python` driving `qdk.stim` populate this field.
22 /// Mirrors the `loss_mask` field on :message:`deq.coordinator.Outcomes`.
23 #[prost(message, optional, tag = "2")]
24 pub loss_mask: ::core::option::Option<super::util::BitVector>,
25}
26/// Per-shot decoding results collected from one simulation run.
27#[derive(Clone, PartialEq, ::prost::Message)]
28pub struct SimulatorTrace {
29 #[prost(message, repeated, tag = "1")]
30 pub shots: ::prost::alloc::vec::Vec<SimulatorShot>,
31}
32#[derive(Clone, PartialEq, ::prost::Message)]
33pub struct SimulatorShot {
34 #[prost(uint64, tag = "1")]
35 pub shot: u64,
36 /// Aggregate readouts and summed statistics. Absent only when decoding failed.
37 #[prost(message, optional, tag = "2")]
38 pub decode_result: ::core::option::Option<super::coordinator::Readouts>,
39 /// Evaluated only for shots with a decode_result.
40 #[prost(bool, tag = "3")]
41 pub logical_error: bool,
42 /// Successful gadget replies in program order, including zero-readout gadgets.
43 /// Postprocessing chooses how to combine their statistics and select shots.
44 #[prost(message, repeated, tag = "4")]
45 pub gadget_readouts: ::prost::alloc::vec::Vec<super::coordinator::Readouts>,
46}