A real-machine-based quantum circuit parallel execution method and related device

By splitting a large number of quantum circuits into multiple smaller numbers of circuits and executing them in parallel on multiple physical machines, and then merging the results in parallel, the problem of heavy burden on physical machines is solved, and faster quantum computing speed and stronger expressive power are achieved.

CN122133836APending Publication Date: 2026-06-02ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
Filing Date
2024-11-26
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In existing technologies, the execution of a large number of quantum bit circuits on a real machine is burdensome, resulting in slow operating speed.

Method used

The first quantum circuit is split into multiple independent second quantum circuits, which are sent to multiple physical machines for parallel execution. The results are then merged through outer product or concat operations to restore the output dimension.

Benefits of technology

This reduces the bit burden on a single physical machine, enhances the expressive power of quantum circuits, and improves processing speed and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122133836A_ABST
    Figure CN122133836A_ABST
Patent Text Reader

Abstract

This invention discloses a method and related apparatus for parallel execution of quantum circuits based on real machines. The method includes: constructing a first quantum circuit having a first number of qubits and a first layer depth; splitting the first quantum circuit into multiple independent second quantum circuits, each having a second number of qubits and a second layer depth, wherein the second number is less than the first number and the second layer depth is greater than the first layer depth; sending the multiple independent second quantum circuits to multiple different real machines, each real machine independently executing a second quantum circuit; and merging the evolution results of the multiple second quantum circuits to restore the output dimension of the first quantum circuit. Compared with existing technologies, this invention significantly reduces the burden of qubit count on a single real machine while enhancing the expressive power of the circuits by increasing the depth of the quantum circuits.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of quantum computing technology, and in particular to a method and related apparatus for parallel execution of quantum circuits based on a real machine. Background Technology

[0002] Training large-scale quantum machine learning models can achieve better results on various tasks, such as improving the accuracy of image classification. However, as the model size increases, the number of qubits required for training also gradually increases. Currently, the maximum number of qubits in a native quantum circuit is 72. When the number of qubits required in a quantum machine learning model exceeds or approaches 72, the burden on the native machine increases, and the execution speed of related training tasks on a single native machine remains slow. Summary of the Invention

[0003] The purpose of this invention is to provide a method and related apparatus for parallel execution of quantum circuits based on a real machine, so as to solve the technical problems in the prior art and reduce the burden of executing a large number of quantum bit circuits on a real machine.

[0004] In a first aspect, the present invention provides a method for parallel execution of quantum circuits based on a real machine, comprising:

[0005] Construct a first quantum circuit, the first quantum circuit having a first number of qubits and a first number of layers of circuit depth;

[0006] The first quantum circuit is split into multiple independent second quantum circuits. The second quantum circuit has a second number of qubits and a second number of layers with a circuit depth. The second number is less than the first number, and the second number of layers is greater than the first number of layers.

[0007] The plurality of independent second quantum circuits are sent to a plurality of different physical devices, and each physical device executes the second quantum circuit independently.

[0008] The evolution results of multiple second quantum circuits are merged to restore the output dimension of the first quantum circuit.

[0009] The above-described method for parallel execution of quantum circuits based on a real machine, preferably, involves splitting the first quantum circuit into multiple independent second quantum circuits, including:

[0010] The first quantity, the second quantity, the first number of layers, and the second number of layers satisfy:

[0011]

[0012] Wherein: n1 represents the first quantity, n2 represents the second quantity, L1 represents the first number of layers, L2 represents the second number of layers, and N2 represents the number of second quantum circuits.

[0013] The above-described method for parallel execution of quantum circuits based on a real machine, wherein, preferably, the step of merging the evolution results of multiple second quantum circuits to restore the output dimension of the first quantum circuit includes:

[0014] After multiple second quantum circuits running on different real machines have completed their evolution, the quantum states of the multiple second quantum circuits are merged by outer product, and the output dimension of each second quantum circuit is restored to the output dimension of the first quantum circuit.

[0015] The above-described method for parallel execution of quantum circuits based on a real machine, preferably, involves splitting the first quantum circuit into multiple independent second quantum circuits, including:

[0016] The first quantity, the second quantity, the first number of layers, and the second number of layers satisfy:

[0017]

[0018] Wherein: n1 represents the first quantity, n2 represents the second quantity, L1 represents the first number of layers, L2 represents the second number of layers, N2 represents the number of second quantum circuits, and m1 and m2 are both preset constants.

[0019] The above-described method for parallel execution of quantum circuits based on a real machine, wherein, preferably, the step of merging the evolution results of multiple second quantum circuits to restore the output dimension of the first quantum circuit includes:

[0020] After multiple second quantum circuits running on different real machines have completed their evolution, the quantum states of the multiple second quantum circuits are merged through the concat operation, and the output dimension of each second quantum circuit is restored to the output dimension of the first quantum circuit.

[0021] The method for parallel execution of quantum circuits based on real machines, as described above, preferably includes sending the plurality of independent second quantum circuits to multiple different real machines, with each real machine independently executing the second quantum circuit, further comprising:

[0022] The second quantum circuit is split into multiple independent third quantum circuits, each third quantum circuit having a third number of qubits and a third number of circuit depths, wherein the third number is less than the second number and the third number of layers is greater than the second number of layers;

[0023] The multiple independent third quantum circuits are sent to multiple different physical devices, and each physical device executes the third quantum circuit independently.

[0024] The evolution results of multiple third quantum circuits are merged to restore the output dimension of the second quantum circuit.

[0025] In the above-described method for parallel execution of quantum circuits based on a real machine, preferably, the first quantity, the second quantity, the third quantity, the first number of layers, the second number of layers, and the third number of layers satisfy the following:

[0026]

[0027] Wherein: n1 represents the first quantity, n2 represents the second quantity, n3 represents the third quantity, L1 represents the first layer number, L2 represents the second layer number, L3 represents the second layer number, N3 represents the number of the third quantum circuits, and m1 and m2 are both preset constants.

[0028] In a second aspect, the present invention provides a quantum circuit parallel execution device, comprising:

[0029] A quantum circuit construction module for constructing a first quantum circuit, the first quantum circuit having a first number of qubits and a first layer of circuit depth;

[0030] The circuit splitting module is used to split the first quantum circuit into multiple independent second quantum circuits. The second quantum circuits have a second number of qubits and a second number of circuit depths, where the second number is less than the first number and the second number of layers is greater than the first number of layers.

[0031] The data processing module is used to send the plurality of independent second quantum circuits to a plurality of different physical devices, each of which independently executes the second quantum circuit;

[0032] The data merging module is used to merge the evolution results of multiple second quantum circuits and restore them to the output dimension of the first quantum circuit.

[0033] Thirdly, the present invention provides a storage medium storing a computer program, wherein the computer program is configured to implement the aforementioned method when running.

[0034] Fourthly, the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to implement the aforementioned method.

[0035] Compared with existing technologies, this invention processes the first quantum circuit used for training on a single real machine in parallel on multiple real machines, and replaces a large-qubit quantum circuit with a second quantum circuit of multiple small qubits. This approach greatly reduces the burden of the number of qubits on a single real machine, while enhancing the expressive power of the circuit by increasing the depth of the quantum circuit. Attached Figure Description

[0036] Figure 1 This is a network block diagram of a quantum circuit construction system provided in an embodiment of the present invention;

[0037] Figure 2 This is a flowchart of a quantum circuit parallel execution method based on a real machine, provided by an embodiment of the present invention;

[0038] Figure 3 A schematic diagram of the structure of the first quantum circuit parallel splitting strategy provided in the embodiments of this application;

[0039] Figure 4 A schematic diagram of the structure of the second quantum circuit parallel splitting strategy provided in the embodiments of this application;

[0040] Figure 5 This is a schematic diagram of the structure of a quantum circuit parallel execution device provided in an embodiment of the present invention. Detailed Implementation

[0041] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0042] [Structure of a quantum circuit construction system]

