Communication method of quantum computing task, medium, quantum computing system and node thereof

Through the combined technology of variable-length integer encoding and resumption identification, the redundant problem of binary data streams in quantum computing tasks is solved, the transmission efficiency and accuracy are improved, the storage space requirements are reduced, and the problem caused by redundant data in the existing technology is solved. waste of computing resources and performance bottlenecks.

CN118713792APending Publication Date: 2024-09-27ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410848059.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

In existing communication methods for quantum computing tasks, redundant data in the binary data stream leads to low storage space and low transmission efficiency required for encoding, especially in multi-bit and high-depth quantum computing tasks, resulting in a waste of computing resources and poor performance. bottleneck.

Method used

Variable-length integer coding is used to encode the binary data of the quantum computing task, and redundant data is removed through the specified binary data stream communication protocol, and the resumption identifier is used for data combination during the transmission process to reduce the degree of redundancy and storage space requirements.

Benefits of technology

It effectively reduces the storage space requirements for encoded data, improves the transmission efficiency of data streams, ensures the accurate transmission and correct execution of quantum computing tasks between different computing nodes, and reduces the risk of computing failure caused by parsing errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118713792A
    Figure CN118713792A
Patent Text Reader

Abstract

The invention discloses a communication method of a quantum computing task, a medium, a quantum computing system and nodes thereof, the computing nodes in the quantum computing system comprise a first computing node and a second computing node, the method is applied to the first computing node, and the method comprises the following steps: performing variable-length integer coding on binary data corresponding to the quantum computing task, obtaining target binary data; wherein the binary data is obtained by encoding a quantum computing task according to a data structure defined by a specified binary data flow communication protocol, and variable-length integer encoding is used for removing high-order redundant data in the binary data; and the binary data stream containing the target binary data is transmitted to the second computing node through the binary data stream communication protocol. The redundancy degree of the binary data stream obtained by performing binary coding on the quantum computing task is reduced in a variable-length integer coding mode, so that the storage space required by the coded data is further reduced, and the transmission efficiency of the data stream is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of quantum computing technology, and in particular to a communication method for quantum computing tasks, a computer-readable storage medium, a computing node in a quantum computing system, and a quantum computing system. Background Art

[0002] In quantum computing, usually the relevant information of a quantum computing task needs to be completed on multiple computing platforms to complete the task preprocessing, parsing, communication, compilation and calculation process, among which communication and parsing occupy a large part of the time and performance overhead. In the relevant quantum computing task communication method, the quantum program of the quantum computing task and the computing configuration information of the quantum program can be represented by a complex JSON format string or a quantum instruction set, and then processed on multiple intermediate platforms in the computing process through network requests. This method has shortcomings in data transmission efficiency, processing speed and security. For large-scale quantum computing tasks, significant delays and performance bottlenecks may also occur during network transmission.

[0003] In order to reduce the time and performance overhead required for encoding, transmitting and decoding quantum computing tasks, the existing technology has developed a method of encoding the quantum circuit information and computing configuration information of quantum computing tasks using a binary data stream communication protocol. However, the binary data in the current binary data stream is obtained based on fixed-length coding, and there is still a lot of redundant data information. Therefore, when encoding multi-bit high-depth quantum computing tasks, the above encoding method will still occupy a high amount of memory, resulting in a waste of computing resources.

[0004] Based on this, the present invention provides a communication method for quantum computing tasks based on an improved performance-optimized binary data stream communication protocol, a computer-readable storage medium, a computing node in a quantum computing system, and a quantum computing system to improve related technologies. Summary of the invention

[0005] The purpose of the present invention is to provide a communication method for quantum computing tasks, a computer-readable storage medium, a computing node in a quantum computing system, and a quantum computing system, aiming to reduce the redundancy of a binary data stream obtained by binary encoding a quantum computing task, thereby further reducing the storage space required for the encoded data and improving the transmission efficiency of the data stream.

[0006] The purpose of the present invention is achieved by the following technical solutions:

[0007] In a first aspect, an embodiment of the present invention provides a communication method for a quantum computing task, wherein a computing node in a quantum computing system includes a first computing node and a second computing node, and the method is applied to the first computing node, and the method includes:

[0008] Performing variable-length integer coding on the binary data corresponding to the quantum computing task to obtain target binary data; wherein the binary data is obtained by encoding the quantum computing task according to a data structure defined by a specified binary data stream communication protocol; the variable-length integer coding is used to remove high-order redundant data in the binary data;

[0009] The binary data stream containing the target binary data is transmitted to the second computing node through the binary data stream communication protocol.

[0010] Optionally, performing variable-length integer encoding on the binary data corresponding to the quantum computing task to obtain target binary data includes:

[0011] Divide the binary data corresponding to the quantum computing task into a plurality of encoding segments of preset bits from low bits to high bits; wherein the preset bits are determined according to the data structure defined by the specified binary data stream communication protocol;

[0012] For each coded segment, perform a bitwise AND operation on the coded segment and the preset segment, and write the resume flag corresponding to the coded segment into the highest bit to obtain the target segment;

[0013] The target binary data is obtained by combining the multiple target segments indicated by the resumed transfer identifier.

[0014] Optionally, the quantum computing task includes computing configuration information and quantum circuit information. Before performing variable-length integer encoding on the binary data corresponding to the quantum computing task to obtain target binary data, the method further includes:

[0015] The computing configuration information and quantum circuit information of the quantum computing task are encoded into binary data according to the data structure defined by the specified binary data stream communication protocol.

[0016] Optionally, the calculation configuration information includes one or more of an operation type, a mapping enable flag, a read error mitigation enable flag, an optimization level, a number of lines, and a number of measurements.

[0017] Optionally, the quantum circuit information includes one or more of an initialization operation, a quantum gate operation, a barrier operation, a measurement operation, an end bit operation and a verification operation.

[0018] Optionally, the first computing node includes a plurality of threads, and the method further includes:

[0019] Determine computing configuration information and quantum circuit information of a plurality of quantum computing tasks to be processed, obtain a plurality of encoding tasks, and evenly distribute the plurality of encoding tasks to a plurality of threads in the first computing node;

[0020] According to the data structure defined by the specified binary data stream communication protocol, using the plurality of threads to encode each encoding task into sub-binary data including a sub-check code;

[0021] The multiple sub-binary data indicated by the sub-check codes are aggregated to obtain binary data corresponding to each of the quantum computing tasks, and a check code of the binary data is obtained based on each of the sub-check code encodings, wherein the check code is used to detect whether an error occurs in data transmission between nodes.

[0022] In a second aspect, an embodiment of the present invention provides a communication method for a quantum computing task, wherein a computing node in a quantum computing system includes a first computing node and a second computing node, and the method is applied to the second computing node, and the method includes:

