Quantum computing task processing method and apparatus, and quantum computer operating system

By cutting the quantum circuit of a quantum computing task into sub-quantum circuits and synthesizing a density matrix, the problem of low computational efficiency of quantum computing tasks in a distributed environment due to sub-task dependence is solved, thus realizing distributed computing and efficiency improvement of quantum computing tasks.

CN115511089BActive Publication Date: 2025-11-18ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110700663.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-23
Publication Date
2025-11-18
Estimated Expiration
2041-06-23

AI Technical Summary

Technical Problem

How to decompose a quantum computing task into multiple independent sub-quantum computing tasks to achieve distributed computing of quantum computing tasks and solve the problem of low computational efficiency caused by the dependency between sub-tasks in a distributed environment.

Method used

The quantum state evolution process of qubits based on quantum circuits involves dividing the quantum circuit corresponding to the quantum computing task into multiple sub-quantum circuits, preparing the initial quantum state of each sub-quantum circuit, obtaining the measurement results through measurement, and finally synthesizing the computing results of the quantum computing task. The density matrix is ​​merged using the tensor shrinking method to achieve distributed computing.

Benefits of technology

Distributed computing for quantum computing tasks has been achieved, improving computational efficiency and enabling sub-quantum circuits to run independently on different devices and synthesize the final results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115511089B_ABST
    Figure CN115511089B_ABST
Patent Text Reader

Abstract

The application discloses a quantum computing task processing method and device and a quantum computer operating system. The method comprises the following steps: cutting a quantum circuit corresponding to a quantum computing task into a plurality of sub quantum circuits based on a quantum state evolution process of a quantum bit of the quantum circuit; preparing an initial quantum state of a quantum bit in each of the sub quantum circuits; measuring the quantum bit in each of the sub quantum circuits after the initial quantum state is prepared to obtain a measurement result of each of the sub quantum circuits; and synthesizing the measurement result of each of the sub quantum circuits to obtain a calculation result of the quantum computing task. According to the embodiment of the application, the quantum computing task can be decomposed into a plurality of independent sub quantum computing tasks, and distributed calculation of the quantum computing task is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of quantum computing technology, and in particular to a quantum computing task processing method, apparatus and quantum computer operating system. Background Technology

[0002] With the development of computing technology, some computing tasks require enormous computing power to complete. If centralized computing is used, it would take a considerable amount of time to complete. Distributed computing breaks down computing tasks into multiple independent subtasks and distributes them to multiple computing devices for processing, thereby saving computing time and improving computing efficiency.

[0003] The core issue in distributed computing lies in the decomposition of the original computational task. In classical computing, the decomposition of the original computational task is usually based on data decomposition. The original data is decomposed into multiple sub-data, and then these sub-data are computed on multiple computing devices using the same algorithm model. Therefore, the sub-computational tasks are independent of each other.

[0004] Quantum computing differs from classical computing. A quantum computing task typically corresponds to a quantum circuit, and the decomposition of the original task is usually based on this quantum circuit decomposition. Because the sub-quantum circuits have a sequential order—the input of one sub-quantum circuit influences the output of the next—the sub-computational tasks are not independent of each other. Therefore, how to decompose a quantum computing task into multiple independent sub-quantum computing tasks and achieve distributed computing of quantum computing tasks is a technical problem that needs to be solved. Summary of the Invention

[0005] This application provides a quantum computing task processing method, apparatus, and quantum computer operating system, which decomposes a quantum computing task into multiple independent sub-quantum computing tasks to achieve distributed computing of quantum computing tasks.

[0006] In a first aspect, embodiments of this application provide a quantum computing task processing method, including:

[0007] The quantum state evolution process of qubits based on quantum circuits divides the quantum circuit corresponding to the quantum computing task into multiple sub-quantum circuits.

[0008] Prepare the initial quantum state of each qubit in each of the sub-quantum circuits;

[0009] The qubits in each of the sub-quantum circuits after the initial quantum state is prepared are measured to obtain the measurement results for each of the sub-quantum circuits;

[0010] The measurement results of each of the sub-quantum circuits are combined to obtain the computation result of the quantum computing task.

[0011] Optionally, the step of synthesizing the measurement results of each of the sub-quantum circuits to obtain the computation result of the quantum computing task includes:

[0012] Determine the density matrix corresponding to the measurement results of each of the sub-quantum circuits;

[0013] The density matrix corresponding to the measurement results of the multiple sub-quantum circuits is merged based on the tensor shrinkage method to obtain the density matrix corresponding to the measurement results of the quantum circuit.

[0014] The density matrix corresponding to the measurement results of the quantum circuit is determined as the calculation result of the quantum computing task.

[0015] Optionally, the tensor shrinking method is as follows:

[0016] If the output node of density matrix I is equal to the input node of density matrix J, then density matrix I and density matrix J are merged to obtain density matrix K. The input node of density matrix K is the same as the input node of density matrix I, and the output node of density matrix K is the same as the output node of density matrix J.

[0017] Optionally, before merging the density matrices corresponding to the measurement results of multiple sub-quantum circuits based on the tensor shrinkage method to obtain the density matrix corresponding to the measurement results of the quantum circuit, the method further includes:

[0018] Determine the qubits contained in each of the sub-quantum circuits;

[0019] If the timeline in which the qubit is located is not cut, then the input node corresponding to the qubit is determined as a classical input node, and the output node corresponding to the qubit is determined as a classical output node;

[0020] If the timeline in which the qubit is located is the upstream timeline after the cut, then the input node corresponding to the qubit is determined as the classical input node, and the output node corresponding to the qubit is determined as the quantum output node;

[0021] If the timeline in which the qubit is located is the downstream timeline after the cut, then the input node corresponding to the qubit is determined as the quantum input node, and the output node corresponding to the qubit is determined as the classical output node;

[0022] The input and output nodes of the density matrix corresponding to the measurement results of each sub-quantum circuit are determined based on the classical input node, the classical output node, the quantum input node, and the quantum output node.

[0023] Optionally, the quantum state evolution process of the quantum circuit-based qubits divides the quantum circuit corresponding to the quantum computing task into multiple sub-quantum circuits, including:

[0024] The quantum state evolution process of qubits based on greedy algorithms and quantum circuits determines the cutting position of the quantum circuit corresponding to the quantum computing task.

[0025] The quantum circuit is cut into multiple sub-quantum circuits based on the cutting position.

[0026] Optionally, the quantum state evolution process of the quantum circuit-based qubits divides the quantum circuit corresponding to the quantum computing task into multiple sub-quantum circuits, including:

