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
49 changes: 49 additions & 0 deletions schemas/v3/PublishState.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"$defs": {
"HWCSState": {
"enum": [
"IDLE",
"EXECUTING",
"CALIBRATING",
"OFFLINE"
],
"title": "HWCSState",
"type": "string"
},
"PublishStatePayloadSchema": {
"properties": {
"timestamp": {
"description": "Timestamp of the instantiation of the message (return value of time.time())",
"title": "Timestamp",
"type": "number"
},
"state": {
"$ref": "#/$defs/HWCSState"
}
},
"required": [
"timestamp",
"state"
],
"title": "PublishStatePayloadSchema",
"type": "object"
}
},
"description": "This message is used to publish the state of the hardware controller system (HWCS).",
"properties": {
"command": {
"const": "publish_state",
"title": "Command",
"type": "string"
},
"payload": {
"$ref": "#/$defs/PublishStatePayloadSchema"
}
},
"required": [
"command",
"payload"
],
"title": "Publish state message",
"type": "object"
}
20 changes: 20 additions & 0 deletions schemas/v3/QuantumHardwareDynamicDataRequest.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"properties": {
"command": {
"const": "get_dynamic",
"title": "Command",
"type": "string"
},
"session_id": {
"format": "uuid",
"title": "Session Id",
"type": "string"
}
},
"required": [
"command",
"session_id"
],
"title": "QuantumHardwareDynamicDataRequest",
"type": "object"
}
32 changes: 32 additions & 0 deletions schemas/v3/QuantumHardwareDynamicDataResponse.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"$defs": {
"DynamicDataSchema": {
"additionalProperties": true,
"title": "DynamicDataSchema",
"type": "object"
}
},
"description": "A successful response to a dynamic data request.",
"properties": {
"status": {
"const": "success",
"title": "Status",
"type": "string"
},
"payload": {
"$ref": "#/$defs/DynamicDataSchema"
},
"session_id": {
"format": "uuid",
"title": "Session Id",
"type": "string"
}
},
"required": [
"status",
"payload",
"session_id"
],
"title": "Get hardware data reply",
"type": "object"
}
60 changes: 60 additions & 0 deletions schemas/v3/QuantumHardwareExecuteRequest.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"$defs": {
"RunCircuitPayloadSchema": {
"properties": {
"job_id": {
"description": "Client identifier for the execution",
"title": "Job Id",
"type": "integer"
},
"circuit": {
"description": "Circuit description in cQASM language",
"title": "Circuit",
"type": "string"
},
"number_of_shots": {
"description": "Number of shots to be executed for the circuit.",
"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.",
"title": "Include Raw Data",
"type": "boolean"
}
},
"required": [
"job_id",
"circuit",
"number_of_shots"
],
"title": "RunCircuitPayloadSchema",
"type": "object"
}
},
"properties": {
"session_id": {
"description": "An arbitrary string, filled in in the request, which is copied into the reply object.",
"format": "uuid",
"title": "Session Id",
"type": "string"
},
"command": {
"const": "execute",
"title": "Command",
"type": "string"
},
"payload": {
"$ref": "#/$defs/RunCircuitPayloadSchema"
}
},
"required": [
"session_id",
"command",
"payload"
],
"title": "Execution request",
"type": "object"
}
67 changes: 67 additions & 0 deletions schemas/v3/QuantumHardwareExecuteResponse.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"$defs": {
"RunCircuitResultSchema": {
"properties": {
"job_id": {
"description": "Client defined identifier for the execution.",
"title": "Job Id",
"type": "integer"
},
"results": {
"additionalProperties": {
"type": "integer"
},
"description": "Mapping of measured bitstring (little endian notation; q[n]...q[0]) to count of occurrences.",
"title": "Results",
"type": "object"
},
"raw_data": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of bitstrings (little endian notation; `q[n]...q[0]`) ordered by the shot in which it was measured.",
"title": "Raw Data"
}
},
"required": [
"job_id",
"results"
],
"title": "Execute Payload",
"type": "object"
}
},
"description": "A successful response to a circuit execution request.",
"properties": {
"session_id": {
"description": "An arbitrary string, filled in in the request, which is copied into the reply object.",
"format": "uuid",
"title": "Session Id",
"type": "string"
},
"status": {
"const": "success",
"title": "Status",
"type": "string"
},
"payload": {
"$ref": "#/$defs/RunCircuitResultSchema"
}
},
"required": [
"session_id",
"status",
"payload"
],
"title": "Operation success reply",
"type": "object"
}
42 changes: 42 additions & 0 deletions schemas/v3/QuantumHardwareFailureResponse.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$defs": {
"FailureDataSchema": {
"properties": {
"error_msg": {
"description": "A descriptive error message to be passed on to the user.",
"title": "Error Msg",
"type": "string"
}
},
"required": [
"error_msg"
],
"title": "FailureDataSchema",
"type": "object"
}
},
"description": "Response that indicates a failure in the operation.\n\nCan be sent in response to any request.",
"properties": {
"session_id": {
"description": "An arbitrary string, filled in in the request, which is copied into the reply object.",
"format": "uuid",
"title": "Session Id",
"type": "string"
},
"status": {
"const": "failure",
"title": "Status",
"type": "string"
},
"payload": {
"$ref": "#/$defs/FailureDataSchema"
}
},
"required": [
"session_id",
"status",
"payload"
],
"title": "Operation failure reply",
"type": "object"
}
22 changes: 22 additions & 0 deletions schemas/v3/QuantumHardwareInitializeRequest.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"description": "This message signals that execution is about to begin.\n\nThe initialize should be picked up as a request for locking.",
"properties": {
"session_id": {
"description": "An arbitrary string, filled in in the request, which is copied into the reply object.",
"format": "uuid",
"title": "Session Id",
"type": "string"
},
"command": {
"const": "initialize",
"title": "Command",
"type": "string"
}
},
"required": [
"session_id",
"command"
],
"title": "Initialize request",
"type": "object"
}
22 changes: 22 additions & 0 deletions schemas/v3/QuantumHardwareSimpleSuccessResponse.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"description": "A simple success response to an initialize or terminate request.",
"properties": {
"session_id": {
"description": "An arbitrary string, filled in in the request, which is copied into the reply object.",
"format": "uuid",
"title": "Session Id",
"type": "string"
},
"status": {
"const": "success",
"title": "Status",
"type": "string"
}
},
"required": [
"session_id",
"status"
],
"title": "Operation success reply",
"type": "object"
}
20 changes: 20 additions & 0 deletions schemas/v3/QuantumHardwareStaticDataRequest.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"properties": {
"command": {
"const": "get_static",
"title": "Command",
"type": "string"
},
"session_id": {
"format": "uuid",
"title": "Session Id",
"type": "string"
}
},
"required": [
"command",
"session_id"
],
"title": "QuantumHardwareStaticDataRequest",
"type": "object"
}
Loading