[0023] According to the data structure defined by the specified binary data stream communication protocol and the multiple retransmission identifiers in the binary data stream, the target binary data in the received binary data stream is decoded into quantum circuit information and computing configuration information of the quantum computing task.

[0024] In a third aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements any of the above methods when executed by a processor.

[0025] In a fourth aspect, the present invention provides a computing node in a quantum computing system, the computing node comprising a memory and a processor, the memory storing a computer program, and the processor implementing any one of the above methods when executing the computer program.

[0026] In a fifth aspect, the present invention provides a quantum computing system, comprising a quantum chip and any one of the computing nodes described above, wherein the quantum chip is provided with one or more quantum bits.

[0027] Compared with the prior art, the present invention provides a communication method for a quantum computing task, a computer-readable storage medium, a computing node in a quantum computing system, and a quantum computing system. In this solution, a first computing node can perform variable-length integer encoding on binary data corresponding to a quantum computing task to obtain target binary data, and then transmit a binary data stream containing the target binary data to a second computing node through a specified binary data stream communication protocol; after receiving the binary data stream, the second computing node can decode the target binary data in the received binary data stream into quantum circuit information and computing configuration information of the quantum computing task according to a data structure defined by the binary data stream communication protocol and multiple continuation identifiers in the binary data stream, so as to facilitate subsequent execution of quantum computing tasks.

[0028] This solution encodes and transmits relevant information of quantum computing tasks through a binary data stream communication protocol. Compared with complex JSON format strings or quantum instruction sets, binary data is more compact, saving bandwidth and storage space. Furthermore, this solution not only defines the format of the data structure through a binary data stream communication protocol, ensuring the accurate transmission and correct execution of quantum computing tasks between different computing nodes, thereby reducing the risk of computing failures due to parsing errors; but also reduces the redundancy of the binary data stream obtained by binary encoding of quantum computing tasks through variable-length integer encoding, thereby further reducing the storage space required for encoded data and improving the transmission efficiency of data streams. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 A block diagram of a quantum computing system provided by an embodiment of the present invention;

[0030] Figure 2 A flow chart of a communication method for a quantum computing task provided by an embodiment of the present invention;

[0031] Figure 3 A flowchart of binary encoding of a quantum computing task provided by an embodiment of the present invention;

[0032] Figure 4 A schematic diagram of a quantum circuit provided by an embodiment of the present invention;

[0033] Figure 5 A schematic diagram of a data structure provided by an embodiment of the present invention;

[0034] Figure 6 A specific flow chart of variable-length integer encoding provided by an embodiment of the present invention;

[0035] Figure 7 A schematic diagram of binary data corresponding to an H gate provided by an embodiment of the present invention;

[0036] Figure 8 A schematic diagram of binary data corresponding to an H gate after variable-length integer encoding provided by an embodiment of the present invention;

[0037] Fig. 9 A schematic diagram of a variable-length integer encoding of a two-bit gate provided by an embodiment of the present invention;

[0038] Fig.10 A flowchart of multi-threaded parallel encoding provided by an embodiment of the present invention;

[0039] Fig.11 A structural block diagram of a computing node provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0040] The following will be combined with the drawings in the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0041] See also Figure 1 , Figure 1 It is a structural block diagram of a quantum computing system provided by an embodiment of the present invention.

[0042] The quantum computing system may include a quantum chip and a computing node, wherein one or more quantum bits are arranged on the quantum chip.

[0043] Among them, the computing nodes in the quantum computing system may include one or more of a quantum computing client, a quantum computing cloud platform, a quantum operating system, a quantum computing server, and a quantum computing measurement and control system.

[0044] Specifically, the computing nodes in the quantum computing system are devices or apparatuses that participate in the execution of quantum computing tasks, including but not limited to quantum computing clients, quantum computing cloud platforms, quantum operating systems, quantum computing servers, and quantum computing measurement and control systems. As an example, the first computing node is a quantum computing client, and the second computing node is a quantum computing cloud platform. As another example, the first computing node is a quantum computing cloud platform, and the second computing node is a quantum operating system or a quantum computing server. As another example, the first computing node is a quantum computing server, and the second computing node is a quantum operating system. As another example, the first computing node is a quantum operating system, and the second computing node is a quantum computing measurement and control system.

[0045] The computing nodes in a quantum computing system can be connected through a network. The network is a medium used to provide communication links between various devices and computers connected together in the quantum computing system, including but not limited to the Internet, corporate intranets, local area networks, mobile communication networks and their combinations. The connection method can be wired, wireless communication links or optical fiber cables.

[0046] In some embodiments, the quantum computing system may be a superconducting quantum computing system, and accordingly, the quantum chip may be a superconducting quantum chip, and one or more superconducting quantum bits may be provided on the superconducting quantum chip. The embodiment of the present invention does not limit the number of quantum bits on the quantum chip, for example, it may be 32, 72, 100, 200, etc.

[0047] Quantum chips can include quantum bits and channels for regulating quantum bits. Quantum logic gates are implemented through analog signals. Different combinations of analog signals are applied to quantum bits through channels for regulating quantum bits, thereby realizing quantum circuits with different functions and completing data processing. Therefore, the design of quantum logic functions acting on quantum bits (including the design of whether quantum bits are used or not and the design of the efficiency of each quantum bit) is the key to improving the computing performance of quantum computers, and special designs are required. This is also the uniqueness of quantum algorithms based on quantum logic functions, which is essentially and significantly different from classical algorithms based on classical logic functions. The above-mentioned design for quantum bits is a technical issue that ordinary computing devices do not need to consider or face.

[0048] It should be noted that although some embodiments of the present invention take quantum chips as examples, the present invention can be applied to other quantum computing devices, such as quantum simulators, quantum circuit classical simulators, high-performance cluster servers, etc., and the present invention is not limited to this.

[0049] In quantum computing systems, the communication methods for quantum computing tasks have been developed to a certain extent. Specifically, the traditional communication method uses complex JSON format strings or instruction sets to represent quantum circuit information and computing configuration information, resulting in a huge amount of data and increasing the performance overhead of network transmission. In addition, the parsing of JSON format strings or instruction sets requires relatively high computing costs, especially when data is frequently transmitted between computing platforms, the parsing complexity also becomes a bottleneck.

[0050] Therefore, in the multi-platform communication process of quantum computing tasks, encoding, decoding and transmitting the quantum circuit information and computing configuration information of quantum computing tasks through binary stream data is an effective solution. Since binary stream data is more compact and has higher transmission efficiency than text data, it can reduce the communication overhead. The decoded quantum program can be directly executed at the receiving end, reducing the time for recompilation or parsing; and the use of binary stream data encoding can more flexibly adapt to the characteristics of different platforms and be compatible with quantum computing environments on different platforms. Furthermore, through binary stream transmission, encryption and other means can be used to improve data security and ensure the confidentiality of quantum computing tasks; the encoding rules can also be expanded according to needs to adapt to the development and changes of future quantum computing platforms. In general, through this solution, the efficient transmission of quantum computing tasks between different platforms is basically achieved, and seamless communication between platforms is achieved.