[0027] The cutting position of the quantum circuit corresponding to the quantum computing task is determined based on the computing resources currently available to the electronic device and the quantum state evolution process of the qubits of the quantum circuit.

[0028] The quantum circuit is cut into multiple sub-quantum circuits based on the cutting position.

[0029] Optionally, the computing resources include qubits, and the determination of the cutting position of the quantum circuit corresponding to the quantum computing task based on the quantum state evolution process of the qubits of the quantum circuit and the computing resources currently allowed to be used by the electronic device includes:

[0030] Obtain the connectivity graph of the quantum circuit corresponding to the quantum computing task, and use the number of qubits currently allowed to be used by the electronic device as the maximum number of qubits allowed to be used in the sub-quantum circuits after the quantum circuit is cut;

[0031] The first cutting point of the connected graph is determined based on the maximum number of qubits;

[0032] Determine the two quantum logic gates corresponding to the first cutting point in the quantum circuit;

[0033] The change in the quantum state evolution of the same qubit under the action of the two quantum logic gates from the quantum state evolution under the action of one quantum logic gate to the quantum state evolution under the action of the other quantum logic gate is taken as the cutting position.

[0034] Secondly, embodiments of this application provide a quantum computing task processing device, characterized in that it includes:

[0035] The cutting unit is used to cut the quantum circuit corresponding to the quantum computing task into multiple sub-quantum circuits based on the quantum state evolution process of the qubits of the quantum circuit;

[0036] A preparation unit is used to prepare the initial quantum state of each qubit in each of the sub-quantum circuits;

[0037] A measurement unit is used to measure the qubits in each of the sub-quantum circuits after the initial quantum state is prepared, and to obtain the measurement results of each of the sub-quantum circuits;

[0038] A synthesis unit is used to synthesize the measurement results of each of the sub-quantum circuits to obtain the computation result of the quantum computing task.

[0039] Thirdly, embodiments of this application provide an electronic device, including a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for performing the steps of the method described in the first aspect of this application.

[0040] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program for electronic data interchange, wherein the computer program causes a computer to perform some or all of the steps described in the method described in the first aspect of embodiments of this application.

[0041] Fifthly, embodiments of this application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, the computer program being operable to cause a computer to perform some or all of the steps described in the method described in the first aspect of embodiments of this application. The computer program product may be a software installation package.

[0042] Sixthly, embodiments of this application provide a quantum computer operating system, wherein the quantum computer operating system implements quantum computing tasks according to some or all of the steps described in the method described in the first aspect of embodiments of this application.

[0043] As can be seen in this embodiment, the quantum state evolution process of qubits based on quantum circuits involves dividing the quantum circuit corresponding to the quantum computing task into multiple sub-quantum circuits; preparing the initial quantum state of the qubits in each sub-quantum circuit; measuring the qubits in each sub-quantum circuit after preparing the initial quantum state to obtain the measurement result of each sub-quantum circuit; and synthesizing the measurement results of each sub-quantum circuit to obtain the computation result of the quantum computing task. This achieves the preparation of the initial quantum state of each sub-quantum circuit, thus enabling each sub-quantum circuit to operate independently on different devices. Since the sub-quantum circuits can operate independently, the qubits of each sub-quantum circuit can also be measured separately to obtain measurement results. Finally, the measurement results of each sub-quantum circuit are synthesized, thereby realizing distributed computing of the quantum computing task.

[0044] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1A A hardware structure block diagram of a computer terminal for a quantum computing task processing method provided in an embodiment of this application;

[0047] Figure 1B A graphical representation of a quantum circuit provided in this application embodiment;

[0048] Figure 2A A flowchart illustrating a quantum computing task processing method provided in an embodiment of this application;

[0049] Figure 2B A schematic diagram illustrating the process of cutting a quantum circuit into sub-quantum circuits, provided as an embodiment of this application;

[0050] Figure 3 A flowchart illustrating yet another quantum computing task processing method provided in this application embodiment;

[0051] Figure 4 A flowchart illustrating another quantum computing task processing method provided in this application embodiment;

[0052] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0053] Figure 6 This is a schematic diagram of the structure of a quantum computing task processing device provided in an embodiment of this application. Detailed Implementation

[0054] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0055] The following sections will provide detailed explanations.

[0056] The terms "first," "second," "third," and "fourth," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0057] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0058] Figure 1A This is a hardware structure block diagram of a computer terminal for a quantum computing task processing method provided in an embodiment of this application.

[0059] See Figure 1A As shown, a computer terminal may include one or more ( Figure 1A Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. Optionally, the computer terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1A The structure shown is for illustrative purposes only and does not limit the structure of the computer terminal described above. For example, the computer terminal may also include components that are more complex than those described above. Figure 1A The more or fewer components shown, or having the same Figure 1A The different configurations shown.

[0060] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / modules corresponding to the quantum computing task processing method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to a computer terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0061] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the computer terminal. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0062] It should be noted that the quantum program referred to in the embodiments of this application is a program written in a classical language that represents qubits and their evolution, wherein qubits, quantum logic gates, etc. related to quantum computing are all represented by corresponding classical codes.

[0063] Quantum circuits, also known as quantum logic circuits, are a common and universal quantum computing model. They represent circuits that operate on qubits in an abstract way. A quantum circuit consists of qubits, a circuit (timeline), and various quantum logic gates. The result is often retrieved through quantum measurement operations. A quantum circuit can be represented as a sequence of quantum logic gates arranged in a specific execution order.

[0064] Specifically, for example, a quantum program:

[0065] QCircuitcir;

[0066] cir< <H(q[0])<<H(q[1])<<H(q[2])<<H(q[3])<<RZ(q[0],PI / 2)<<RY(q[1],PI / 4)<<RZ(q[2],PI / 4)<<CNOT(q[0],q[1])<<CR(q[1],q[2],PI / 3)<<CNOT(q[2],q[3])<<CNOT(q[0],q[3]).

