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
4 changes: 2 additions & 2 deletions docs/publish/meta.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ System 2300 publishes a state message to inform subscribers of its current state
("am I still responsive") and the state the system is in.

!!! info
The schemas for validation inherit from the **base schema** and can be found in:
The schemas for validation inherit can be found in:

* `/schemas/publish_state/message.schema.json`
* `/schemas/<version>/PublishState.schema.json`

### Publish state payload

Expand Down
8 changes: 4 additions & 4 deletions docs/request/execute.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ This message requests a backend to execute a user generated circuit. This can on
initialized (in reality "locked").

!!! info
The schemas for validation inherit from the **extended schema** and can be found in:
The schemas for validation can be found in:

* `/schemas/execute/request.schema.json`
* `/schemas/execute/reply_success.schema.json`
* `/schemas/execute/reply_failure.schema.json`
* `/schemas/<version>/QuantumHardwareExecuteRequest.schema.json`
* `/schemas/<version>/QuantumHardwareExecuteResponse.schema.json`
* `/schemas/<version>/QuantumHardwareFailureResponse.schema.json`

### Execute request payload

Expand Down
16 changes: 8 additions & 8 deletions docs/request/locking.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ This message signals to the 2300 that execution is about to begin. The initializ
locking 2300. However, this interpretation is left to this component.

!!! info
The schemas for validation inherit from the **extended schema** and can be found in:
The schemas for validation can be found in:

* `/schemas/initialize/request.schema.json`
* `/schemas/initialize/reply_success.schema.json`
* `/schemas/initialize/reply_failure.schema.json`
* `/schemas/<version>/QuantumHardwareInitializeRequest.schema.json`
* `/schemas/<version>/QuantumHardwareSimpleSuccessResponse.schema.json`
* `/schemas/<version>/QuantumHardwareFailureResponse.schema.json`

### Initialize request payload

Expand Down Expand Up @@ -48,11 +48,11 @@ The opposing message for the initialize request. When 2300 receives this request
has stopped and the system can resume normal operations.

!!! info
The schemas for validation inherit from the **extended schema** and can be found in:
The schemas for validation can be found in:

* `/schemas/terminate/request.schema.json`
* `/schemas/terminate/reply_success.schema.json`
* `/schemas/terminate/reply_failure.schema.json`
* `/schemas/<version>/QuantumHardwareTerminateRequest.schema.json`
* `/schemas/<version>/QuantumHardwareSimpleSuccessResponse.schema.json`
* `/schemas/<version>/QuantumHardwareFailureResponse.schema.json`

### Terminate request payload

Expand Down
24 changes: 16 additions & 8 deletions docs/request/meta.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ by 2300.
Get system information from 2300. This information is retrieved only once, normally at startup time for 2200.

!!! info
The schemas for validation inherit from the **base schema** and can be found in:
The schemas for validation can be found in:

* `/schemas/get_static/request.schema.json`
* `/schemas/get_static/reply_success.schema.json`
* `/schemas/get_static/reply_failure.schema.json`
* `/schemas/<version>/QuantumHardwareStaticDataRequest.schema.json`
* `/schemas/<version>/QuantumHardwareStaticDataResponse.schema.json`
* `/schemas/<version>/QuantumHardwareFailureResponse.schema.json`

or the alternative failure response for version 2 and older:

* `/schemas/<version>/QuantumHardwareDataFailureResponse.schema.json`

### Get static request payload

Expand Down Expand Up @@ -90,11 +94,15 @@ Dynamic information is generated by 2300. This information can for example const
This dynamic metadata fetched on a status change from `CALIBRATING`/`OFFLINE` to `IDLE` or on startup of 2200.

!!! info
The schemas for validation inherit from the **base schema** and can be found in:
The schemas for validation can be found in:

* `/schemas/<version>/QuantumHardwareDynamicDataRequest.schema.json`
* `/schemas/<version>/QuantumHardwareDynamicDataResponse.schema.json`
* `/schemas/<version>/QuantumHardwareFailureResponse.schema.json`

* `/schemas/get_dynamic/request.schema.json`
* `/schemas/get_dynamic/reply_success.schema.json`
* `/schemas/get_dynamic/reply_failure.schema.json`
or the alternative failure response for version 2 and older:

* `/schemas/<version>/QuantumHardwareDataFailureResponse.schema.json`

### Get dynamic request payload

