Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions schemas/v1/PublishState.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand All @@ -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": [
Expand Down
7 changes: 7 additions & 0 deletions schemas/v1/QuantumHardwareDataFailureResponse.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
7 changes: 7 additions & 0 deletions schemas/v1/QuantumHardwareDynamicDataRequest.schema.json
Original file line number Diff line number Diff line change
@@ -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"
}
Expand Down
14 changes: 13 additions & 1 deletion schemas/v1/QuantumHardwareDynamicDataResponse.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,29 @@
"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": [
{
"dynamic_key_1": "dynamic_value_1"
}
]
}
},
"required": [
Expand Down
32 changes: 31 additions & 1 deletion schemas/v1/QuantumHardwareExecuteRequest.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,35 @@
"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"
},
"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"
}
Expand All @@ -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": [
Expand Down
48 changes: 47 additions & 1 deletion schemas/v1/QuantumHardwareExecuteResponse.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"properties": {
"job_id": {
"description": "Client defined identifier for the execution.",
"examples": [
1
],
"title": "Job Id",
"type": "integer"
},
Expand All @@ -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"
},
Expand All @@ -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"
}
},
Expand All @@ -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": [
Expand Down
20 changes: 19 additions & 1 deletion schemas/v1/QuantumHardwareFailureResponse.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand All @@ -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": [
Expand Down
10 changes: 10 additions & 0 deletions schemas/v1/QuantumHardwareInitializeRequest.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
Loading