[0067] The corresponding quantum circuit (denoted as quantum circuit #1) can be represented as:

[0068] q[0]:H(q[0]), RZ(q[0],PI / 2)

[0069] q[1]:H(q[1]), RY(q[1],PI / 4), CNOT(q[0],q[1])

[0070] q[2]:H(q[2]), RZ(q[2],-PI / 4), CR(q[1],q[2],PI / 3)

[0071] q[3]:H(q[3]), CNOT(q[2], q[3]), CNOT(q[0],q[3])

[0072] Among them, q[0], q[1], q[2], and q[3] refer to qubits with bits ranging from 0 to 3, and are usually also written as q0, q1, q2, and q3.

[0073] A more visual representation can be found in the quantum circuit diagrams corresponding to the aforementioned quantum logic gate sequences. Figure 1B As shown.

[0074] Unlike traditional circuits that use metal wires to transmit voltage or current signals, in quantum circuits, the circuits can be seen as being connected by time. That is, the state of a quantum bit evolves naturally over time, following the instructions of the Hamiltonian operator, until it encounters a quantum logic gate and is manipulated.

[0075] A quantum program corresponds to a single quantum circuit. The quantum program described in this application refers to this single quantum circuit, where the total number of qubits in the single quantum circuit is the same as the total number of qubits in the quantum program. This can be understood as follows: a quantum program can consist of a quantum circuit, measurement operations on the qubits within the quantum circuit, registers storing the measurement results, and control flow nodes (jump instructions). A single quantum circuit can contain dozens, hundreds, or even thousands of quantum logic gate operations. The execution of a quantum program is the process of executing all the quantum logic gates in a specific timing order. It should be noted that the timing order refers to the chronological sequence in which individual quantum logic gates are executed.

[0076] It's important to note that in classical computing, the most basic unit is the bit, and the most fundamental control mode is the logic gate. Circuit control can be achieved through combinations of logic gates. Similarly, the way to process qubits is through quantum logic gates. Quantum logic gates enable the evolution of quantum states and are the foundation of quantum circuits. Quantum logic gates include single-qubit quantum logic gates (or simply "single gate"), such as the Hadamard gate (H gate), Pauli-X gate (X gate), Pauli-Y gate (Y gate), Pauli-Z gate (Z gate), RX gate, RY gate, RZ gate, etc.; two-qubit quantum logic gates (or simply "dual gate"), such as the CNOT gate, CR gate, SWAP gate, ISWAP gate, etc.; and multi-qubit quantum logic gates (or simply "multi-gate"), such as the ToffolI gate, etc. Quantum logic gates are generally represented using unitary matrices, which are not only matrix forms but also operations and transformations. The general quantum logic gate's effect on a quantum state is calculated by left-multiplying the unitary matrix by the matrix corresponding to the right vector of the quantum state.

[0077] For example, the vector corresponding to the right vector of the quantum state |0> is The vector corresponding to the right vector of the quantum state |1> is

[0078] A quantum state is the logical state of a qubit. In quantum algorithms (or quantum programs), the quantum states of a group of qubits in a quantum circuit are represented in binary. For example, a group of qubits q0, q1, and q2, representing the 0th, 1st, and 2nd qubits, are represented in binary from most significant bit to least significant bit as q2q1q0. This group of qubits corresponds to a total of 2^(1 / 2) qubits, or 8 eigenstates (determined states): |000>, |001>, |010>, |011>, |100>, |101>, |110>, and |111>. Each bit in a quantum state corresponds to a qubit. For example, in the |001> state, 001 corresponds to q2q1q0 from most significant bit to least significant bit. |> represents the Dirac notation. For a group of N qubits q0, q1, ..., q2, ... n , ..., q N-1 In quantum circuits, the binary representation of quantum states is ordered as q. N-1 q N-2 …、q1q0.

[0079] Taking a single qubit as an example, the logical state ψ of a single qubit may be in a superposition of the states |0>, |1>, and |0> and |1> (an uncertain state), specifically expressed as ψ = a|0> + b|1>, where a and b are complex numbers representing the amplitude (probability amplitude) of the quantum state, and the square of the magnitude of the amplitude represents the probability. 2 b 2 Let |a| represent the probabilities that the logical state is |0> and |1>, respectively. 2 +|b| 2 =1. In short, a quantum state is a superposition of eigenstates. When the probability of other states is 0, it is in a uniquely determined eigenstate.

[0080] The following describes a quantum computing task processing method provided by an embodiment of this application in conjunction with the accompanying drawings.

[0081] See Figure 2A , Figure 2A This application provides a flowchart illustrating a quantum computing task processing method, which includes:

[0082] Step 201: The quantum state evolution process of qubits based on quantum circuits divides the quantum circuit corresponding to the quantum computing task into multiple sub-quantum circuits.

[0083] Step 202: Prepare the initial quantum state of each qubit in the sub-quantum circuit.

[0084] Step 203: Measure the qubits in each of the sub-quantum circuits after the initial quantum state is prepared, and obtain the measurement results for each of the sub-quantum circuits.

[0085] Step 204: Combine the measurement results of each of the sub-quantum circuits to obtain the computation result of the quantum computing task.

[0086] Specifically, the sub-quantum circuit includes a first qubit and a second qubit, wherein the timeline containing the first qubit is not cut, while the timeline containing the second qubit is cut; the preparation of the initial quantum state of each qubit in the sub-quantum circuit includes:

[0087] The initial quantum state of the first qubit is prepared to the first quantum state using the first unitary matrix; if the timeline where the second qubit is located is the upstream timeline after the cut, the initial quantum state of the second qubit is prepared to the first quantum state using the first unitary matrix; if the timeline where the second qubit is located is the downstream timeline after the cut, the initial quantum state of the second qubit is prepared to the second quantum state using the second unitary matrix. The upstream timeline is the timeline before the cut position, and the downstream timeline is the timeline after the cut position.

[0088] Wherein, the first quantum state is |0>, the first unitary matrix is ​​the identity matrix E, and the...

[0089] Wherein, the second quantum state If |0>, the second unitary matrix is ​​the identity matrix E;

[0090] Second quantum state for The second unitary matrix is

[0091] Second quantum state for The second unitary matrix is

[0092] Second quantum state for The second unitary matrix is

[0093] in,

[0094] Specifically, the measurement of each qubit in each sub-quantum circuit after the initial quantum state is prepared, to obtain the measurement result of each sub-quantum circuit, includes:

[0095] The final quantum state of the first qubit after running the sub-quantum circuit is measured on the first measurement basis; if the timeline of the second qubit is downstream of the cut position, the final quantum state of the second qubit after running the sub-quantum circuit is measured on the first measurement basis; if the timeline of the second qubit is upstream of the cut position, the final quantum state of the second qubit after running the sub-quantum circuit is measured on the second measurement basis.

[0096] Wherein, the first measurement basis is Z, and the second measurement basis is Z, X, and Y; wherein, the The The

[0097] Wherein, the final measurement state is a Pauli characteristic state, and the Pauli characteristic state corresponding to Z is or The Pauli characteristic state corresponding to X is: or The Pauli characteristic state corresponding to Y is: or

[0098] like Figure 2B As shown, Figure 2B This is a schematic diagram illustrating the process of cutting a quantum circuit into sub-quantum circuits, provided in an embodiment of this application. The original quantum circuit is cut into two sub-quantum circuits at the two cutting positions shown in the diagram: sub-quantum circuit 1 and sub-quantum circuit 2. The timelines containing qubits q[1] and q[3] in the original quantum circuit are cut, while the timelines containing qubits q[0] and q[2] are not cut. The left-pointing triangle indicates that the initial quantum state of the qubit at that location needs to be prepared to the second quantum state, and the right-pointing triangle indicates that the final quantum state of the qubit at that location needs to be measured on the second measurement basis.

[0099] As can be seen in this embodiment, the quantum state evolution process of qubits based on quantum circuits involves dividing the quantum circuit corresponding to the quantum computing task into multiple sub-quantum circuits; preparing the initial quantum state of the qubits in each sub-quantum circuit; measuring the qubits in each sub-quantum circuit after preparing the initial quantum state to obtain the measurement result of each sub-quantum circuit; and synthesizing the measurement results of each sub-quantum circuit to obtain the computation result of the quantum computing task. This achieves the preparation of the initial quantum state of each sub-quantum circuit, thus enabling each sub-quantum circuit to operate independently on different devices. Since the sub-quantum circuits can operate independently, the qubits of each sub-quantum circuit can also be measured separately to obtain measurement results. Finally, the measurement results of each sub-quantum circuit are synthesized, thereby realizing distributed computing of the quantum computing task.

[0100] In one embodiment of this application, the method of synthesizing the measurement results of each of the sub-quantum circuits to obtain the computation result of the quantum computing task includes:

[0101] Determine the density matrix corresponding to the measurement results of each of the sub-quantum circuits;

[0102] The density matrix corresponding to the measurement results of the multiple sub-quantum circuits is merged based on the tensor shrinkage method to obtain the density matrix corresponding to the measurement results of the quantum circuit.

[0103] The density matrix corresponding to the measurement results of the quantum circuit is determined as the calculation result of the quantum computing task.

[0104] For example, the measurement results of sub-quantum circuit 1 are as follows: the density matrix corresponding to the |00> state is Λ1(00), the density matrix corresponding to the |01> state is Λ1(01), the density matrix corresponding to the |10> state is Λ1(10), and the density matrix corresponding to the |11> state is Λ1(11).

[0105] The measurement results of sub-quantum circuit 2 are as follows: the density matrix corresponding to the |00> state is Λ2(00), the density matrix corresponding to the |01> state is Λ2(01), the density matrix corresponding to the |10> state is Λ2(10), and the density matrix corresponding to the |11> state is Λ2(11).

[0106] Among them, Λ1(00), Λ1(01), Λ1(10), Λ1(11), Λ2(00), Λ2(01), Λ2(10), and Λ2(11) are all 4×4 complex matrices.

[0107] Based on the tensor shrinking method, Λ1(00) can be merged with Λ2(00) to obtain Λ(00), which represents the first quantum state of the atomic quantum circuit; Λ1(01) can be merged with Λ2(01) to obtain Λ(01), which represents the second quantum state of the atomic quantum circuit; Λ1(10) can be merged with Λ2(10) to obtain Λ(10), which represents the third quantum state of the atomic quantum circuit; Λ1(11) can be merged with Λ2(11) to obtain Λ(11), which represents the fourth quantum state of the atomic quantum circuit. Λ(00), Λ(01), Λ(10), and Λ(11) are the results of the quantum computing task.

[0108] In one embodiment of this application, before merging the density matrices corresponding to the measurement results of multiple sub-quantum circuits based on the tensor shrinkage method to obtain the density matrix corresponding to the measurement results of the quantum circuit, the method further includes:

[0109] Determine the qubits contained in each of the sub-quantum circuits;

[0110] If the timeline in which the qubit is located is not cut, then the input node corresponding to the qubit is determined as a classical input node, and the output node corresponding to the qubit is determined as a classical output node;

[0111] If the timeline in which the qubit is located is the upstream timeline after the cut, then the input node corresponding to the qubit is determined as the classical input node, and the output node corresponding to the qubit is determined as the quantum output node;

[0112] If the timeline in which the qubit is located is the downstream timeline after the cut, then the input node corresponding to the qubit is determined as the quantum input node, and the output node corresponding to the qubit is determined as the classical output node;

[0113] The input and output nodes of the density matrix corresponding to the measurement results of each sub-quantum circuit are determined based on the classical input node, the classical output node, the quantum input node, and the quantum output node.

[0114] like Figure 2B As shown, for sub-quantum circuit 1, the input node corresponding to q[0] is a classical input node, using C i0 This indicates that the output node is a classic output node, using C++. o0 It indicates that the input node corresponding to q[1] is the quantum input node Q. i1 This indicates that the output node is a classic output node, using C++. o1 It indicates that the input node corresponding to q[3] is the classic input node C. i3 This indicates that the output node is a quantum output node, denoted by Q. o3 Indicated; the density matrix corresponding to sub-quantum circuit 1 is

[0115]

[0116] Among them, the initial quantum states of q[0] and q[3] have been determined, and the output states of q[0] and q[1] have also been determined to be either 0 or 1. Therefore, the density matrix corresponding to the above sub-quantum circuit 1 is:

[0117]

[0118] For sub-quantum circuit 2, the input node corresponding to q[1] is a classical input node using C. i1 This indicates that the output node is a quantum output node, denoted by Q. o1 It indicates that the input node corresponding to q[2] is the classic input node C. i2 This indicates that the output node is a classic output node, using C++. o2 It indicates that the input node corresponding to q[3] is the quantum input node Q. i3 This indicates that the output node is a classic output node, using C++. o3 Indicated; the density matrix corresponding to sub-quantum circuit 1 is

[0119]

[0120] Among them, the initial quantum states of q[1] and q[2] have been determined, and the output states of q[2] and q[3] have also been determined to be 0 or 1. Therefore, the density matrix corresponding to the above sub-quantum circuit 2 is:

[0121]

[0122] In one embodiment of this application, the tensor shrinking method is as follows:

[0123] If the output node of density matrix I is equal to the input node of density matrix J, then density matrix I and density matrix J are merged to obtain density matrix K. The input node of density matrix K is the same as the input node of density matrix I, and the output node of density matrix K is the same as the output node of density matrix J.

[0124] For example, suppose the input node of I is i and the output node is j, using... Indicate that J has input node j and output node k, using... Indicate; then

[0125]

[0126] For the density matrices corresponding to sub-quantum circuit 1 and sub-quantum circuit 2

[0127]

[0128] Here, Λ represents a real number.

[0129] Therefore, for Λ1(00), Λ1(01), Λ1(10), Λ1(11), Λ2(00), Λ2(01), Λ2(10), Λ2(11), Λ1(00) can be merged with Λ2(00) to obtain Λ(00), which is used to represent the first quantum state of the atomic quantum circuit; Λ1(01) can be merged with Λ2(01) to obtain Λ(01), which is used to represent the second quantum state of the atomic quantum circuit; Λ1(10) can be merged with Λ2(10) to obtain Λ(10), which is used to represent the third quantum state of the atomic quantum circuit; Λ1(11) can be merged with Λ2(11) to obtain Λ(11), which is used to represent the fourth quantum state of the atomic quantum circuit.

[0130] In one embodiment of this application, the process of dividing the quantum circuit corresponding to the quantum computing task into multiple sub-quantum circuits in the quantum state evolution process of the quantum circuit-based qubit includes:

[0131] The cutting position of the quantum circuit corresponding to the quantum computing task is determined based on the computing resources currently available to the electronic device and the quantum state evolution process of the qubits of the quantum circuit.

[0132] The quantum circuit is cut into multiple sub-quantum circuits based on the cutting position.

[0133] In one embodiment of this application, the computing resources include qubits, and determining the cutting position of the quantum circuit corresponding to the quantum computing task based on the quantum state evolution process of the qubits of the quantum circuit and the computing resources currently allowed to be used by the electronic device includes:

[0134] Obtain the connectivity graph of the quantum circuit corresponding to the quantum computing task, and use the number of qubits currently allowed to be used by the electronic device as the maximum number of qubits allowed to be used in the sub-quantum circuits after the quantum circuit is cut;

[0135] The first cutting point of the connected graph is determined based on the maximum number of qubits;

[0136] Determine the two quantum logic gates corresponding to the first cutting point in the quantum circuit;

[0137] The change in the quantum state evolution of the same qubit under the action of the two quantum logic gates from the quantum state evolution under the action of one quantum logic gate to the quantum state evolution under the action of the other quantum logic gate is taken as the cutting position.

[0138] The vertices of the connected graph represent the quantum logic gates in the quantum circuit, and the directed edges of the connected graph represent the dependencies of the quantum logic gates on the quantum state evolution time order of the qubits.

[0139] Specifically, if the electronic device includes multiple computing modules, the step of using the number of qubits currently allowed to be used by the electronic device as the maximum number of qubits allowed to be used in the sub-quantum circuits after the quantum circuit is cut includes:

[0140] Determine the number of qubits n used in the quantum circuit;

[0141] From the plurality of computing modules, m target computing modules are determined, wherein the sum of the number of qubits currently allowed to be used by the m target computing modules is greater than or equal to n;

[0142] The number of qubits currently allowed to be used by the i-th target computing module is taken as the maximum number of qubits allowed to be used by the i-th sub-quantum circuit after the quantum circuit is cut, and the i-th target computing module is any one of the m target computing modules.

[0143] Specifically, determining the first cut point of the connected graph based on the maximum number of qubits includes:

[0144] Obtain q from the vertices of the connected graph i A series of consecutive vertices, and the q i A series of consecutive vertices are used as the vertices of the i-th sub-connected graph, wherein q i The number of qubits included in a consecutive vertex is equal to the number of qubits currently allowed to be used by the i-th target computing module;

[0145] Any point on the directed edge between the vertices included in the i-th sub-connected graph and any vertex in the connected graph other than the vertices included in the i-th sub-connected graph is taken as the first cutting point of the connected graph.

[0146] Delete the i-th sub-connected graph to obtain a new connected graph;

[0147] Let i = i + 1, and then perform the step to obtain q from the vertices of the connected graph. i A series of consecutive vertices, and the q i The process continues until all the first cut points are determined, using consecutive vertices as vertices of the i-th sub-connected graph.

[0148] In one embodiment of this application, the process of dividing the quantum circuit corresponding to the quantum computing task into multiple sub-quantum circuits in the quantum state evolution process of the quantum circuit-based qubit includes:

[0149] The quantum state evolution process of qubits based on greedy algorithms and quantum circuits determines the cutting position of the quantum circuit corresponding to the quantum computing task.

[0150] The quantum circuit is cut into multiple sub-quantum circuits based on the cutting position.

[0151] It should be noted that the specific implementation method for determining the cutting position of the quantum circuit corresponding to the quantum computing task based on the quantum state evolution process of the qubits of the quantum circuit and the greedy algorithm is the same as the above-mentioned specific implementation method for determining the cutting position of the quantum circuit corresponding to the quantum computing task based on the quantum state evolution process of the qubits of the quantum circuit and the computing resources currently allowed to be used by the electronic device. In the greedy algorithm, the number of qubits included in the vertices of each sub-connected graph is all the same, which is equal to the preset number of qubits, and is independent of the number of qubits currently allowed to be used in the specific electronic device.

[0152] See Figure 3 , Figure 3 This is a flowchart illustrating another quantum computing task processing method provided in an embodiment of this application. The method includes:

[0153] Step 301: Determine the cutting position of the quantum circuit corresponding to the quantum computing task based on the quantum state evolution process of the qubits of the quantum circuit using a greedy algorithm.

[0154] Step 302: Cut the quantum circuit into multiple sub-quantum circuits based on the cutting position.

[0155] Step 303: Prepare the initial quantum state of each qubit in the sub-quantum circuit.

[0156] Step 304: Measure the qubits in each of the sub-quantum circuits after the initial quantum state is prepared, and obtain the measurement results for each of the sub-quantum circuits.

[0157] Step 305: Determine the density matrix corresponding to the measurement results of each sub-quantum circuit.

[0158] Step 306: Determine the qubits contained in each of the sub-quantum circuits.

[0159] Step 307: If the timeline in which the qubit is located is not cut, then the input node corresponding to the qubit is determined as a classical input node, and the output node corresponding to the qubit is determined as a classical output node.

[0160] Step 308: If the timeline where the qubit is located is the upstream timeline after the cut, then the input node corresponding to the qubit is determined as the classical input node, and the output node corresponding to the qubit is determined as the quantum output node.

[0161] Step 309: If the timeline where the qubit is located is the downstream timeline after the cut, then the input node corresponding to the qubit is determined as the quantum input node, and the output node corresponding to the qubit is determined as the classical output node.

[0162] Step 310: Based on the classical input node, the classical output node, the quantum input node, and the quantum output node, determine the input node and output node of the density matrix corresponding to the measurement result of each sub-quantum circuit.

[0163] Step 311: Based on the tensor shrinking method, merge the density matrices corresponding to the measurement results of multiple sub-quantum circuits to obtain the density matrix corresponding to the measurement results of the quantum circuit; the tensor shrinking method is as follows: if the output node of density matrix I is equal to the input node of density matrix J, then merge density matrix I and density matrix J to obtain density matrix K, the input node of density matrix K is the same as the input node of density matrix I, and the output node of density matrix K is the same as the output node of density matrix J.

[0164] Step 312: Determine the density matrix corresponding to the measurement results of the quantum circuit as the calculation result of the quantum computing task.

[0165] It should be noted that the specific implementation process of this embodiment can be found in the specific implementation process described in the above method embodiments, and will not be described again here.

[0166] See Figure 4 , Figure 4This is a flowchart illustrating another quantum computing task processing method provided in an embodiment of this application. The method includes:

[0167] Step 401: Obtain the connectivity graph of the quantum circuit corresponding to the quantum computing task, and use the number of qubits currently allowed to be used by the electronic device as the maximum number of qubits allowed to be used in the sub-quantum circuits after the quantum circuit is cut.

[0168] Step 402: Determine the first cut point of the connected graph based on the maximum number of qubits.

[0169] Step 403: Determine the two quantum logic gates corresponding to the first cutting point in the quantum circuit.

[0170] Step 404: The change in the quantum state evolution of the same qubit under the action of the two quantum logic gates from the quantum state evolution under the action of one quantum logic gate to the quantum state evolution under the action of the other quantum logic gate is taken as the cutting position.

[0171] Step 405: Cut the quantum circuit into multiple sub-quantum circuits based on the cutting position.

[0172] Step 406: Prepare the initial quantum state of each qubit in the sub-quantum circuit.

[0173] Step 407: Measure the qubits in each of the sub-quantum circuits after the initial quantum state is prepared, and obtain the measurement results for each of the sub-quantum circuits.

[0174] Step 408: Determine the density matrix corresponding to the measurement results of each sub-quantum circuit.

[0175] Step 409: Determine the qubits contained in each of the sub-quantum circuits.

[0176] Step 410: If the timeline in which the qubit is located has not been cut, then the input node corresponding to the qubit is determined as a classical input node, and the output node corresponding to the qubit is determined as a classical output node.

[0177] Step 411: If the timeline where the qubit is located is the upstream timeline after the cut, then the input node corresponding to the qubit is determined as the classical input node, and the output node corresponding to the qubit is determined as the quantum output node.

[0178] Step 412: If the timeline where the qubit is located is the downstream timeline after the cut, then the input node corresponding to the qubit is determined as the quantum input node, and the output node corresponding to the qubit is determined as the classical output node.

[0179] Step 413: Based on the classical input node, the classical output node, the quantum input node, and the quantum output node, determine the input node and output node of the density matrix corresponding to the measurement result of each sub-quantum circuit.

[0180] Step 414: Based on the tensor shrinking method, merge the density matrices corresponding to the measurement results of multiple sub-quantum circuits to obtain the density matrix corresponding to the measurement results of the quantum circuit; the tensor shrinking method is as follows: if the output node of density matrix I is equal to the input node of density matrix J, then merge density matrix I and density matrix J to obtain density matrix K, the input node of density matrix K is the same as the input node of density matrix I, and the output node of density matrix K is the same as the output node of density matrix J.

[0181] Step 415: Determine the density matrix corresponding to the measurement results of the quantum circuit as the calculation result of the quantum computing task.

[0182] It should be noted that the specific implementation process of this embodiment can be found in the specific implementation process described in the above method embodiments, and will not be described again here.

[0183] With the above Figure 2A , Figure 3 and Figure 4 The embodiments shown are consistent; please refer to [link / reference]. Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 5 As shown, the electronic device includes a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for performing the following steps:

[0184] The quantum state evolution process of qubits based on quantum circuits divides the quantum circuit corresponding to the quantum computing task into multiple sub-quantum circuits.

[0185] Prepare the initial quantum state of each qubit in each of the sub-quantum circuits;

[0186] The qubits in each of the sub-quantum circuits after the initial quantum state is prepared are measured to obtain the measurement results for each of the sub-quantum circuits;

[0187] The measurement results of each of the sub-quantum circuits are combined to obtain the computation result of the quantum computing task.

[0188] In one embodiment of this application, the procedure for synthesizing the measurement results of each of the sub-quantum circuits to obtain the computation result of the quantum computing task includes instructions specifically for performing the following steps:

[0189] Determine the density matrix corresponding to the measurement results of each of the sub-quantum circuits;

[0190] The density matrix corresponding to the measurement results of the multiple sub-quantum circuits is merged based on the tensor shrinkage method to obtain the density matrix corresponding to the measurement results of the quantum circuit.

[0191] The density matrix corresponding to the measurement results of the quantum circuit is determined as the calculation result of the quantum computing task.

[0192] In one embodiment of this application, the tensor shrinking method is as follows:

[0193] If the output node of density matrix I is equal to the input node of density matrix J, then density matrix I and density matrix J are merged to obtain density matrix K. The input node of density matrix K is the same as the input node of density matrix I, and the output node of density matrix K is the same as the output node of density matrix J.

[0194] In one embodiment of this application, before merging the density matrices corresponding to the measurement results of the multiple sub-quantum circuits based on the tensor shrinkage method to obtain the density matrix corresponding to the measurement results of the quantum circuit, the above procedure includes instructions for performing the following steps:

[0195] Determine the qubits contained in each of the sub-quantum circuits;

[0196] If the timeline in which the qubit is located is not cut, then the input node corresponding to the qubit is determined as a classical input node, and the output node corresponding to the qubit is determined as a classical output node;

[0197] If the timeline in which the qubit is located is the upstream timeline after the cut, then the input node corresponding to the qubit is determined as the classical input node, and the output node corresponding to the qubit is determined as the quantum output node;

[0198] If the timeline in which the qubit is located is the downstream timeline after the cut, then the input node corresponding to the qubit is determined as the quantum input node, and the output node corresponding to the qubit is determined as the classical output node;

[0199] The input and output nodes of the density matrix corresponding to the measurement results of each sub-quantum circuit are determined based on the classical input node, the classical output node, the quantum input node, and the quantum output node.

[0200] In one embodiment of this application, regarding the process of quantum state evolution of quantum circuit-based qubits, which involves dividing the quantum circuit corresponding to a quantum computing task into multiple sub-quantum circuits, the above procedure includes instructions specifically for performing the following steps:

[0201] The quantum state evolution process of qubits based on greedy algorithms and quantum circuits determines the cutting position of the quantum circuit corresponding to the quantum computing task.

[0202] The quantum circuit is cut into multiple sub-quantum circuits based on the cutting position.

[0203] In one embodiment of this application, regarding the process of quantum state evolution of quantum circuit-based qubits, which involves dividing the quantum circuit corresponding to a quantum computing task into multiple sub-quantum circuits, the above procedure includes instructions specifically for performing the following steps:

[0204] The cutting position of the quantum circuit corresponding to the quantum computing task is determined based on the computing resources currently available to the electronic device and the quantum state evolution process of the qubits of the quantum circuit.

[0205] The quantum circuit is cut into multiple sub-quantum circuits based on the cutting position.

[0206] In one embodiment of this application, the computing resources include qubits. Regarding determining the cutting position of the quantum circuit corresponding to the quantum computing task based on the quantum state evolution process of the qubits of the quantum circuit and the computing resources currently permitted for use by the electronic device, the above procedure includes instructions specifically for performing the following steps:

[0207] Obtain the connectivity graph of the quantum circuit corresponding to the quantum computing task, and use the number of qubits currently allowed to be used by the electronic device as the maximum number of qubits allowed to be used in the sub-quantum circuits after the quantum circuit is cut;

[0208] The first cutting point of the connected graph is determined based on the maximum number of qubits;

[0209] Determine the two quantum logic gates corresponding to the first cutting point in the quantum circuit;

[0210] The change in the quantum state evolution of the same qubit under the action of the two quantum logic gates from the quantum state evolution under the action of one quantum logic gate to the quantum state evolution under the action of the other quantum logic gate is taken as the cutting position.

[0211] It should be noted that the specific implementation process of this embodiment can be found in the specific implementation process described in the above method embodiments, and will not be described again here.

[0212] This application embodiment can divide an electronic device into functional units according to the method example described above. For example, each function can be divided into its own functional unit, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0213] The following are embodiments of the apparatus described in this application. These embodiments are used to execute the methods implemented in the embodiments of the method described in this application. Please refer to... Figure 6 , Figure 6 This is a schematic diagram of the structure of a quantum computing task processing device provided in an embodiment of this application, including:

