pub struct NodeEmissionPlan {
pub circuit: CoordCircuit,
pub normalized_templates: Option<BloqTemplatePool>,
pub measurements: FxHashMap<InstanceMeasurement, u32>,
pub bodies: FxHashMap<(TemplateInstanceId, BodyId), BodyId>,
}Expand description
A node’s merged circuit and instance-space maps.
measurements translates each InstanceMeasurement
to its merged measurement id, and bodies translates each
(instance, template body) to its merged body id. Side tables (detectors,
observable recipes) named in instance space resolve against these.
Fields§
§circuit: CoordCircuitMerged circuit.
normalized_templates: Option<BloqTemplatePool>Annotated source templates after repeat expansion, when idle noise
crosses a repeat boundary. Use Self::templates when resolving this
plan’s detector tables and instance-local measurement ids.
measurements: FxHashMap<InstanceMeasurement, u32>Instance-space measurement to merged-local measurement id.
bodies: FxHashMap<(TemplateInstanceId, BodyId), BodyId>Instance/template body to merged body id.
Implementations§
Source§impl NodeEmissionPlan
impl NodeEmissionPlan
Sourcepub fn templates<'a>(
&'a self,
original: &'a BloqTemplatePool,
) -> &'a BloqTemplatePool
pub fn templates<'a>( &'a self, original: &'a BloqTemplatePool, ) -> &'a BloqTemplatePool
Source templates matching this plan’s circuit and id maps. Most plans
use original; partial repeat moments carry an expanded annotated pool.
Sourcepub fn grouped_measurements(&self) -> Vec<(u32, Vec<InstanceMeasurement>)>
pub fn grouped_measurements(&self) -> Vec<(u32, Vec<InstanceMeasurement>)>
The plan’s measurements inverted and grouped by
merged-local id: each (local, sources) pair collects every
InstanceMeasurement that resolves to the same merged record local.
The order is canonical and load-bearing — both backends mint their global
records in it: groups are yielded ascending by local, and within a group
the sources are sorted by (instance, measurement). bloq_vm mints
one global record per group in this order; bloq_stim folds each group to
its minimum backend id. Both folds are order-independent within a group, so
the intra-group order is fixed only to make the grouping canonical.
Trait Implementations§
Source§impl Clone for NodeEmissionPlan
impl Clone for NodeEmissionPlan
Source§fn clone(&self) -> NodeEmissionPlan
fn clone(&self) -> NodeEmissionPlan
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more