From bb6a374abfc7f02c4326129556b4fedad0bd6087 Mon Sep 17 00:00:00 2001 From: Randall Fulton Date: Thu, 7 Apr 2022 10:40:49 -0500 Subject: [PATCH] Update: Add new execution results message --- rpcq/core_messages.py | 1 - rpcq/messages.py | 13 +++++++++++++ src/messages.lisp | 12 ++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/rpcq/core_messages.py b/rpcq/core_messages.py index 095c381..450847b 100644 --- a/rpcq/core_messages.py +++ b/rpcq/core_messages.py @@ -8,7 +8,6 @@ from warnings import warn from rpcq._base import Message -from rpcq.messages import ParameterSpec, PatchTarget from typing import Any, List, Dict, Optional if sys.version_info < (3, 7): diff --git a/rpcq/messages.py b/rpcq/messages.py index adcf58f..35dbe61 100644 --- a/rpcq/messages.py +++ b/rpcq/messages.py @@ -408,3 +408,16 @@ class QuiltCalibrationsResponse(Message): """Quilt code with definitions for frames, waveforms, and calibrations.""" +@dataclass(eq=False, repr=False) +class GetExecutionResultsResponse(Message): + """ + Results of a completed ExecutorJob execution. + """ + + buffers: Dict[str, Dict[str, Any]] + """Result buffers for a completed ExecutorJob.""" + + execution_duration_microseconds: int + """Duration (in microseconds) ExecutorJob held exclusive access to quantum hardware.""" + + diff --git a/src/messages.lisp b/src/messages.lisp index 7bbf967..6874d1f 100644 --- a/src/messages.lisp +++ b/src/messages.lisp @@ -449,3 +449,15 @@ :type :string :required t)) :documentation "Up-to-date Quilt calibrations.") + +(defmessage |GetExecutionResultsResponse| () + ((|buffers| + :documentation "Result buffers for a completed ExecutorJob." + :type (:map :string -> (:map :string -> :any)) + :required t) + + (|execution_duration_microseconds| + :documentation "Duration (in microseconds) ExecutorJob held exclusive access to quantum hardware." + :type :integer + :required t)) + :documentation "Results of a completed ExecutorJob execution.")