[0214] The cutting unit 601 is used to cut the quantum circuit corresponding to the quantum computing task into multiple sub-quantum circuits in the quantum state evolution process of the quantum bit based on the quantum circuit;

[0215] The preparation unit 602 is used to prepare the initial quantum state of each qubit in the sub-quantum circuit;

[0216] Measurement unit 603 is used to measure the qubits in each of the sub-quantum circuits after the initial quantum state is prepared, and to obtain the measurement results of each of the sub-quantum circuits;

[0217] Synthesis unit 604 is used to synthesize the measurement results of each of the sub-quantum circuits to obtain the calculation results of the quantum computing task.

[0218] In one embodiment of this application, in terms of synthesizing the measurement results of each of the sub-quantum circuits to obtain the computation result of the quantum computing task, the synthesis unit 604 is configured to:

[0219] Determine the density matrix corresponding to the measurement results of each of the sub-quantum circuits;

[0220] The density matrix corresponding to the measurement results of the multiple sub-quantum circuits is merged based on the tensor shrinkage method to obtain the density matrix corresponding to the measurement results of the quantum circuit.

[0221] The density matrix corresponding to the measurement results of the quantum circuit is determined as the calculation result of the quantum computing task.

[0222] In one embodiment of this application, the tensor shrinking method is as follows:

[0223] If the output node of density matrix I is equal to the input node of density matrix J, then density matrix I and density matrix J are merged to obtain density matrix K. The input node of density matrix K is the same as the input node of density matrix I, and the output node of density matrix K is the same as the output node of density matrix J.

[0224] In one embodiment of this application, before merging the density matrices corresponding to the measurement results of multiple sub-quantum circuits based on the tensor shrinkage method to obtain the density matrix corresponding to the measurement results of the quantum circuit, the synthesis unit 604 is further configured to:

[0225] Determine the qubits contained in each of the sub-quantum circuits;

[0226] If the timeline in which the qubit is located is not cut, then the input node corresponding to the qubit is determined as a classical input node, and the output node corresponding to the qubit is determined as a classical output node;

[0227] If the timeline in which the qubit is located is the upstream timeline after the cut, then the input node corresponding to the qubit is determined as the classical input node, and the output node corresponding to the qubit is determined as the quantum output node;

[0228] If the timeline in which the qubit is located is the downstream timeline after the cut, then the input node corresponding to the qubit is determined as the quantum input node, and the output node corresponding to the qubit is determined as the classical output node;

[0229] The input and output nodes of the density matrix corresponding to the measurement results of each sub-quantum circuit are determined based on the classical input node, the classical output node, the quantum input node, and the quantum output node.

