Decoding scheduling method for syndrome data stream of fault-tolerant quantum computing
Patent Information
- Application Number
- CN202611014557.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-08
- Publication Date
- 2026-09-29
AI Technical Summary
[0004]有鉴于此,本申请提供了一种面向容错量子计算的综合征数据流的解码调度方法,用于解决现有的解码调度方案多采用静态分配策略,并不能根据实时的变化或状态进行灵活的解码调度,导致解码资源的利用率非常低,容易造成数据积压和处理延迟的问题
[0075]从上述技术方案可以看出,本申请当量子硬件运行时,将所述量子硬件实时产生的待解码的综合征数据流切分为各个切片;所述切片为将量子硬件在逻辑量子比特补丁或逻辑操作区域上产生的综合征数据流,按照一个或多个纠错周期切分后形成的综合征数据块;实时获取当前时间,计算所述当前时间与预设的第一关键操作的操作截止时间之间的时间间隔,判断所述时间间隔是否小于预设的间隔阈值;若所述时间间隔不小于所述间隔阈值,则从各个所述切片中筛选出各个第一目标切片;由各个所述第一目标切片构建常规任务,调度解码器对所述常规任务进行解码处理;当所述时间间隔小于所述间隔阈值时,暂停所述常规任务,确定为完成所述第一关键操作所需解码的各个第二目标切片,以构建紧急任务,并调度解码器对所述紧急任务进行解码处理。本申请首先将量子硬件实时产生的综合征数据流切分为各个切片,这样使连续的数据流变成了可以被灵活调度的独立单元,这是本申请实现动态调度的前提,在此基础上,通过实时获取当前时间并与预设的第一关键操作截止时间进行比较,实现实时的感知机制,这样本申请的调度策略就不会像现有技术一样提前被定义好,而是可以根据实时的情况采取不同的策略,间隔阈值的设置是提供了一个清晰的决策边界,将时间充裕情况下和时间紧迫情况下的两个状态明确的区分开来,形成两条路径,当时间间隔不小于间隔阈值,即时间充裕时,进行常规的处理,主动、按需的从各个切片中筛选出第一目标切片来构建常规任务,使解码器的利用率得到提升;而当时间间隔小于间隔阈值时,即第一关键操作临近、时间紧张时,就需要暂停常规任务,确定为完成第一关键操作所需解码的第二目标切片,以构建紧急任务,那么紧急任务的构建范围就会限定在了与第一关键操作直接相关的切片上,不是盲目的提升所有切片的优先级,以将解码器资源集中投入到最关键的位置,整体提高了解码资源的利用率,避免了因资源分散而导致的解码阻塞、数据积压和处理延迟等问题。
Smart Images