[0043] Figure 1 This is a network block diagram of a quantum circuit construction system provided in an embodiment of this application. The quantum circuit construction system may include a network 110, a server 120, a wireless device 130, a client 140, a storage unit 150, a classical processing system 160, a quantum processing system 170, and may also include additional memory, a classical processor, a quantum processor, and other devices not shown.

[0044] Network 110 is a medium used to provide communication links between various devices and computers connected together within a quantum circuit construction system, including but not limited to the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The connection method can be wired, wireless communication links, or fiber optic cables.

[0045] Server 120 and client 140 are conventional data processing systems that may contain data and applications or software tools that perform conventional computational processes. Client 140 may be a personal computer or a network computer, so the data may also be provided by server 120. Wireless device 130 may be a smartphone, tablet, laptop, smart wearable device, etc. Storage unit 150 may include database 151, which can be configured to store data such as qubit parameters, quantum logic gate parameters, quantum circuits, and quantum programs.

[0046] The classical processing system 160 (quantum processing system 170) may include a classical processor 161 (quantum processor 171) for processing classical data (quantum data) and a memory 163 (memory 172) for storing classical data (quantum data). The classical data (quantum data) may be a boot file, an operating system image, and an application program 162 (application program 173). The application program 162 (application program 173) may be used to implement a quantum algorithm compiled according to the quantum circuit construction method provided in the embodiments of this application.

[0047] Any data or information stored or generated in the classical processing system 160 (quantum processing system 170) can also be configured to be stored or generated in another classical (quantum) processing system in a similar manner, and any application executed therein can also be configured to be executed in another classical (quantum) processing system in a similar manner.

[0048] It should be noted that a true quantum computer has a hybrid structure, which includes at least... Figure 1 The system consists of two main parts: the classical processing system 160, which is responsible for performing classical calculations and control; and the quantum processing system 170, which is responsible for running quantum programs and thus realizing quantum computing.

[0049] The aforementioned classical processing system 160 and quantum processing system 170 can be integrated into a single device or distributed across two different devices. For example, the first device, including the classical processing system 160, runs a classical computer operating system that provides quantum application development tools and services, as well as the storage and network services required for quantum applications. Users develop quantum applications using the quantum application development tools and services on the second device and send the quantum program to the second device, including the quantum processing system 170, via the network services. The second device runs a quantum computer operating system, which parses the code of the quantum program and compiles it into instructions that can be recognized and executed by the quantum computer control system. The quantum processor 170 then implements the quantum algorithm corresponding to the quantum program based on these instructions.

[0050] In the classic silicon-based processing system 160, the units of the classic processor 161 are CMOS transistors. These computing units are not limited by time or coherence; that is, they are available at any time without time constraints. Furthermore, the number of these computing units in a silicon chip is sufficient; currently, a classic processor contains tens of thousands of computing units. The sufficient number of computing units and the fixed selectable computing logic of the CMOS transistors, such as AND logic, allow for computational efficiency through a combination of numerous CMOS transistors and limited logic functions.

[0051] Unlike the logic units in the classical processing system 160, the basic computational unit of the quantum processor 171 in the quantum processing system 170 is the qubit. The input of a qubit is limited by coherence and coherence time; that is, a qubit is limited by its available usage time and is not always readily available. Making full use of qubits within their available usage time is a key challenge in quantum computing. Furthermore, the number of qubits in a quantum computer is one of the representative indicators of its performance. Each qubit performs computational functions through on-demand configured logic functions. Given the limited number of qubits and the diverse logic functions available in quantum computing, such as Hadamard gates (H gates), Pauli-X gates (X gates), Pauli-Y gates (Y gates), Pauli-Z gates (Z gates), RX gates, RY gates, RZ gates, CR gates, iSWAP gates, Tofoli gates, etc., quantum computing requires combining a limited number of qubits with diverse combinations of logic functions to achieve computational effects.