[0230] In one embodiment of this application, regarding the process of quantum state evolution of qubits based on quantum circuits to divide the quantum circuit corresponding to the quantum computing task into multiple sub-quantum circuits, the dividing unit 601 is specifically used for:

[0231] The quantum state evolution process of qubits based on greedy algorithms and quantum circuits determines the cutting position of the quantum circuit corresponding to the quantum computing task.

[0232] The quantum circuit is cut into multiple sub-quantum circuits based on the cutting position.

[0233] In one embodiment of this application, regarding the process of quantum state evolution of qubits based on quantum circuits to divide the quantum circuit corresponding to the quantum computing task into multiple sub-quantum circuits, the dividing unit 601 is specifically used for:

[0234] The cutting position of the quantum circuit corresponding to the quantum computing task is determined based on the computing resources currently available to the electronic device and the quantum state evolution process of the qubits of the quantum circuit.

[0235] The quantum circuit is cut into multiple sub-quantum circuits based on the cutting position.

[0236] In one embodiment of this application, the computing resources include qubits, and the quantum state evolution process of the qubits of the quantum circuit, based on the computing resources currently allowed to be used by the electronic device, determines the cutting position of the quantum circuit corresponding to the quantum computing task. The cutting unit 601 is specifically used for:

[0237] Obtain the connectivity graph of the quantum circuit corresponding to the quantum computing task, and use the number of qubits currently allowed to be used by the electronic device as the maximum number of qubits allowed to be used in the sub-quantum circuits after the quantum circuit is cut;