[0051] However, the binary data in the current binary data stream is obtained based on fixed-length coding, and there is still a lot of redundant data information. Therefore, when encoding multi-bit high-depth quantum computing tasks, the above encoding method will still occupy a high amount of memory, resulting in a waste of computing resources. Therefore, it is necessary to improve the performance of the communication method for quantum computing tasks based on the above binary data stream communication protocol to reduce the redundancy and storage space of the encoded binary data stream, thereby improving the transmission efficiency.

[0052] Based on this, the present invention proposes a communication method for quantum computing tasks, a computer-readable storage medium, a computing node in a quantum computing system, and a quantum computing system.

[0053] See also Figure 2 , Figure 2 A communication method for a quantum computing task provided in an embodiment of the present invention, wherein a computing node in a quantum computing system includes a first computing node and a second computing node, and the method is applied to the first computing node, and the method includes the following steps:

[0054] Step 201, performing variable-length integer encoding on the binary data corresponding to the quantum computing task to obtain target binary data;

[0055] The binary data is obtained by encoding the quantum computing task according to a data structure defined by a specified binary data stream communication protocol; and the variable-length integer encoding is used to remove high-order redundant data in the binary data.

[0056] Specifically, the embodiments of the present invention do not limit the task types of quantum computing tasks, which may include, for example, noise learning, error mitigation, expectation computing, quantum state tomography computing, quantum optimization computing, quantum simulation computing, quantum cryptographic analysis computing, and quantum machine learning. Similarly, the embodiments of the present invention do not limit the application scenarios of quantum computing tasks, which may be, for example, biochemistry, quantum finance, quantum education, big data, artificial intelligence, information security, engineering design, etc.

[0057] In specific quantum computing tasks, quantum programs refer to data structures constructed by quantum programming frameworks according to specified rules. During the execution of quantum computing tasks, the instruction set corresponding to the data structure needs to be transmitted. The instruction set is a sequence of instructions written in quantum language that can be run on quantum computers, which supports quantum gate operations and ultimately realizes quantum computing. Specifically, the instruction set is a series of instruction sequences that operate quantum gates in a certain time sequence. Quantum circuits, as a manifestation of quantum programs, are also called quantum logic circuits. They are commonly used general quantum computing models, representing circuits that operate quantum bits under abstract concepts. They are composed of quantum bits, circuits (timelines), and various quantum gates. Finally, the results often need to be read out through measurement operations. Unlike traditional circuits that are connected by metal wires to transmit voltage or current signals, quantum circuits can be seen as connected by time, that is, the state of the quantum bit evolves naturally over time. In this process, it follows the instructions of the Hamiltonian operator until it encounters a quantum gate and is operated. The time sequence is the time sequence in which a single quantum gate is executed.

[0058] It should be noted that in classical computing, the most basic unit is the classical bit, and the most basic control mode is the logic gate, which can achieve the purpose of controlling the circuit through the combination of logic gates. Similarly, the way to process quantum bits is quantum gates (i.e., quantum logic gates). Using quantum gates, quantum states can evolve. Quantum gates are the basis of quantum circuits. Quantum gates include: single-qubit gates, such as Hadamard gates (H gates, Hadamard gates), Pauli-X gates (X gates), Pauli-Y gates (Y gates), Pauli-Z gates (Z gates), RX gates, RY gates, RZ gates, etc.; multi-qubit gates, such as CNOT gates, CR gates, iSWAP gates, Toffoli gates, etc. Quantum gates are generally represented by unitary matrices, and unitary matrices are not only in matrix form, but also an operation and transformation. The general function of quantum gates on quantum states is to calculate by multiplying the unitary matrix on the left by the matrix corresponding to the right vector of the quantum state.

[0059] With the continuous development of quantum computing technology, the potential computing power of quantum computing systems has provided new possibilities for solving complex computing problems. In the process of converting the theoretical advantages of quantum computing into practical applications, it is necessary to efficiently and accurately transmit and process the relevant information of quantum computing tasks between the computing nodes of the quantum computing system. For quantum computing tasks, the relevant information that needs to be communicated can be divided into two parts, for example, the first part is quantum circuit information, and the second part is computing configuration information (such as task configuration parameters, chip parameters, and runtime configuration parameters).

[0060] As an implementation method of an embodiment of the present invention, the quantum computing task may include computing configuration information and quantum circuit information, such as Figure 3 As shown, before performing variable-length integer encoding on the binary data corresponding to the quantum computing task to obtain target binary data, the method further includes the following steps:

[0061] Step 301, encoding the computing configuration information and quantum circuit information of the quantum computing task into binary data according to the data structure defined by the specified binary data stream communication protocol.

[0062] Specifically, the calculation configuration information may include one or more of an operation type, a mapping enable flag, a read error mitigation enable flag, an optimization level, a number of lines, and a number of measurements.

[0063] Accordingly, the quantum circuit information may include one or more of an initialization operation, a quantum gate operation, a barrier operation, a measurement operation, an end bit operation and a verification operation.

[0064] In the solution provided by the embodiment of the present invention, the quantum computing task involves multiple quantum computing processes, such as from the user's local quantum computing client to the quantum computing cloud platform, from the quantum computing cloud platform directly to the quantum operating system or through the quantum computing server to the quantum operating system, from the quantum operating system to the quantum computing measurement and control system, etc. Then, if a specific quantum computing task A needs to be communicated, for example, its corresponding quantum circuit can be as follows Figure 4 shown.

[0065] In one implementation, the relevant technology can convert the quantum circuit information of the quantum computing task A into a quantum instruction set as shown below:

[0066] QINIT 3

[0067] CREG 3

[0068] H q[0]

[0069] U2 q[1],(2,3)

[0070] U2 q[0],(2,3)

[0071] U3 q[1],(2,3,4)

[0072] U3 q[0],(2,3,4)

[0073] BARRIER q[0],q[1],q[2]

[0074] TOFFOLI q[0],q[1],q[2]

[0075] The computing configuration information of quantum computing task A includes whether to enable line mapping, whether to enable line optimization (including read error mitigation, for example), optimization level, number of lines, number of measurements, etc. The related technology can also convert the computing configuration information of quantum computing task A into a quantum instruction set, as shown below:

[0076] config.open_mapping = True

[0077] config.open_error_mitigation=False

[0078] config.optimization_level=2

[0079] config.circuits_num=5

[0080] config.shots=1000

[0081] In another embodiment, in addition to the quantum instruction set, the related technology can also convert the relevant information of a quantum computing task into a JSON format string for transmission. As an example, the relevant information of a quantum computing task B is packaged into the following JSON format string:

[0082] {"code":"QINIT 4\nCREG 4\nH q[0]\nH q[1]\nH q[2]\nH q[3]\nCZ q[1],q[3]\nMEASURE[0],c[0]\nMEASUREq[1],c[1]",qubitNum":4,"classicalbitNu m":4,"taskName":"QPandaExperiment","chipId":2,"isAmend":0,"mappingFlag":0,"circuitOptimization":0,"measureType":1,"QMachineType":5,"shot":1000}

[0083] It can be seen that in the relevant technology, complex JSON format strings or quantum instruction sets can be used to represent quantum circuit information and computing configuration information, but such processing methods result in a huge amount of data and increase the performance overhead of network transmission. Since the data representation is relatively redundant, the bandwidth required for network transmission is large, resulting in low communication efficiency, which is particularly significant in quantum computing, because quantum computing tasks usually require collaborative processing between multiple computing platforms. In addition, the parsing of JSON format strings or quantum instruction sets requires relatively high computing costs, especially when data is frequently transferred between computing platforms, the parsing complexity becomes a bottleneck.

[0084] In order to improve the relevant technology, the quantum circuit information and computing configuration information of the quantum computing task can be encoded and transmitted in a binary data format. The relevant information of the quantum computing task is encoded as a binary digital sequence consisting of 0 and 1 (i.e., binary data). This encoding method provides a more compact and efficient data representation. Compared with the string transmission method, binary data is usually more compact than text strings, and fewer bits can be used to represent the same information, which can save bandwidth and storage space in network transmission and storage. Because binary data is more compact, less bandwidth is required for transmission, which is an important advantage for network communication, especially in the case of large-scale data transmission. Parsing binary data is usually more efficient than parsing text strings. The structure of binary data is more direct, and there is no need to deal with character encoding and separators like text parsing. Binary encoding allows a variety of data types to be represented more directly, including integers, floating-point numbers, and byte sequences, which can reduce the data conversion overhead during encoding and decoding. Binary encoding is not affected by character encoding and format when processing binary data, and it is easier to ensure the integrity and consistency of data.

[0085] Specifically, a communication protocol designed specifically for quantum computing can be used, which is called the binary data stream communication protocol. The protocol supports encoding in the form of binary data. The encoded information may include, for example, the following: the number of quantum bits and the number of classical bits requested for quantum computing tasks; quantum gates, including complex quantum gate operations, such as U3, U4, CU, etc. These operations may require multiple quantum gate parameters in floating point format; BARRIRE operations, which can act on multiple quantum bits. The binary data stream communication protocol specifies how to encode and transmit data in binary format, aiming to achieve efficient and secure transmission of data between computing nodes. Computing configuration information refers to the configuration item information required to perform quantum computing tasks, such as optimization level, number of lines, and number of measurements.

[0086] In one embodiment, the length of the data structure (i.e., the number of bits of the binary number) can be 64 bits, including dedicated areas for different functions for writing 64-bit binary data. As an example, when the relevant information of the quantum computing task is represented in the form of a quantum instruction set, each instruction can be encoded as one or more 64-bit binary data, that is, "fixed length encoding". In this communication protocol, the binary data stream communication protocol can be applicable to quantum computing systems with a number of quantum bits not exceeding 256.

[0087] Therefore, according to the data structure defined by the specified binary data stream communication protocol, the first computing node can encode the computing configuration information and quantum circuit information of the quantum computing task to be encoded into multiple binary data.

[0088] For example, when the quantum gate operation corresponding to the quantum circuit information is encoded into binary data, the data structure defined by the corresponding binary data stream communication protocol can be as follows: Figure 5 As shown, the white numbers in the figure are the number of digits in the corresponding area.

[0089] In some embodiments, the specified binary data stream communication protocol is used to define a data structure of binary data corresponding to a quantum gate operation, and the data structure may include an operation type area, a continuation identification area, a conjugate transposition identification area, a quantum bit identification area, and a quantum gate parameter area. The process of encoding the quantum circuit information of the quantum computing task into binary data includes:

[0090] Step S1, determining the number N of binary data required to encode the quantum gate operation based on the number of quantum gate parameters corresponding to the quantum gate operation and the number of quantum gate parameter regions in the data structure, where N is a positive integer;

[0091] Step S2, writing the operation type, conjugate transposition flag, continuation flag, quantum bit flag and binary representation of quantum gate parameters corresponding to the quantum gate operation into corresponding areas of the N binary data having the first data structure to form N binary data corresponding to the quantum gate operation.

[0092] The quantum gate operation may be one of a plurality of quantum logic gates in a quantum circuit. The operation type corresponds to the operation type region, the continuation flag corresponds to the continuation flag region, the conjugate transposition flag corresponds to the conjugate transposition flag region, and the rest are analogous, which will not be described in detail in this article.

[0093] The binary representations of multiple quantum gate parameters corresponding to the quantum gate operation are sequentially written into N binary data (the binary representation of each quantum gate parameter is only written into one of the quantum gate parameter areas of one of the binary data), and the operation type, continuation flag, conjugate transposition flag and quantum bit flag corresponding to the quantum gate operation are respectively written into each binary data (that is, the operation type, continuation flag, conjugate transposition flag and quantum bit flag written into these N binary data can be the same). As an example, in the above data structure, the operation type area, the continuation flag area, the conjugate transposition flag area, the quantum bit flag area and the quantum gate parameter area can be arranged from right to left. The number of quantum bit flag areas can be one or more, and the number of quantum gate parameter areas can be one or more.

[0094] The operation type corresponding to the quantum gate operation is the quantum gate type, which is used to define the quantum gate to be executed and can represent a variety of different quantum gate types. As an example, the binary representation of the operation type includes, for example, 6 binary bits, that is, a 6-bit operation type area can be written, which can specifically represent any of the 64 quantum gate operations (2 6 =64).

[0095] The binary representation of the continuation identification corresponding to the quantum gate operation includes, for example, 1 binary bit, i.e., 0 or 1, which can be written into the 1-bit continuation identification area. For example, when executing the corresponding writing of the quantum gate operation, if the binary representation of the continuation identification written into the current binary data is 0, it means that the next binary data does not belong to the current quantum gate operation. If the binary representation of the continuation identification written into the current binary data is 1, it means that the next binary data belongs to the current quantum gate operation. As an example, the continuation identification area can be located at the rightmost side of the first data structure except for the operation type area. When the continuation identification of the previous binary data is 1, the quantum gate parameters carried by the current binary data are the data of the quantum gate operation corresponding to the previous binary data, and the data in other areas are the same as the previous binary data.

[0096] The conjugate transposition flag corresponding to the quantum gate operation is used to determine whether the current quantum gate is a dagger, that is, whether to perform a conjugate transposition operation on the current quantum gate. The binary representation of the conjugate transposition flag includes, for example, 1 binary bit, that is, 0 or 1, which can be written into the 1-bit conjugate transposition flag area. As an example, 0 indicates that the conjugate transposition operation is not performed, and 1 indicates that the conjugate transposition operation is performed.

[0097] The function of the quantum bit identification corresponding to the quantum gate operation is to identify the quantum bit involved in the quantum gate operation. The binary representation of the quantum bit identification includes, for example, 8 binary bits, which can be written into an 8-bit quantum bit identification area. Since the quantum gate operation may involve one or more quantum bits, in the first data structure, the number of quantum bit identification areas can be one or more, used to write one or more quantum bit identifications. These quantum bit identification areas are independent of each other, and the number of bits in each quantum bit identification area can be the same or different. As an example, the number of quantum bit identification areas is 3, and the number of bits in each quantum bit identification area is the same, which is 8. Then, these 3 quantum bit identification areas can be used to write 3 quantum bit identifications, and each quantum bit identification area can represent 256 different quantum bit identifications (2 8 =256). In practical applications, when the quantum gate is a single-qubit gate, the qubit corresponding to the qubit identifier of the first qubit identifier region can be used as the target bit; when the quantum gate is a single-control gate, the qubit corresponding to the qubit identifier of the first qubit identifier region can be used as the control bit, and the qubit corresponding to the qubit identifier of the second qubit identifier region can be used as the target bit; when the quantum gate is a multi-control gate, such as a Toffoli gate, the qubit corresponding to the qubit identifier of the first qubit identifier region and the second qubit identifier region can be used as the control bit, and the qubit corresponding to the qubit identifier of the third qubit identifier region can be used as the target bit.

[0098] The quantum gate parameters corresponding to the quantum gate operation have the function of transmitting the quantum gate parameters required for the quantum gate operation. The quantum gate parameters are used to represent the parameters involved in the quantum gate operation, such as the angle of the rotating gate. The quantum gate parameters can be floating point numbers. As an example, the quantum gate parameters are half-precision floating point numbers. The quantum gate parameters can reduce the amount of data while maintaining sufficient accuracy and optimize storage and transmission efficiency. The binary representation of the quantum gate parameters, for example, includes 16 binary bits, which can be written into a 16-bit quantum bit identification area. In the first data structure, the number of quantum gate parameter areas can be one or more, which are used to write one or more quantum gate parameters corresponding to the quantum gate operation. These quantum gate parameter areas are independent of each other, and the number of bits in each quantum gate parameter area can be the same or different. As an example, the number of quantum gate parameter areas is 2, and the number of bits in each quantum gate parameter area is the same, both 16.

[0099] As an example, in the above data structure, the number of quantum bit identification areas is 3, the number of quantum gate parameter areas is 2, the operation type area, the conjugate transposition identification area, the continuation identification area, the first quantum bit identification area, the second quantum bit identification area, the third quantum bit identification area, the first quantum gate parameter area and the second quantum gate parameter area are arranged from right to left, and their bit numbers are 6, 1, 1, 8, 8, 8, 16, 16 respectively, and the total length of the first data structure is 64 bits.

[0100] In some embodiments, when the number of quantum gate parameters corresponding to the quantum gate operation is not greater than the number of quantum gate parameter regions in the above data structure, N=1; when the number of quantum gate parameters corresponding to the quantum gate operation is greater than the number of quantum gate parameter regions in the above data structure, N>1. In other words, different quantum gate operations may be encoded as different amounts of binary data.

[0101] In the above embodiment, the number of quantum gate parameters corresponding to the quantum gate operation is, for example, 0, 1, 2, 3, etc., the number of quantum gate parameter regions in the data structure is, for example, 1, 2, 3, etc., and N is, for example, 1, 2, 3, 4, etc. As an example, the quantum gate operation is a quantum gate with parameters and the number of quantum gate parameters is, for example, 3, the number of quantum gate parameter regions in the above data structure is, for example, 2, and N is, for example, 2, that is, the quantum gate operation can be encoded as 2 binary data, for example, the binary representation of the first quantum gate parameter and the second quantum gate parameter can be written into the first binary data, and the binary representation of the third quantum gate parameter can be written into the second binary data. When N is 2, the binary representation of the continuation flag written into the first binary data is, for example, 1 (indicating that continuation is required), and the binary representation of the continuation flag written into the second binary data is 0 (indicating that continuation is not required).

[0102] Correspondingly, other operations included in the quantum circuit information, such as initialization operation, barrier operation, measurement operation, end bit operation and verification operation, can be encoded into one or more binary data according to multiple different data structures defined by the specified binary data stream communication protocol. Similarly, the calculation configuration information including operation type, mapping start flag, read error mitigation start flag, optimization level, number of circuits and number of measurements can also be encoded into a 64-bit data structure, and the specific identification areas of each data structure will not be repeated here.

[0103] In practical applications, in order to achieve alignment between binary data corresponding to different operations and make the binary data corresponding to different operations have the same length (or the number of bits of the binary number), the above data structure may also include a blank identification area, and the number of blank identification areas may be one or more, and the present invention does not impose any restrictions on this.

[0104] For example, the binary representation of the operation type in the calculation configuration information includes, for example, 6 binary bits, which can be written into the 6-bit operation type area. The binary representation of the mapping enable flag in the calculation configuration information includes, for example, 1 binary bit, that is, 0 or 1, which can be written into the 1-bit mapping enable flag area, where 0, for example, indicates that mapping is not enabled, and 1, for example, indicates that mapping is enabled. The binary representation of the read error mitigation enable flag in the calculation configuration information includes, for example, 1 binary bit, that is, 0 or 1, which can be written into the 1-bit read error mitigation enable flag area, where 0, for example, indicates that read error mitigation is not enabled, and 1, for example, indicates that read error mitigation is enabled. The binary representation of the optimization level in the calculation configuration information includes, for example, 4 binary bits, which can be written into the 4-bit optimization level area. The binary representation of the blank flag in the calculation configuration information includes, for example, 4 binary bits, which can be written into the 4-bit blank flag area. The binary representation of the number of lines in the calculation configuration information includes, for example, 16 binary bits, which can be written into the 16-bit number of lines area. The binary representation of the number of measurements in the calculation configuration information includes, for example, 32 binary bits, which can be written into the 32-bit number of measurements area.

[0105] Therefore, in the data structure corresponding to the calculation configuration information, the operation type area, the mapping start identification area, the reading error mitigation start identification area, the optimization level area, the blank identification area, the line quantity area and the measurement number area are arranged from right to left, and their bit numbers are 6, 1, 1, 4, 4, 16, and 32 respectively. The total length of the data structure is 64 bits, which is consistent with the number of bits (64 bits) of the data structure corresponding to the above-mentioned quantum gate operation, that is, "fixed length encoding" is realized.

[0106] As an implementation method of the embodiment of the present invention, Figure 6 As shown, the step 201 of performing variable-length integer encoding on the binary data corresponding to the quantum computing task to obtain target binary data may include the following steps:

[0107] Step 211, dividing the binary data corresponding to the quantum computing task into a plurality of code segments of preset bits from low to high bits;

[0108] The preset number of bits is determined according to a data structure defined by the specified binary data stream communication protocol.

[0109] Step 2012: for each coded segment, perform a bitwise AND operation on the coded segment and the preset segment, and write the resume flag corresponding to the coded segment into the highest bit to obtain the target segment.

[0110] Step 2013: combine the multiple target segments indicated by the resume flag to obtain the target binary data.

[0111] Specifically, through the data structure defined by the above-specified binary data stream communication protocol, the first computing node has encoded the computing configuration information and quantum circuit information of the quantum computing task into multiple binary data. Then, by performing variable-length integer encoding on the binary data corresponding to the quantum computing task, the high-order redundant data in the above-mentioned multiple binary data can be removed, thereby further reducing the storage space required for the encoded data and improving the transmission efficiency of the data stream.

[0112] For example, in a quantum circuit of a quantum computing task, there is a quantum gate operation as follows: the H gate acts on the 0th quantum bit, then, Figure 7 The 64-bit data shown is used to characterize the quantum gate operation. Among them, the binary number corresponding to the operation type identifier of the H gate is 000010, and the operation target bit of the H gate, that is, the binary number corresponding to the 0th quantum bit is 00000000, abbreviated as 00.00. This quantum gate operation does not require conjugate transposition operation and continuation, and its corresponding areas are filled with 0. Similarly, this quantum gate operation has no control bits and quantum gate parameters, so the corresponding areas can be filled with blank identifiers of 00.00.

[0113] It can be seen that in the binary data encoded by the quantum gate operation, the high bits are all 0, that is, there is a lot of redundant data. Therefore, when the fixed-length encoding is performed on the multi-bit high-depth quantum circuit as above, the wasted memory is very huge.

[0114] Furthermore, the above binary data can be processed using variable-length integer coding. In a specific implementation, the variable-length integer coding can be Varint coding, which uses an indefinite number of bytes to represent an integer to save space. Varint coding is mainly used to effectively encode non-negative integers in a limited storage space, especially for small integers, it can provide high coding efficiency. The coding algorithm of variable-length integer coding can include the following process:

[0115] Integer segmentation: Varint encoding can be performed by dividing an integer into multiple segments of a preset number of bits. The highest bit of each segment is used as a continuation bit to indicate whether there are subsequent segments. The length of each segment (i.e., the number of bits of the binary number) can be determined based on the data structure defined by the specified binary data stream communication protocol. For example, in the above Figure 7 As shown, in the 64-bit binary data corresponding to the H-gate operation acting on quantum bit No. 0, the preset number of bits can be 8, so that 8 coding segments can be obtained by dividing from low to high bits, where the highest bit of each coding segment is the continuation bit. For each coding segment, if there are other segments after the current segment, the highest bit can be set to 1, indicating that there are other subsequent segments; otherwise, the highest bit can be set to 0, indicating the end of encoding.

[0116] Shift and bitwise AND operation: Furthermore, for each coding segment, the coding segment can be bitwise ANDed with the preset segment 0X7F (ie, binary number 01111111), and the resume flag corresponding to each coding segment is written into the highest bit to obtain 8 target segments.

[0117] Combined coded segments: The codes of each segment are combined in order to obtain the final Varint code. That is, the multiple target segments indicated by the resume identifier are combined to obtain the target binary data. Among them, the multiple target segments indicated by each resume identifier 1 can be encoded continuously first, and then stopped after encoding a target segment with a resume identifier 0, and the above multiple target segments are combined in the coding order to obtain the target binary data.

[0118] For example, for the above Figure 7 As shown in the binary data, it can be seen that only the rightmost 8-bit binary number needs to be encoded to obtain the target binary data. The target binary data can be specifically Figure 8 That is, for the H gate acting on quantum bit 0, only 8 binary bits are needed for encoding, which is 56 binary bits less than the original method.

[0119] For another example, for binary coded data corresponding to a two-bit gate operation, the above variable-length integer coding optimization method can also be used. For example, after the binary data corresponding to the CNOT gate operation CNOT(0,1) is encoded using the original binary coding method, Varint encoding is performed on it, and the target binary data obtained can be as follows: Fig. 9 As shown, it can be seen that the Varint encoding method can also reduce the 24-bit binary number used to encode the second control bit and the first and second quantum gate parameters, thereby reducing memory waste and improving encoding efficiency.

[0120] As can be seen from the above examples, the variable-length integer encoding such as Varint encoding focuses on optimizing the high-order 0s in the original encoded data. For large quantum circuits, it can effectively reduce the redundant data of each operation. Correspondingly, for other quantum gate operations, as well as the initialization operation, barrier operation, measurement operation, end bit operation and verification operation in the embodiment of the present invention, the corresponding binary data can use the above variable-length integer encoding to remove the high-order redundant data, which will not be repeated here.

[0121] Step 202: Transmit the binary data stream containing the target binary data to the second computing node through the binary data stream communication protocol.

[0122] As an implementation manner of an embodiment of the present invention, the method is applied to the second computing node, and the method may include the following steps:

[0123] Step 301, according to the data structure defined by the specified binary data stream communication protocol and multiple retransmission identifiers in the binary data stream, decode the target binary data in the received binary data stream into quantum circuit information and computing configuration information of the quantum computing task.

[0124] Among them, the computing nodes in the quantum computing system may include one or more of a quantum computing client, a quantum computing cloud platform, a quantum operating system, a quantum computing server, and a quantum computing measurement and control system.

[0125] In step 301, in the process of decoding binary data into quantum circuit information and computing configuration information of a quantum computing task, the binary data can be decoded according to the data structure used in the corresponding encoding process and multiple retransmission identifiers in the binary data stream to achieve restoration of the quantum circuit information and computing configuration information. After knowing the encoding method, those skilled in the art can achieve the corresponding decoding function, which will not be described in detail here.

[0126] It can be seen that in the scheme provided by the embodiment of the present invention, the first computing node can perform variable-length integer encoding on the binary data corresponding to the quantum computing task to obtain the target binary data, and then transmit the binary data stream containing the target binary data to the second computing node through the specified binary data stream communication protocol; after the second computing node receives the binary data stream, it can decode the target binary data in the received binary data stream into quantum circuit information and computing configuration information of the quantum computing task according to the data structure defined by the binary data stream communication protocol and the multiple retransmission identifiers in the binary data stream, so as to provide for the subsequent execution of the quantum computing task. Thus, the relevant information of the quantum computing task is encoded and transmitted through the binary data stream communication protocol, and the binary data is more compact than the complex JSON format string or quantum instruction set, saving bandwidth and storage space. Furthermore, this scheme not only defines the format of the data structure through the binary data stream communication protocol, ensuring the accurate transmission and correct execution of the quantum computing task between different computing nodes, thereby reducing the risk of computing failure caused by parsing errors; and reduces the redundancy of the binary data stream obtained by binary encoding the quantum computing task through variable-length integer encoding, thereby further reducing the storage space required for the encoded data and improving the transmission efficiency of the data stream.

[0127] As an implementation method of the embodiment of the present invention, Fig.10 As shown, the first computing node includes multiple threads, and the method may further include the following steps:

[0128] Step 1001, determining computing configuration information and quantum circuit information of a plurality of quantum computing tasks to be processed, obtaining a plurality of encoding tasks, and evenly distributing the plurality of encoding tasks to a plurality of threads in the first computing node.

[0129] Step 1002: according to the data structure defined by the specified binary data stream communication protocol, use the multiple threads to encode each encoding task into sub-binary data including a sub-check code.

[0130] Step 1003, aggregating the multiple sub-binary data indicated by the sub-check code to obtain binary data corresponding to each of the quantum computing tasks, and obtaining a check code of the binary data based on each of the sub-check code encodings;

[0131] The check code is used to detect whether errors occur in data transmission between nodes.

[0132] Specifically, in a collection of multiple batches of quantum circuits, the encoding and decoding process of each group of quantum circuits is completely independent. Therefore, a multi-threaded encoding method based on MPI (Message Passing Interface) or OpenMP (Open Multi-Processing) can be used to significantly speed up the encoding and decoding efficiency, while giving full play to the multi-threaded performance advantages of computing nodes.

[0133] Among them, MPI is a message passing standard for writing parallel programs. It defines a set of functions and semantics that allow communication and data exchange between multiple processors. MPI programs consist of multiple processes, each of which has its own memory space. Processes communicate by sending and receiving messages, which can realize data exchange and collaboration between different processes. It supports parallel computing on distributed memory architecture and is suitable for large-scale parallel tasks. MPI not only provides a wealth of communication operations, such as point-to-point communication, broadcasting, reduction, etc., but also has strong flexibility. It is also cross-platform and can run on different types of computer clusters.

[0134] OpenMP is a parallel programming technology based on a shared memory architecture. It achieves parallelization by adding instructions or comments to the code, allowing programmers to take advantage of the parallel computing capabilities of multi-core processors. OpenMP achieves parallel computing by assigning tasks to multiple threads. Instructions or comments are used to mark parallel code segments in the program, and the compiler will automatically generate multi-threaded code based on these tags. OpenMP is simple and easy to use. You only need to add some instructions to the existing code to achieve parallelization, which lowers the threshold for parallel programming. It is suitable for shared memory architectures, such as multi-core processors, multi-processor servers, etc., and is efficient for small-scale parallel tasks. Parallelism can be adjusted through control instructions, which is highly flexible.

[0135] When using the above multi-threaded encoding method, the encoding process may include:

[0136] First, the computing configuration information and quantum circuit information of multiple quantum computing tasks to be processed are determined to obtain multiple encoding tasks, and the multiple encoding tasks are evenly divided into multiple threads in the first computing node. For example, for a 500-layer 200-batch encoding task acting on 72 quantum bits, if the current first computing node includes 20 threads, 10 batches of encoding tasks can be evenly divided into each thread.

[0137] Then, a parallel encoding process can be executed, that is, according to the data structure defined by the specified binary data stream communication protocol, multiple threads are used to encode each encoding task into sub-binary data containing sub-check codes. The encoding operation of each thread can specifically include: traversing the encoding tasks assigned to the thread; encoding the initialization operation of each quantum computing task; encoding each other operation of the current quantum computing task; encoding the check code information of the thread.

[0138] Finally, the multiple sub-binary data indicated by the sub-check codes can be aggregated to obtain the binary data corresponding to each quantum computing task, and the check code of the binary data can be obtained based on each sub-check code encoding.

[0139] Specifically, in order to detect whether errors occur in the transmitted data during the data transmission process between the computing nodes, in some embodiments, the quantum circuit information corresponds to a verification operation, and the above-specified binary data stream communication protocol can define a data structure of binary data corresponding to the verification operation, and the data structure includes a verification identification area. The process of encoding the quantum circuit information of the quantum computing task into binary data may include: writing a binary representation of the verification identification corresponding to the verification operation into the verification identification area in the binary data having the above-mentioned data structure to form binary data corresponding to the verification operation.

[0140] The embodiment of the present invention does not limit the verification method, which can adopt a CRC verification method, for example. As an example, the verification code corresponding to the quantum computing task can be generated by using one or more binary data obtained by quantum computing task encoding in an XOR manner, so as to provide a verification method for subsequent data transmission or scenarios requiring verification. As an example, for a specific quantum computing task C, the computing configuration information and the part of the quantum circuit information other than the verification operation are first encoded to obtain, for example, X binary data of a specified number of bits (for example, 64 bits), and then the verification operation is encoded to obtain a binary data corresponding to the verification operation. Specifically, the process of encoding the verification operation may include: using the X binary data obtained by encoding, generating, for example, a verification code of a specified number of bits in an XOR manner one by one, as a binary representation of a verification mark, and then writing the binary representation of the verification mark into the verification mark area, thereby forming binary data corresponding to the verification operation. Among them, the quantum circuit information corresponding to a quantum circuit corresponds to one verification operation, for example. For example, the binary representation of the verification mark may include 64 binary bits, which can be written into a 64-bit verification mark area.

[0141] It can be seen that in this embodiment, the process of encoding the quantum program in each thread is completely independent and can be executed in parallel. The final encoding result is the sum of the encoding results of each thread, and the final total check code can be obtained step by step according to the sub-check code of each thread. Therefore, it can not only significantly speed up the encoding and decoding efficiency and give full play to the multi-threaded performance advantages of the computing node, but also detect whether there are errors in the transmitted data during the data transmission between the computing nodes.

[0142] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the above methods is implemented.

[0143] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, any of the above methods is implemented.

[0144] The computer program product may be a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the computer program product of the present invention is not limited thereto, and the computer program product may be any combination of one or more computer readable media.

[0145] An embodiment of the present invention further provides a computing node in a quantum computing system, the computing node comprising a memory and a processor, the memory storing a computer program, and the processor implementing any one of the above methods when executing the computer program.

[0146] The computing nodes in the quantum computing system include one or more of a quantum computing client, a quantum computing cloud platform, a quantum operating system, a quantum computing server, and a quantum computing measurement and control system. In some embodiments, the computing nodes may adopt a distributed architecture.

[0147] See also Fig.11 , Fig.11 It is a structural block diagram of a computing node provided by an embodiment of the present invention.

[0148] The computing node may include: a memory 110, a processor 120, and a communication interface 130. The memory 110, the processor 120, and the communication interface 130 are connected via an internal connection path.

[0149] The memory 110 is used to store computer programs. In some implementations, the computer programs may include codes for implementing the methods of the embodiments of the present invention.

[0150] The processor 120 is used to execute the computer program stored in the memory 110 to control the communication interface 130 to receive input data and information and output data such as operation results. In some implementations, when the solution of the embodiment of the present invention is implemented by software or firmware, the computer program for implementing the solution of the embodiment of the present invention may be stored in the processor 120 and executed by the processor 120.

[0151] The memory 110 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory may be a random access memory (RAM). It should be noted that the memory 110 described herein is intended to include, but is not limited to, any memory of these and other suitable types. As an example, the memory 110 includes a random access memory (RAM), a cache memory and a read-only memory (ROM). Among them, the memory 110 stores a computer program, and the computer program can be executed by the processor 120 so that the processor 120 implements the steps of any of the above methods.

[0152] The processor 120 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor 120 may be any conventional processor, etc.

[0153] In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 120 or the instruction in the form of software. The method disclosed in conjunction with the embodiment of the present invention can be directly embodied as a hardware processor for execution, or it can be executed by a combination of hardware and software modules in the processor 120. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 110, and the processor 120 reads the information in the memory 110 and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it will not be described in detail here.

[0154] In some implementations, in addition to the hardware units described above, the computing node may also include software modules, where the software modules may be, for example, an operating system, a basic input output system (BIOS), application software, etc.

[0155] The operating system is used to manage the hardware and / or software resources of the computing node and is the core and cornerstone of the computing node. The operating system needs to handle basic tasks such as managing and configuring memory, determining the priority of system resource supply and demand, controlling input and output devices, operating the network, and managing the file system. In order to facilitate user operations, most operating systems provide an operating interface for users to interact with the system.

[0156] BIOS is used to run hardware initialization during the power-on boot phase and provide runtime services for the operating system and application programs. In some implementations, BIOS can also monitor and display processor temperature and execute functions such as adjusting temperature protection strategies.

[0157] Application software is also called application program, which can be understood as software written for a specific application purpose of the user. It is one of the main categories of computer software. For example, application software can be a program used to achieve power control, temperature management, etc.

[0158] It should be understood that the specific examples in this specification are only intended to help those skilled in the art to better understand the embodiments of the present invention, rather than to limit the protection scope of the present invention.

[0159] It is understood that in various implementations of this specification, the size of the sequence number of each process does not mean 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 present invention.

[0160] It can be understood that the various implementation modes described in this specification can be implemented individually or in combination, and the present invention is not limited to this.

[0161] Unless otherwise specified, all technical and scientific terms used in this specification have the same meaning as those generally understood by those skilled in the art of the technical field of this specification. The terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the scope of this specification. The term "and / or" used in this specification includes any and all combinations of one or more related listed items. The singular forms of "a", "above", and "the" used in this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0162] Those skilled in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this specification.

