NoiseLearnerV3Results
class NoiseLearnerV3Results(data, metadata=None)
Bases: object
The results of a noise learner experiment.
Parameters
- data (Iterable[NoiseLearnerV3Result]) – The data in this result object.
- metadata (Metadata | None) – A dictionary of metadata.
Methods
__getitem__
__len__
to_dict
to_dict(instructions, require_refs=True)
Convert to dictionary from InjectNoise.ref to PauliLindbladMap objects.
This function iterates over a sequence of instructions, extracts the ref value from the inject noise annotation of each instruction, and returns a dictionary mapping those refs to the corresponding noise data (in PauliLindbladMap format) stored in this NoiseLearnerV3Results object.
Parameters
- instructions (Sequence[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]