Figure CN122840295A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data stream decoding and scheduling technology, specifically to a decoding and scheduling method for a comprehensive data stream for fault-tolerant quantum computing. Background Technology
[0002] Quantum computers, with their potential to process information using the principles of quantum mechanics, are expected to surpass classical computers in solving certain complex problems. In fault-tolerant quantum computing (FTQC), quantum hardware continuously generates a large amount of complex data streams during operation, which need to be decoded in real time by classical decoders to identify and correct errors. Therefore, the efficiency of decoding scheduling directly affects the logic error rate and system throughput of quantum computing.
[0003] Currently, most mainstream decoding scheduling schemes adopt static allocation strategies, which cannot flexibly schedule decoding based on real-time changes or states, resulting in very low utilization of decoding resources and easy data backlog and processing delays. Summary of the Invention
[0004] In view of this, this application provides a decoding scheduling method for complex data streams in fault-tolerant quantum computing, which solves the problem that existing decoding scheduling schemes mostly adopt static allocation strategies and cannot flexibly schedule decoding according to real-time changes or states, resulting in very low utilization of decoding resources and easy data backlog and processing delays.
[0005] To achieve the above objectives, the following solution is proposed:
[0006] Firstly, a decoding and scheduling method for complex data streams in fault-tolerant quantum computing includes:
[0007] When the quantum hardware is running, the syndrome data stream to be decoded generated in real time by the quantum hardware is divided into slices; the slice is a syndrome data block formed by dividing the syndrome data stream generated by the quantum hardware on the logical qubit patch or logical operation region according to one or more error correction cycles.
[0008] The system acquires the current time in real time, calculates the time interval between the current time and the preset deadline for the first key operation, and determines whether the time interval is less than a preset interval threshold.
[0009] If the time interval is not less than the interval threshold, then each first target slice is selected from each slice;
[0010] A regular task is constructed from each of the first target slices, and a decoder is scheduled to decode the regular task.
[0011] When the time interval is less than the interval threshold, the regular task is paused, each second target slice that needs to be decoded to complete the first critical operation is identified, an emergency task is constructed, and the decoder is scheduled to decode the emergency task.
[0012] Preferably, the step of selecting each first target slice from each of the slices includes:
[0013] A lifecycle state machine is maintained for each slice to determine the state of the slice in real time; the states in the lifecycle state machine include: not generated, waiting to be decoded, occupied, decoder allocated, and decoding completed.
[0014] The ungenerated state of each slice is transformed into a waiting-to-decode state, and a dynamic constraint graph is established from each slice based on the state.
[0015] For each slice in the waiting-to-decode state, in the dynamic constraint graph, the node that has an edge connection with the corresponding node of the slice is regarded as the neighbor node of the corresponding node of the slice.
[0016] Determine whether the states of the slices corresponding to each neighboring node of the slice are not in the state of having an assigned decoder. If so, then the slice is taken as a candidate slice.
[0017] Determine whether there are edge connections between each candidate slice, and treat the candidate slices without edge connections as idle slices;
[0018] The number of idle slices is determined, and the number of first decoders currently in an idle state is also determined. If the number of idle slices is not greater than the number of first decoders, then the idle slices are used as the first target slices.
[0019] If the number of idle slices is greater than the number of the first decoders, then each idle slice is given a priority score, and the idle slice with a priority score greater than a preset score threshold is taken as the first target slice.
[0020] Preferably, the step of establishing a dynamic constraint graph from each of the slices based on the state includes:
[0021] Each slice is treated as a node, and for every two slices, it is determined whether there is a mutual exclusion constraint between the two slices;
[0022] If so, then establish edges between the nodes corresponding to these two slices to form a dynamic constraint graph;
[0023] For each slice, the lifecycle state machine of the slice is monitored in real time. When the state of the slice changes to the decoding completed state, the corresponding node and the edge connected to the node in the dynamic constraint graph are deleted.
[0024] Preferably, the step of prioritizing each of the idle slices to obtain a priority score includes:
[0025] For each of the aforementioned free slices, determine the second key operation corresponding to that free slice;
[0026] Obtain the operation deadline of the second key operation and calculate the time difference with the current time;
[0027] The decoding urgency of the idle slice is calculated based on the time difference;
[0028] From the dynamic constraint graph, count the number of neighboring nodes of the node corresponding to the free slice;
[0029] The decoding cost efficiency of the idle slice is calculated based on the number of neighboring nodes;
[0030] Weights are assigned to the decoding urgency and decoding cost efficiency respectively, and the priority score is obtained by weighted summation of the decoding urgency and decoding cost efficiency according to the weights.
[0031] Preferably, the step of assigning weights to the decoding urgency and decoding cost efficiency includes:
[0032] Determine the logical qubit to which the idle slice belongs, and determine whether the logical qubit corresponds to the first key operation;
[0033] If not, then the preset first coefficient is used as the weight of the decoding urgency; wherein, the first coefficient is less than the weight of the decoding cost efficiency, and the sum of the first coefficient and the weight of the decoding cost efficiency is 1;
[0034] If so, the high-level quantum algorithm corresponding to the quantum hardware is converted into a low-level instruction stream containing a sequence of logical operations, and the timeline is constructed from the low-level instruction stream; wherein the sequence of logical operations includes the first key operation;
[0035] In the timeline, the error correction period between the idle slice and the first critical operation is determined;
[0036] The error correction cycle based on the interval is weighted according to the decoding urgency and decoding cost efficiency.
[0037] Preferably, determining the second target slices required for decoding to complete the first key operation includes:
[0038] The high-level quantum algorithm corresponding to the quantum hardware is converted into a low-level instruction stream containing a sequence of logical operations; wherein the sequence of logical operations includes the first key operation;
[0039] The timeline is constructed from the underlying instruction stream;
[0040] Determine the future slice corresponding to the first key operation from the timeline;
[0041] Starting from the future slice, the slices that are related to the future slice are backtracked on the timeline and identified as associated slices; the associated slices are slices of the syndrome data stream to be decoded generated in real time by the quantum hardware or historical slices generated before the quantum hardware runs.
[0042] Determine whether each of the associated slices has been decoded, and determine each second target slice from the associated slices that have not been decoded.
[0043] Preferably, determining each second target slice from each associated slice that has not yet been decoded includes:
[0044] Determine the estimated decoding completion time for each of the currently undecoded associated slices, and designate slices whose estimated decoding completion time is no later than the operation deadline as schedulable slices;
[0045] Conflict analysis is performed on each of the schedulable slices to determine a set of conflict-free slices, and each schedulable slice in the set of conflict-free slices is taken as a second target slice.
[0046] Preferably, the step of performing conflict analysis on each of the schedulable slices to determine a set of conflict-free slices includes:
[0047] The state of each slice is determined, and a dynamic constraint graph is built from each slice based on the state; one slice corresponds to one node, nodes with conflicting constraints are connected by edges, and they are neighbors of each other;
[0048] For each schedulable slice, determine whether there is a neighboring node in the dynamic constraint graph whose state is "allocated decoder" for the corresponding node of the schedulable slice.
[0049] If not, then the schedulable slice is selected as the candidate slice;
[0050] Determine the number of second decoders currently in an idle state, and count the number of edges connecting each candidate slice to other candidate slices in the dynamic constraint graph;
[0051] The candidate slices are traversed sequentially in ascending order of the number of edges. For each candidate slice, other candidate slices that are not connected to it by edges are placed into a pre-built set of conflict-free slices. The number of slices in the set of conflict-free slices is monitored in real time until all candidate slices have been traversed or the number of slices reaches the number of the second decoder.
[0052] Preferably, after determining the respective second target slices required to be decoded to complete the first critical operation, the method further includes:
[0053] Predict the total number of decoders required for each of the second target slices at each decoding moment in the decoding process, in order to determine the number of decoders to be reserved at the current moment;
[0054] Obtain the total number of decoders and the number of decoders currently allocated. Calculate the backfill decoder budget for the current moment based on the total number of decoders, the number of decoders currently allocated, and the number of decoders to be reserved.
[0055] From the regular tasks, select the first target slice that has no conflicting constraints with each of the second target slices as the backfill slice;
[0056] The backfill slice is used as the new second target slice.
[0057] Preferably, after determining the respective second target slices required to be decoded to complete the first critical operation, the method further includes:
[0058] Determine whether at least one urgent task to be decoded is recorded in the pre-established global flags;
[0059] If so, then determine whether the previous urgent task that was decoded has been completed;
[0060] If the processing is not completed, the second target slices from the previous decoded emergency task are retrieved as the historical slices of each target.
[0061] Determine a new slice in each of the second target slices relative to each of the target historical slices;
[0062] Calculate the proportion of the new slice in each of the second target slices;
[0063] Obtain the build time of the last urgent task that was decoded and processed, and calculate the difference between the current time and the build time;
[0064] If the percentage value is greater than a preset percentage threshold and the difference is greater than a preset difference threshold, then the step of constructing an emergency task continues.
[0065] Secondly, a decoding and scheduling device for a comprehensive data stream for fault-tolerant quantum computing includes:
[0066] The syndrome data stream segmentation module is used to segment the syndrome data stream to be decoded generated in real time by the quantum hardware into various slices when the quantum hardware is running; the slice is a syndrome data block formed by segmenting the syndrome data stream generated by the quantum hardware on the logical qubit patch or logical operation region according to one or more error correction cycles.
[0067] The judgment module is used to obtain the current time in real time, calculate the time interval between the current time and the preset operation deadline of the first key operation, and determine whether the time interval is less than the preset interval threshold.
[0068] The first target slice filtering module is used to filter out each first target slice from each slice if the time interval is not less than the interval threshold.
[0069] A regular task decoding processing module is used to construct regular tasks from each of the first target slices and schedule the decoder to decode the regular tasks;
[0070] An emergency task decoding processing module is used to pause the regular task when the time interval is less than the interval threshold, determine each second target slice that needs to be decoded to complete the first critical operation, construct an emergency task, and schedule the decoder to decode the emergency task.
[0071] Thirdly, a decoding and scheduling device for a comprehensive data stream for fault-tolerant quantum computing, including a memory and a processor;
[0072] The memory is used to store programs;
[0073] The processor is configured to execute the program to implement the steps of the decoding and scheduling method for a complex data stream for fault-tolerant quantum computing as described in any of the first aspects.
[0074] Fourthly, a storage medium storing a computer program thereon, characterized in that, when the computer program is executed by a processor, it implements the steps of the decoding and scheduling method for a complex data stream for fault-tolerant quantum computing as described in any one of the first aspects.
[0075] As can be seen from the above technical solution, when the quantum hardware is running, this application divides the complex data stream to be decoded generated in real time by the quantum hardware into various slices; each slice is a complex data block formed by dividing the complex data stream generated by the quantum hardware on the logical qubit patch or logical operation region according to one or more error correction cycles; the current time is obtained in real time, the time interval between the current time and the operation deadline of the preset first key operation is calculated, and it is determined whether the time interval is less than the preset interval threshold; if the time interval is not less than the interval threshold, each first target slice is selected from each slice; a regular task is constructed from each first target slice, and the decoder is scheduled to decode the regular task; when the time interval is less than the interval threshold, the regular task is paused, and each second target slice that needs to be decoded to complete the first key operation is identified to construct an emergency task, and the decoder is scheduled to decode the emergency task. This application first divides the real-time integrated data stream generated by quantum hardware into various slices, thus transforming the continuous data stream into independent units that can be flexibly scheduled. This is the premise for achieving dynamic scheduling in this application. Based on this, a real-time sensing mechanism is implemented by acquiring the current time in real time and comparing it with a preset first critical operation deadline. Therefore, the scheduling strategy of this application is not predefined like in existing technologies, but can adopt different strategies based on the real-time situation. The setting of the interval threshold provides a clear decision boundary, clearly distinguishing between two states: ample time and time-constrained time, forming two paths. When the time interval is not less than the interval threshold, i.e., time is sufficient... In the event of a time leeway, routine processing is performed, proactively and on demand selecting the first target slice from various slices to construct routine tasks, thereby improving decoder utilization. However, when the time interval is less than the interval threshold, i.e., when the first critical operation is approaching and time is tight, routine tasks need to be paused, and the second target slice to be decoded to complete the first critical operation is identified to construct an emergency task. Thus, the scope of emergency task construction is limited to slices directly related to the first critical operation, rather than blindly increasing the priority of all slices. This concentrates decoder resources on the most critical positions, improving the overall utilization of decoding resources and avoiding problems such as decoding blockage, data backlog, and processing delays caused by resource dispersion. Attached Figure Description
[0076] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0077] Figure 1 An optional flowchart of a decoding and scheduling method for a complex data stream for fault-tolerant quantum computing provided in an embodiment of this application;
[0078] Figure 2 A schematic diagram of the structure of a decoding and scheduling device for a complex data stream for fault-tolerant quantum computing provided in an embodiment of this application;
[0079] Figure 3 This is a schematic diagram of the structure of a decoding and scheduling device for a comprehensive data stream for fault-tolerant quantum computing, provided in an embodiment of this application. Detailed Implementation
[0080] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0081] This invention can be used in a wide variety of general-purpose or special-purpose computing environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor devices, distributed computing environments including any of the above devices, etc.
[0082] This invention provides a decoding and scheduling method for complex data streams in fault-tolerant quantum computing. This method can be applied to various computer terminals or smart terminals, and its execution entity can be the processor or server of the computer terminal or smart terminal. The method flowchart is shown below. Figure 1 As shown, it specifically includes:
[0083] S1: When the quantum hardware is running, the synthesized data stream to be decoded generated in real time by the quantum hardware is divided into slices. Each slice is a synthesized data block formed by dividing the synthesized data stream generated by the quantum hardware on logical qubit patches or logical operation regions according to one or more error correction cycles.
[0084] When the quantum hardware is running, it continuously generates fault-tolerant data streams that need to be decoded in real time, also known as syndrome data streams. These syndrome data streams can be discretized and divided into atomic scheduling units, or slices. A slice can be regarded as a predefined logical container or block. After being filled with data from the syndrome data streams generated in real time by the quantum hardware at a specific time (such as the d-th round of error correction), it becomes an atomic unit or data block for decoding and scheduling. This allows slices to be flexibly selected, sorted, allocated, and tracked, which is the premise for the dynamic scheduling implemented in this application.
[0085] Atomic scheduling units or data blocks are not limited to d × d × d cube patches. Their size can be dynamically variable, or they can be divided in a non-uniform way according to the complexity of logical operations. For example, smaller time windows can be used in regions with high error rates, while larger time windows can be merged in idle regions to balance scheduling overhead and parallelism.
[0086] S2: Obtain the current time in real time, calculate the time interval between the current time and the preset deadline of the first key operation, and determine whether the time interval is less than the preset interval threshold.
[0087] This step introduces a real-time sensing mechanism. Instead of pre-defining how to allocate decoding resources as in existing technologies, it continuously monitors the proximity of the first critical operation in real time. The preset interval threshold provides a decision boundary. When there is sufficient time, the focus can be on the decoding of routine tasks; when time is tight, the focus can be on the encryption of urgent tasks. This is the key operation to solve the problem of static decoding in existing technologies.
[0088] The first critical operation refers to a logical operation that is crucial for the decoding process during quantum hardware operation. This logical operation requires that the relevant decoding task must be completed before it can be executed. In one example, the first critical operation refers to the logical operation that requires the relevant Pauli frame synchronization to be completed before it can be executed.
[0089] The operation deadline refers to a future point in time for the first critical operation. If this point in time has passed and the slice that must be decoded for the first critical operation has not been decoded, the first critical operation cannot be executed on time, causing the decoding logic to stall.
[0090] The solution provided in this application can handle multiple first critical operations simultaneously. For each first critical operation, the decoding scheduling scheme provided in this application is executed. The first critical operation can be a non-Clifford gate operation, a logic measurement operation, a magic state injection operation, a merge / split operation in lattice surgery, etc. Specifically, for non-Clifford gate operations, quantum gates are roughly divided into two categories: Clifford gates and non-Clifford gates. Clifford gates include Hadamard gates (H gates), phase gates (S gates), controlled NOT gates (CNOT), etc. These gates can be efficiently simulated on classical computers. In fault-tolerant quantum computing, their error correction is also relatively simple and can be handled in an accounting manner through the update of Pauli frames, without causing a decoding bottleneck. The most typical non-Clifford gate is the T gate (π / 8 gate). This type of gate is necessary to realize universal quantum computing—Clifford gates alone cannot complete arbitrary quantum algorithms, and non-Clifford gates must be introduced to achieve the completeness of quantum computing.
[0091] Non-Clifford gates have a hard synchronization dependency during execution. That is, before executing non-Clifford gates such as T gates, the relevant historical errors must be decoded first, and the Pauli frame must be updated accordingly. If the decoding is not completed in time, the T gate cannot be executed, the entire quantum computing pipeline will stop, and it will directly lead to an increase in the logic error rate. Therefore, this application combines the first key operation and time interval to introduce a dynamic decoding scheme.
[0092] Optionally, there are two ways to calculate the time threshold:
[0093] ① Under the condition that the decoding resources are running at full speed, calculate the shortest time required to clear all the slices on which the critical operation depends, and use it as the time threshold. This should take into account the total number of tasks (i.e. the number of slices on which the critical operation depends), the average decoding time of a single slice, and the maximum number of parallel decoders. The average decoding time includes the actual decoding time, the preparation time before decoding, and the safety margin. The safety margin is used to deal with the time wasted due to unexpected situations.
[0094] Therefore, the calculation formula is: ;
[0095] in, This is the interval threshold. For the total number of tasks, The maximum number of parallel lines in the decoder. , and These represent the actual decoding time, the preparation time before decoding, and the safety margin, respectively.
[0096] ② Calculate the average decoding efficiency of all decoders over a recent period (e.g., a preset time period) and the average utilization rate of all decoders in the most recent N error correction cycles. Calculate the average value of the average decoding efficiency and the average utilization rate. Set the interval threshold based on the magnitude of this average value, as the two are negatively correlated.
[0097] S3: If the time interval is not less than the interval threshold, then select each first target slice from each slice.
[0098] If there is no urgent pressure, the system filters from all available slices. This filtering is to select the slices that are most suitable for processing at the moment. In other words, within a window of ample time, regular tasks can be built with the goal of maximizing throughput, thereby efficiently consuming the data stream, avoiding slice backlog, and improving the utilization of decoding resources.
[0099] S4: Construct a regular task from each of the first target slices, and schedule the decoder to perform decoding processing on the regular task.
[0100] The selected first target slice is constructed as a regular task and scheduled for execution by the decoder. The scheduling action here is active allocation rather than static binding. Therefore, decoder resources are no longer pre-assigned to a certain region or type of data, but dynamically receive tasks based on the current filtering results. This allows the decoder to be reused by slices from different regions between multiple error correction cycles, avoiding idle waiting of the decoder. Compared with the existing static allocation technology where the decoder is idle after binding, this on-demand dynamic allocation mechanism greatly improves the utilization rate of decoding resources.
[0101] Optionally, the first target slices are grouped according to their spatial region or generation sequence to ensure that slices within the same group do not conflict during decoding. Then, the slices in each group are assigned the same regular identifier, and each group is encapsulated into an independent regular task unit. Each regular task unit contains the index information, data address, and time window parameters required for decoding of all slices in the group. The encapsulated regular task units are then arranged according to the generation order or priority, waiting for the decoder to pick them up in order for decoding.
[0102] S5: When the time interval is less than the interval threshold, the regular task is paused, each second target slice that needs to be decoded to complete the first critical operation is determined, an emergency task is constructed, and the decoder is scheduled to decode the emergency task.
[0103] The second target slice is the slice that is directly related to the first critical operation, that is, the slice that has a causal dependency on the first critical operation and is within the scope of the closure.
[0104] When the time interval is less than the interval threshold, pause the decoding process of the regular task. There are two ways to do this:
[0105] 1) Only pause regular tasks that have not yet started, and allocate idle decoder resources to emergency tasks;
[0106] 2) Pause all regular tasks (including those that have been started and those that have not). If the current decoder resources are not limited, then only the idle decoder resources can be allocated to emergency tasks. If the current decoder resources are limited, then release the resources of all decoders that have been allocated to regular tasks, and then allocate all decoder resources to emergency tasks.
[0107] This step targets the first critical operation by identifying the slices that must be decoded to complete the operation as the second target slices. Each second target slice may include backlogged historical slices and / or slices from the complex data stream to be decoded in real time generated by quantum hardware. This avoids indiscriminately increasing the priority of all slices, preventing overuse of decoding resources, and ensuring decoding efficiency. Then, an emergency task is constructed to uniformly schedule decoder processing, so that the critical operation will not be forced to wait before the operation deadline due to undecoded related slices, avoiding processing delays and logical pauses.
[0108] The process for creating emergency tasks is similar to that for creating regular tasks, and will not be repeated here.
[0109] In addition, the decoders used to decode the slices can be homogeneous or heterogeneous. For example, a fast but low-precision FPGA decoder and a slow but high-precision CPU / GPU decoder can be used in combination. When allocating the decoders in the future, different decoders can be divided according to the error tolerance of regular or urgent tasks. For example, urgent tasks can be assigned to fast decoders and regular tasks can be assigned to high-precision decoders.
[0110] In the above scheme, this application first divides the real-time integrated data stream generated by the quantum hardware into various slices, thus transforming the continuous data stream into independent units that can be flexibly scheduled. This is the premise for achieving dynamic scheduling in this application. Based on this, a real-time sensing mechanism is achieved by acquiring the current time in real time and comparing it with a preset first critical operation deadline. Thus, the scheduling strategy of this application is not predefined like in existing technologies, but can adopt different strategies based on the real-time situation. The setting of the interval threshold provides a clear decision boundary, clearly distinguishing between two states: ample time and time-sensitive conditions, forming two paths. When the time interval is not less than the interval threshold, i.e. When time is ample, routine processing is performed, proactively and on demand selecting the first target slice from various slices to construct routine tasks, thereby improving decoder utilization. However, when the time interval is less than the interval threshold, i.e., when the first critical operation is approaching and time is tight, routine tasks need to be paused, and the second target slice to be decoded to complete the first critical operation is identified to construct emergency tasks. In this way, the scope of emergency task construction is limited to slices directly related to the first critical operation, rather than blindly increasing the priority of all slices. This concentrates decoder resources on the most critical positions, improving the overall utilization of decoding resources and avoiding problems such as decoding blockage, data backlog, and processing delays caused by resource dispersion.
[0111] The process of selecting each first target slice from each slice in the method provided by the embodiments of the present invention is specifically described as follows:
[0112] A lifecycle state machine is maintained for each slice to determine the state of the slice in real time; the states in the lifecycle state machine include: not generated, waiting to be decoded, occupied, decoder allocated, and decoding completed.
[0113] The ungenerated state of each slice is transformed into a waiting-to-decode state, and a dynamic constraint graph is established from each slice based on the state.
[0114] For each slice in the waiting-to-decode state, in the dynamic constraint graph, the node that has an edge connection with the corresponding node of the slice is regarded as the neighbor node of the corresponding node of the slice.
[0115] Determine whether the states of the slices corresponding to each neighboring node of the slice are not in the state of having an assigned decoder. If so, then the slice is taken as a candidate slice.
[0116] Determine whether there are edge connections between each candidate slice, and treat the candidate slices without edge connections as idle slices;
[0117] The number of idle slices is determined, and the number of first decoders currently in an idle state is also determined. If the number of idle slices is not greater than the number of first decoders, then the idle slices are used as the first target slices.
[0118] If the number of idle slices is greater than the number of the first decoders, then each idle slice is given a priority score, and the idle slice with a priority score greater than a preset score threshold is taken as the first target slice.
[0119] Specifically, each slice has its corresponding lifecycle state machine. The states in the lifecycle state machine indicate the state of the slice. The ungenerated state is the initial state of the slice. The waiting-to-decode state means that the slice is waiting to be decoded. The occupied state means that its neighboring slices are being decoded and it cannot move temporarily. The assigned decoder state means that the slice has been assigned to the corresponding decoder and is being decoded. The decoded-complete state means that the slice has been successfully decoded. When the slice completes decoding, its state changes from the assigned decoder state to the decoded-complete state, and the occupancy constraints of its neighboring nodes are released. When the quantum hardware generates a new layer of synthetic data stream, the newly generated synthetic data stream will also be divided into slices, and the state of each slice changes from the ungenerated state to the waiting-to-decode state.
[0120] Because there are complex spatiotemporal dependencies between slices, this application uses a dynamic constraint graph to represent them. Each slice represents a node. The dynamic constraint graph is constructed based on the state. If there are edges connecting the nodes, it means that there is an association or some kind of relationship between the nodes. For each node, its neighboring nodes do not refer to the nodes that are neighbors with it in terms of location, but rather to the nodes that are connected to it by edges.
[0121] If a slice's neighbor node in the dynamic constraint graph is already in an assigned decoding state, the slice cannot enter an assigned decoding state. This is because the two slices are connected by the same edge in the dynamic constraint graph, meaning they share a boundary in space and time and will share the syndrome data on that boundary. If the two slices decode simultaneously, they will simultaneously read and use this shared boundary measurement data. However, this data may contain erroneous signals from both slice regions. Simultaneous processing can lead to ambiguity in misassignment, making it impossible for the decoding algorithm to correctly determine which slice a particular error belongs to, ultimately causing decoding failure. Therefore, to ensure that each slice can independently and conflict-free acquire and parse its boundary data, when a neighbor is occupied (in an assigned decoder state), the current slice must wait and be in an occupied state. Thus, there is a mutual exclusion constraint between nodes and their neighbors. It is important to note that the mutual exclusion constraint between two slices is inherently present, but there is also the question of whether it is activated. If the state of a neighbor node corresponding to a slice (i.e., the state of the slice corresponding to the neighbor node) is in an assigned decoder state, then the mutual exclusion constraint effect between the two slices is activated.
[0122] Therefore, when selecting the first target slice from the slices to form a regular task for decoding, it is necessary to check the state of the neighboring nodes in the dynamic constraint graph. Only slices that are not constrained by the assigned decoder state of their neighboring nodes are eligible to be identified as candidate slices. A node may have one or more neighboring nodes. Only when all its neighboring nodes are not in the assigned decoder state is its corresponding slice considered a candidate slice. However, it should be noted that there may be edge connections between these candidate slices. Therefore, it is also necessary to determine whether there are edge connections between the candidate slices and to designate candidate slices without edge connections as idle slices.
[0123] At this point, to prevent insufficient decoding resources, the number of free slices needs to be compared with the number of first decoders. If the number of first decoders is greater than the number of free slices, it means that the current decoding resources can handle the free slices, and all free slices are used as the first target slices. If the number of first decoders is not greater than the number of free slices, then priority scoring is required for filtering.
[0124] The process of establishing a dynamic constraint graph from each slice based on the state, as described above, includes:
[0125] Each slice is treated as a node, and for every two slices, it is determined whether there is a mutual exclusion constraint between the two slices;
[0126] If so, then establish edges between the nodes corresponding to these two slices to form a dynamic constraint graph;
[0127] For each slice, the lifecycle state machine of the slice is monitored in real time. When the state of the slice changes to the decoding completed state, the corresponding node and the edge connected to the node in the dynamic constraint graph are deleted.
[0128] Specifically, the process of constructing a dynamic constraint graph involves binding the spatiotemporal topological relationship of a slice to a lifecycle state machine. As a result, the dynamic constraint graph will change as the state of the slice corresponding to the node changes.
[0129] All undecoded slices are potential decoding tasks and therefore must be included in the scope of conflict management. For any two nodes, it is determined whether there is a mutual exclusion constraint between their corresponding slices. The determination is based on their local spatiotemporal neighbor relationship, which includes spatial adjacency, temporal adjacency, and gate propagation correlation. Spatial adjacency means that within the same error correction cycle, the logical qubit patches covered by the two slices are spatially adjacent and share auxiliary qubits on the boundary. Temporal adjacency means that slices corresponding to two consecutive error correction cycles in the same spatial region are adjacent. Gate propagation correlation means that a two-bit gate operation causes an error to propagate from one qubit to another, resulting in a constraint on the corresponding slice. If any of the above relationships exist between two slices, it indicates that there is a mutual exclusion constraint between them, and an edge connection can be established.
[0130] Since the state of a slice can change, the dynamic constraint graph needs to be updated accordingly. Slices that have already been decoded will no longer participate in the decoding scheduling process, and their corresponding nodes will not occupy any neighboring nodes. Therefore, when the state of a slice changes to the decoding completed state, the corresponding node and the edge connected to that node are deleted from the dynamic constraint graph. After deletion, the neighboring nodes that were previously occupied are released. From the perspective of that neighboring node, if there are no other neighboring nodes besides that node, and its state is occupied, then this edge deletion operation will release the node's occupation constraint on that neighboring node. Therefore, the state of that neighboring node will change to the waiting-to-decode state, meaning that the neighboring node can be scheduled for decoding.
[0131] In addition, when the quantum hardware generates a new syndrome data stream, a new batch of slices will be added to this dynamic constraint graph as new nodes. At the same time, it is necessary to analyze the neighbor relationships between each node and add the corresponding edges.
[0132] This dynamic mechanism ensures that the dynamic constraint graph can accurately reflect the conflict relationships between all undecoded slices at the current moment, without missing new conflicts or having memory occupied by slices that have been deleted or decoded. Therefore, by using this dynamic constraint graph, free slices can be accurately filtered out, and then the first target slice can be filtered out.
[0133] This application can be configured such that, by default, the decoding process is in a steady-state mode, where the first target slice can be selected normally to form a regular task; while when a critical operation is imminent, it enters an emergency mode, selecting the second target slice to form an emergency task; then, in the steady-state mode, in order to achieve a balance between processing backlogged tasks and preventing future operation deadlines, and to efficiently consume the data stream while maintaining a low average latency, the operation steps of prioritizing each of the aforementioned idle slices to obtain a priority score include:
[0134] For each of the aforementioned free slices, determine the second key operation corresponding to that free slice;
[0135] Obtain the operation deadline of the second key operation and calculate the time difference with the current time;
[0136] The decoding urgency of the idle slice is calculated based on the time difference;
[0137] From the dynamic constraint graph, count the number of neighboring nodes of the node corresponding to the free slice;
[0138] The decoding cost efficiency of the idle slice is calculated based on the number of neighboring nodes;
[0139] Weights are assigned to the decoding urgency and decoding cost efficiency respectively, and the priority score is obtained by weighted summation of the decoding urgency and decoding cost efficiency according to the weights.
[0140] Specifically, the relationship between the idle slice and the second key operation is as follows: the slice that must be decoded in order to complete the second key operation is the idle slice. The second key operation can be the same as the first key operation, or it can be a different operation.
[0141] For each idle slice, there are also differences in priority. For example, which idle slices should be processed first to make efficient use of decoding resources and avoid data backlog. Therefore, this application starts from two aspects: decoding urgency and decoding cost efficiency. Decoding urgency is used to measure the urgency of an idle slice before the deadline of its corresponding critical operation. If the decoding of the corresponding idle slice is not completed before the deadline, it will cause the overall decoding to be paused and an idle error correction layer will be inserted until the relevant slice is decoded. Decoding cost efficiency is used to quantify the computational cost-effectiveness of decoding an idle slice. The fewer the neighbor nodes of the idle slice, the smaller the decoding buffer required for the idle slice and the faster the decoding speed. Therefore, it is possible to prioritize those easy and fast slices to maximize the number of slices completed in a unit of time. Thus, the number of neighbor nodes also represents the degree of the idle slice in the dynamic constraint graph.
[0142] The priority score is obtained by weighted summation of these two items, using the following formula:
[0143] ;
[0144] in, Indicates priority score, Indicates an empty slice. Indicates the urgency of decoding. Indicates decoding cost efficiency. As a weight for decoding urgency, For the weights of decoding cost efficiency, these two weights can be set in advance or dynamically adjusted, and must satisfy... .
[0145] The formula for calculating decoding urgency is:
[0146] ;
[0147] in, Indicates a free slice The corresponding deadline for the second critical operation. This indicates the current time, which creates a situation where slices that are close to expiring are likely to be processed first.
[0148] The formula for calculating decoding cost efficiency is:
[0149] ;
[0150] in, This indicates the number of neighboring nodes of the node corresponding to the slice.
[0151] Optionally, the method for calculating decoding urgency can be replaced with other methods, such as calculating based on resource status or error rate feedback: 1) Resource status: For example, whether the backlog length of the decoder buffer is about to exceed a specific safety threshold, or whether the generation rate of the comprehensive data stream is about to reach its peak, and calculate the decoding urgency based on these two situations; 2) Error rate feedback: Triggered based on the real-time monitored logical error rate trend, for example, if the error rate in a certain idle slice area rises abnormally, the decoding urgency of that idle slice needs to be increased to prioritize the elimination of potential error accumulation.
[0152] In addition to the priority scoring method mentioned above, a deep reinforcement learning model can also be used. The dynamic constraint graph is used as input, and the selection of which idle slices are used as actions. The neural network is trained to fit the optimal scheduling strategy to adapt to more complex noisy environments and workloads.
[0153] The steps for assigning weights to the decoding urgency and decoding cost efficiency are explained in detail below:
[0154] Determine the logical qubit to which the idle slice belongs, and determine whether the logical qubit corresponds to the first key operation;
[0155] If not, then the preset first coefficient is used as the weight of the decoding urgency; wherein, the first coefficient is less than the weight of the decoding cost efficiency, and the sum of the first coefficient and the weight of the decoding cost efficiency is 1;
[0156] If so, the high-level quantum algorithm corresponding to the quantum hardware is converted into a low-level instruction stream containing a sequence of logical operations, and the timeline is constructed from the low-level instruction stream; wherein the sequence of logical operations includes the first key operation;
[0157] In the timeline, the error correction period between the idle slice and the first critical operation is determined;
[0158] The error correction cycle based on the interval is weighted according to the decoding urgency and decoding cost efficiency.
[0159] Specifically, existing technologies mostly use fixed weights to calculate priorities, but this calculation is very inflexible. This application sets weights according to the actual situation, and considers that the weights should change dynamically according to the potential threat level of future emergency states corresponding to each idle slice.
[0160] To analyze the likelihood that an idle slice, if not processed within the next M error correction cycles, will be subsequently included in an urgent task, we need to understand the logical qubits of the idle slice and the error correction cycle between the idle slice and the first critical operation. A logical qubit is a virtual bit in fault-tolerant quantum computing; it is not a physical entity, but a protected logical unit encoded by a set of physical qubits using quantum error correction codes. All algorithm-level operations are described at the logical qubit level.
[0161] If a logical qubit does not participate in the first critical operation but only in some non-critical operations, such as Clifford gate operations, then the logical qubit does not correspond to the first critical operation. Treating it as a non-critical bit indicates that it is not in a hurry to be decoded. Accordingly, the decoding urgency is low, so a low weight can be set for the decoding urgency, such as 0.1.
[0162] If a logical qubit is to participate in the first key operation, then that logical qubit corresponds to the first key operation. It is used as the key bit, and a time-related consideration is added. It's understandable that quantum algorithms are typically described in the form of high-level languages or quantum circuit diagrams. The compiler translates this into a sequence of low-level logical operations that quantum hardware can directly execute, including state preparation, Clifford gates, non-Clifford gates, and logical measurements. At this step, the types of all operations and their positions in the instruction stream are determined, thus generating a low-level instruction stream. Then, the first key operation is identified, and the entire low-level instruction stream can be scanned according to preset rules. The criteria for identifying which operations belong to the first critical operation are: whether the operation must force the completion of relevant historical decoding and updating of Pauli frames before execution. Once identified, these operations are marked in the underlying instruction stream. Then, the marked underlying instruction stream is scanned, and the entire algorithm execution process is unfolded in space-time according to the error correction cycle to form a timeline. Each position on the timeline corresponds to a logical definition of a slice. Each slice has definite coordinates on the timeline, including which logical qubit it belongs to, which error correction cycle it is in, and what the corresponding operation type is, etc. Thus, the error correction cycle between the idle slice and the first critical operation can be determined in the timeline.
[0163] A first period threshold can be set. If the error correction period interval is greater than the preset first period threshold, then a preset second coefficient is used as the weight of decoding urgency. The second coefficient is less than the weight of decoding cost efficiency, and the sum of the second coefficient and the weight of decoding cost efficiency is 1. If the error correction period interval is equal to the first period threshold, then the weights of decoding urgency and decoding cost efficiency are both set to 0.5. If the error correction period interval is less than the first period threshold, then a preset third coefficient is used as the weight of decoding urgency. The third coefficient is greater than the weight of decoding cost efficiency, and the sum of the third coefficient and the weight of decoding cost efficiency is 1. The second coefficient > 0.5 > the third coefficient > the first coefficient.
[0164] In addition, the timeline can be built offline, and the building process can be encapsulated in an efficient middleware layer to connect the quantum hardware and the subsequent decoding and scheduling process.
[0165] The method provided in this embodiment of the invention, specifically the process for determining each second target slice required to be decoded to complete the first key operation, is described below:
[0166] The high-level quantum algorithm corresponding to the quantum hardware is converted into a low-level instruction stream containing a sequence of logical operations; wherein the sequence of logical operations includes the first key operation;
[0167] The timeline is constructed from the underlying instruction stream;
[0168] Determine the future slice corresponding to the first key operation from the timeline;
[0169] Starting from the future slice, the slices that are related to the future slice are backtracked on the timeline and identified as associated slices; the associated slices are slices of the syndrome data stream to be decoded generated in real time by the quantum hardware or historical slices generated before the quantum hardware runs.
[0170] Determine whether each of the associated slices has been decoded, and determine each second target slice from the associated slices that have not been decoded.
[0171] Specifically, the underlying instruction flow and timeline have been described previously and will not be repeated here. In addition, the timeline covers the entire process of the quantum algorithm from start to finish. It unfolds the execution flow of the entire algorithm according to the error correction cycle rounds, from the first round to the last round. Therefore, the slices on the timeline are divided into three categories: historical slices, current slices, and future slices, with the current time as a reference. Some historical slices have been decoded, while others are waiting to be assigned decoders, which may result in a backlog. The current slice has just been filled with data, which is the slice in step S1 of this application. The future slice corresponds to data that has not yet been generated and is in an ungenerated state. Therefore, although the future slice has not yet been filled with the synthesized data at the current moment, it already has two key pieces of information on the timeline: its spacetime coordinates and its neighbor (association) relationship. Therefore, the future slice can be used as the search starting point to trace back and traverse the slices that have a neighbor relationship with it on the timeline, i.e., associated slices. These associated slices include the current slice and / or historical slices. Then, the second target slice can be determined from these associated slices. To determine whether an associated slice has been decoded, you can call the lifecycle state machine of the associated slice to determine its current state.
[0172] Specifically, the step of determining each second target slice from each currently undecoded associated slice in the above process includes:
[0173] Determine the estimated decoding completion time for each of the currently undecoded associated slices, and designate slices whose estimated decoding completion time is no later than the operation deadline as schedulable slices;
[0174] Conflict analysis is performed on each of the schedulable slices to determine a set of conflict-free slices, and each schedulable slice in the set of conflict-free slices is taken as a second target slice.
[0175] Specifically, this process aims to enable the precise selection of slices that must be processed immediately from the undecoded slices associated with the first critical operation in emergency mode.
[0176] For each associated slice, there is an estimated decoding completion time. This time depends on the occupancy status of the neighbors, the generation time of the associated slice itself, and the decoding time required for the associated slice to complete decoding from being assigned a decoder. If the associated slice is in an occupied state, it must wait until the neighbor occupying it completes decoding and releases the constraints before it can be assigned a decoder. Therefore, its estimated decoding completion time is the estimated decoding time of the neighbors plus the decoding time required from being assigned a decoder to completion. For future slices, its earliest available decoder is the estimated time for it to be filled with syndrome data plus the time for being assigned a decoder, plus the decoding time required from being assigned a decoder to completion. That is, the sum of the time it takes for its state to change from ungenerated state to waiting for decoding state, the time from waiting for decoding state to being assigned a decoder state, and the time from being assigned a decoder state to being decoded complete state.
[0177] If the earliest allocable time of an associated slice that has not yet been decoded is later than the deadline of the first critical operation, it means that even if a decoder is allocated immediately, it cannot be decoded before the execution of the first critical operation. In this case, such a slice can be excluded. Only slices that can be decoded before the operation deadline can be schedulable. However, there may still be mutual exclusion constraints among these schedulable slices, so conflict analysis is required to filter out a set of slices that do not conflict with each other.
[0178] The step of performing conflict analysis on each of the schedulable slices in the above process to determine the set of conflict-free slices includes:
[0179] The state of each slice is determined, and a dynamic constraint graph is built from each slice based on the state; one slice corresponds to one node, nodes with conflicting constraints are connected by edges, and they are neighbors of each other;
[0180] For each schedulable slice, determine whether there is a neighboring node in the dynamic constraint graph whose state is "allocated decoder" for the corresponding node of the schedulable slice.
[0181] If not, then the schedulable slice is selected as the candidate slice;
[0182] Determine the number of second decoders currently in an idle state, and count the number of edges connecting each candidate slice to other candidate slices in the dynamic constraint graph;
[0183] According to the order of the number of edges from smallest to largest, the nodes corresponding to each candidate slice are traversed sequentially in the dynamic constraint graph. If the current node is not marked as disabled, its corresponding candidate slice is selected into the set of conflict-free slices, and the candidate slices corresponding to all the neighboring nodes of the current node are marked as disabled; if the current candidate slice has been marked as disabled, it is skipped.
[0184] The number of slices in the conflict-free slice set is monitored in real time during the traversal. When the number of slices reaches the number of the second decoder, the traversal stops.
[0185] Specifically, the dynamic constraint graph in this process is the aforementioned dynamic constraint graph, which will not be repeated here. This application introduces the concept of a maximum independent set. First, it is determined whether the neighboring slices of the schedulable slice are not being decoded, so that they are not occupied and can be decoded, thereby filtering out candidate slices. Then, a set of non-conflicting slices is selected, and the number of slices in this set is as large as possible to maximize the parallel utilization of the decoder.
[0186] Since regular tasks have been paused, but there may still be decoders that have been assigned to regular tasks, the actual number of decoders currently available is different from the first number of decoders determined in the previous steps. This number is referred to as the second number of decoders, and this number affects the number of second target slices.
[0187] For each candidate slice, check the number of edges connecting it to other candidate slices in the dynamic constraint graph. This number of edges is the degree of the candidate slice. The higher the degree, the more mutually exclusive constraints the candidate slice has with other candidate slices. The lower the degree, the more independent the candidate slice is and the fewer conflicts it has with other candidate slices. Sort the candidate slices in ascending order of this degree. The slice with the lowest degree will be preferentially included in the set of conflict-free slices because selecting this candidate slice as the second target slice has the least impact on other candidate slices.
[0188] The following is a greedy selection principle: traverse each candidate slice in ascending order of edge count to prioritize slices with fewer conflicts. During the traversal, for each candidate slice, first check if it is marked with a disabled tag. If not, it means that this candidate slice does not conflict with any candidate slices already selected in the conflict-free slice set, so it is added to the conflict-free slice set, and the candidate slices corresponding to its neighboring nodes are disabled. In other words, since this candidate slice has been selected, all candidate slices with mutual exclusion constraints with it cannot be selected anymore, and they are marked as disabled, so they can be skipped in subsequent traversals. If it is marked with a disabled tag, it means that it is a neighboring slice of a candidate slice previously selected in the conflict-free slice set, so it is skipped, and the next candidate slice is traversed.
[0189] It is also necessary to monitor the number of slices in the conflict-free slice set in real time. If the number of slices reaches the second decoder, the traversal stops and the final conflict-free slice set is obtained. Even if there are still untraversed candidate slices, the traversal will not continue because enough slices have been selected to fill all the free decoders. If more slices are selected, there will be no decoders to allocate. If all candidate slices that have not been marked as disabled have been traversed, the traversal process will also end and the final conflict-free slice set will be obtained.
[0190] Furthermore, after determining the respective second target slices required to be decoded to complete the first critical operation, this application also includes the following two operations:
[0191] 1) Considering that while handling urgent tasks can prioritize the rapid decoding of critical second target slices, the parallelism of these second target slices may be limited by time and space constraints. At certain times, the actual number of slices that can be decoded in parallel may be less than the number of second decoders, leading to some decoders being idle. To improve the utilization of decoding resources, this application provides an opportunistic backfilling mechanism, specifically including:
[0192] Predict the total number of decoders required for each of the second target slices at each decoding moment in the decoding process, in order to determine the number of decoders to be reserved at the current moment;
[0193] Obtain the total number of decoders and the number of decoders currently allocated. Calculate the backfill decoder budget for the current moment based on the total number of decoders, the number of decoders currently allocated, and the number of decoders to be reserved.
[0194] From the regular tasks, select the first target slice that has no conflicting constraints with each of the second target slices as the backfill slice;
[0195] The backfill slice is used as the new second target slice.
[0196] Specifically, although the second target slices have been configured as emergency tasks, they will not all start decoding at the same time, but in batches. Therefore, based on the expected start time and expected decoding duration of the second target slices, it can be estimated how many second target slices are being processed at each future decoding moment. Then, the number of second target slices being processed at each decoding moment is the number of decoders that must be reserved for emergency tasks at that decoding moment.
[0197] Next, calculate how many decoders are currently idle and can be used to backfill regular tasks. The calculation method is: total number of decoders - number of currently allocated decoders - number of decoders to be reserved = backfill decoder budget. Then, select slices from regular tasks that do not conflict with the second target slice in the emergency task to ensure that backfilling will not interfere with the processing of the emergency task. Then, add the selected slices as new second target slices to the emergency task. In this way, the remaining decoding resources are utilized as much as possible without affecting the emergency task, which can improve the overall throughput.
[0198] 2) To avoid computational overhead fluctuations caused by frequently triggering emergency mode and rebuilding emergency tasks, this application provides a de-jittering logic that does not unconditionally switch emergency mode every time. Specifically, this includes:
[0199] Determine whether at least one urgent task to be decoded is recorded in the pre-established global flags;
[0200] If so, determine whether the previous decoded emergency task has been completed; if not, directly trigger the construction of the emergency task.
[0201] If the processing is not completed, the second target slices from the previous decoded emergency task are retrieved as the historical slices of each target; if the processing is completed, the construction of the emergency task is triggered directly.
[0202] Determine a new slice in each of the second target slices relative to each of the target historical slices;
[0203] Calculate the proportion of the new slice in each of the second target slices;
[0204] Obtain the build time of the last urgent task that was decoded and processed, and calculate the difference between the current time and the build time;
[0205] If the percentage value is greater than a preset percentage threshold and the difference value is greater than a preset difference threshold, then the step of constructing an emergency task continues; if the percentage value is not greater than the percentage threshold and / or the difference value is not greater than the difference threshold, then an emergency task is not constructed.
[0206] Specifically, a global flag is maintained to record whether an emergency task is currently being decoded. This flag is set when an emergency task is first constructed and cleared after all emergency tasks have been decoded. If the previous emergency task has been fully decoded, it means that the previous emergency has been resolved, and the current trigger is a completely new emergency event, so it is safe to construct a new emergency task.
[0207] If a previous emergency task is still in progress and a new emergency task is detected, it is necessary to determine whether it is worthwhile to adjust the previous emergency task. This requires comparing the overlap range (percentage value) between the second target slice and the target historical slice (the second target slice in the previous emergency task), and dynamically deciding how to handle it based on the percentage value. Second target slices not included in the historical emergency task are considered new slices. If the percentage value is small, it means that only a few sporadic new slices have appeared that need to be handled urgently, and the emergency task currently being processed can basically cover them. If the percentage value is large, it means that the current decoding requirements have changed significantly, and the emergency task currently being processed may no longer be sufficient.
[0208] Simultaneously, it's necessary to combine this with the time frame and calculate the difference between the current time and the build time. This difference indicates how much time has passed since the last emergency task build. A small difference means the emergency task was just built, and its re-triggering might be due to frequent triggering caused by system instability. A large difference indicates that some time has passed since the last emergency task build, making a rebuild reasonable. Therefore, based on this dual condition, the emergency task build step is only executed when both the percentage value and the difference value are greater than the difference threshold. This approach responds to truly significant changes without frequently rebuilding emergency tasks due to minor fluctuations, thus avoiding scheduling overhead oscillations.
[0209] From a more forward-looking perspective, this application clears the way for the large-scale expansion of various mainstream physics platforms such as superconductivity and neutral atoms, accelerates the practical application of general-purpose quantum computers, and enables them to be applied earlier to fields with extremely high computing power requirements, such as drug development, new material design, and complex system simulation, thereby promoting the upgrading and development of related high-tech industries.
[0210] Here are three examples:
[0211] 1) For routine tasks only, the comparison between this application and existing technologies is as follows:
[0212] The relevant configuration for this application is as follows:
[0213] Hardware: The simulation environment is configured with an Intel i9-14900K processor, simulating a small superconducting quantum processor surface code array containing 4 logical qubits; Software: Includes a Litinski-style quantum compiler, static analyzer, and a basic scheduler (with steady-state mode enabled only); Parameter settings: surface code distance d=9, physical error rate... .
[0214] By utilizing the response and construction processing of conventional tasks provided in this application, compared with the sliding window scheduler method used in the prior art, this application successfully achieves parallel processing of multiple slices. Experimental data shows that when the number of decoders is sufficient, this basic scheme can effectively avoid backlog and verify the effectiveness of the spatiotemporal slice model.
[0215] 2) The following is a comparison of the proposed solutions combining routine and emergency tasks in this application:
[0216] The relevant configuration for this application is as follows:
[0217] Hardware: Simulates a fault-tolerant quantum computing environment of a certain scale, containing 28 logical qubits; Resource constraints: Set to a "slow decoding scenario," meaning the decoder speed is 0.9 times the rate at which the complex data stream is generated, and the number of decoders is limited (only twice the number of logical qubits); Settings The threshold for the proportion of emergency task replanning is .
[0218] In this test of a 28-bit adder with severely limited resources (decoder speed slower than data generation), existing techniques (time parallelism) would cause serious logic pauses. However, this application prioritizes critical slice decoding operations through emergency mode, reducing the number of logic pause layers to a very low level and lowering the logic error rate by about 83% compared to the time parallel benchmark, demonstrating its robustness under extreme pressure.
[0219] 3) Applying this application to lattice surgery:
[0220] In scenarios where multi-qubit rotation is frequently used, such as in variable quantum algorithms, this application not only resolves spatial conflicts but also maintains decoder utilization at over 90% through a backfilling mechanism. Experiments show that this application allows the system to use slower, lower-cost decoders (such as low-end FPGAs or general-purpose CPUs) to support large-scale error correction without the need for expensive ultra-high-speed custom hardware. Under the same error rate target, it can reduce the need for the number of physical decoders and significantly reduce the hardware cost of the control layer.
[0221] and Figure 1 Corresponding to the method described above, embodiments of the present invention also provide a decoding and scheduling device for a comprehensive data stream for fault-tolerant quantum computing, used for... Figure 1 The specific implementation of the method, the decoding and scheduling device for the comprehensive data stream of fault-tolerant quantum computing provided in this embodiment of the invention, can be used in computer terminals or various mobile devices, combined with Figure 2 This paper introduces a decoding and scheduling device for a comprehensive data stream in fault-tolerant quantum computing, such as... Figure 2 As shown, the device may include:
[0222] The syndrome data stream segmentation module 10 is used to segment the syndrome data stream to be decoded generated in real time by the quantum hardware into various slices when the quantum hardware is running; the slice is a syndrome data block formed by segmenting the syndrome data stream generated by the quantum hardware on the logical qubit patch or logical operation region according to one or more error correction cycles.
[0223] The judgment module 20 is used to obtain the current time in real time, calculate the time interval between the current time and the preset operation deadline of the first key operation, and determine whether the time interval is less than the preset interval threshold.
[0224] The first target slice filtering module 30 is used to filter out each first target slice from each slice if the time interval is not less than the interval threshold.
[0225] The regular task decoding processing module 40 is used to construct regular tasks from each of the first target slices and schedule the decoder to decode the regular tasks.
[0226] The emergency task decoding processing module 50 is used to pause the regular task when the time interval is less than the interval threshold, determine each second target slice that needs to be decoded to complete the first critical operation, construct an emergency task, and schedule the decoder to decode the emergency task.
[0227] In the above scheme, this application first divides the real-time integrated data stream generated by the quantum hardware into various slices, thus transforming the continuous data stream into independent units that can be flexibly scheduled. This is the premise for achieving dynamic scheduling in this application. Based on this, a real-time sensing mechanism is achieved by acquiring the current time in real time and comparing it with a preset first critical operation deadline. Thus, the scheduling strategy of this application is not predefined like in existing technologies, but can adopt different strategies based on the real-time situation. The setting of the interval threshold provides a clear decision boundary, clearly distinguishing between two states: ample time and time-sensitive conditions, forming two paths. When the time interval is not less than the interval threshold, i.e. When time is ample, routine processing is performed, proactively and on demand selecting the first target slice from various slices to construct routine tasks, thereby improving decoder utilization. However, when the time interval is less than the interval threshold, i.e., when the first critical operation is approaching and time is tight, routine tasks need to be paused, and the second target slice to be decoded to complete the first critical operation is identified to construct emergency tasks. In this way, the scope of emergency task construction is limited to slices directly related to the first critical operation, rather than blindly increasing the priority of all slices. This concentrates decoder resources on the most critical positions, improving the overall utilization of decoding resources and avoiding problems such as decoding blockage, data backlog, and processing delays caused by resource dispersion.
[0228] Furthermore, embodiments of this application provide a decoding and scheduling device for a comprehensive data stream for fault-tolerant quantum computing. Optionally, Figure 3 The hardware block diagram of a decoding and scheduling method for a complex data stream for fault-tolerant quantum computing is shown, with reference to... Figure 3 The hardware structure of a decoding and scheduling device for a comprehensive data stream for fault-tolerant quantum computing may include: at least one processor 01, at least one communication interface 02, at least one memory 03, and at least one communication bus 04.
[0229] In this embodiment, the number of processor 01, communication interface 02, memory 03 and communication bus 04 is at least one, and processor 01, communication interface 02 and memory 03 communicate with each other through communication bus 04.
[0230] Processor 01 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
[0231] Memory 03 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device.
[0232] The memory stores a program that the processor can call. This program executes the following decoding and scheduling method for a comprehensive data stream in fault-tolerant quantum computing:
[0233] When the quantum hardware is running, the syndrome data stream to be decoded generated in real time by the quantum hardware is divided into slices; the slice is a syndrome data block formed by dividing the syndrome data stream generated by the quantum hardware on the logical qubit patch or logical operation region according to one or more error correction cycles.
[0234] The system acquires the current time in real time, calculates the time interval between the current time and the preset deadline for the first key operation, and determines whether the time interval is less than a preset interval threshold.
[0235] If the time interval is not less than the interval threshold, then each first target slice is selected from each slice;
[0236] A regular task is constructed from each of the first target slices, and a decoder is scheduled to decode the regular task.
[0237] When the time interval is less than the interval threshold, the regular task is paused, each second target slice that needs to be decoded to complete the first critical operation is identified, an emergency task is constructed, and the decoder is scheduled to decode the emergency task.
[0238] Optionally, the refinement and extension functions of the program can be referred to the description of the decoding and scheduling method for the syndrome data stream for fault-tolerant quantum computing in the method embodiments.
[0239] This application embodiment also provides a storage medium that can store a program suitable for processor execution. When the program runs, it controls the device where the storage medium resides to execute the following decoding and scheduling method for a comprehensive data stream for fault-tolerant quantum computing, including:
[0240] When the quantum hardware is running, the syndrome data stream to be decoded generated in real time by the quantum hardware is divided into slices; the slice is a syndrome data block formed by dividing the syndrome data stream generated by the quantum hardware on the logical qubit patch or logical operation region according to one or more error correction cycles.
[0241] The system acquires the current time in real time, calculates the time interval between the current time and the preset deadline for the first key operation, and determines whether the time interval is less than a preset interval threshold.
[0242] If the time interval is not less than the interval threshold, then each first target slice is selected from each slice;
[0243] A regular task is constructed from each of the first target slices, and a decoder is scheduled to decode the regular task.
[0244] When the time interval is less than the interval threshold, the regular task is paused, each second target slice that needs to be decoded to complete the first critical operation is identified, an emergency task is constructed, and the decoder is scheduled to decode the emergency task.
[0245] Specifically, the storage medium can be a computer-readable storage medium, which can be an electronic storage device such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM.
[0246] Optionally, the refinement and extension functions of the program can be referred to the description of the decoding and scheduling method for the syndrome data stream for fault-tolerant quantum computing in the method embodiments.
[0247] Furthermore, the functional modules in the various embodiments of this disclosure can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part. If the function is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a live streaming device, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this disclosure.
[0248] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0249] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0250] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A decoding and scheduling method for a complex data stream for fault-tolerant quantum computing, characterized in that, include: When the quantum hardware is running, the syndrome data stream generated in real time by the quantum hardware is divided into various slices; The slice is a comprehensive data block formed by dividing the comprehensive data stream generated by the quantum hardware on the logical qubit patch or logical operation region according to one or more error correction cycles. The system acquires the current time in real time, calculates the time interval between the current time and the preset deadline for the first key operation, and determines whether the time interval is less than a preset interval threshold. If the time interval is not less than the interval threshold, then each first target slice is selected from each slice; A regular task is constructed from each of the first target slices, and a decoder is scheduled to decode the regular task. When the time interval is less than the interval threshold, the regular task is paused, each second target slice that needs to be decoded to complete the first critical operation is identified, an emergency task is constructed, and the decoder is scheduled to decode the emergency task.
2. The method according to claim 1, characterized in that, The step of selecting each first target slice from each of the slices includes: A lifecycle state machine is maintained for each slice to determine the state of the slice in real time; the states in the lifecycle state machine include: not generated, waiting to be decoded, occupied, decoder allocated, and decoding completed. The ungenerated state of each slice is transformed into a waiting-to-decode state, and a dynamic constraint graph is established from each slice based on the state. For each slice in the waiting-to-decode state, in the dynamic constraint graph, the node that has an edge connection with the corresponding node of the slice is regarded as the neighbor node of the corresponding node of the slice. Determine whether the states of the slices corresponding to each neighboring node of the slice are not in the state of having an assigned decoder. If so, then the slice is taken as a candidate slice. Determine whether there are edge connections between each candidate slice, and treat the candidate slices without edge connections as idle slices; The number of idle slices is determined, and the number of first decoders currently in an idle state is also determined. If the number of idle slices is not greater than the number of first decoders, then the idle slices are used as the first target slices. If the number of idle slices is greater than the number of the first decoders, then each idle slice is given a priority score, and the idle slice with a priority score greater than a preset score threshold is taken as the first target slice.
3. The method according to claim 2, characterized in that, The step of establishing a dynamic constraint graph from each slice based on the state includes: Each slice is treated as a node, and for every two slices, it is determined whether there is a mutual exclusion constraint between the two slices; If so, then establish edges between the nodes corresponding to these two slices to form a dynamic constraint graph; For each slice, the lifecycle state machine of the slice is monitored in real time. When the state of the slice changes to the decoding completed state, the corresponding node and the edge connected to the node in the dynamic constraint graph are deleted.
4. The method according to claim 2, characterized in that, The step of prioritizing each of the idle slices to obtain a priority score includes: For each of the aforementioned free slices, determine the second key operation corresponding to that free slice; Obtain the operation deadline of the second key operation and calculate the time difference with the current time; The decoding urgency of the idle slice is calculated based on the time difference; From the dynamic constraint graph, count the number of neighboring nodes of the node corresponding to the free slice; The decoding cost efficiency of the idle slice is calculated based on the number of neighboring nodes; Weights are assigned to the decoding urgency and decoding cost efficiency respectively, and the priority score is obtained by weighted summation of the decoding urgency and decoding cost efficiency according to the weights.
5. The method according to claim 4, characterized in that, The weighting of the decoding urgency and decoding cost efficiency includes: Determine the logical qubit to which the idle slice belongs, and determine whether the logical qubit corresponds to the first key operation; If not, then the preset first coefficient is used as the weight of the decoding urgency; wherein, the first coefficient is less than the weight of the decoding cost efficiency, and the sum of the first coefficient and the weight of the decoding cost efficiency is 1; If so, the high-level quantum algorithm corresponding to the quantum hardware is converted into a low-level instruction stream containing a sequence of logical operations, and the timeline is constructed from the low-level instruction stream; wherein the sequence of logical operations includes the first key operation; In the timeline, the error correction period between the idle slice and the first critical operation is determined; The error correction cycle based on the interval is weighted according to the decoding urgency and decoding cost efficiency.
6. The method according to claim 1, characterized in that, The determination of each second target slice required to complete the first key operation includes: The high-level quantum algorithm corresponding to the quantum hardware is converted into a low-level instruction stream containing a sequence of logical operations; wherein the sequence of logical operations includes the first key operation; The timeline is constructed from the underlying instruction stream; Determine the future slice corresponding to the first key operation from the timeline; Starting from the future slice, the slices that are related to the future slice are backtracked on the timeline and identified as associated slices; the associated slices are slices of the syndrome data stream to be decoded generated in real time by the quantum hardware or historical slices generated before the quantum hardware runs. Determine whether each of the associated slices has been decoded, and determine each second target slice from the associated slices that have not been decoded.
7. The method according to claim 6, characterized in that, The step of determining each second target slice from each associated slice that has not yet been decoded includes: Determine the estimated decoding completion time for each of the currently undecoded associated slices, and designate slices whose estimated decoding completion time is no later than the operation deadline as schedulable slices; Conflict analysis is performed on each of the schedulable slices to determine a set of conflict-free slices, and each schedulable slice in the set of conflict-free slices is taken as a second target slice.
8. The method according to claim 7, characterized in that, The step of performing conflict analysis on each of the schedulable slices to determine the set of conflict-free slices includes: The state of each slice is determined, and a dynamic constraint graph is built from each slice based on the state; one slice corresponds to one node, nodes with conflicting constraints are connected by edges, and they are neighbors of each other; For each schedulable slice, determine whether there is a neighboring node in the dynamic constraint graph whose state is "allocated decoder" for the corresponding node of the schedulable slice. If not, then the schedulable slice is selected as the candidate slice; Determine the number of second decoders currently in an idle state, and count the number of edges connecting each candidate slice to other candidate slices in the dynamic constraint graph; The candidate slices are traversed sequentially in ascending order of the number of edges. For each candidate slice, other candidate slices that are not connected to it by edges are placed into a pre-built set of conflict-free slices. The number of slices in the set of conflict-free slices is monitored in real time until all candidate slices have been traversed or the number of slices reaches the number of the second decoder.
9. The method according to any one of claims 1 to 8, characterized in that, After determining the individual second target slices that need to be decoded to complete the first critical operation, the method further includes: Predict the total number of decoders required for each of the second target slices at each decoding moment in the decoding process, in order to determine the number of decoders to be reserved at the current moment; Obtain the total number of decoders and the number of decoders currently allocated. Calculate the backfill decoder budget for the current moment based on the total number of decoders, the number of decoders currently allocated, and the number of decoders to be reserved. From the regular tasks, select the first target slice that has no conflicting constraints with each of the second target slices as the backfill slice; The backfill slice is used as the new second target slice.
10. The method according to any one of claims 1 to 8, characterized in that, After determining the individual second target slices that need to be decoded to complete the first critical operation, the method further includes: Determine whether at least one urgent task to be decoded is recorded in the pre-established global flags; If so, then determine whether the previous urgent task that was decoded has been completed; If the processing is not completed, the second target slices from the previous decoded emergency task are retrieved as the historical slices of each target. Determine a new slice in each of the second target slices relative to each of the target historical slices; Calculate the proportion of the new slice in each of the second target slices; Obtain the build time of the last urgent task that was decoded and processed, and calculate the difference between the current time and the build time; If the percentage value is greater than a preset percentage threshold and the difference is greater than a preset difference threshold, then the step of constructing an emergency task continues.
11. A decoding and scheduling device for a comprehensive data stream for fault-tolerant quantum computing, characterized in that, include: The syndrome data stream segmentation module is used to segment the syndrome data stream to be decoded generated in real time by the quantum hardware into various slices when the quantum hardware is running; The slice is a comprehensive data block formed by dividing the comprehensive data stream generated by the quantum hardware on the logical qubit patch or logical operation region according to one or more error correction cycles. The judgment module is used to obtain the current time in real time, calculate the time interval between the current time and the preset operation deadline of the first key operation, and determine whether the time interval is less than the preset interval threshold. The first target slice filtering module is used to filter out each first target slice from each slice if the time interval is not less than the interval threshold. A regular task decoding processing module is used to construct regular tasks from each of the first target slices and schedule the decoder to decode the regular tasks; An emergency task decoding processing module is used to pause the regular task when the time interval is less than the interval threshold, determine each second target slice that needs to be decoded to complete the first critical operation, construct an emergency task, and schedule the decoder to decode the emergency task.
12. A decoding and scheduling device for a comprehensive data stream for fault-tolerant quantum computing, characterized in that, Including memory and processor; The memory is used to store programs; The processor is configured to execute the program to implement the various steps of the decoding and scheduling method for a comprehensive data stream for fault-tolerant quantum computing as described in any one of claims 1-10.
13. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the decoding and scheduling method for a complex data stream for fault-tolerant quantum computing as described in any one of claims 1-10.