Expand Down
48 changes: 0 additions & 48 deletions schemas/initialize/reply_failure.schema.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"title": "HWCSState",
"type": "string"
},
"PublishStatePayload": {
"PublishStatePayloadSchema": {
"properties": {
"timestamp": {
"description": "Timestamp of the instantiation of the message (return value of time.time())",
Expand All @@ -25,11 +25,10 @@
"timestamp",
"state"
],
"title": "PublishStatePayload",
"title": "PublishStatePayloadSchema",
"type": "object"
}
},
"description": "System 2300 publishes a state message to inform subscribers of its current state.",
"properties": {
"version": {
"pattern": "^\\d+\\.\\d+\\.\\d$",
Expand All @@ -42,8 +41,7 @@
"type": "string"
},
"payload": {
"$ref": "#/$defs/PublishStatePayload",
"description": "The return value(s) of the executed command."
"$ref": "#/$defs/PublishStatePayloadSchema"
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"version",
"command"
],
"title": "GetDynamicRequest",
"title": "QuantumHardwareDynamicDataRequest",
"type": "object"
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$defs": {
"QuantumHardwareDynamicData": {
"DynamicDataSchema": {
"additionalProperties": true,
"title": "QuantumHardwareDynamicData",
"title": "DynamicDataSchema",
"type": "object"
}
},
Expand All @@ -19,8 +19,7 @@
"type": "string"
},
"payload": {
"$ref": "#/$defs/QuantumHardwareDynamicData",
"description": "The return value(s) of the executed command."
"$ref": "#/$defs/DynamicDataSchema"
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$defs": {
"QuantumHardwareRunCircuitPayload": {
"RunCircuitPayloadSchema": {
"description": "Data that specifies a run that can be used as input for the quantum execution manager.",
"properties": {
"job_id": {
Expand Down Expand Up @@ -31,7 +31,7 @@
"circuit",
"number_of_shots"
],
"title": "QuantumHardwareRunCircuitPayload",
"title": "RunCircuitPayloadSchema",
"type": "object"
}
},
Expand All @@ -54,7 +54,7 @@
"type": "string"
},
"payload": {
"$ref": "#/$defs/QuantumHardwareRunCircuitPayload"
"$ref": "#/$defs/RunCircuitPayloadSchema"
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$defs": {
"QuantumHardwareRunCircuitResult": {
"RunCircuitResultSchema": {
"description": "The return value(s) of the executed command.",
"properties": {
"job_id": {
Expand Down Expand Up @@ -60,7 +60,7 @@
"type": "string"
},
"payload": {
"$ref": "#/$defs/QuantumHardwareRunCircuitResult"
"$ref": "#/$defs/RunCircuitResultSchema"
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$defs": {
"QuantumHardwareFailureData": {
"FailureDataSchema": {
"properties": {
"error_msg": {
"description": "A descriptive error message to be passed on to the user.",
Expand All @@ -11,11 +11,10 @@
"required": [
"error_msg"
],
"title": "QuantumHardwareFailureData",
"title": "FailureDataSchema",
"type": "object"
}
},
"description": "The reply for a failed operation.",
"properties": {
"version": {
"pattern": "^\\d+\\.\\d+\\.\\d$",
Expand All @@ -34,7 +33,7 @@
"type": "string"
},
"payload": {
"$ref": "#/$defs/QuantumHardwareFailureData"
"$ref": "#/$defs/FailureDataSchema"
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"version",
"command"
],
"title": "GetStaticRequest",
"title": "QuantumHardwareStaticDataRequest",
"type": "object"
}
85 changes: 85 additions & 0 deletions schemas/v1/QuantumHardwareStaticDataResponse.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"$defs": {
"StaticDataSchema": {
"properties": {
"nqubits": {
"description": "The number of qubits.",
"title": "Nqubits",
"type": "integer"
},
"topology": {
"$ref": "#/$defs/Topology",
"description": "List of the edges between the various qubits"
},
"name": {
"description": "Name of the system.",
"title": "Name",
"type": "string"
},
"pgs": {
"description": "Supported primitive gates set of the system. Gate names as described in cQASM (in uppercase).",
"items": {
"type": "string"
},
"title": "Pgs",
"type": "array"
},
"starttime": {
"description": "Timestamp of start-up of the system (return value of time.time())",
"title": "Starttime",
"type": "number"
}
},
"required": [
"nqubits",
"topology",
"name",
"pgs",
"starttime"
],
"title": "StaticDataSchema",
"type": "object"
},
"Topology": {
"description": "A class representing the topology of a quantum chip.\n\nIt is a list of tuples, where each tuple represents a unidirectional connection between two qubits. The first\nelement of the tuple is the source qubit, and the second element is the target qubit.",
"items": {
"maxItems": 2,
"minItems": 2,
"prefixItems": [
{
"type": "integer"
},
{
"type": "integer"
}
],
"type": "array"
},
"title": "Topology",
"type": "array"
}
},
"description": "The reply containing system information for 2300.",
"properties": {
"version": {
"pattern": "^\\d+\\.\\d+\\.\\d$",
"title": "Version",
"type": "string"
},
"status": {
"const": "success",
"title": "Status",
"type": "string"
},
"payload": {
"$ref": "#/$defs/StaticDataSchema"
}
},
"required": [
"version",
"status",
"payload"
],
"title": "Get hardware data reply",
"type": "object"
}
Loading