[0163] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of each embodiment described above can refer to the corresponding process in other embodiments and will not be repeated here.

[0164] In the several embodiments provided in this specification, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0165] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the technical solution of the present invention.

[0166] In addition, each functional unit in each embodiment of the present specification may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0167] If the function is implemented in the form of 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, the technical solution of this specification, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions for a computing node (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of this specification. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0168] The above are only specific implementation methods of this specification, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in this specification, which should be covered by the protection scope of this specification.

Claims

1. A communication method for a quantum computing task, characterized in that: The computing nodes in the quantum computing system include a first computing node and a second computing node, and the method is applied to the first computing node, and the method includes: Performing variable-length integer coding on the binary data corresponding to the quantum computing task to obtain target binary data; wherein the binary data is obtained by encoding the quantum computing task according to a data structure defined by a specified binary data stream communication protocol; the variable-length integer coding is used to remove high-order redundant data in the binary data; The binary data stream containing the target binary data is transmitted to the second computing node through the binary data stream communication protocol.

2. The method according to claim 1, characterized in that The step of performing variable-length integer encoding on the binary data corresponding to the quantum computing task to obtain target binary data includes: Divide the binary data corresponding to the quantum computing task into a plurality of encoding segments of preset bits from low bits to high bits; wherein the preset bits are determined according to the data structure defined by the specified binary data stream communication protocol; For each coded segment, perform a bitwise AND operation on the coded segment and the preset segment, and write the resume flag corresponding to the coded segment into the highest bit to obtain the target segment; The target binary data is obtained by combining the multiple target segments indicated by the resumed transfer identifier.

