From 3831dba0b50cde0e63c442166a5f4b82954bd3cf Mon Sep 17 00:00:00 2001 From: Nischal Sehrawat Date: Mon, 14 Jul 2025 16:11:27 +0200 Subject: [PATCH 1/6] [QI2-1678] Added examples for qi2lib and qi2comms models --- schemas/v1/PublishState.schema.json | 23 ++- ...tumHardwareDataFailureResponse.schema.json | 7 + ...ntumHardwareDynamicDataRequest.schema.json | 7 + ...tumHardwareDynamicDataResponse.schema.json | 12 +- .../QuantumHardwareExecuteRequest.schema.json | 32 ++- ...QuantumHardwareExecuteResponse.schema.json | 48 ++++- ...QuantumHardwareFailureResponse.schema.json | 20 +- ...antumHardwareInitializeRequest.schema.json | 10 + ...mHardwareSimpleSuccessResponse.schema.json | 10 + ...antumHardwareStaticDataRequest.schema.json | 7 + ...ntumHardwareStaticDataResponse.schema.json | 77 ++++++- ...uantumHardwareTerminateRequest.schema.json | 10 + schemas/v2/PublishState.schema.json | 22 +- ...tumHardwareDataFailureResponse.schema.json | 7 + ...ntumHardwareDynamicDataRequest.schema.json | 10 + ...tumHardwareDynamicDataResponse.schema.json | 12 +- .../QuantumHardwareExecuteRequest.schema.json | 32 ++- ...QuantumHardwareExecuteResponse.schema.json | 48 ++++- ...QuantumHardwareFailureResponse.schema.json | 20 +- ...antumHardwareInitializeRequest.schema.json | 10 + ...mHardwareSimpleSuccessResponse.schema.json | 10 + ...antumHardwareStaticDataRequest.schema.json | 10 + ...ntumHardwareStaticDataResponse.schema.json | 192 +++++++++++++++++- ...uantumHardwareTerminateRequest.schema.json | 10 + schemas/v3/PublishState.schema.json | 19 +- ...ntumHardwareDynamicDataRequest.schema.json | 6 + ...tumHardwareDynamicDataResponse.schema.json | 11 +- .../QuantumHardwareExecuteRequest.schema.json | 28 ++- ...QuantumHardwareExecuteResponse.schema.json | 44 +++- ...QuantumHardwareFailureResponse.schema.json | 16 +- ...antumHardwareInitializeRequest.schema.json | 6 + ...mHardwareSimpleSuccessResponse.schema.json | 6 + ...antumHardwareStaticDataRequest.schema.json | 6 + ...ntumHardwareStaticDataResponse.schema.json | 191 ++++++++++++++++- ...uantumHardwareTerminateRequest.schema.json | 6 + 35 files changed, 959 insertions(+), 26 deletions(-) diff --git a/schemas/v1/PublishState.schema.json b/schemas/v1/PublishState.schema.json index 6ae8543..18c9dfa 100644 --- a/schemas/v1/PublishState.schema.json +++ b/schemas/v1/PublishState.schema.json @@ -14,11 +14,17 @@ "properties": { "timestamp": { "description": "Timestamp of the instantiation of the message (return value of time.time())", + "examples": [ + 1752241667.1091666 + ], "title": "Timestamp", "type": "number" }, "state": { - "$ref": "#/$defs/HWCSState" + "$ref": "#/$defs/HWCSState", + "examples": [ + "IDLE" + ] } }, "required": [ @@ -31,17 +37,30 @@ }, "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "command": { "const": "publish_state", + "examples": [ + "publish_state" + ], "title": "Command", "type": "string" }, "payload": { - "$ref": "#/$defs/PublishStatePayloadSchema" + "$ref": "#/$defs/PublishStatePayloadSchema", + "examples": [ + { + "state": "IDLE", + "timestamp": 1752241667.1091666 + } + ] } }, "required": [ diff --git a/schemas/v1/QuantumHardwareDataFailureResponse.schema.json b/schemas/v1/QuantumHardwareDataFailureResponse.schema.json index 472aa0f..370535d 100644 --- a/schemas/v1/QuantumHardwareDataFailureResponse.schema.json +++ b/schemas/v1/QuantumHardwareDataFailureResponse.schema.json @@ -2,12 +2,19 @@ "description": "Reply for when hardware data request fails.", "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "status": { "const": "failure", + "examples": [ + "failure" + ], "title": "Status", "type": "string" } diff --git a/schemas/v1/QuantumHardwareDynamicDataRequest.schema.json b/schemas/v1/QuantumHardwareDynamicDataRequest.schema.json index 79564b2..99579e7 100644 --- a/schemas/v1/QuantumHardwareDynamicDataRequest.schema.json +++ b/schemas/v1/QuantumHardwareDynamicDataRequest.schema.json @@ -1,12 +1,19 @@ { "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "command": { "const": "get_dynamic", + "examples": [ + "get_dynamic" + ], "title": "Command", "type": "string" } diff --git a/schemas/v1/QuantumHardwareDynamicDataResponse.schema.json b/schemas/v1/QuantumHardwareDynamicDataResponse.schema.json index ec360d0..122ae44 100644 --- a/schemas/v1/QuantumHardwareDynamicDataResponse.schema.json +++ b/schemas/v1/QuantumHardwareDynamicDataResponse.schema.json @@ -9,17 +9,27 @@ "description": "The reply containing system information for 2300.", "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "status": { "const": "success", + "examples": [ + "success" + ], "title": "Status", "type": "string" }, "payload": { - "$ref": "#/$defs/DynamicDataSchema" + "$ref": "#/$defs/DynamicDataSchema", + "examples": [ + {} + ] } }, "required": [ diff --git a/schemas/v1/QuantumHardwareExecuteRequest.schema.json b/schemas/v1/QuantumHardwareExecuteRequest.schema.json index 666d9b0..8c43fe0 100644 --- a/schemas/v1/QuantumHardwareExecuteRequest.schema.json +++ b/schemas/v1/QuantumHardwareExecuteRequest.schema.json @@ -5,16 +5,25 @@ "properties": { "job_id": { "description": "Client identifier for the execution", + "examples": [ + 1 + ], "title": "Job Id", "type": "integer" }, "circuit": { "description": "Circuit description in cQASM language", + "examples": [ + "version 3.0\n\nqubit[10] q\n" + ], "title": "Circuit", "type": "string" }, "number_of_shots": { "description": "Number of shots to be executed for the circuit.", + "examples": [ + 100 + ], "exclusiveMinimum": 0, "title": "Number Of Shots", "type": "integer" @@ -22,6 +31,9 @@ "include_raw_data": { "default": false, "description": "Whether or not to return all bitstrings in the order in which they were measured.", + "examples": [ + false + ], "title": "Include Raw Data", "type": "boolean" } @@ -38,23 +50,41 @@ "description": "Request execution of a circuit.", "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "session_id": { "description": "An arbitrary string, filled in in the request, which is copied into the reply object.", + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" }, "command": { "const": "execute", + "examples": [ + "execute" + ], "title": "Command", "type": "string" }, "payload": { - "$ref": "#/$defs/RunCircuitPayloadSchema" + "$ref": "#/$defs/RunCircuitPayloadSchema", + "examples": [ + { + "circuit": "version 3.0\n\nqubit[10] q\n", + "include_raw_data": false, + "job_id": 1, + "number_of_shots": 100 + } + ] } }, "required": [ diff --git a/schemas/v1/QuantumHardwareExecuteResponse.schema.json b/schemas/v1/QuantumHardwareExecuteResponse.schema.json index 1f4bf50..ec4439a 100644 --- a/schemas/v1/QuantumHardwareExecuteResponse.schema.json +++ b/schemas/v1/QuantumHardwareExecuteResponse.schema.json @@ -5,6 +5,9 @@ "properties": { "job_id": { "description": "Client defined identifier for the execution.", + "examples": [ + 1 + ], "title": "Job Id", "type": "integer" }, @@ -13,6 +16,14 @@ "type": "integer" }, "description": "Mapping of measured bitstring (little endian notation; q[n]...q[0]) to count of occurrences.", + "examples": [ + { + "0000000000": 250, + "0000000001": 250, + "0000000010": 250, + "0000000011": 250 + } + ], "title": "Results", "type": "object" }, @@ -30,6 +41,14 @@ ], "default": null, "description": "A list of bitstrings (little endian notation; `q[n]...q[0]`) ordered by the shot in which it was measured.", + "examples": [ + [ + "0000000000", + "0000000001", + "0000000010", + "0000000011" + ] + ], "title": "Raw Data" } }, @@ -44,23 +63,50 @@ "description": "The reply for a successful operation.", "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "session_id": { "description": "An arbitrary string, filled in in the request, which is copied into the reply object.", + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" }, "status": { "const": "success", + "examples": [ + "success" + ], "title": "Status", "type": "string" }, "payload": { - "$ref": "#/$defs/RunCircuitResultSchema" + "$ref": "#/$defs/RunCircuitResultSchema", + "examples": [ + { + "job_id": 1, + "raw_data": [ + "0000000000", + "0000000001", + "0000000010", + "0000000011" + ], + "results": { + "0000000000": 250, + "0000000001": 250, + "0000000010": 250, + "0000000011": 250 + } + } + ] } }, "required": [ diff --git a/schemas/v1/QuantumHardwareFailureResponse.schema.json b/schemas/v1/QuantumHardwareFailureResponse.schema.json index 5728666..43dc718 100644 --- a/schemas/v1/QuantumHardwareFailureResponse.schema.json +++ b/schemas/v1/QuantumHardwareFailureResponse.schema.json @@ -4,6 +4,9 @@ "properties": { "error_msg": { "description": "A descriptive error message to be passed on to the user.", + "examples": [ + "Some Error" + ], "title": "Error Msg", "type": "string" } @@ -17,23 +20,38 @@ }, "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "session_id": { "description": "An arbitrary string, filled in in the request, which is copied into the reply object.", + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" }, "status": { "const": "failure", + "examples": [ + "failure" + ], "title": "Status", "type": "string" }, "payload": { - "$ref": "#/$defs/FailureDataSchema" + "$ref": "#/$defs/FailureDataSchema", + "examples": [ + { + "error_msg": "Some Error" + } + ] } }, "required": [ diff --git a/schemas/v1/QuantumHardwareInitializeRequest.schema.json b/schemas/v1/QuantumHardwareInitializeRequest.schema.json index 2e82548..09ee7c1 100644 --- a/schemas/v1/QuantumHardwareInitializeRequest.schema.json +++ b/schemas/v1/QuantumHardwareInitializeRequest.schema.json @@ -2,18 +2,28 @@ "description": "This message signals to the 2300 that execution is about to begin.\n\nThe initialize should be picked up as a request for locking 2300.", "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "session_id": { "description": "An arbitrary string, filled in in the request, which is copied into the reply object.", + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" }, "command": { "const": "initialize", + "examples": [ + "initialize" + ], "title": "Command", "type": "string" } diff --git a/schemas/v1/QuantumHardwareSimpleSuccessResponse.schema.json b/schemas/v1/QuantumHardwareSimpleSuccessResponse.schema.json index 9d92569..aae77f9 100644 --- a/schemas/v1/QuantumHardwareSimpleSuccessResponse.schema.json +++ b/schemas/v1/QuantumHardwareSimpleSuccessResponse.schema.json @@ -2,18 +2,28 @@ "description": "The reply for a successful operation.", "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "session_id": { "description": "An arbitrary string, filled in in the request, which is copied into the reply object.", + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" }, "status": { "const": "success", + "examples": [ + "success" + ], "title": "Status", "type": "string" } diff --git a/schemas/v1/QuantumHardwareStaticDataRequest.schema.json b/schemas/v1/QuantumHardwareStaticDataRequest.schema.json index 66460b9..da5bd53 100644 --- a/schemas/v1/QuantumHardwareStaticDataRequest.schema.json +++ b/schemas/v1/QuantumHardwareStaticDataRequest.schema.json @@ -1,12 +1,19 @@ { "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "command": { "const": "get_static", + "examples": [ + "get_static" + ], "title": "Command", "type": "string" } diff --git a/schemas/v1/QuantumHardwareStaticDataResponse.schema.json b/schemas/v1/QuantumHardwareStaticDataResponse.schema.json index 42d3fe1..c0f7fe5 100644 --- a/schemas/v1/QuantumHardwareStaticDataResponse.schema.json +++ b/schemas/v1/QuantumHardwareStaticDataResponse.schema.json @@ -4,20 +4,53 @@ "properties": { "nqubits": { "description": "The number of qubits.", + "examples": [ + 3 + ], "title": "Nqubits", "type": "integer" }, "topology": { "$ref": "#/$defs/Topology", - "description": "List of the edges between the various qubits" + "description": "List of the edges between the various qubits", + "examples": [ + [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 2, + 0 + ], + [ + 3, + 2 + ] + ] + ] }, "name": { "description": "Name of the system.", + "examples": [ + "Spin2" + ], "title": "Name", "type": "string" }, "pgs": { "description": "Supported primitive gates set of the system. Gate names as described in cQASM (in uppercase).", + "examples": [ + [ + "X", + "Y", + "Z" + ] + ], "items": { "type": "string" }, @@ -26,6 +59,9 @@ }, "starttime": { "description": "Timestamp of start-up of the system (return value of time.time())", + "examples": [ + 1752241667.1091666 + ], "title": "Starttime", "type": "number" } @@ -62,17 +98,54 @@ "description": "The reply containing system information for 2300.", "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "status": { "const": "success", + "examples": [ + "success" + ], "title": "Status", "type": "string" }, "payload": { - "$ref": "#/$defs/StaticDataSchema" + "$ref": "#/$defs/StaticDataSchema", + "examples": [ + { + "name": "Spin2", + "nqubits": 3, + "pgs": [ + "X", + "Y", + "Z" + ], + "starttime": 1752241667.1091666, + "topology": [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 2, + 0 + ], + [ + 3, + 2 + ] + ] + } + ] } }, "required": [ diff --git a/schemas/v1/QuantumHardwareTerminateRequest.schema.json b/schemas/v1/QuantumHardwareTerminateRequest.schema.json index fec726d..950018f 100644 --- a/schemas/v1/QuantumHardwareTerminateRequest.schema.json +++ b/schemas/v1/QuantumHardwareTerminateRequest.schema.json @@ -2,18 +2,28 @@ "description": "When 2300 receives this request, execution from user generated circuits has stopped and the system can resume\nnormal operations.", "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "session_id": { "description": "An arbitrary string, filled in in the request, which is copied into the reply object.", + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" }, "command": { "const": "terminate", + "examples": [ + "terminate" + ], "title": "Command", "type": "string" } diff --git a/schemas/v2/PublishState.schema.json b/schemas/v2/PublishState.schema.json index 6e2c03d..7d08b79 100644 --- a/schemas/v2/PublishState.schema.json +++ b/schemas/v2/PublishState.schema.json @@ -14,11 +14,17 @@ "properties": { "timestamp": { "description": "Timestamp of the instantiation of the message (return value of time.time())", + "examples": [ + 1752241667.1091666 + ], "title": "Timestamp", "type": "number" }, "state": { - "$ref": "#/$defs/HWCSState" + "$ref": "#/$defs/HWCSState", + "examples": [ + "IDLE" + ] } }, "required": [ @@ -34,17 +40,29 @@ "version": { "default": "0.2.0", "description": "Version of the message schema. Has been made optional to allow for moving to the new versioning scheme.", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "command": { "const": "publish_state", + "examples": [ + "publish_state" + ], "title": "Command", "type": "string" }, "payload": { - "$ref": "#/$defs/PublishStatePayloadSchema" + "$ref": "#/$defs/PublishStatePayloadSchema", + "examples": [ + { + "state": "IDLE", + "timestamp": 1752241667.1091666 + } + ] } }, "required": [ diff --git a/schemas/v2/QuantumHardwareDataFailureResponse.schema.json b/schemas/v2/QuantumHardwareDataFailureResponse.schema.json index b2dd936..135bf83 100644 --- a/schemas/v2/QuantumHardwareDataFailureResponse.schema.json +++ b/schemas/v2/QuantumHardwareDataFailureResponse.schema.json @@ -2,12 +2,19 @@ "description": "Simplified failure response that can only be used for dynamic/static data requests.", "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "status": { "const": "failure", + "examples": [ + "failure" + ], "title": "Status", "type": "string" } diff --git a/schemas/v2/QuantumHardwareDynamicDataRequest.schema.json b/schemas/v2/QuantumHardwareDynamicDataRequest.schema.json index a44d1aa..d939810 100644 --- a/schemas/v2/QuantumHardwareDynamicDataRequest.schema.json +++ b/schemas/v2/QuantumHardwareDynamicDataRequest.schema.json @@ -1,16 +1,26 @@ { "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "command": { "const": "get_dynamic", + "examples": [ + "get_dynamic" + ], "title": "Command", "type": "string" }, "session_id": { + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" diff --git a/schemas/v2/QuantumHardwareDynamicDataResponse.schema.json b/schemas/v2/QuantumHardwareDynamicDataResponse.schema.json index f963f2c..6c7a6e3 100644 --- a/schemas/v2/QuantumHardwareDynamicDataResponse.schema.json +++ b/schemas/v2/QuantumHardwareDynamicDataResponse.schema.json @@ -9,17 +9,27 @@ "description": "A successful response to a dynamic data request.", "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "status": { "const": "success", + "examples": [ + "success" + ], "title": "Status", "type": "string" }, "payload": { - "$ref": "#/$defs/DynamicDataSchema" + "$ref": "#/$defs/DynamicDataSchema", + "examples": [ + {} + ] } }, "required": [ diff --git a/schemas/v2/QuantumHardwareExecuteRequest.schema.json b/schemas/v2/QuantumHardwareExecuteRequest.schema.json index 04eec9c..a4d5063 100644 --- a/schemas/v2/QuantumHardwareExecuteRequest.schema.json +++ b/schemas/v2/QuantumHardwareExecuteRequest.schema.json @@ -4,16 +4,25 @@ "properties": { "job_id": { "description": "Client identifier for the execution", + "examples": [ + 1 + ], "title": "Job Id", "type": "integer" }, "circuit": { "description": "Circuit description in cQASM language", + "examples": [ + "version 3.0\n\nqubit[10] q\n" + ], "title": "Circuit", "type": "string" }, "number_of_shots": { "description": "Number of shots to be executed for the circuit.", + "examples": [ + 100 + ], "exclusiveMinimum": 0, "title": "Number Of Shots", "type": "integer" @@ -21,6 +30,9 @@ "include_raw_data": { "default": false, "description": "Whether or not to return all bitstrings in the order in which they were measured.", + "examples": [ + false + ], "title": "Include Raw Data", "type": "boolean" } @@ -36,23 +48,41 @@ }, "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "session_id": { "description": "An arbitrary string, filled in in the request, which is copied into the reply object.", + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" }, "command": { "const": "execute", + "examples": [ + "execute" + ], "title": "Command", "type": "string" }, "payload": { - "$ref": "#/$defs/RunCircuitPayloadSchema" + "$ref": "#/$defs/RunCircuitPayloadSchema", + "examples": [ + { + "circuit": "version 3.0\n\nqubit[10] q\n", + "include_raw_data": false, + "job_id": 1, + "number_of_shots": 100 + } + ] } }, "required": [ diff --git a/schemas/v2/QuantumHardwareExecuteResponse.schema.json b/schemas/v2/QuantumHardwareExecuteResponse.schema.json index 8b48d8c..f1f8ca3 100644 --- a/schemas/v2/QuantumHardwareExecuteResponse.schema.json +++ b/schemas/v2/QuantumHardwareExecuteResponse.schema.json @@ -4,6 +4,9 @@ "properties": { "job_id": { "description": "Client defined identifier for the execution.", + "examples": [ + 1 + ], "title": "Job Id", "type": "integer" }, @@ -12,6 +15,14 @@ "type": "integer" }, "description": "Mapping of measured bitstring (little endian notation; q[n]...q[0]) to count of occurrences.", + "examples": [ + { + "0000000000": 250, + "0000000001": 250, + "0000000010": 250, + "0000000011": 250 + } + ], "title": "Results", "type": "object" }, @@ -29,6 +40,14 @@ ], "default": null, "description": "A list of bitstrings (little endian notation; `q[n]...q[0]`) ordered by the shot in which it was measured.", + "examples": [ + [ + "0000000000", + "0000000001", + "0000000010", + "0000000011" + ] + ], "title": "Raw Data" } }, @@ -43,23 +62,50 @@ "description": "A successful response to a circuit execution request.", "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "session_id": { "description": "An arbitrary string, filled in in the request, which is copied into the reply object.", + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" }, "status": { "const": "success", + "examples": [ + "success" + ], "title": "Status", "type": "string" }, "payload": { - "$ref": "#/$defs/RunCircuitResultSchema" + "$ref": "#/$defs/RunCircuitResultSchema", + "examples": [ + { + "job_id": 1, + "raw_data": [ + "0000000000", + "0000000001", + "0000000010", + "0000000011" + ], + "results": { + "0000000000": 250, + "0000000001": 250, + "0000000010": 250, + "0000000011": 250 + } + } + ] } }, "required": [ diff --git a/schemas/v2/QuantumHardwareFailureResponse.schema.json b/schemas/v2/QuantumHardwareFailureResponse.schema.json index 5aea670..046988b 100644 --- a/schemas/v2/QuantumHardwareFailureResponse.schema.json +++ b/schemas/v2/QuantumHardwareFailureResponse.schema.json @@ -4,6 +4,9 @@ "properties": { "error_msg": { "description": "A descriptive error message to be passed on to the user.", + "examples": [ + "Some Error" + ], "title": "Error Msg", "type": "string" } @@ -18,23 +21,38 @@ "description": "Response that indicates a failure in the operation.\n\nCan be sent in response to any request.", "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "session_id": { "description": "An arbitrary string, filled in in the request, which is copied into the reply object.", + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" }, "status": { "const": "failure", + "examples": [ + "failure" + ], "title": "Status", "type": "string" }, "payload": { - "$ref": "#/$defs/FailureDataSchema" + "$ref": "#/$defs/FailureDataSchema", + "examples": [ + { + "error_msg": "Some Error" + } + ] } }, "required": [ diff --git a/schemas/v2/QuantumHardwareInitializeRequest.schema.json b/schemas/v2/QuantumHardwareInitializeRequest.schema.json index 557b107..703d742 100644 --- a/schemas/v2/QuantumHardwareInitializeRequest.schema.json +++ b/schemas/v2/QuantumHardwareInitializeRequest.schema.json @@ -2,18 +2,28 @@ "description": "This message signals that execution is about to begin.\n\nThe initialize should be picked up as a request for locking.", "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "session_id": { "description": "An arbitrary string, filled in in the request, which is copied into the reply object.", + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" }, "command": { "const": "initialize", + "examples": [ + "initialize" + ], "title": "Command", "type": "string" } diff --git a/schemas/v2/QuantumHardwareSimpleSuccessResponse.schema.json b/schemas/v2/QuantumHardwareSimpleSuccessResponse.schema.json index 0bcb45b..6a1017a 100644 --- a/schemas/v2/QuantumHardwareSimpleSuccessResponse.schema.json +++ b/schemas/v2/QuantumHardwareSimpleSuccessResponse.schema.json @@ -2,18 +2,28 @@ "description": "A simple success response to an initialize or terminate request.", "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "session_id": { "description": "An arbitrary string, filled in in the request, which is copied into the reply object.", + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" }, "status": { "const": "success", + "examples": [ + "success" + ], "title": "Status", "type": "string" } diff --git a/schemas/v2/QuantumHardwareStaticDataRequest.schema.json b/schemas/v2/QuantumHardwareStaticDataRequest.schema.json index c979b61..bae27b0 100644 --- a/schemas/v2/QuantumHardwareStaticDataRequest.schema.json +++ b/schemas/v2/QuantumHardwareStaticDataRequest.schema.json @@ -1,16 +1,26 @@ { "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "command": { "const": "get_static", + "examples": [ + "get_static" + ], "title": "Command", "type": "string" }, "session_id": { + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" diff --git a/schemas/v2/QuantumHardwareStaticDataResponse.schema.json b/schemas/v2/QuantumHardwareStaticDataResponse.schema.json index 6a52b83..01a0d87 100644 --- a/schemas/v2/QuantumHardwareStaticDataResponse.schema.json +++ b/schemas/v2/QuantumHardwareStaticDataResponse.schema.json @@ -5,6 +5,16 @@ "properties": { "decomposition": { "default": [], + "description": "The decomposition stage compiler config", + "examples": [ + [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ] + ], "items": { "$ref": "#/$defs/CompilerPass" }, @@ -13,6 +23,16 @@ }, "mapping": { "default": [], + "description": "The mapping stage compiler config", + "examples": [ + [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ] + ], "items": { "$ref": "#/$defs/CompilerPass" }, @@ -21,6 +41,16 @@ }, "optimization": { "default": [], + "description": "The optimization stage compiler config", + "examples": [ + [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ] + ], "items": { "$ref": "#/$defs/CompilerPass" }, @@ -29,6 +59,16 @@ }, "routing": { "default": [], + "description": "The routing stage compiler config", + "examples": [ + [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ] + ], "items": { "$ref": "#/$defs/CompilerPass" }, @@ -61,6 +101,9 @@ "additionalProperties": true, "default": {}, "description": "Arguments for the compiler pass", + "examples": [ + {} + ], "title": "Arguments", "type": "object" } @@ -77,25 +120,61 @@ "protocol_version": { "default": 2, "description": "Version of the Compute Runtime Schema to use", + "examples": [ + 2 + ], "title": "Protocol Version", "type": "integer" }, "nqubits": { "description": "The number of qubits.", + "examples": [ + 3 + ], "title": "Nqubits", "type": "integer" }, "topology": { "$ref": "#/$defs/Topology", - "description": "List of the edges between the various qubits" + "description": "List of the edges between the various qubits", + "examples": [ + [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 2, + 0 + ], + [ + 3, + 2 + ] + ] + ] }, "name": { "description": "Name of the system.", + "examples": [ + "Spin2" + ], "title": "Name", "type": "string" }, "pgs": { "description": "Supported primitive gates set of the system. Gate names as described in cQASM (in uppercase).", + "examples": [ + [ + "X", + "Y", + "Z" + ] + ], "items": { "type": "string" }, @@ -110,16 +189,54 @@ "optimization": [], "routing": [] }, - "description": "A suitable default compiler configuration for the hardware backend" + "description": "A suitable default compiler configuration for the hardware backend", + "examples": [ + { + "decomposition": [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ], + "mapping": [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ], + "optimization": [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ], + "routing": [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ] + } + ] }, "starttime": { "description": "Timestamp of start-up of the system (return value of time.time())", + "examples": [ + 1752241667.1091666 + ], "title": "Starttime", "type": "number" }, "supports_raw_data": { "default": false, "description": "Whether the hardware backend supports shot memory. If True, the include_raw_data flag in the QuantumHardwareRunCircuitPayload should trigger the backend to store shot memory in the raw_data field of the results.", + "examples": [ + false + ], "title": "Supports Raw Data", "type": "boolean" } @@ -156,17 +273,86 @@ "description": "A successful response to a static data request.", "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "status": { "const": "success", + "examples": [ + "success" + ], "title": "Status", "type": "string" }, "payload": { - "$ref": "#/$defs/StaticDataSchema" + "$ref": "#/$defs/StaticDataSchema", + "examples": [ + { + "default_compiler_config": { + "decomposition": [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ], + "mapping": [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ], + "optimization": [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ], + "routing": [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ] + }, + "name": "Spin2", + "nqubits": 3, + "pgs": [ + "X", + "Y", + "Z" + ], + "protocol_version": 2, + "starttime": 1752241667.1091666, + "supports_raw_data": false, + "topology": [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 2, + 0 + ], + [ + 3, + 2 + ] + ] + } + ] } }, "required": [ diff --git a/schemas/v2/QuantumHardwareTerminateRequest.schema.json b/schemas/v2/QuantumHardwareTerminateRequest.schema.json index 8e54011..f1add6b 100644 --- a/schemas/v2/QuantumHardwareTerminateRequest.schema.json +++ b/schemas/v2/QuantumHardwareTerminateRequest.schema.json @@ -2,18 +2,28 @@ "description": "This message signals the end of a session.", "properties": { "version": { + "description": "The version of the protocol", + "examples": [ + "0.2.0" + ], "pattern": "^\\d+\\.\\d+\\.\\d$", "title": "Version", "type": "string" }, "session_id": { "description": "An arbitrary string, filled in in the request, which is copied into the reply object.", + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" }, "command": { "const": "terminate", + "examples": [ + "terminate" + ], "title": "Command", "type": "string" } diff --git a/schemas/v3/PublishState.schema.json b/schemas/v3/PublishState.schema.json index 1fc85d9..52ef311 100644 --- a/schemas/v3/PublishState.schema.json +++ b/schemas/v3/PublishState.schema.json @@ -14,11 +14,17 @@ "properties": { "timestamp": { "description": "Timestamp of the instantiation of the message (return value of time.time())", + "examples": [ + 1752241667.1091666 + ], "title": "Timestamp", "type": "number" }, "state": { - "$ref": "#/$defs/HWCSState" + "$ref": "#/$defs/HWCSState", + "examples": [ + "IDLE" + ] } }, "required": [ @@ -33,11 +39,20 @@ "properties": { "command": { "const": "publish_state", + "examples": [ + "publish_state" + ], "title": "Command", "type": "string" }, "payload": { - "$ref": "#/$defs/PublishStatePayloadSchema" + "$ref": "#/$defs/PublishStatePayloadSchema", + "examples": [ + { + "state": "IDLE", + "timestamp": 1752241667.1091666 + } + ] } }, "required": [ diff --git a/schemas/v3/QuantumHardwareDynamicDataRequest.schema.json b/schemas/v3/QuantumHardwareDynamicDataRequest.schema.json index 712d849..d3e1f4b 100644 --- a/schemas/v3/QuantumHardwareDynamicDataRequest.schema.json +++ b/schemas/v3/QuantumHardwareDynamicDataRequest.schema.json @@ -2,10 +2,16 @@ "properties": { "command": { "const": "get_dynamic", + "examples": [ + "get_dynamic" + ], "title": "Command", "type": "string" }, "session_id": { + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" diff --git a/schemas/v3/QuantumHardwareDynamicDataResponse.schema.json b/schemas/v3/QuantumHardwareDynamicDataResponse.schema.json index e0036f0..9a5dd3b 100644 --- a/schemas/v3/QuantumHardwareDynamicDataResponse.schema.json +++ b/schemas/v3/QuantumHardwareDynamicDataResponse.schema.json @@ -10,13 +10,22 @@ "properties": { "status": { "const": "success", + "examples": [ + "success" + ], "title": "Status", "type": "string" }, "payload": { - "$ref": "#/$defs/DynamicDataSchema" + "$ref": "#/$defs/DynamicDataSchema", + "examples": [ + {} + ] }, "session_id": { + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" diff --git a/schemas/v3/QuantumHardwareExecuteRequest.schema.json b/schemas/v3/QuantumHardwareExecuteRequest.schema.json index bd6362d..90f3b29 100644 --- a/schemas/v3/QuantumHardwareExecuteRequest.schema.json +++ b/schemas/v3/QuantumHardwareExecuteRequest.schema.json @@ -4,16 +4,25 @@ "properties": { "job_id": { "description": "Client identifier for the execution", + "examples": [ + 1 + ], "title": "Job Id", "type": "integer" }, "circuit": { "description": "Circuit description in cQASM language", + "examples": [ + "version 3.0\n\nqubit[10] q\n" + ], "title": "Circuit", "type": "string" }, "number_of_shots": { "description": "Number of shots to be executed for the circuit.", + "examples": [ + 100 + ], "exclusiveMinimum": 0, "title": "Number Of Shots", "type": "integer" @@ -21,6 +30,9 @@ "include_raw_data": { "default": false, "description": "Whether or not to return all bitstrings in the order in which they were measured.", + "examples": [ + false + ], "title": "Include Raw Data", "type": "boolean" } @@ -37,17 +49,31 @@ "properties": { "session_id": { "description": "An arbitrary string, filled in in the request, which is copied into the reply object.", + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" }, "command": { "const": "execute", + "examples": [ + "execute" + ], "title": "Command", "type": "string" }, "payload": { - "$ref": "#/$defs/RunCircuitPayloadSchema" + "$ref": "#/$defs/RunCircuitPayloadSchema", + "examples": [ + { + "circuit": "version 3.0\n\nqubit[10] q\n", + "include_raw_data": false, + "job_id": 1, + "number_of_shots": 100 + } + ] } }, "required": [ diff --git a/schemas/v3/QuantumHardwareExecuteResponse.schema.json b/schemas/v3/QuantumHardwareExecuteResponse.schema.json index fe121aa..8f49b7d 100644 --- a/schemas/v3/QuantumHardwareExecuteResponse.schema.json +++ b/schemas/v3/QuantumHardwareExecuteResponse.schema.json @@ -4,6 +4,9 @@ "properties": { "job_id": { "description": "Client defined identifier for the execution.", + "examples": [ + 1 + ], "title": "Job Id", "type": "integer" }, @@ -12,6 +15,14 @@ "type": "integer" }, "description": "Mapping of measured bitstring (little endian notation; q[n]...q[0]) to count of occurrences.", + "examples": [ + { + "0000000000": 250, + "0000000001": 250, + "0000000010": 250, + "0000000011": 250 + } + ], "title": "Results", "type": "object" }, @@ -29,6 +40,14 @@ ], "default": null, "description": "A list of bitstrings (little endian notation; `q[n]...q[0]`) ordered by the shot in which it was measured.", + "examples": [ + [ + "0000000000", + "0000000001", + "0000000010", + "0000000011" + ] + ], "title": "Raw Data" } }, @@ -44,17 +63,40 @@ "properties": { "session_id": { "description": "An arbitrary string, filled in in the request, which is copied into the reply object.", + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" }, "status": { "const": "success", + "examples": [ + "success" + ], "title": "Status", "type": "string" }, "payload": { - "$ref": "#/$defs/RunCircuitResultSchema" + "$ref": "#/$defs/RunCircuitResultSchema", + "examples": [ + { + "job_id": 1, + "raw_data": [ + "0000000000", + "0000000001", + "0000000010", + "0000000011" + ], + "results": { + "0000000000": 250, + "0000000001": 250, + "0000000010": 250, + "0000000011": 250 + } + } + ] } }, "required": [ diff --git a/schemas/v3/QuantumHardwareFailureResponse.schema.json b/schemas/v3/QuantumHardwareFailureResponse.schema.json index 804c7fa..904dae5 100644 --- a/schemas/v3/QuantumHardwareFailureResponse.schema.json +++ b/schemas/v3/QuantumHardwareFailureResponse.schema.json @@ -4,6 +4,9 @@ "properties": { "error_msg": { "description": "A descriptive error message to be passed on to the user.", + "examples": [ + "Some Error" + ], "title": "Error Msg", "type": "string" } @@ -19,17 +22,28 @@ "properties": { "session_id": { "description": "An arbitrary string, filled in in the request, which is copied into the reply object.", + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" }, "status": { "const": "failure", + "examples": [ + "failure" + ], "title": "Status", "type": "string" }, "payload": { - "$ref": "#/$defs/FailureDataSchema" + "$ref": "#/$defs/FailureDataSchema", + "examples": [ + { + "error_msg": "Some Error" + } + ] } }, "required": [ diff --git a/schemas/v3/QuantumHardwareInitializeRequest.schema.json b/schemas/v3/QuantumHardwareInitializeRequest.schema.json index 937a06d..b667845 100644 --- a/schemas/v3/QuantumHardwareInitializeRequest.schema.json +++ b/schemas/v3/QuantumHardwareInitializeRequest.schema.json @@ -3,12 +3,18 @@ "properties": { "session_id": { "description": "An arbitrary string, filled in in the request, which is copied into the reply object.", + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" }, "command": { "const": "initialize", + "examples": [ + "initialize" + ], "title": "Command", "type": "string" } diff --git a/schemas/v3/QuantumHardwareSimpleSuccessResponse.schema.json b/schemas/v3/QuantumHardwareSimpleSuccessResponse.schema.json index 28216fa..5f8f9ad 100644 --- a/schemas/v3/QuantumHardwareSimpleSuccessResponse.schema.json +++ b/schemas/v3/QuantumHardwareSimpleSuccessResponse.schema.json @@ -3,12 +3,18 @@ "properties": { "session_id": { "description": "An arbitrary string, filled in in the request, which is copied into the reply object.", + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" }, "status": { "const": "success", + "examples": [ + "success" + ], "title": "Status", "type": "string" } diff --git a/schemas/v3/QuantumHardwareStaticDataRequest.schema.json b/schemas/v3/QuantumHardwareStaticDataRequest.schema.json index 1f32d09..835956d 100644 --- a/schemas/v3/QuantumHardwareStaticDataRequest.schema.json +++ b/schemas/v3/QuantumHardwareStaticDataRequest.schema.json @@ -2,10 +2,16 @@ "properties": { "command": { "const": "get_static", + "examples": [ + "get_static" + ], "title": "Command", "type": "string" }, "session_id": { + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" diff --git a/schemas/v3/QuantumHardwareStaticDataResponse.schema.json b/schemas/v3/QuantumHardwareStaticDataResponse.schema.json index 16ff183..274d646 100644 --- a/schemas/v3/QuantumHardwareStaticDataResponse.schema.json +++ b/schemas/v3/QuantumHardwareStaticDataResponse.schema.json @@ -5,6 +5,16 @@ "properties": { "decomposition": { "default": [], + "description": "The decomposition stage compiler config", + "examples": [ + [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ] + ], "items": { "$ref": "#/$defs/CompilerPass" }, @@ -13,6 +23,16 @@ }, "mapping": { "default": [], + "description": "The mapping stage compiler config", + "examples": [ + [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ] + ], "items": { "$ref": "#/$defs/CompilerPass" }, @@ -21,6 +41,16 @@ }, "optimization": { "default": [], + "description": "The optimization stage compiler config", + "examples": [ + [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ] + ], "items": { "$ref": "#/$defs/CompilerPass" }, @@ -29,6 +59,16 @@ }, "routing": { "default": [], + "description": "The routing stage compiler config", + "examples": [ + [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ] + ], "items": { "$ref": "#/$defs/CompilerPass" }, @@ -61,6 +101,9 @@ "additionalProperties": true, "default": {}, "description": "Arguments for the compiler pass", + "examples": [ + {} + ], "title": "Arguments", "type": "object" } @@ -76,25 +119,61 @@ "properties": { "protocol_version": { "const": 3, + "examples": [ + 3 + ], "title": "Protocol Version", "type": "integer" }, "nqubits": { "description": "The number of qubits.", + "examples": [ + 3 + ], "title": "Nqubits", "type": "integer" }, "topology": { "$ref": "#/$defs/Topology", - "description": "List of the edges between the various qubits" + "description": "List of the edges between the various qubits", + "examples": [ + [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 2, + 0 + ], + [ + 3, + 2 + ] + ] + ] }, "name": { "description": "Name of the system.", + "examples": [ + "Spin2" + ], "title": "Name", "type": "string" }, "pgs": { "description": "Supported primitive gates set of the system. Gate names as described in cQASM (in uppercase).", + "examples": [ + [ + "X", + "Y", + "Z" + ] + ], "items": { "type": "string" }, @@ -109,16 +188,54 @@ "optimization": [], "routing": [] }, - "description": "A suitable default compiler configuration for the hardware backend" + "description": "A suitable default compiler configuration for the hardware backend", + "examples": [ + { + "decomposition": [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ], + "mapping": [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ], + "optimization": [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ], + "routing": [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ] + } + ] }, "starttime": { "description": "Timestamp of start-up of the system (return value of time.time())", + "examples": [ + 1752241667.1091666 + ], "title": "Starttime", "type": "number" }, "supports_raw_data": { "default": false, "description": "Whether the hardware backend supports shot memory. If True, the include_raw_data flag in the QuantumHardwareRunCircuitPayload should trigger the backend to store shot memory in the raw_data field of the results.", + "examples": [ + false + ], "title": "Supports Raw Data", "type": "boolean" } @@ -157,16 +274,84 @@ "properties": { "status": { "const": "success", + "examples": [ + "success" + ], "title": "Status", "type": "string" }, "session_id": { + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" }, "payload": { - "$ref": "#/$defs/StaticDataSchema" + "$ref": "#/$defs/StaticDataSchema", + "examples": [ + { + "default_compiler_config": { + "decomposition": [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ], + "mapping": [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ], + "optimization": [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ], + "routing": [ + { + "arguments": {}, + "method": "decompose", + "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + } + ] + }, + "name": "Spin2", + "nqubits": 3, + "pgs": [ + "X", + "Y", + "Z" + ], + "protocol_version": 3, + "starttime": 1752241667.1091666, + "supports_raw_data": false, + "topology": [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 2, + 0 + ], + [ + 3, + 2 + ] + ] + } + ] } }, "required": [ diff --git a/schemas/v3/QuantumHardwareTerminateRequest.schema.json b/schemas/v3/QuantumHardwareTerminateRequest.schema.json index 6bd4e5b..f600334 100644 --- a/schemas/v3/QuantumHardwareTerminateRequest.schema.json +++ b/schemas/v3/QuantumHardwareTerminateRequest.schema.json @@ -3,12 +3,18 @@ "properties": { "session_id": { "description": "An arbitrary string, filled in in the request, which is copied into the reply object.", + "examples": [ + "8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a" + ], "format": "uuid", "title": "Session Id", "type": "string" }, "command": { "const": "terminate", + "examples": [ + "terminate" + ], "title": "Command", "type": "string" } From 7f434bc2179659c57a8ffb16fb23e7c2f1431b28 Mon Sep 17 00:00:00 2001 From: Nischal Sehrawat Date: Mon, 14 Jul 2025 14:46:22 +0000 Subject: [PATCH 2/6] Updated models --- .../models/PublishState.py | 11 +- .../QuantumHardwareDynamicDataRequest.py | 8 +- .../QuantumHardwareDynamicDataResponse.py | 8 +- .../models/QuantumHardwareExecuteRequest.py | 27 ++- .../models/QuantumHardwareExecuteResponse.py | 28 ++- .../models/QuantumHardwareFailureResponse.py | 6 +- .../QuantumHardwareInitializeRequest.py | 5 +- .../QuantumHardwareSimpleSuccessResponse.py | 3 +- .../QuantumHardwareStaticDataRequest.py | 8 +- .../QuantumHardwareStaticDataResponse.py | 165 ++++++++++++++++-- .../models/QuantumHardwareTerminateRequest.py | 3 +- 11 files changed, 238 insertions(+), 34 deletions(-) diff --git a/tests/control-software-validator/models/PublishState.py b/tests/control-software-validator/models/PublishState.py index 659c2b7..7531537 100644 --- a/tests/control-software-validator/models/PublishState.py +++ b/tests/control-software-validator/models/PublishState.py @@ -20,11 +20,16 @@ class PublishStatePayloadSchema(BaseModel): timestamp: float = Field( ..., description='Timestamp of the instantiation of the message (return value of time.time())', + examples=[1752241667.1091666], title='Timestamp', ) - state: HWCSState + state: HWCSState = Field(..., examples=['IDLE']) class PublishState(BaseModel): - command: Literal['publish_state'] = Field(..., title='Command') - payload: PublishStatePayloadSchema + command: Literal['publish_state'] = Field( + ..., examples=['publish_state'], title='Command' + ) + payload: PublishStatePayloadSchema = Field( + ..., examples=[{'state': 'IDLE', 'timestamp': 1752241667.1091666}] + ) diff --git a/tests/control-software-validator/models/QuantumHardwareDynamicDataRequest.py b/tests/control-software-validator/models/QuantumHardwareDynamicDataRequest.py index 582124d..cc46f63 100644 --- a/tests/control-software-validator/models/QuantumHardwareDynamicDataRequest.py +++ b/tests/control-software-validator/models/QuantumHardwareDynamicDataRequest.py @@ -10,5 +10,9 @@ class QuantumHardwareDynamicDataRequest(BaseModel): - command: Literal['get_dynamic'] = Field(..., title='Command') - session_id: UUID = Field(..., title='Session Id') + command: Literal['get_dynamic'] = Field( + ..., examples=['get_dynamic'], title='Command' + ) + session_id: UUID = Field( + ..., examples=['8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a'], title='Session Id' + ) diff --git a/tests/control-software-validator/models/QuantumHardwareDynamicDataResponse.py b/tests/control-software-validator/models/QuantumHardwareDynamicDataResponse.py index 24f69b6..79bbff1 100644 --- a/tests/control-software-validator/models/QuantumHardwareDynamicDataResponse.py +++ b/tests/control-software-validator/models/QuantumHardwareDynamicDataResponse.py @@ -17,6 +17,8 @@ class DynamicDataSchema(BaseModel): class QuantumHardwareDynamicDataResponse(BaseModel): - status: Literal['success'] = Field(..., title='Status') - payload: DynamicDataSchema - session_id: UUID = Field(..., title='Session Id') + status: Literal['success'] = Field(..., examples=['success'], title='Status') + payload: DynamicDataSchema = Field(..., examples=[{}]) + session_id: UUID = Field( + ..., examples=['8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a'], title='Session Id' + ) diff --git a/tests/control-software-validator/models/QuantumHardwareExecuteRequest.py b/tests/control-software-validator/models/QuantumHardwareExecuteRequest.py index 0206327..d9bd4f9 100644 --- a/tests/control-software-validator/models/QuantumHardwareExecuteRequest.py +++ b/tests/control-software-validator/models/QuantumHardwareExecuteRequest.py @@ -11,20 +11,28 @@ class RunCircuitPayloadSchema(BaseModel): job_id: int = Field( - ..., description='Client identifier for the execution', title='Job Id' + ..., + description='Client identifier for the execution', + examples=[1], + title='Job Id', ) circuit: str = Field( - ..., description='Circuit description in cQASM language', title='Circuit' + ..., + description='Circuit description in cQASM language', + examples=['version 3.0\n\nqubit[10] q\n'], + title='Circuit', ) number_of_shots: int = Field( ..., description='Number of shots to be executed for the circuit.', + examples=[100], gt=0, title='Number Of Shots', ) include_raw_data: Optional[bool] = Field( False, description='Whether or not to return all bitstrings in the order in which they were measured.', + examples=[False], title='Include Raw Data', ) @@ -33,7 +41,18 @@ class QuantumHardwareExecuteRequest(BaseModel): session_id: UUID = Field( ..., description='An arbitrary string, filled in in the request, which is copied into the reply object.', + examples=['8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a'], title='Session Id', ) - command: Literal['execute'] = Field(..., title='Command') - payload: RunCircuitPayloadSchema + command: Literal['execute'] = Field(..., examples=['execute'], title='Command') + payload: RunCircuitPayloadSchema = Field( + ..., + examples=[ + { + 'circuit': 'version 3.0\n\nqubit[10] q\n', + 'include_raw_data': False, + 'job_id': 1, + 'number_of_shots': 100, + } + ], + ) diff --git a/tests/control-software-validator/models/QuantumHardwareExecuteResponse.py b/tests/control-software-validator/models/QuantumHardwareExecuteResponse.py index 2f89b12..c475340 100644 --- a/tests/control-software-validator/models/QuantumHardwareExecuteResponse.py +++ b/tests/control-software-validator/models/QuantumHardwareExecuteResponse.py @@ -11,16 +11,23 @@ class RunCircuitResultSchema(BaseModel): job_id: int = Field( - ..., description='Client defined identifier for the execution.', title='Job Id' + ..., + description='Client defined identifier for the execution.', + examples=[1], + title='Job Id', ) results: Dict[str, int] = Field( ..., description='Mapping of measured bitstring (little endian notation; q[n]...q[0]) to count of occurrences.', + examples=[ + {'0000000000': 250, '0000000001': 250, '0000000010': 250, '0000000011': 250} + ], title='Results', ) raw_data: Optional[List[str]] = Field( None, description='A list of bitstrings (little endian notation; `q[n]...q[0]`) ordered by the shot in which it was measured.', + examples=[['0000000000', '0000000001', '0000000010', '0000000011']], title='Raw Data', ) @@ -29,7 +36,22 @@ class QuantumHardwareExecuteResponse(BaseModel): session_id: UUID = Field( ..., description='An arbitrary string, filled in in the request, which is copied into the reply object.', + examples=['8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a'], title='Session Id', ) - status: Literal['success'] = Field(..., title='Status') - payload: RunCircuitResultSchema + status: Literal['success'] = Field(..., examples=['success'], title='Status') + payload: RunCircuitResultSchema = Field( + ..., + examples=[ + { + 'job_id': 1, + 'raw_data': ['0000000000', '0000000001', '0000000010', '0000000011'], + 'results': { + '0000000000': 250, + '0000000001': 250, + '0000000010': 250, + '0000000011': 250, + }, + } + ], + ) diff --git a/tests/control-software-validator/models/QuantumHardwareFailureResponse.py b/tests/control-software-validator/models/QuantumHardwareFailureResponse.py index a910365..a25280a 100644 --- a/tests/control-software-validator/models/QuantumHardwareFailureResponse.py +++ b/tests/control-software-validator/models/QuantumHardwareFailureResponse.py @@ -13,6 +13,7 @@ class FailureDataSchema(BaseModel): error_msg: str = Field( ..., description='A descriptive error message to be passed on to the user.', + examples=['Some Error'], title='Error Msg', ) @@ -21,7 +22,8 @@ class QuantumHardwareFailureResponse(BaseModel): session_id: UUID = Field( ..., description='An arbitrary string, filled in in the request, which is copied into the reply object.', + examples=['8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a'], title='Session Id', ) - status: Literal['failure'] = Field(..., title='Status') - payload: FailureDataSchema + status: Literal['failure'] = Field(..., examples=['failure'], title='Status') + payload: FailureDataSchema = Field(..., examples=[{'error_msg': 'Some Error'}]) diff --git a/tests/control-software-validator/models/QuantumHardwareInitializeRequest.py b/tests/control-software-validator/models/QuantumHardwareInitializeRequest.py index 67f8a6b..9f97fe4 100644 --- a/tests/control-software-validator/models/QuantumHardwareInitializeRequest.py +++ b/tests/control-software-validator/models/QuantumHardwareInitializeRequest.py @@ -13,6 +13,9 @@ class QuantumHardwareInitializeRequest(BaseModel): session_id: UUID = Field( ..., description='An arbitrary string, filled in in the request, which is copied into the reply object.', + examples=['8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a'], title='Session Id', ) - command: Literal['initialize'] = Field(..., title='Command') + command: Literal['initialize'] = Field( + ..., examples=['initialize'], title='Command' + ) diff --git a/tests/control-software-validator/models/QuantumHardwareSimpleSuccessResponse.py b/tests/control-software-validator/models/QuantumHardwareSimpleSuccessResponse.py index 186f64b..c27c1fa 100644 --- a/tests/control-software-validator/models/QuantumHardwareSimpleSuccessResponse.py +++ b/tests/control-software-validator/models/QuantumHardwareSimpleSuccessResponse.py @@ -13,6 +13,7 @@ class QuantumHardwareSimpleSuccessResponse(BaseModel): session_id: UUID = Field( ..., description='An arbitrary string, filled in in the request, which is copied into the reply object.', + examples=['8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a'], title='Session Id', ) - status: Literal['success'] = Field(..., title='Status') + status: Literal['success'] = Field(..., examples=['success'], title='Status') diff --git a/tests/control-software-validator/models/QuantumHardwareStaticDataRequest.py b/tests/control-software-validator/models/QuantumHardwareStaticDataRequest.py index d212032..c420034 100644 --- a/tests/control-software-validator/models/QuantumHardwareStaticDataRequest.py +++ b/tests/control-software-validator/models/QuantumHardwareStaticDataRequest.py @@ -10,5 +10,9 @@ class QuantumHardwareStaticDataRequest(BaseModel): - command: Literal['get_static'] = Field(..., title='Command') - session_id: UUID = Field(..., title='Session Id') + command: Literal['get_static'] = Field( + ..., examples=['get_static'], title='Command' + ) + session_id: UUID = Field( + ..., examples=['8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a'], title='Session Id' + ) diff --git a/tests/control-software-validator/models/QuantumHardwareStaticDataResponse.py b/tests/control-software-validator/models/QuantumHardwareStaticDataResponse.py index d3dcac7..d715f5b 100644 --- a/tests/control-software-validator/models/QuantumHardwareStaticDataResponse.py +++ b/tests/control-software-validator/models/QuantumHardwareStaticDataResponse.py @@ -23,7 +23,10 @@ class CompilerPass(BaseModel): title='Method', ) arguments: Optional[Dict[str, Any]] = Field( - {}, description='Arguments for the compiler pass', title='Arguments' + {}, + description='Arguments for the compiler pass', + examples=[{}], + title='Arguments', ) @@ -40,22 +43,81 @@ class Topology(RootModel[List[TopologyItem]]): class CompilerConfig(BaseModel): - decomposition: Optional[List[CompilerPass]] = Field([], title='Decomposition') - mapping: Optional[List[CompilerPass]] = Field([], title='Mapping') - optimization: Optional[List[CompilerPass]] = Field([], title='Optimization') - routing: Optional[List[CompilerPass]] = Field([], title='Routing') + decomposition: Optional[List[CompilerPass]] = Field( + [], + description='The decomposition stage compiler config', + examples=[ + [ + { + 'arguments': {}, + 'method': 'decompose', + 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', + } + ] + ], + title='Decomposition', + ) + mapping: Optional[List[CompilerPass]] = Field( + [], + description='The mapping stage compiler config', + examples=[ + [ + { + 'arguments': {}, + 'method': 'decompose', + 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', + } + ] + ], + title='Mapping', + ) + optimization: Optional[List[CompilerPass]] = Field( + [], + description='The optimization stage compiler config', + examples=[ + [ + { + 'arguments': {}, + 'method': 'decompose', + 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', + } + ] + ], + title='Optimization', + ) + routing: Optional[List[CompilerPass]] = Field( + [], + description='The routing stage compiler config', + examples=[ + [ + { + 'arguments': {}, + 'method': 'decompose', + 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', + } + ] + ], + title='Routing', + ) class StaticDataSchema(BaseModel): - protocol_version: Literal[3] = Field(..., title='Protocol Version') - nqubits: int = Field(..., description='The number of qubits.', title='Nqubits') + protocol_version: Literal[3] = Field(..., examples=[3], title='Protocol Version') + nqubits: int = Field( + ..., description='The number of qubits.', examples=[3], title='Nqubits' + ) topology: Topology = Field( - ..., description='List of the edges between the various qubits' + ..., + description='List of the edges between the various qubits', + examples=[[[0, 1], [1, 2], [2, 0], [3, 2]]], + ) + name: str = Field( + ..., description='Name of the system.', examples=['Spin2'], title='Name' ) - name: str = Field(..., description='Name of the system.', title='Name') pgs: List[str] = Field( ..., description='Supported primitive gates set of the system. Gate names as described in cQASM (in uppercase).', + examples=[['X', 'Y', 'Z']], title='Pgs', ) default_compiler_config: Optional[CompilerConfig] = Field( @@ -63,20 +125,99 @@ class StaticDataSchema(BaseModel): {'decomposition': [], 'mapping': [], 'optimization': [], 'routing': []} ), description='A suitable default compiler configuration for the hardware backend', + examples=[ + { + 'decomposition': [ + { + 'arguments': {}, + 'method': 'decompose', + 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', + } + ], + 'mapping': [ + { + 'arguments': {}, + 'method': 'decompose', + 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', + } + ], + 'optimization': [ + { + 'arguments': {}, + 'method': 'decompose', + 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', + } + ], + 'routing': [ + { + 'arguments': {}, + 'method': 'decompose', + 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', + } + ], + } + ], ) starttime: float = Field( ..., description='Timestamp of start-up of the system (return value of time.time())', + examples=[1752241667.1091666], title='Starttime', ) supports_raw_data: Optional[bool] = Field( False, description='Whether the hardware backend supports shot memory. If True, the include_raw_data flag in the QuantumHardwareRunCircuitPayload should trigger the backend to store shot memory in the raw_data field of the results.', + examples=[False], title='Supports Raw Data', ) class QuantumHardwareStaticDataResponse(BaseModel): - status: Literal['success'] = Field(..., title='Status') - session_id: UUID = Field(..., title='Session Id') - payload: StaticDataSchema + status: Literal['success'] = Field(..., examples=['success'], title='Status') + session_id: UUID = Field( + ..., examples=['8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a'], title='Session Id' + ) + payload: StaticDataSchema = Field( + ..., + examples=[ + { + 'default_compiler_config': { + 'decomposition': [ + { + 'arguments': {}, + 'method': 'decompose', + 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', + } + ], + 'mapping': [ + { + 'arguments': {}, + 'method': 'decompose', + 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', + } + ], + 'optimization': [ + { + 'arguments': {}, + 'method': 'decompose', + 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', + } + ], + 'routing': [ + { + 'arguments': {}, + 'method': 'decompose', + 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', + } + ], + }, + 'name': 'Spin2', + 'nqubits': 3, + 'pgs': ['X', 'Y', 'Z'], + 'protocol_version': 3, + 'starttime': 1752241667.1091666, + 'supports_raw_data': False, + 'topology': [[0, 1], [1, 2], [2, 0], [3, 2]], + } + ], + ) diff --git a/tests/control-software-validator/models/QuantumHardwareTerminateRequest.py b/tests/control-software-validator/models/QuantumHardwareTerminateRequest.py index eb974e9..cbec132 100644 --- a/tests/control-software-validator/models/QuantumHardwareTerminateRequest.py +++ b/tests/control-software-validator/models/QuantumHardwareTerminateRequest.py @@ -13,6 +13,7 @@ class QuantumHardwareTerminateRequest(BaseModel): session_id: UUID = Field( ..., description='An arbitrary string, filled in in the request, which is copied into the reply object.', + examples=['8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a'], title='Session Id', ) - command: Literal['terminate'] = Field(..., title='Command') + command: Literal['terminate'] = Field(..., examples=['terminate'], title='Command') From 57e6a05235e1adc16a77c4d749e99caec7fac8d2 Mon Sep 17 00:00:00 2001 From: Nischal Sehrawat Date: Tue, 15 Jul 2025 15:41:24 +0200 Subject: [PATCH 3/6] Updated examples --- ...tumHardwareDynamicDataResponse.schema.json | 4 +- ...tumHardwareDynamicDataResponse.schema.json | 4 +- ...ntumHardwareStaticDataResponse.schema.json | 60 +++++++++++++------ ...tumHardwareDynamicDataResponse.schema.json | 4 +- ...ntumHardwareStaticDataResponse.schema.json | 60 +++++++++++++------ 5 files changed, 95 insertions(+), 37 deletions(-) diff --git a/schemas/v1/QuantumHardwareDynamicDataResponse.schema.json b/schemas/v1/QuantumHardwareDynamicDataResponse.schema.json index 122ae44..835465c 100644 --- a/schemas/v1/QuantumHardwareDynamicDataResponse.schema.json +++ b/schemas/v1/QuantumHardwareDynamicDataResponse.schema.json @@ -28,7 +28,9 @@ "payload": { "$ref": "#/$defs/DynamicDataSchema", "examples": [ - {} + { + "dynamic_key_1": "dynamic_value_1" + } ] } }, diff --git a/schemas/v2/QuantumHardwareDynamicDataResponse.schema.json b/schemas/v2/QuantumHardwareDynamicDataResponse.schema.json index 6c7a6e3..fb74c8f 100644 --- a/schemas/v2/QuantumHardwareDynamicDataResponse.schema.json +++ b/schemas/v2/QuantumHardwareDynamicDataResponse.schema.json @@ -28,7 +28,9 @@ "payload": { "$ref": "#/$defs/DynamicDataSchema", "examples": [ - {} + { + "dynamic_key_1": "dynamic_value_1" + } ] } }, diff --git a/schemas/v2/QuantumHardwareStaticDataResponse.schema.json b/schemas/v2/QuantumHardwareStaticDataResponse.schema.json index 01a0d87..628fc9c 100644 --- a/schemas/v2/QuantumHardwareStaticDataResponse.schema.json +++ b/schemas/v2/QuantumHardwareStaticDataResponse.schema.json @@ -5,11 +5,13 @@ "properties": { "decomposition": { "default": [], - "description": "The decomposition stage compiler config", + "description": "The decomposition stage compiler passes", "examples": [ [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } @@ -23,11 +25,13 @@ }, "mapping": { "default": [], - "description": "The mapping stage compiler config", + "description": "The mapping stage compiler cpassesonfig", "examples": [ [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } @@ -41,11 +45,13 @@ }, "optimization": { "default": [], - "description": "The optimization stage compiler config", + "description": "The optimization stage compiler passes", "examples": [ [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } @@ -59,11 +65,13 @@ }, "routing": { "default": [], - "description": "The routing stage compiler config", + "description": "The routing stage compiler passes", "examples": [ [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } @@ -102,7 +110,9 @@ "default": {}, "description": "Arguments for the compiler pass", "examples": [ - {} + { + "param_1": "value_1" + } ], "title": "Arguments", "type": "object" @@ -194,28 +204,36 @@ { "decomposition": [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } ], "mapping": [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } ], "optimization": [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } ], "routing": [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } @@ -296,28 +314,36 @@ "default_compiler_config": { "decomposition": [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } ], "mapping": [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } ], "optimization": [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } ], "routing": [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } diff --git a/schemas/v3/QuantumHardwareDynamicDataResponse.schema.json b/schemas/v3/QuantumHardwareDynamicDataResponse.schema.json index 9a5dd3b..b7809ee 100644 --- a/schemas/v3/QuantumHardwareDynamicDataResponse.schema.json +++ b/schemas/v3/QuantumHardwareDynamicDataResponse.schema.json @@ -19,7 +19,9 @@ "payload": { "$ref": "#/$defs/DynamicDataSchema", "examples": [ - {} + { + "dynamic_key_1": "dynamic_value_1" + } ] }, "session_id": { diff --git a/schemas/v3/QuantumHardwareStaticDataResponse.schema.json b/schemas/v3/QuantumHardwareStaticDataResponse.schema.json index 274d646..f3ac8f0 100644 --- a/schemas/v3/QuantumHardwareStaticDataResponse.schema.json +++ b/schemas/v3/QuantumHardwareStaticDataResponse.schema.json @@ -5,11 +5,13 @@ "properties": { "decomposition": { "default": [], - "description": "The decomposition stage compiler config", + "description": "The decomposition stage compiler passes", "examples": [ [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } @@ -23,11 +25,13 @@ }, "mapping": { "default": [], - "description": "The mapping stage compiler config", + "description": "The mapping stage compiler cpassesonfig", "examples": [ [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } @@ -41,11 +45,13 @@ }, "optimization": { "default": [], - "description": "The optimization stage compiler config", + "description": "The optimization stage compiler passes", "examples": [ [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } @@ -59,11 +65,13 @@ }, "routing": { "default": [], - "description": "The routing stage compiler config", + "description": "The routing stage compiler passes", "examples": [ [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } @@ -102,7 +110,9 @@ "default": {}, "description": "Arguments for the compiler pass", "examples": [ - {} + { + "param_1": "value_1" + } ], "title": "Arguments", "type": "object" @@ -193,28 +203,36 @@ { "decomposition": [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } ], "mapping": [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } ], "optimization": [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } ], "routing": [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } @@ -295,28 +313,36 @@ "default_compiler_config": { "decomposition": [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } ], "mapping": [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } ], "optimization": [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } ], "routing": [ { - "arguments": {}, + "arguments": { + "param_1": "value_1" + }, "method": "decompose", "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" } From f44ea46a60a3ab37be249be809521e2a2c8151c6 Mon Sep 17 00:00:00 2001 From: Nischal Sehrawat Date: Tue, 15 Jul 2025 13:43:26 +0000 Subject: [PATCH 4/6] Updated models --- .../QuantumHardwareDynamicDataResponse.py | 4 ++- .../QuantumHardwareStaticDataResponse.py | 34 +++++++++---------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/tests/control-software-validator/models/QuantumHardwareDynamicDataResponse.py b/tests/control-software-validator/models/QuantumHardwareDynamicDataResponse.py index 79bbff1..bd9c3d2 100644 --- a/tests/control-software-validator/models/QuantumHardwareDynamicDataResponse.py +++ b/tests/control-software-validator/models/QuantumHardwareDynamicDataResponse.py @@ -18,7 +18,9 @@ class DynamicDataSchema(BaseModel): class QuantumHardwareDynamicDataResponse(BaseModel): status: Literal['success'] = Field(..., examples=['success'], title='Status') - payload: DynamicDataSchema = Field(..., examples=[{}]) + payload: DynamicDataSchema = Field( + ..., examples=[{'dynamic_key_1': 'dynamic_value_1'}] + ) session_id: UUID = Field( ..., examples=['8e7e2b6c-2b3c-4d9f-8b12-6a4d9b1e3f5a'], title='Session Id' ) diff --git a/tests/control-software-validator/models/QuantumHardwareStaticDataResponse.py b/tests/control-software-validator/models/QuantumHardwareStaticDataResponse.py index d715f5b..b74ca38 100644 --- a/tests/control-software-validator/models/QuantumHardwareStaticDataResponse.py +++ b/tests/control-software-validator/models/QuantumHardwareStaticDataResponse.py @@ -25,7 +25,7 @@ class CompilerPass(BaseModel): arguments: Optional[Dict[str, Any]] = Field( {}, description='Arguments for the compiler pass', - examples=[{}], + examples=[{'param_1': 'value_1'}], title='Arguments', ) @@ -45,11 +45,11 @@ class Topology(RootModel[List[TopologyItem]]): class CompilerConfig(BaseModel): decomposition: Optional[List[CompilerPass]] = Field( [], - description='The decomposition stage compiler config', + description='The decomposition stage compiler passes', examples=[ [ { - 'arguments': {}, + 'arguments': {'param_1': 'value_1'}, 'method': 'decompose', 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', } @@ -59,11 +59,11 @@ class CompilerConfig(BaseModel): ) mapping: Optional[List[CompilerPass]] = Field( [], - description='The mapping stage compiler config', + description='The mapping stage compiler cpassesonfig', examples=[ [ { - 'arguments': {}, + 'arguments': {'param_1': 'value_1'}, 'method': 'decompose', 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', } @@ -73,11 +73,11 @@ class CompilerConfig(BaseModel): ) optimization: Optional[List[CompilerPass]] = Field( [], - description='The optimization stage compiler config', + description='The optimization stage compiler passes', examples=[ [ { - 'arguments': {}, + 'arguments': {'param_1': 'value_1'}, 'method': 'decompose', 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', } @@ -87,11 +87,11 @@ class CompilerConfig(BaseModel): ) routing: Optional[List[CompilerPass]] = Field( [], - description='The routing stage compiler config', + description='The routing stage compiler passes', examples=[ [ { - 'arguments': {}, + 'arguments': {'param_1': 'value_1'}, 'method': 'decompose', 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', } @@ -129,28 +129,28 @@ class StaticDataSchema(BaseModel): { 'decomposition': [ { - 'arguments': {}, + 'arguments': {'param_1': 'value_1'}, 'method': 'decompose', 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', } ], 'mapping': [ { - 'arguments': {}, + 'arguments': {'param_1': 'value_1'}, 'method': 'decompose', 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', } ], 'optimization': [ { - 'arguments': {}, + 'arguments': {'param_1': 'value_1'}, 'method': 'decompose', 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', } ], 'routing': [ { - 'arguments': {}, + 'arguments': {'param_1': 'value_1'}, 'method': 'decompose', 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', } @@ -184,28 +184,28 @@ class QuantumHardwareStaticDataResponse(BaseModel): 'default_compiler_config': { 'decomposition': [ { - 'arguments': {}, + 'arguments': {'param_1': 'value_1'}, 'method': 'decompose', 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', } ], 'mapping': [ { - 'arguments': {}, + 'arguments': {'param_1': 'value_1'}, 'method': 'decompose', 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', } ], 'optimization': [ { - 'arguments': {}, + 'arguments': {'param_1': 'value_1'}, 'method': 'decompose', 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', } ], 'routing': [ { - 'arguments': {}, + 'arguments': {'param_1': 'value_1'}, 'method': 'decompose', 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', } From fae829223c1969f8f68bb6da76da623012bbe2ce Mon Sep 17 00:00:00 2001 From: Nischal Sehrawat Date: Tue, 15 Jul 2025 13:47:45 +0000 Subject: [PATCH 5/6] Fixed typo --- schemas/v2/QuantumHardwareStaticDataResponse.schema.json | 2 +- schemas/v3/QuantumHardwareStaticDataResponse.schema.json | 2 +- .../models/QuantumHardwareStaticDataResponse.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/schemas/v2/QuantumHardwareStaticDataResponse.schema.json b/schemas/v2/QuantumHardwareStaticDataResponse.schema.json index 628fc9c..ff55aac 100644 --- a/schemas/v2/QuantumHardwareStaticDataResponse.schema.json +++ b/schemas/v2/QuantumHardwareStaticDataResponse.schema.json @@ -25,7 +25,7 @@ }, "mapping": { "default": [], - "description": "The mapping stage compiler cpassesonfig", + "description": "The mapping stage compiler passes", "examples": [ [ { diff --git a/schemas/v3/QuantumHardwareStaticDataResponse.schema.json b/schemas/v3/QuantumHardwareStaticDataResponse.schema.json index f3ac8f0..3795ba7 100644 --- a/schemas/v3/QuantumHardwareStaticDataResponse.schema.json +++ b/schemas/v3/QuantumHardwareStaticDataResponse.schema.json @@ -25,7 +25,7 @@ }, "mapping": { "default": [], - "description": "The mapping stage compiler cpassesonfig", + "description": "The mapping stage compiler passes", "examples": [ [ { diff --git a/tests/control-software-validator/models/QuantumHardwareStaticDataResponse.py b/tests/control-software-validator/models/QuantumHardwareStaticDataResponse.py index b74ca38..7c78bb7 100644 --- a/tests/control-software-validator/models/QuantumHardwareStaticDataResponse.py +++ b/tests/control-software-validator/models/QuantumHardwareStaticDataResponse.py @@ -59,7 +59,7 @@ class CompilerConfig(BaseModel): ) mapping: Optional[List[CompilerPass]] = Field( [], - description='The mapping stage compiler cpassesonfig', + description='The mapping stage compiler passes', examples=[ [ { From abcebb414321432e7827134e9ee9872e2d29b7f6 Mon Sep 17 00:00:00 2001 From: Nischal Sehrawat Date: Thu, 17 Jul 2025 09:15:50 +0000 Subject: [PATCH 6/6] Added examples --- ...ntumHardwareStaticDataResponse.schema.json | 99 ++++++++++++++----- ...ntumHardwareStaticDataResponse.schema.json | 99 ++++++++++++++----- .../QuantumHardwareStaticDataResponse.py | 54 +++++----- 3 files changed, 180 insertions(+), 72 deletions(-) diff --git a/schemas/v2/QuantumHardwareStaticDataResponse.schema.json b/schemas/v2/QuantumHardwareStaticDataResponse.schema.json index ff55aac..290d0b6 100644 --- a/schemas/v2/QuantumHardwareStaticDataResponse.schema.json +++ b/schemas/v2/QuantumHardwareStaticDataResponse.schema.json @@ -30,10 +30,14 @@ [ { "arguments": { - "param_1": "value_1" + "mapping": [ + 2, + 0, + 1 + ] }, - "method": "decompose", - "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + "method": "map", + "path": "opensquirrel.passes.mapper.simple_mappers.IdentityMapper" } ] ], @@ -52,8 +56,8 @@ "arguments": { "param_1": "value_1" }, - "method": "decompose", - "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + "method": "some_method", + "path": "some_dummy_path" } ] ], @@ -70,10 +74,23 @@ [ { "arguments": { - "param_1": "value_1" + "connectivity": { + "0": [ + 1, + 2 + ], + "1": [ + 0, + 2 + ], + "2": [ + 0, + 1 + ] + } }, - "method": "decompose", - "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + "method": "route", + "path": "opensquirrel.passes.router.astar_router.AStarRouter" } ] ], @@ -214,10 +231,14 @@ "mapping": [ { "arguments": { - "param_1": "value_1" + "mapping": [ + 2, + 0, + 1 + ] }, - "method": "decompose", - "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + "method": "map", + "path": "opensquirrel.passes.mapper.simple_mappers.IdentityMapper" } ], "optimization": [ @@ -225,17 +246,30 @@ "arguments": { "param_1": "value_1" }, - "method": "decompose", - "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + "method": "some_method", + "path": "some_dummy_path" } ], "routing": [ { "arguments": { - "param_1": "value_1" + "connectivity": { + "0": [ + 1, + 2 + ], + "1": [ + 0, + 2 + ], + "2": [ + 0, + 1 + ] + } }, - "method": "decompose", - "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + "method": "route", + "path": "opensquirrel.passes.router.astar_router.AStarRouter" } ] } @@ -324,10 +358,14 @@ "mapping": [ { "arguments": { - "param_1": "value_1" + "mapping": [ + 2, + 0, + 1 + ] }, - "method": "decompose", - "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + "method": "map", + "path": "opensquirrel.passes.mapper.simple_mappers.IdentityMapper" } ], "optimization": [ @@ -335,17 +373,30 @@ "arguments": { "param_1": "value_1" }, - "method": "decompose", - "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + "method": "some_method", + "path": "some_dummy_path" } ], "routing": [ { "arguments": { - "param_1": "value_1" + "connectivity": { + "0": [ + 1, + 2 + ], + "1": [ + 0, + 2 + ], + "2": [ + 0, + 1 + ] + } }, - "method": "decompose", - "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + "method": "route", + "path": "opensquirrel.passes.router.astar_router.AStarRouter" } ] }, diff --git a/schemas/v3/QuantumHardwareStaticDataResponse.schema.json b/schemas/v3/QuantumHardwareStaticDataResponse.schema.json index 3795ba7..4447b25 100644 --- a/schemas/v3/QuantumHardwareStaticDataResponse.schema.json +++ b/schemas/v3/QuantumHardwareStaticDataResponse.schema.json @@ -30,10 +30,14 @@ [ { "arguments": { - "param_1": "value_1" + "mapping": [ + 2, + 0, + 1 + ] }, - "method": "decompose", - "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + "method": "map", + "path": "opensquirrel.passes.mapper.simple_mappers.IdentityMapper" } ] ], @@ -52,8 +56,8 @@ "arguments": { "param_1": "value_1" }, - "method": "decompose", - "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + "method": "some_method", + "path": "some_dummy_path" } ] ], @@ -70,10 +74,23 @@ [ { "arguments": { - "param_1": "value_1" + "connectivity": { + "0": [ + 1, + 2 + ], + "1": [ + 0, + 2 + ], + "2": [ + 0, + 1 + ] + } }, - "method": "decompose", - "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + "method": "route", + "path": "opensquirrel.passes.router.astar_router.AStarRouter" } ] ], @@ -213,10 +230,14 @@ "mapping": [ { "arguments": { - "param_1": "value_1" + "mapping": [ + 2, + 0, + 1 + ] }, - "method": "decompose", - "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + "method": "map", + "path": "opensquirrel.passes.mapper.simple_mappers.IdentityMapper" } ], "optimization": [ @@ -224,17 +245,30 @@ "arguments": { "param_1": "value_1" }, - "method": "decompose", - "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + "method": "some_method", + "path": "some_dummy_path" } ], "routing": [ { "arguments": { - "param_1": "value_1" + "connectivity": { + "0": [ + 1, + 2 + ], + "1": [ + 0, + 2 + ], + "2": [ + 0, + 1 + ] + } }, - "method": "decompose", - "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + "method": "route", + "path": "opensquirrel.passes.router.astar_router.AStarRouter" } ] } @@ -323,10 +357,14 @@ "mapping": [ { "arguments": { - "param_1": "value_1" + "mapping": [ + 2, + 0, + 1 + ] }, - "method": "decompose", - "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + "method": "map", + "path": "opensquirrel.passes.mapper.simple_mappers.IdentityMapper" } ], "optimization": [ @@ -334,17 +372,30 @@ "arguments": { "param_1": "value_1" }, - "method": "decompose", - "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + "method": "some_method", + "path": "some_dummy_path" } ], "routing": [ { "arguments": { - "param_1": "value_1" + "connectivity": { + "0": [ + 1, + 2 + ], + "1": [ + 0, + 2 + ], + "2": [ + 0, + 1 + ] + } }, - "method": "decompose", - "path": "opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer" + "method": "route", + "path": "opensquirrel.passes.router.astar_router.AStarRouter" } ] }, diff --git a/tests/control-software-validator/models/QuantumHardwareStaticDataResponse.py b/tests/control-software-validator/models/QuantumHardwareStaticDataResponse.py index 7c78bb7..459d0d0 100644 --- a/tests/control-software-validator/models/QuantumHardwareStaticDataResponse.py +++ b/tests/control-software-validator/models/QuantumHardwareStaticDataResponse.py @@ -63,9 +63,9 @@ class CompilerConfig(BaseModel): examples=[ [ { - 'arguments': {'param_1': 'value_1'}, - 'method': 'decompose', - 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', + 'arguments': {'mapping': [2, 0, 1]}, + 'method': 'map', + 'path': 'opensquirrel.passes.mapper.simple_mappers.IdentityMapper', } ] ], @@ -78,8 +78,8 @@ class CompilerConfig(BaseModel): [ { 'arguments': {'param_1': 'value_1'}, - 'method': 'decompose', - 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', + 'method': 'some_method', + 'path': 'some_dummy_path', } ] ], @@ -91,9 +91,11 @@ class CompilerConfig(BaseModel): examples=[ [ { - 'arguments': {'param_1': 'value_1'}, - 'method': 'decompose', - 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', + 'arguments': { + 'connectivity': {'0': [1, 2], '1': [0, 2], '2': [0, 1]} + }, + 'method': 'route', + 'path': 'opensquirrel.passes.router.astar_router.AStarRouter', } ] ], @@ -136,23 +138,25 @@ class StaticDataSchema(BaseModel): ], 'mapping': [ { - 'arguments': {'param_1': 'value_1'}, - 'method': 'decompose', - 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', + 'arguments': {'mapping': [2, 0, 1]}, + 'method': 'map', + 'path': 'opensquirrel.passes.mapper.simple_mappers.IdentityMapper', } ], 'optimization': [ { 'arguments': {'param_1': 'value_1'}, - 'method': 'decompose', - 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', + 'method': 'some_method', + 'path': 'some_dummy_path', } ], 'routing': [ { - 'arguments': {'param_1': 'value_1'}, - 'method': 'decompose', - 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', + 'arguments': { + 'connectivity': {'0': [1, 2], '1': [0, 2], '2': [0, 1]} + }, + 'method': 'route', + 'path': 'opensquirrel.passes.router.astar_router.AStarRouter', } ], } @@ -191,23 +195,25 @@ class QuantumHardwareStaticDataResponse(BaseModel): ], 'mapping': [ { - 'arguments': {'param_1': 'value_1'}, - 'method': 'decompose', - 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', + 'arguments': {'mapping': [2, 0, 1]}, + 'method': 'map', + 'path': 'opensquirrel.passes.mapper.simple_mappers.IdentityMapper', } ], 'optimization': [ { 'arguments': {'param_1': 'value_1'}, - 'method': 'decompose', - 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', + 'method': 'some_method', + 'path': 'some_dummy_path', } ], 'routing': [ { - 'arguments': {'param_1': 'value_1'}, - 'method': 'decompose', - 'path': 'opensquirrel.passes.decomposer.mckay_decomposer.McKayDecomposer', + 'arguments': { + 'connectivity': {'0': [1, 2], '1': [0, 2], '2': [0, 1]} + }, + 'method': 'route', + 'path': 'opensquirrel.passes.router.astar_router.AStarRouter', } ], },