[0052] Based on these differences, the design of logical functions applied to qubits (including the design of whether qubits are used and the design of the efficiency of each qubit's use) is crucial to improving the computational performance of quantum computers and requires specialized design. The aforementioned design considerations for qubits are technical issues that ordinary computing devices do not need to address.

[0053] [A Parallel Execution Method for Quantum Circuits Based on Real Machines]

[0054] Reference Figure 2 As shown, this invention provides a method for parallel execution of quantum circuits based on a real machine, comprising the following steps:

[0055] Step S101: Construct a first quantum circuit. The first quantum circuit has a first number of qubits and a first layer of circuit depth. In one feasible implementation, the first number is n1 and the first layer is L1. The n1 qubits first pass through a data encoding layer, then through the quantum gates of the L1 layer to act on the timing, and finally through a series of measurement operations to complete the complete quantum computing process from encoding the input quantum state to the final measurement.

[0056] In the data encoding layer, the data encoding module can be supplemented by single-parameter logic gates, such as RX gates, RY gates, or RZ gates. The rotation control parameters of the single-parameter logic gates, such as RX gates, RY gates, or RZ gates, are adjusted according to the data information to be processed, and the parameters are encoded into the logic gates one by one by taking the remainder.

[0057] For example, a quantum circuit uses four qubits. Assuming the input data dimension is (batch_size, 10), this means each batch has multiple data samples, each with 10 features. For each data sample, its 10 feature values ​​will be encoded into four qubits. Since the number of qubits is less than the number of features, each feature value can be modulo 4. The remainder can be used as an index for the qubits. Thus, each feature value is mapped to a qubit. If the number of feature values ​​exceeds the number of qubits, the mapping can be cyclically performed using the remainder. If the number of features in a data sample is less than the number of qubits, empty qubit positions can be filled with 0.

[0058] Step S102: Split the first quantum circuit into multiple independent second quantum circuits. The second quantum circuit has a second number of qubits and a second number of layers in the circuit depth. The second number is less than the first number, and the second number of layers is greater than the first number of layers.

[0059] By splitting a first quantum circuit into at least two second quantum circuits, each with fewer qubits than the first, this splitting allows these second quantum circuits to run in parallel on different prototypes, thereby reducing the workload on a single prototype, where each prototype only needs to process a subset of the qubits. This is particularly important for current quantum computers, as their number of qubits and error rate limit the complexity of the quantum circuits they can process.

[0060] Meanwhile, to compensate for the reduction in the expressive power of the second quantum circuit caused by the splitting, the circuit depth of the second quantum circuit is increased, and more quantum gates are added to the second quantum circuit to enhance its expressive power and training ability. This can help compensate for the information loss caused by the splitting. By designing more complex quantum gate sequences, richer quantum state transitions can be simulated, thereby restoring the expressive power of the original high-bit-count sub-circuit to a certain extent. It can capture more subtle data features, thereby improving the prediction accuracy of the model.

[0061] While increasing circuit depth adds complexity, it places a smaller burden on the physical device than increasing the number of qubits. This is because increasing the number of qubits requires more physical resources and may also lead to an increase in error rate. Increasing circuit depth primarily involves adding quantum gate operations at the software level, with a relatively small increase in hardware resource requirements.

[0062] In one feasible implementation, the second quantity is n2, the second layer number is L2, and the structure of the second quantum circuit is the same as that of the first quantum circuit. The n2 qubits first pass through a data encoding layer, then through the quantum gates of the L2 layer to act on the timing, and finally through a series of measurement operations to complete the complete quantum computing process from encoding the input quantum state to the final measurement.

[0063] Step S103: Send multiple independent second quantum circuits to multiple different physical machines. Each physical machine executes the second quantum circuit independently. Parallel processing on multiple physical machines can improve the overall processing speed and efficiency. At the same time, by splitting the quantum circuits and increasing the circuit depth, the operating burden of the physical machines and the expressive power of the quantum circuits are effectively balanced, providing a feasible strategy for dealing with large-scale quantum computing problems.

[0064] Step S104: Merge the evolution results of multiple second quantum circuits to restore the output dimension of the first quantum circuit. The aggregated data can be used for subsequent quantum machine learning or other quantum algorithm training. The restored quantum state can participate in the training of the remaining stages. This means that the performance and expressive power of the entire first quantum circuit are maintained, even though it is split and run on multiple real machines.

[0065] Based on the above embodiments, the parallel execution method of quantum circuits on real machines is achieved by performing parallel processing of the first quantum circuit trained on a single real machine on multiple real machines and replacing a large-qubit quantum circuit with a second quantum circuit of multiple small qubits. This scheme greatly reduces the burden of the number of bits on a single real machine, while enhancing the expressive power of the circuit by increasing the depth of the quantum circuit.

[0066] The following describes several strategies for splitting first quantum circuits, which those skilled in the art will recognize and can be used to make more implementations, but are not limited here.

[0067] First splitting strategy

[0068] In the first splitting strategy, the first quantity, the second quantity, the first level, and the second level satisfy the following:

[0069]

[0070] Where: n1 represents the first quantity, n2 represents the second quantity, L1 represents the first layer number, L2 represents the second layer number, and N2 represents the number of second quantum circuits, which is also the number of allocated physical machines.

[0071] In step S102, when splitting the first quantum circuit, the n1 qubits are evenly distributed across N2 physical machines, with each physical machine processing... There are 100 qubits. Here, N2 must be divisible by n1 to ensure even distribution.

[0072] For example Figure 3 As shown, after splitting the first quantum circuit into two second quantum circuits, the number of qubits in the second quantum circuit is half that of the first quantum circuit, and the circuit depth is twice that of the first quantum circuit. This splitting allows the second quantum circuits to run in parallel on two different prototype machines, thereby reducing the number of qubits that a single quantum computer needs to process. By splitting the first quantum circuit, each prototype machine only needs to process half of the qubits, which reduces the operational burden on a single prototype machine.

[0073] In step S104, after the multiple second quantum circuits running on different prototype machines complete their evolution, the quantum states of the multiple second quantum circuits are merged through an outer product, restoring the output dimension of each second quantum circuit to the output dimension of the first quantum circuit. The dimension of the second quantum circuit on each prototype machine is... After all the quantum computers have finished processing, the results need to be communicated to a central machine, and these results need to be integrated in the form of an outer product to restore the second dimension of the first quantum circuit. n1In this way, the combined quantum state can maintain the same dimension as the original circuit and be used for subsequent training or other quantum computing tasks.

[0074] The second splitting strategy

[0075] In the second splitting strategy, the first quantity, the second quantity, the first level, and the second level satisfy the following:

[0076] The first quantity, the second quantity, the first layer number, and the second layer number satisfy:

[0077]

[0078] Wherein: n1 represents the first quantity, n2 represents the second quantity, L1 represents the first layer number, L2 represents the second layer number, N2 represents the number of second quantum circuits, and m1 and m2 are both preset constants.

[0079] In step S102, when splitting the first quantum circuit, the number of qubits of the second quantum circuit is the number of qubits of the first quantum circuit minus a first constant. This first constant has a certain proportional relationship with the number of actual devices. The circuit depth of the second quantum circuit is the circuit depth of the first quantum circuit plus a second constant. This second constant has a certain proportional relationship with the number of actual devices. Preferably, the second constant is an integer multiple of the first constant.

[0080] For example Figure 4 As shown, after splitting the first quantum circuit into two second quantum circuits, the number of qubits in the second quantum circuit is one less than the number of qubits in the first quantum circuit, and the circuit depth is two times the circuit depth of the first quantum circuit. This splitting allows the second quantum circuits to run in parallel on two different physical machines. The number of qubits on each physical machine decreases as the number of physical machines increases. By reducing the number of qubits on each physical machine, the computational load of a single quantum computer can be reduced, potentially improving the stability and accuracy of the computation.

[0081] In step S104, after the multiple second quantum circuits running on different real machines complete their evolution, the quantum states of the multiple second quantum circuits are merged by concatenating the results from the real machines. This concatenation of the results from different real machines maintains the same dimension as the first quantum circuit for subsequent training or other quantum computing tasks. The dimension of the second quantum circuit on each real machine is... After all the quantum computers have finished processing, the results need to be communicated to a central machine. A concat operation is then used to merge the quantum states of multiple second-order quantum circuits to restore the dimension of the first-order quantum circuit. In this way, the combined quantum state can maintain the same dimension as the original circuit and be used for subsequent training or other quantum computing tasks.

[0082] The second splitting strategy is consistent with the first in its basic idea: to reduce the operational burden on a single physical machine by splitting the quantum circuits. However, the second approach differs in implementation. The second quantum circuit in the second splitting strategy has more qubits than the second quantum circuit in the first strategy. By increasing the number of qubits on the split quantum circuits, the expressive power is maintained similarly to the original quantum circuits. This means that excessive depth is not required in each second quantum circuit, thus reducing the complexity of quantum gate operations. Compared to the first splitting strategy, the second splitting strategy does not require adding many quantum gates to each second quantum circuit because the number of qubits already provides sufficient expressive power. This helps reduce the depth of the quantum circuits, thereby reducing potential errors when the physical machine executes quantum gate operations.

[0083] The second splitting strategy requires more physical machines to process the split quantum circuits in parallel compared to the first strategy. This method can utilize the computing resources of multiple physical machines, improving overall computational efficiency.

[0084] In the second partitioning strategy, resource allocation is more even because the number of qubits on each physical machine increases compared to the first partitioning strategy. This helps balance the load on each physical machine and improves overall computing performance.

[0085] Due to the reduced line depth, the second splitting strategy has advantages in error management; fewer quantum gate operations mean less error accumulation, thereby improving the accuracy of quantum computing.

[0086] In summary, the second strategy effectively maintains the expressive power of the quantum circuit by increasing the number of qubits in the split second quantum circuit, while reducing the circuit depth, lowering the error rate, and improving the efficiency of parallel processing compared to the first strategy.

[0087] The third splitting strategy

[0088] The third splitting strategy is a hybrid approach that combines the advantages of the first two strategies to optimize the splitting of large-bit quantum circuits. This hybrid method allows for more flexible handling of qubit allocation and quantum circuit splitting, reducing information loss and improving overall performance.

[0089] In the third splitting strategy, the first quantum circuit is first split into multiple second quantum circuits according to the first splitting strategy, and then the second quantum circuit is split into multiple third quantum circuits according to the second splitting strategy.

[0090] The first quantity, the second quantity, the third quantity, the first layer number, the second layer number, and the third layer number satisfy:

[0091]

[0092] Wherein: n1 represents the first quantity, n2 represents the second quantity, n3 represents the third quantity, L1 represents the first layer number, L2 represents the second layer number, L3 represents the second layer number, N3 represents the number of third quantum circuits, and m1 and m2 are both preset constants.

[0093] Specifically:

[0094] First, when splitting the first quantum circuit, the n1 qubits are evenly distributed across N2 physical machines, with each physical machine processing... There are 100 qubits. Here, N2 must be divisible by n1 to ensure even distribution.

[0095] Secondly, when splitting the second quantum circuit, the number of qubits of the third quantum circuit is the number of qubits of the second quantum circuit minus a first constant. This first constant has a certain proportional relationship with the number of actual devices. The circuit depth of the third quantum circuit is the circuit depth of the second quantum circuit plus a second constant. This second constant has a certain proportional relationship with the number of actual devices. Preferably, the second constant is an integer multiple of the first constant.

[0096] The third splitting strategy can dynamically select between the first and second splitting strategies, or a trade-off between the two, based on the complexity of the quantum circuit and the resources of the physical machine. For example, for certain critical parts of the quantum circuit, the second splitting strategy may be preferred to reduce information loss; while for other parts, the first splitting strategy may be used to improve the efficiency of parallel processing.

[0097] This hybrid strategy allows for a balance between reducing information loss and improving parallel processing efficiency, thereby optimizing the splitting and execution of large-bit quantum circuits.

[0098] For example, by combining two quantum circuit splitting strategies, the N² qubit quantum circuit is first split into N² / ² qubit sub-circuits on two quantum computers. Then, on each quantum computer, the N² / ² qubit sub-circuit is further split into N² / ²-1 qubit sub-circuits. This combined parallel approach can effectively reduce the execution burden on a single quantum computer while minimizing information loss in the circuit.

[0099] In this hybrid approach, a two-step splitting method enables finer-grained parallel processing while maintaining a relatively small quantum circuit depth. First, the first quantum circuit is split into two N² / 2 qubit second quantum circuits, halving the number of qubits processed per physical device. Then, each N² / 2 qubit second quantum circuit is further split into an N² / 2-1 qubit third quantum circuit, further reducing the load on a single physical device without significantly increasing the circuit depth.

[0100] The third splitting strategy combines the advantages of increased depth from the first strategy and reduced qubit count from the second. By appropriately increasing the circuit depth, it can compensate for the information loss caused by splitting. At the same time, by reducing the number of qubits on each physical machine, it can alleviate the operational burden on a single physical machine. Finally, by performing a concat operation on the quantum states on each physical machine, the original output dimension of the quantum circuit can be restored, allowing it to participate in the remaining training stages.

[0101] [Structure of a Quantum Circuit Parallel Execution Device]

[0102] See Figure 5 As shown, the quantum circuit parallel execution device includes:

[0103] A quantum circuit construction module for constructing a first quantum circuit, the first quantum circuit having a first number of qubits and a first number of circuit depths.

[0104] The circuit splitting module is used to split the first quantum circuit into multiple independent second quantum circuits. The second quantum circuit has a second number of qubits and a second number of layers in the circuit depth. The second number is less than the first number, and the second number of layers is greater than the first number of layers.

[0105] The data processing module is used to send multiple independent second quantum circuits to multiple different physical devices, and each physical device executes the second quantum circuit independently.

[0106] The data merging module is used to merge the evolution results of multiple second quantum circuits and restore them to the output dimension of the first quantum circuit.

[0107] [Structure of storage media]

[0108] This invention also provides a storage medium storing a computer program, wherein the computer program is configured to implement the steps in any of the above method embodiments when running.

[0109] Specifically, in this embodiment, the storage medium can be configured to store a computer program for implementing the following steps:

[0110] Step S101: Construct a first quantum circuit, which has a first number of qubits and a first layer of circuit depth.

[0111] Step S102: Split the first quantum circuit into multiple independent second quantum circuits. The second quantum circuit has a second number of qubits and a second number of layers in the circuit depth. The second number is less than the first number, and the second number of layers is greater than the first number of layers.

[0112] Step S103: Send multiple independent second quantum circuits to multiple different physical machines, and each physical machine executes the second quantum circuit independently.

[0113] Step S104: Merge the evolution results of multiple second quantum circuits to restore the output dimension of the first quantum circuit.

[0114] Structure of electronic devices

[0115] This invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to implement the steps in any of the above method embodiments.

[0116] Specifically, the aforementioned electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the aforementioned processor, and the input / output device is connected to the aforementioned processor.

[0117] Specifically, in this embodiment, the processor described above can be configured to implement the following steps via a computer program:

[0118] Step S101: Construct a first quantum circuit, which has a first number of qubits and a first layer of circuit depth.

[0119] Step S102: Split the first quantum circuit into multiple independent second quantum circuits. The second quantum circuit has a second number of qubits and a second number of layers in the circuit depth. The second number is less than the first number, and the second number of layers is greater than the first number of layers.

[0120] Step S103: Send multiple independent second quantum circuits to multiple different physical machines, and each physical machine executes the second quantum circuit independently.

[0121] Step S104: Merge the evolution results of multiple second quantum circuits to restore the output dimension of the first quantum circuit.

[0122] The above description of the structure, features and effects of the present invention is based on the embodiments shown in the figures. The above are only preferred embodiments of the present invention, but the present invention is not limited to the scope of implementation shown in the figures. Any changes made in accordance with the concept of the present invention, or equivalent embodiments modified to have equivalent changes, shall be within the protection scope of the present invention as long as they do not exceed the spirit covered by the specification and figures.

Claims

1. A method for parallel execution of quantum circuits based on a real machine, characterized in that: include: Construct a first quantum circuit, the first quantum circuit having a first number of qubits and a first number of layers of circuit depth; The first quantum circuit is split into multiple independent second quantum circuits. The second quantum circuit has a second number of qubits and a second number of layers with a circuit depth. The second number is less than the first number, and the second number of layers is greater than the first number of layers. The plurality of independent second quantum circuits are sent to a plurality of different physical devices, and each physical device executes the second quantum circuit independently. The evolution results of multiple second quantum circuits are merged to restore the output dimension of the first quantum circuit.

2. The method according to claim 1, characterized in that: The step of splitting the first quantum circuit into multiple independent second quantum circuits includes: The first quantity, the second quantity, the first number of layers, and the second number of layers satisfy: Wherein: n1 represents the first quantity, n2 represents the second quantity, L1 represents the first layer number, L2 represents the second layer number, and N2 represents the number of the second quantum circuits, which is also the number of allocated physical machines.

3. The method according to claim 2, characterized in that: The step of merging the evolution results of multiple second quantum circuits to restore the output dimension of the first quantum circuit includes: After multiple second quantum circuits running on different real machines have completed their evolution, the quantum states of the multiple second quantum circuits are merged by outer product, and the output dimension of each second quantum circuit is restored to the output dimension of the first quantum circuit.

4. The method according to claim 1, characterized in that: The step of splitting the first quantum circuit into multiple independent second quantum circuits includes: The first quantity, the second quantity, the first number of layers, and the second number of layers satisfy: Wherein: n1 represents the first quantity, n2 represents the second quantity, L1 represents the first number of layers, L2 represents the second number of layers, N2 represents the number of second quantum circuits, and m1 and S2 are both preset constants.

5. The method according to claim 4, characterized in that: The step of merging the evolution results of multiple second quantum circuits to restore the output dimension of the first quantum circuit includes: After multiple second quantum circuits running on different real machines have completed their evolution, the quantum states of the multiple second quantum circuits are merged through the concat operation, and the output dimension of each second quantum circuit is restored to the output dimension of the first quantum circuit.

6. The method according to claim 5, characterized in that: The step of sending the plurality of independent second quantum circuits to a plurality of different prototype machines, each of which independently executes the second quantum circuit, further includes: The second quantum circuit is split into multiple independent third quantum circuits, each third quantum circuit having a third number of qubits and a third number of circuit depths, wherein the third number is less than the second number and the third number of layers is greater than the second number of layers; The multiple independent third quantum circuits are sent to multiple different physical devices, and each physical device executes the third quantum circuit independently. The evolution results of multiple third quantum circuits are merged to restore the output dimension of the second quantum circuit.

7. The method according to claim 6, characterized in that: The first quantity, the second quantity, the third quantity, the first number of layers, the second number of layers, and the third number of layers satisfy the following: Wherein: n1 represents the first quantity, n2 represents the second quantity, n3 represents the third quantity, L1 represents the first layer number, L2 represents the second layer number, L3 represents the second layer number, N3 represents the number of the third quantum circuits, and m1 and m2 are both preset constants.

8. A quantum circuit parallel execution device, characterized in that, include: A quantum circuit construction module for constructing a first quantum circuit, the first quantum circuit having a first number of qubits and a first layer of circuit depth; The circuit splitting module is used to split the first quantum circuit into multiple independent second quantum circuits. The second quantum circuits have a second number of qubits and a second number of circuit depths, where the second number is less than the first number and the second number of layers is greater than the first number of layers. The data processing module is used to send the plurality of independent second quantum circuits to a plurality of different physical devices, each of which independently executes the second quantum circuit; The data merging module is used to merge the evolution results of multiple second quantum circuits and restore them to the output dimension of the first quantum circuit.

9. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to implement the method described in any one of claims 1 to 7 when it is run.

10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to implement the method of any one of claims 1 to 7.