3. The method according to claim 1, characterized in that The quantum computing task includes computing configuration information and quantum circuit information. Before performing variable-length integer encoding on the binary data corresponding to the quantum computing task to obtain target binary data, the method further includes: The computing configuration information and quantum circuit information of the quantum computing task are encoded into binary data according to the data structure defined by the specified binary data stream communication protocol.

4. The method as claimed in claim 3, characterized in that The calculation configuration information includes one or more of an operation type, a mapping enable flag, a read error mitigation enable flag, an optimization level, a number of lines, and a number of measurements.

5. The method as claimed in claim 3, characterized in that The quantum circuit information includes one or more of an initialization operation, a quantum gate operation, a barrier operation, a measurement operation, an end bit operation and a verification operation.

6. The method according to claim 5, characterized in that The first computing node includes a plurality of threads, and the method further includes: Determine computing configuration information and quantum circuit information of a plurality of quantum computing tasks to be processed, obtain a plurality of encoding tasks, and evenly distribute the plurality of encoding tasks to a plurality of threads in the first computing node; According to the data structure defined by the specified binary data stream communication protocol, using the plurality of threads to encode each encoding task into sub-binary data including a sub-check code; The multiple sub-binary data indicated by the sub-check codes are aggregated to obtain binary data corresponding to each of the quantum computing tasks, and a check code of the binary data is obtained based on each of the sub-check code encodings, wherein the check code is used to detect whether an error occurs in data transmission between nodes.

7. A communication method for a quantum computing task, characterized in that: The computing nodes in the quantum computing system include a first computing node and a second computing node, and the method is applied to the second computing node, and the method includes: According to the data structure defined by the specified binary data stream communication protocol and the multiple retransmission identifiers in the binary data stream, the target binary data in the received binary data stream is decoded into quantum circuit information and computing configuration information of the quantum computing task.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 or the method according to claim 7 is implemented.

9. A computing node in a quantum computing system, characterized in that: The computing node includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 6 or the method according to claim 7 when executing the computer program.

10. A quantum computing system, characterized in that: The quantum computing system comprises a quantum chip and the computing node according to claim 9, wherein one or more quantum bits are arranged on the quantum chip.