Subscription Messages (PUB-SUB Mode)¶
Task Status¶
Function: The measurement and control system pushes real-time task status information when the task calculation stage changes.
Operation: Fixed as bytes: task_status;
Push Message Format:
Description |
Name |
Type |
Notes |
Is Nullable |
|---|---|---|---|---|
Message Type |
MsgType |
String |
TaskStatus |
Non-nullable |
Sequence ID |
SN |
Uint32_t |
Heartbeat message sequence number |
Non-nullable |
Task ID |
TaskId |
String |
Non-nullable |
|
Task Status |
TaskStatus |
Uint32_t |
Task status, refer to the task status definitions |
Non-nullable |
Example
{
"MsgType":"TaskStatus",
"SN":0,
"TaskId":"11D919FA044846F3B4DF453A827AE901",
"TaskStatus":3
}
Chip Config Update Flag¶
Function: After the chip parameters are changed, the measurement and control all-in-one machine pushes a message to notify Sinan that it can send a fetch request via the router-dealer mode to query the latest chip configuration information.
Operation: Fixed as bytes: chip_update;
Push Message Format:
Description |
Name |
Type |
Notes |
Is Nullable |
|---|---|---|---|---|
Update Flag |
UpdateFlag |
Bool |
Update identifier |
Non-nullable |
Last Update Time |
LastUpdateTime |
Uint64_t |
Last update time |
Non-nullable |
Example
{
"UpdateFlag":true,
"LastUpdateTime": 1705307288685
}
Chip Resource Status¶
Function: During the calculation of tasks by the measurement and control all-in-one machine, in multi-threaded mode, whenever the chip resources change (locked, released), the measurement and control service will push detailed thread data to Sinan (qubit usage of each control service thread); QPilot can simply focus on the use_bits field of each thread (t0, t1, t2…).
Operation: Fixed as bytes: probe;
Push Message Format:
Description |
Name |
Type |
Notes |
Is Nullable |
|---|---|---|---|---|
Thread Name |
core_thread.t0 |
Object |
Thread name of the control service |
Non-nullable |
Bits in Use |
core_thread.t0. use_bits |
String Array |
All qubits in the current thread |
Non-nullable |
Example
{
"inst_status": 1,
"linked": 1,
"timestamp": 1695182448.7963016,
"scheduler": {
"status": "InitialState",
"queue_len": 3
},
"core_status": {
"empty_thread": 3,
"pause_read": 0,
"thread_num": 5
},
"core_thread": {
"t0": {
"status": "waiting",
"thread_id": "t0",
"task_id": "650a6e6f197b42e9aeaad6d6",
"start_time": 1695182447.5371444,
"user": "admin3",
"use_bits": ["q56", "q18", "q68", "q69", "q6", "q2", "q67"]
},
"t1": { "status": "ready", "use_bits": [] },
"t2": { "status": "ready", "use_bits": [] },
"t3": {
"status": "waiting",
"thread_id": "t3",
"task_id": "650a6e6e197b42e9aeaad6d0",
"start_time": 1695182446.8370538,
"user": "admin3",
"use_bits": ["q59", "q30", "q50", "q33", "q47", "q19", "q38"]
},
"t4": { "status": "ready", "use_bits": [] }
}
}
Automatic Calibration Start Information¶
Function: When the measurement and control all-in-one machine performs automatic calibration, it will push the information of the qubits being calibrated to Sinan; during this time period, the qubits under calibration are unavailable.
Operation: Fixed as bytes: calibration_start;
Push Message Format:
Description |
Name |
Type |
Notes |
Is Nullable |
|---|---|---|---|---|
Qubit Index |
qubits |
String Array |
Calibrated single-qubit info |
Non-nullable |
Couplers |
couplers |
String Array |
Couplers |
Non-nullable |
Qubit Pairs |
pairs |
String Array |
Calibrated qubit pair info |
Non-nullable |
Discriminators |
discriminators |
String Array |
Discriminators |
Non-nullable |
Point Label |
point_label |
Int |
Represents which label the current calibration acts upon |
Non-nullable |
Example
{
"config_flag": false,
"qubits":["q0", "q1", "q2", "q3"],
"couplers":["c0-1", "c11-12", "c2-3"],
"pairs": ["q0q1", "q2q3"],
"discriminators":["q0_01.bin", "q1_01.bin", "q2_01.bin", "q3_01.bin"],
"point_label": 2
}
Automatic Calibration Completion Information¶
Function: After the calibration is completed, a completion message will be pushed to Sinan, and the qubits will become available again.
Operation: Fixed as bytes: calibration_done;
Push Message Format:
Description |
Name |
Type |
Notes |
Is Nullable |
|---|---|---|---|---|
Qubit Index |
qubits |
String Array |
Calibrated single-qubit info |
Non-nullable |
Couplers |
couplers |
String Array |
Couplers |
Non-nullable |
Qubit Pairs |
pairs |
String Array |
Calibrated qubit pair info |
Non-nullable |
Discriminators |
discriminators |
String Array |
Discriminators |
Non-nullable |
Example
{
"qubits":["q0", "q1", "q2", "q3"],
"couplers":["c0-1", "c11-12", "c2-3"],
"pairs": ["q0q1", "q2q3"],
"discriminators":["q0", "q1", "q2", "q3"],
"config_flag":true,
"point_label": 2
}
Chip Maintenance Information¶
Function: Receives chip maintenance start and end information to realize automatic suspension of Sinan. If the maintenance time exceeds 2 hours, Sinan pushes an offline maintenance notice to the cloud platform; if the maintenance time does not exceed 2 hours, only Sinan suspends, and the cloud platform remains online normally.
Operation: Fixed as bytes: chip_protect;
Push Message Format:
Description |
Name |
Type |
Notes |
Is Nullable |
|---|---|---|---|---|
Protect Flag |
ProtectFlag |
bool |
true for maintenance start, false for maintenance end |
Non-nullable |
Duration Time |
DurativeTime |
uint64_t |
Unit: minutes |
Non-nullable |
Timestamp |
LastTime |
uint64_t |
Timestamp |
Non-nullable |
Example
{
"ProtectFlag":true,
"DurativeTime":10,
"LastTime":1705307288685
}