A quantum controller network communication overhead testing method and system
By extracting remote quantum instruction information and calculating the product of communication hops and time cost, the problem of quantifying communication overhead in distributed quantum computing controller networks is solved, improving the accuracy and efficiency of test results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA GREATWALL TECH GRP CO LTD
- Filing Date
- 2023-03-03
- Publication Date
- 2026-05-22
AI Technical Summary
The lack of existing methods for quantifying the network communication overhead of distributed quantum computing controllers affects the accuracy of network performance optimization and program execution.
By extracting remote quantum instruction information, calculating the communication hop count and multiplying it by a preset time cost as the communication overhead, the communication overhead of the remote quantum instructions is accumulated to obtain the total network overhead, and a buffer queue is used to process the quantum instruction sequence.
This method enables accurate quantification of the network communication overhead of distributed quantum computing controllers, improving the accuracy of test results and the efficiency of result verification for staff.
Smart Images

Figure CN116405416B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of quantum controller technology, and in particular relates to a method and system for testing the network communication overhead of quantum controllers. Background Technology
[0002] Quantum controllers are physical devices that perform high-speed mathematical and logical operations, store and process quantum information according to the laws of quantum mechanics. Due to the powerful parallel computing capabilities of quantum computers, they are able to quickly complete calculations that classical computers cannot, thus showing great promise for development. Quantum controllers include centralized quantum controllers and distributed quantum controller networks. Unlike centralized quantum controllers, which are limited by the manageable qubit resources, distributed quantum controller networks can expand the manageable qubit resources by connecting multiple controllers in a specific structure.
[0003] In distributed quantum controller networks, multiple controllers coordinate the execution of a set of synchronization instructions to achieve periodic synchronization of controller commands. Executing these synchronization instructions incurs communication overhead, which is a key factor in improving the performance of quantum computing controller networks. Higher communication overhead leads to longer total program execution time, thus affecting the fidelity of the quantum program's execution results. Therefore, accurate testing of communication overhead is a prerequisite for optimizing the design of quantum computing control network structures and a crucial step in improving the performance of quantum computing controller networks.
[0004] Current research on communication overhead is still theoretical. For example, it may reduce communication frequency by maximizing the number of locally executed quantum gates to reduce communication overhead. There is no method to quantify and calculate communication overhead. Summary of the Invention
[0005] This application provides a method and system for testing the communication overhead of quantum computing controller networks. By extracting remote quantum instruction information, the communication overhead between quantum computing controller networks is tested to obtain quantitative results.
[0006] In a first aspect, embodiments of this application provide a method for testing the communication overhead of a quantum controller network, including:
[0007] In one possible implementation of the first aspect, a remote quantum instruction is extracted from a sequence of quantum instructions to obtain a remote quantum instruction.
[0008] Calculate the communication hop count of the remote quantum instruction, and use the product of the communication hop count and a preset communication time cost as the communication overhead of the remote quantum instruction;
[0009] The communication overhead of the remote quantum instruction is added to the total network communication overhead calculated previously to obtain the current total network communication overhead.
[0010] Secondly, embodiments of this application provide a quantum controller network communication overhead testing system, comprising:
[0011] The extraction module is used to extract remote quantum instructions from the quantum instruction sequence to obtain remote quantum instructions;
[0012] The first computing module is used to calculate the communication hop count of the remote quantum instruction and use the product of the communication hop count and a preset communication time cost as the communication overhead of the remote quantum instruction.
[0013] The second calculation module is used to add the communication overhead of the remote quantum instruction to the total network communication overhead of the previous calculation to obtain the current total network communication overhead.
[0014] Thirdly, embodiments of this application provide a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the quantum controller network communication overhead testing method as described in any one of the first aspects above.
[0015] Fourthly, embodiments of this application provide a computer-readable storage medium, wherein the computer program, when executed by a processor, implements the quantum controller network communication overhead testing method as described in any one of the first aspects above.
[0016] Fifthly, embodiments of this application provide a computer program product that, when run on a terminal device, causes the terminal device to execute the quantum controller network communication overhead testing method described in any of the first aspects above.
[0017] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here.
[0018] The beneficial effects of the embodiments in this application compared with the prior art are:
[0019] In one embodiment of this application, by traversing and locating the corresponding physical qubit numbering information, and combining it with the analysis of the configuration information of the quantum computing controller network, the communication overhead of the distributed quantum controller network is tested, and accurate quantitative results are obtained.
[0020] In one embodiment of this application, a quantum instruction sequence is obtained and a remote quantum instruction sequence is extracted from it. The remote quantum instruction sequence is placed in a cache queue, and the remote quantum instruction sequence is parsed and the communication overhead is calculated one by one. The error rate is low, which is conducive to the staff to check the results in a timely manner and improve the accuracy of the test results.
[0021] Of course, any product implementing this application does not necessarily need to achieve all of the advantages described above at the same time.
[0022] The above description is merely an overview of the technical solution of this application. In order to better understand the technical means of this invention, it can be implemented according to the contents of the specification. Furthermore, in order to make the purpose, features and advantages of this application more obvious and understandable, specific embodiments of this application are described below. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this application, 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 some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart illustrating the implementation of a quantum controller network communication overhead testing method according to an embodiment of this application;
[0025] Figure 2 This is a flowchart illustrating a method for extracting remote quantum instructions from a sequence of quantum instructions according to an embodiment of this application.
[0026] Figure 3 This application provides a flowchart of a method for calculating the communication hop count of a remote quantum instruction according to an embodiment of the present application.
[0027] Figure 4 This is a flowchart illustrating one method for calculating the number of communication hops between communication nodes.
[0028] Figure 5 This is a schematic diagram of a quantum controller network communication overhead testing system provided in an embodiment of this application;
[0029] Figure 6 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation
[0030] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0031] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0032] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0033] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0034] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0035] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0036] Please see Figure 1 , Figure 1This is a flowchart illustrating the implementation of a quantum controller network communication overhead testing method according to an embodiment of this application. The quantum controller network communication overhead testing method proposed in this embodiment can be applied to a terminal device, which can be a quantum computing controller, a server that establishes a communication connection with the quantum computing controller, or other devices that establish a communication connection with the quantum computing controller and are capable of data processing operations. This embodiment does not impose any restrictions on the specific type of terminal device.
[0037] like Figure 1 As shown, a quantum controller network communication overhead testing method provided in an embodiment of this application may include steps S101 to S103, which are detailed below:
[0038] Step S101: Extract the remote quantum instruction from the quantum instruction sequence to obtain the remote quantum instruction.
[0039] A quantum instruction sequence is a sequence of instructions written in quantum language that can run on a quantum computing controller, thereby enabling support for quantum logic gate operations and ultimately realizing quantum computing. In essence, a quantum instruction sequence is a series of quantum instructions that operate on quantum logic gates in a specific timing order; the timing order refers to the chronological sequence in which individual quantum logic gates are executed. A quantum instruction has one or more opcodes specifying a quantum operation and one or more operands and / or fields specifying the values to be used to perform the quantum operation.
[0040] The quantum instruction sequence referred to in the embodiments of this application can also be a program written in a classical language that represents qubits and their evolution. Qubits, quantum logic gates, etc., related to quantum computing all have corresponding classical code representations.
[0041] Using a quantum computing controller as a terminal device in one embodiment of this application, the quantum instruction sequence can be obtained from the memory of the quantum computing controller.
[0042] For some specific embodiments, please refer to Figure 2 , Figure 2 This is a flowchart illustrating a method for extracting remote quantum instructions from a quantum instruction sequence in a quantum controller network communication overhead testing method provided in this application embodiment. Figure 2 As shown, it may specifically include steps S201 to S202.
[0043] Step S201: Parse the quantum instruction sequence file in sequence to obtain the quantum instructions in the quantum instruction sequence file.
[0044] In one embodiment, a quantum instruction sequence file is stored in a first instruction cache memory, and the quantum instruction sequence file is parsed using a decoder. In another embodiment, an existing decoder can be extended to include microcode support for quantum instructions (e.g., in a microcode ROM) to generate sets of new quantum microinstructions (uops).
[0045] Step S202: Obtain the identification field in the quantum instruction, and determine whether the quantum instruction is a remote quantum instruction based on the identification field. If the value of the identification field is a preset value, then the quantum instruction is confirmed to be a remote quantum instruction.
[0046] As one possible implementation, the identification field can be a single bit in the highest-order bit field of the quantum instruction. That is, a single bit is allocated in the highest-order bit field of the quantum instruction to identify whether the quantum instruction is a remote quantum instruction. When the bit value is 1, it indicates that the quantum instruction is a remote quantum instruction; when the bit value is 0, it indicates that the quantum instruction is a non-remote quantum instruction.
[0047] It should be noted that in the field of quantum computing, due to different implementation schemes, the quantum instruction sets are different in different systems. For example, IBM's Quantum Assembly Language (QASM) and the Quantum Control Instruction Set (QCIS) released by quantum computing cloud platforms use different compilation languages. QCIS is tightly coupled with the physical system; in principle, QCIS and the quantum processing control system are bound together. If there are significant changes in the physical system, such as replacing qubits from transmission line shunted plasma oscillation qubits (Transmon Qubits) with superconducting magnetic flux qubits (Flux Qubits), not all instructions in QCIS will be supported. Therefore, this application does not restrict the specific allocation of the identification field, nor does it restrict the preset values of the identification field.
[0048] Step S102: Calculate the communication hop count of the remote quantum instruction, and use the product of the communication hop count and the preset communication time cost as the communication overhead of the remote quantum instruction.
[0049] It's understandable that the communication hop count is the number of controller output ports a message must pass through. The aforementioned message is a data unit exchanged and transmitted in the network, i.e., a data block that a station sends at one time. A message contains complete data information to be sent, and its length varies greatly, being unlimited and variable. Distributed quantum computing controller networks connect multiple controllers in a specific structure, forming a network containing multiple quantum controller nodes. During network transmission, due to the need to transform data formats for signal transmission, some redundant data is inevitably added. This redundant data is necessary for transmission, and the proportion of this redundant data in the source data is called overhead. Furthermore, multiple quantum controller nodes coordinate the execution of a set of synchronization instructions to achieve periodic synchronization of multiple controller instructions. During this execution, communication overhead is generated.
[0050] For some specific embodiments, please refer to Figure 3 , Figure 3 This is a flowchart illustrating one method for calculating the communication hop count of a remote quantum instruction in the quantum controller network communication overhead testing method provided in this application embodiment. Figure 3 As shown, it may specifically include steps S301 to S302.
[0051] Step S301: Obtain several communication nodes corresponding to the remote quantum command according to the quantum controller node mapping relationship. The quantum controller node mapping relationship includes the mapping relationship between physical qubits and quantum controller nodes.
[0052] It can be understood that a quantum instruction refers to a total quantum circuit, where the total number of qubits in the total quantum circuit is the same as the total number of qubits in the quantum instruction. This can be understood as follows: a quantum instruction can consist of a quantum circuit, measurement operations on the physical qubits in the quantum circuit, a register storing the measurement results, and a controller node (jump instruction).
[0053] Each physical qubit has a unique identification number. The physical qubit identification number in each quantum instruction represents the physical entity of the qubit it is acting on, and there is a one-to-one mapping relationship between the physical qubit identification number and the quantum controller node.
[0054] In one embodiment, the method for obtaining several communication nodes corresponding to a remote quantum instruction includes the following two steps:
[0055] (1) Analyze the remote quantum instruction to obtain the physical qubit number data in the remote quantum instruction;
[0056] (2) Based on the quantum controller node mapping relationship, find the quantum controller node corresponding to each physical quantum bit in the physical quantum bit number data, and confirm the quantum controller node as the communication node corresponding to the remote quantum command.
[0057] Understandably, by parsing remote quantum instructions and obtaining the physical qubit number information in each quantum instruction, the corresponding quantum controller node information can be found, and then subsequent communication overhead can be evaluated.
[0058] It should be noted that the physical entity of the qubit in this application is also known as a quantum bit. Compared to digital computers that store data in one of two finite states (0 or 1), quantum computing uses qubits, which can exist in a superposition of states, typically represented by bracket notation |0> and |1>. Qubits have been implemented using a variety of different techniques that can manipulate and read quantum states. Exemplary physical entities of qubits include, but are not limited to, quantum dot devices (spin-based and space-based), trapped ion devices, superconducting quantum computers, optical lattices, nuclear magnetic resonance computers, solid-state NMR Kane quantum devices, helium-on-electron quantum computers, cavity quantum electrodynamics (CQED) devices, molecular magnet computers, and fullerene-based ESR quantum computers. The underlying principles of the physical entities of qubits in this application can be combined with any type of quantum computer, including but not limited to those listed above.
[0059] Step S302: Calculate the communication hop count of each communication node based on the quantum controller network configuration information, and sum the communication hop counts of all communication nodes as the communication hop count of the remote quantum instruction.
[0060] Unlike the single-hop data transmission method of traditional cellular networks, distributed networks transmit data through multiple hops, and each hop affects the total latency and energy consumption of data transmission. Neighboring nodes in a distributed network determine the range of the next hop, thus determining the range of each hop distance; while the coverage radius of a communication node determines the number of neighboring nodes. For quantum controller networks, the configuration information includes information on all communication nodes.
[0061] For some specific embodiments, please refer to Figure 4 , Figure 4 This is a flowchart illustrating one method for calculating the communication hop count between communication nodes in the quantum controller network communication overhead testing method provided in this application embodiment. Figure 4 As shown, it may specifically include steps S401 to S402.
[0062] Step S401: Obtain the quantum controller network configuration information.
[0063] The quantum controller network configuration information includes the location of all communication nodes in the quantum controller network and the interconnection relationships between all communication nodes.
[0064] Optionally, after reading the quantum controller network configuration information in the processor of the quantum computing controller, the quantum controller network configuration information can be stored in a configuration information cache module for querying the parsed configuration information of the communication nodes. As an example and not a limitation, in actual implementation, the configuration information cache module can be implemented in hardware using static random-access memory (SRAM).
[0065] Step S402: Take each of the communication nodes as the target communication node, calculate the communication hop count of the target communication node based on the location of the target communication node and the connection relationship between all communication nodes, and obtain the communication hop count of each communication node.
[0066] Understandably, in a distributed network communication system, the first node and the last node establish a communication link through multiple intermediate communication nodes. The first node in the communication link can be represented as the starting communication node or the source node, and the last node in the communication link can be represented as the terminating communication node. In a quantum controller network, the node information in the communication link can be obtained from the quantum controller network configuration. After confirming the positions of the target communication node and the terminating communication node, as well as the connection relationships between all communication nodes, the communication hop count of the target communication node can be calculated.
[0067] In one embodiment, the method for calculating the communication hop count of a target communication node includes the following two steps:
[0068] (1) Determine the termination communication node in the remote quantum instruction.
[0069] (2) Taking the target communication node as the starting communication node, based on the location of the target communication node, the location of the ending communication node, and the connection relationship between all communication nodes, count the number of communication nodes that the starting communication node passes through when connecting to the ending communication node, and use the number of communication nodes that pass through as the communication hop count of the target communication node.
[0070] In one embodiment, during the process of obtaining several communication nodes corresponding to a remote quantum instruction based on the quantum controller node mapping relationship, the termination communication node in the remote quantum instruction can be determined. Based on the physical qubit number data parsed from the remote quantum instruction, each obtained communication node is taken as a target communication node. By determining the termination and target communication nodes in the remote quantum instruction, the number of communication nodes traversed when connecting the starting and termination communication nodes can be calculated, which is also the communication hop count of the target communication node.
[0071] In one embodiment, the communication overhead of a remote quantum instruction can be obtained by accumulating a counter. When the first physical qubit number data, i.e., the first qubit, is parsed from the remote quantum instruction, the counter counts the communication hop count of the communication node corresponding to the first qubit, and the count result is A1; when the second physical qubit number data, i.e., the second qubit, is parsed from the remote quantum instruction, the counter counts the communication hop count of the communication node corresponding to the second qubit, and the count result is A2; until the communication node corresponding to the last qubit is counted, the count result is A1. n The total communication overhead is then the cumulative value of all the aforementioned counting results: A1 + A2 + ... + A i +…+A n , where A i This is the count of communication hops for the communication node corresponding to the i-th qubit, where n is a positive integer.
[0072] Step S103: Add the communication overhead of the remote quantum instruction to the total network communication overhead calculated in the previous calculation to obtain the current total network communication overhead.
[0073] Specifically, the communication overhead of remote quantum instructions can be stored in a communication overhead buffer, which can optionally be implemented using SRAM hardware. The communication overhead corresponding to each remote quantum instruction in the communication overhead buffer can be updated by accumulation: when the first remote quantum instruction completes the calculation of its communication overhead, the communication overhead of the first remote quantum instruction is stored in the communication overhead buffer; when the second remote quantum instruction completes the calculation of its communication overhead, the communication overhead of the second remote quantum instruction is added to the result of the communication overhead of the first remote quantum instruction in the communication overhead buffer to obtain the current total network communication overhead; until the last remote quantum instruction completes the calculation of its communication overhead, the communication overhead of the last remote quantum instruction is added to the previously calculated total network communication overhead in the communication overhead buffer to obtain the total network communication overhead of the remote quantum instructions.
[0074] In another embodiment of this application, after obtaining the remote quantum instruction, considering the limitations of computing capacity and response speed, it is necessary to cache the parsed data. Using a cache queue can ensure that the parsed remote quantum instructions enter the computation step in sequence while controlling the cache capacity. The quantum controller network communication overhead testing method provided in this embodiment of the application further includes the following steps:
[0075] (1) Cache the remote quantum instructions into a preset cache queue.
[0076] (2) According to the order in the cache queue, the remote quantum instructions cached in the cache queue are taken one by one as the target remote quantum instructions, the communication hop count of the target remote quantum instructions is calculated, and the product of the communication hop count and the preset communication time cost is taken as the communication overhead of the target remote quantum instructions.
[0077] (3) Add the communication overhead of the target remote quantum instruction to the total network communication overhead calculated in the previous calculation to obtain the current total network communication overhead.
[0078] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0079] Corresponding to the quantum controller network communication overhead test method in the above embodiment, Figure 5 A schematic diagram of a quantum controller network communication overhead test system provided in an embodiment of this application is shown. For ease of explanation, only the parts relevant to the embodiments of this application are shown. (Refer to...) Figure 5 The system includes:
[0080] The extraction module is used to extract remote quantum instructions from the quantum instruction sequence to obtain remote quantum instructions;
[0081] The first computing module is used to calculate the communication hop count of a remote quantum instruction and to use the product of the communication hop count and the preset communication time cost as the communication overhead of the remote quantum instruction.
[0082] The second computation module is used to add the communication overhead of the remote quantum instruction to the total network communication overhead of the previous computation to obtain the current total network communication overhead.
[0083] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0084] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0085] Figure 6 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Figure 6 As shown, the terminal device 6 in this embodiment includes: at least one processor 60 ( Figure 6 (Only one is shown) a processor, a memory 61, and a computer program 62 stored in the memory 61 and capable of running on at least one processor 60. When the processor 60 executes the computer program 62, it implements the steps in any of the above embodiments of the quantum controller network communication overhead test method.
[0086] The terminal device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will understand that... Figure 6 This is merely an example of terminal device 6 and does not constitute a limitation on terminal device 6. It may include more or fewer components than shown in the figure, or combine certain components, or different components, such as input / output devices, network access devices, etc.
[0087] The processor 60 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0088] In some embodiments, memory 61 may be an internal storage unit of terminal device 6, such as the RAM of terminal device 6. In other embodiments, memory 61 may be an external storage device of terminal device 6, such as a plug-in hard drive, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on terminal device 6. Furthermore, memory 61 may include both internal and external storage units of terminal device 6. Memory 61 is used to store operating system, applications, bootloader, data, and other programs, such as program code for computer programs. Memory 61 can also be used to temporarily store data that has been output or will be output.
[0089] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps described in the various method embodiments above.
[0090] This application provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to implement the steps described in the above-described method embodiments.
[0091] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographic device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0092] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0093] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0094] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0095] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0096] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for testing the communication overhead of a quantum controller network, characterized in that, include: The remote quantum instruction is extracted from the quantum instruction sequence to obtain the remote quantum instruction. The quantum instruction sequence is a string of instructions written in quantum language that can run on a quantum computing controller. The quantum instruction sequence is used to support quantum logic gate operations and realize quantum computing. When extracting the long-range quantum instruction from the quantum instruction sequence, the following steps are performed: The quantum instruction sequence is parsed sequentially to obtain the quantum instructions in the sequence. Obtain the identification field from the quantum instruction, and determine whether the quantum instruction is a remote quantum instruction based on the identification field. If the value of the identification field is a preset value, then the quantum instruction is confirmed to be a remote quantum instruction. The communication hop count of the remote quantum instruction is calculated, and the product of the communication hop count and the preset communication time cost is used as the communication overhead of the remote quantum instruction. The communication hop count is the number of controller output ports through which the message needs to pass. The message contains complete data information to be sent. The preset communication time cost is the time cost required for the message to pass through each controller output port. The communication overhead of the remote quantum instruction is added to the total network communication overhead calculated previously to obtain the current total network communication overhead.
2. The quantum controller network communication overhead testing method as described in claim 1, characterized in that, After the step of extracting the long-range quantum instruction from the quantum instruction sequence to obtain the long-range quantum instruction, the method further includes: The remote quantum instructions are cached in a preset cache queue; The step of calculating the communication hop count of the remote quantum instruction and using the product of the communication hop count and a preset communication time cost as the communication overhead of the remote quantum instruction includes: According to the order in the cache queue, the cached remote quantum instructions are taken one by one as target remote quantum instructions, the communication hop count of the target remote quantum instructions is calculated, and the product of the communication hop count and the preset communication time cost is taken as the communication overhead of the target remote quantum instructions. The step of adding the communication overhead of the remote quantum instruction to the total network communication overhead calculated previously to obtain the current total network communication overhead includes: The communication overhead of the target remote quantum instruction is added to the total network communication overhead calculated in the previous calculation to obtain the current total network communication overhead.
3. The quantum controller network communication overhead testing method as described in claim 1, characterized in that, The step of calculating the communication hop count of the remote quantum instruction includes: The remote quantum instruction is obtained by a number of communication nodes according to the quantum controller node mapping relationship, wherein the quantum controller node mapping relationship includes the mapping relationship between physical qubits and quantum controller nodes; The number of communication hops for each communication node is calculated based on the quantum controller network configuration information, and the sum of the communication hops for all communication nodes is taken as the number of communication hops for the remote quantum instruction.
4. The quantum controller network communication overhead testing method as described in claim 3, characterized in that, The step of obtaining the plurality of communication nodes corresponding to the remote quantum instruction according to the quantum controller node mapping relationship includes: Parse the remote quantum instruction to obtain the physical qubit numbering data in the remote quantum instruction; Based on the quantum controller node mapping relationship, the quantum controller node corresponding to each physical qubit in the physical qubit numbering data is found, and the quantum controller node is confirmed as the communication node corresponding to the remote quantum instruction.
5. The quantum controller network communication overhead testing method as described in claim 3, characterized in that, The step of calculating the communication hop count between the communication nodes based on the quantum controller network configuration information includes: Obtain quantum controller network configuration information, which includes the location of all communication nodes in the quantum controller network and the interconnection relationships between all communication nodes; Each of the communication nodes is taken as a target communication node, and the communication hop count of the target communication node is calculated based on the location of the target communication node and the connection relationship between all the communication nodes, so as to obtain the communication hop count of each communication node.
6. The quantum controller network communication overhead testing method as described in claim 5, characterized in that, The step of calculating the communication hop count of the target communication node based on the location of the target communication node and the interconnection relationships between all communication nodes includes: Determine the termination communication node in a remote quantum instruction; Using the target communication node as the starting communication node, based on the location of the target communication node, the location of the ending communication node, and the connection relationships between all communication nodes, the number of communication nodes traversed when the starting communication node connects to the ending communication node is counted, and the number of communication nodes traversed is used as the communication hop count of the target communication node.
7. A quantum controller network communication overhead testing system, characterized in that, include: An extraction module is used to extract remote quantum instructions from a quantum instruction sequence to obtain remote quantum instructions. The quantum instruction sequence is a string of instructions written in quantum language that can run on a quantum computing controller. The quantum instruction sequence is used to support quantum logic gate operations and realize quantum computing. The extraction module is further configured to perform the following steps when extracting the remote quantum instruction from the quantum instruction sequence: parsing the quantum instruction sequence in order to obtain the quantum instructions in the quantum instruction sequence sequentially; obtaining the identification field in the quantum instruction; determining whether the quantum instruction is a remote quantum instruction based on the identification field; if the value of the identification field is a preset value, then confirming that the quantum instruction is a remote quantum instruction. The first computing module is used to calculate the communication hop count of the remote quantum instruction, and to use the product of the communication hop count and the preset communication time cost as the communication overhead of the remote quantum instruction. The communication hop count is the number of controller output ports through which the message needs to pass. The message contains complete data information to be sent. The preset communication time cost is the time cost required for the message to pass through each controller output port. The second calculation module is used to add the communication overhead of the remote quantum instruction to the total network communication overhead of the previous calculation to obtain the current total network communication overhead.
8. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 6.