[0238] The first cutting point of the connected graph is determined based on the maximum number of qubits;

[0239] Determine the two quantum logic gates corresponding to the first cutting point in the quantum circuit;

[0240] The change in the quantum state evolution of the same qubit under the action of the two quantum logic gates from the quantum state evolution under the action of one quantum logic gate to the quantum state evolution under the action of the other quantum logic gate is taken as the cutting position.

[0241] It should be noted that the cutting unit 601, the preparation unit 602, the measurement unit 603, and the synthesis unit 604 can be implemented by a processor.

[0242] This application also provides a computer-readable storage medium storing a computer program for electronic data interchange, which causes a computer to perform some or all of the steps of any of the methods described in the above method embodiments, wherein the computer includes an electronic device.

[0243] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments. The computer program product may be a software installation package, and the computer may include an electronic device.

[0244] This application also provides a quantum computer operating system, which implements the cutting process of the quantum computing circuit according to some or all of the steps of any of the methods described in the above method embodiments.

[0245] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0246] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0247] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.

[0248] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0249] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0250] If the integrated units described above are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0251] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0252] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A quantum computing task processing method, characterized in that, include: The quantum state evolution process of qubits based on quantum circuits divides the quantum circuit corresponding to the quantum computing task into multiple sub-quantum circuits. Prepare the initial quantum state of each qubit in each of the sub-quantum circuits; The qubits in each of the sub-quantum circuits after the initial quantum state is prepared are measured to obtain the measurement results for each of the sub-quantum circuits; Determine the density matrix corresponding to the measurement results of each of the sub-quantum circuits; The density matrix corresponding to the measurement results of the multiple sub-quantum circuits is merged based on the tensor shrinkage method to obtain the density matrix corresponding to the measurement results of the quantum circuit. The density matrix corresponding to the measurement results of the quantum circuit is determined as the calculation result of the quantum computing task.

