diff --git a/pulser-core/pulser/backend/results.py b/pulser-core/pulser/backend/results.py index 357e79a9b..ec7a731ca 100644 --- a/pulser-core/pulser/backend/results.py +++ b/pulser-core/pulser/backend/results.py @@ -103,6 +103,18 @@ def get_result(self, observable: Observable | str, time: float) -> Any: f"{observable!r} is not available at time {time}." ) + def get_tagged_results(self) -> dict[str, dict[float, Any]]: + """Gets the results for every tag. + + Returns: + A mapping between a tag and the results associated to it, + at every evaluation time. + """ + return { + tag: dict(self._results[uuid_]) + for tag, uuid_ in self._tagmap.items() + } + def _find_uuid(self, observable: Observable | str) -> uuid.UUID: if isinstance(observable, Observable): return observable.uuid