CompiledProgram¶
Bases: Displayable
What an engine runs for a program: plain, serializable data.
It is filled here by tracing one shot of the program, and later could
be filled ahead of time by a static compiler. It holds no History
index, closure or live object, and is keyed by the measurement
record, which is the concatenation of the steps' outcome bits.
Each entry of steps is a dict with five keys:
nameandtype: those of the instruction that ran.outcome_labels: the qubit labels behind the record bits the step wrote, in record order; an entry isNonefor a bit with no qubit label (anMPPbit).emitted: adictfrom a target name to what the step emitted for that target, so one step can carry several targets. The"stim"target holds the STIM text the step ran, and a step that emits nothing has an emptydict.reads: a sorted list of the indices of earlier steps whose output the step collects, which records feed-forward as data flow. It is an over-approximation: every earlier step that set a key the step collects counts, and an in-place change to shared data isn't seen.
A step may gain keys later, so read a step by key and never assume these five are all there is.
Attributes¶
decode¶
Inherited static method from Serializable.decode().
display¶
Inherited method from Displayable.display().
dump¶
Inherited method from Serializable.dump().
encode¶
Inherited static method from Serializable.encode().
load¶
Inherited class method from Serializable.load().
read¶
Inherited class method from Serializable.read().
serialize_function¶
Inherited static method from Serializable.serialize_function().
write¶
Inherited method from Serializable.write().