2. The method according to claim 1, characterized in that, The tensor shrinking method is as follows: If the output node of density matrix I is equal to the input node of density matrix J, then density matrix I and density matrix J are merged to obtain density matrix K. The input node of density matrix K is the same as the input node of density matrix I, and the output node of density matrix K is the same as the output node of density matrix J.

3. The method according to claim 1 or 2, characterized in that, Before merging the density matrices corresponding to the measurement results of multiple sub-quantum circuits based on the tensor shrinkage method to obtain the density matrix corresponding to the measurement results of the quantum circuit, the method further includes: Determine the qubits contained in each of the sub-quantum circuits; If the timeline in which the qubit is located is not cut, then the input node corresponding to the qubit is determined as a classical input node, and the output node corresponding to the qubit is determined as a classical output node; If the timeline in which the qubit is located is the upstream timeline after the cut, then the input node corresponding to the qubit is determined as the classical input node, and the output node corresponding to the qubit is determined as the quantum output node; If the timeline in which the qubit is located is the downstream timeline after the cut, then the input node corresponding to the qubit is determined as the quantum input node, and the output node corresponding to the qubit is determined as the classical output node; The input and output nodes of the density matrix corresponding to the measurement results of each sub-quantum circuit are determined based on the classical input node, the classical output node, the quantum input node, and the quantum output node.

4. The method according to claim 1, characterized in that, The quantum state evolution process of the quantum bit based on the quantum circuit divides the quantum circuit corresponding to the quantum computing task into multiple sub-quantum circuits, including: The quantum state evolution process of qubits based on greedy algorithms and quantum circuits determines the cutting position of the quantum circuit corresponding to the quantum computing task. The quantum circuit is cut into multiple sub-quantum circuits based on the cutting position.

5. The method according to claim 1, characterized in that, The quantum state evolution process of the quantum bit based on the quantum circuit divides the quantum circuit corresponding to the quantum computing task into multiple sub-quantum circuits, including: The cutting position of the quantum circuit corresponding to the quantum computing task is determined based on the computing resources currently available to the electronic device and the quantum state evolution process of the qubits of the quantum circuit. The quantum circuit is cut into multiple sub-quantum circuits based on the cutting position.

6. The method according to claim 5, characterized in that, The computing resources include qubits. The determination of the cutting position of the quantum circuit corresponding to the quantum computing task based on the quantum state evolution process of the qubits of the quantum circuit, based on the computing resources currently allowed to be used by the electronic device, includes: Obtain the connectivity graph of the quantum circuit corresponding to the quantum computing task, and use the number of qubits currently allowed to be used by the electronic device as the maximum number of qubits allowed to be used in the sub-quantum circuits after the quantum circuit is cut; The first cutting point of the connected graph is determined based on the maximum number of qubits; Determine the two quantum logic gates corresponding to the first cutting point in the quantum circuit; The change in the quantum state evolution of the same qubit under the action of the two quantum logic gates from the quantum state evolution under the action of one quantum logic gate to the quantum state evolution under the action of the other quantum logic gate is taken as the cutting position.

7. A quantum computing task processing device, characterized in that, include: The cutting unit is used to cut the quantum circuit corresponding to the quantum computing task into multiple sub-quantum circuits based on the quantum state evolution process of the qubits of the quantum circuit; A preparation unit is used to prepare the initial quantum state of each qubit in each of the sub-quantum circuits; A measurement unit is used to measure the qubits in each of the sub-quantum circuits after the initial quantum state is prepared, and to obtain the measurement results of each of the sub-quantum circuits; A synthesis unit is used to determine the density matrix corresponding to the measurement result of each sub-quantum circuit; merge the density matrices corresponding to the measurement results of multiple sub-quantum circuits based on the tensor shrinking method to obtain the density matrix corresponding to the measurement result of the quantum circuit; and determine the density matrix corresponding to the measurement result of the quantum circuit as the computation result of the quantum computing task.

8. An electronic device, characterized in that, The method includes a processor, a memory, a communication interface, and one or more programs, said programs being stored in the memory and configured to be executed by the processor, said programs including instructions for performing the steps of the method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is executed by a processor to implement the method of any one of claims 1-6.

10. A quantum computer operating system, characterized in that, The quantum computer operating system implements the processing of quantum computing tasks according to any one of claims 1-6.

Citation Information

Patent Citations

  • Quantum computing simulation method and device, storage medium and electronic device

    CN110188885A

  • Method and system for estimating quantum computing simulation time

    CN111563598A