NoiseLearnerV3Results¶
- class NoiseLearnerV3Results(data, metadata=None)[source]¶
Bases:
objectThe results of a noise learner experiment.
- Parameters:
data (Iterable[NoiseLearnerV3Result]) – The data in this result object.
metadata (Metadata | None) – A dictionary of metadata.
Methods
- to_dict(instructions, require_refs=True)[source]¶
Convert to a dictionary from
InjectNoise.reftoPauliLindbladMapobjects. This function iterates over a sequence of instructions, extracts therefvalue from the inject noise annotation of each instruction, and returns a dictionary mapping those refs to the corresponding noise data (inPauliLindbladMapformat) stored in thisNoiseLearnerV3Resultsobject.- Parameters:
instructions (Iterable[CircuitInstruction]) – The instructions to get the refs from.
require_refs (bool) – Whether to raise if some of the instructions do not own an inject noise annotation. If
False, all the instructions that do not contain an inject noise annotations are simply skipped when constructing the returned dictionary.
- Raises:
ValueError – If
instructionscontains a number of elements that is not equal to the item in thisNoiseLearnerV3Resultsobject.ValueError – If some of the instructions do not contain a box.
ValueError – If multiple instructions have the same
ref.ValueError – If some of the instructions have no inject noise annotation and
require_refsifTrue.
- Return type:
dict[int, PauliLindbladMap]