Data decomposition task processing method and apparatus, storage medium, and electronic device

By using cascaded modular multiplication units and quantum state measurement reset technology for control bits in quantum data decomposition circuits, the problem of excessive qubit occupancy in large-scale integer decomposition is solved, and efficient integer decomposition is achieved.

CN117035103BActive Publication Date: 2026-05-12ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
Filing Date
2023-06-29
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing quantum computing technologies require a large number of qubits for large-scale integer factorization, resulting in excessive resource consumption and making it difficult to effectively achieve large-scale integer factorization.

Method used

By using multiple cascaded modular multiplication units and control bits in the quantum data decomposition circuit, the control bits sequentially control each modular multiplication unit to perform modular multiplication operations, and measure and reset its quantum state after each operation to generate a sequence of measurement results. The classical processing unit determines the integer decomposition result based on this sequence.

Benefits of technology

This reduces the occupancy of qubits, enables large-scale integer factorization, and improves the efficiency of quantum computing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117035103B_ABST
    Figure CN117035103B_ABST
Patent Text Reader

Abstract

The application discloses a data decomposition task processing method and device, a storage medium and an electronic device, and relates to the technical field of quantum computing. The method comprises the following steps: receiving to-be-decomposed data, a random number and a quantum data decomposition circuit sent by a classical processing unit, wherein the quantum data decomposition circuit comprises a plurality of cascaded modular multiplication units and control bits, and the control bits are used for sequentially controlling each modular multiplication unit to calculate a preset exponential power of the random number and a modulus of the to-be-decomposed data; running the quantum data decomposition circuit; for each modular multiplication unit, after the control bits control the current modular multiplication unit to perform modular multiplication operation, measuring the quantum state of the control bits, setting the quantum state of the control bits to zero state for controlling the next modular multiplication unit to perform modular multiplication operation, and obtaining a measurement result sequence; and sending the measurement result sequence to the classical processing unit, so that the classical processing unit determines an integer decomposition result of the to-be-decomposed data according to the measurement result sequence. The occupation of quantum bits can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of quantum computing technology, and in particular relates to a method, apparatus, storage medium and electronic device for processing data decomposition tasks. Background Technology

[0002] A quantum computer is a physical device that performs high-speed mathematical and logical operations, stores and processes quantum information in accordance with the laws of quantum mechanics. When a device processes and calculates quantum information and runs quantum algorithms, it is a quantum computer. Because of its ability to process mathematical problems more efficiently than ordinary computers—for example, reducing the time to crack RSA keys from hundreds of years to hours—quantum computers have become a key technology under research.

[0003] Shor's algorithm is an algorithm used to factor integers. Currently, integer factorization is based on building quantum circuits using GPU or CPU simulators to implement Shor's algorithm. Building simulated quantum circuits usually requires hundreds of qubits. However, the dimensionality of Hilbert space increases exponentially with the number of qubits, so GPU or CPU simulators cannot simulate quantum circuits with more than 100 qubits. Therefore, existing technical solutions require a large number of qubits for factoring large numbers of integers. Summary of the Invention

[0004] The purpose of this application is to provide a method, apparatus, storage medium, and electronic device for data factorization tasks, aiming to achieve large-scale integer factorization and reduce the occupancy of qubits.

[0005] To achieve the above objectives, a first aspect of this application provides a method for processing a data decomposition task, the method being applied to a quantum processing unit, wherein the data decomposition task is a task of integer decomposing data to be decomposed, comprising:

[0006] The system receives the data to be decomposed, a random number, and a quantum data decomposition circuit sent by a classical processing unit. The quantum data decomposition circuit includes multiple cascaded modular multiplication units and control bits. The control bits are used to sequentially control each modular multiplication unit to calculate the preset exponent of the random number and the modulus of the data to be decomposed.

[0007] The quantum data decomposition circuit is run. For each modular multiplication unit, after the control bit controls the current modular multiplication unit to perform a modular multiplication operation, the quantum state of the control bit is measured, and the quantum state of the control bit is set to zero to control the next modular multiplication unit to perform a modular multiplication operation, thus obtaining a sequence of measurement results.

[0008] The measurement result sequence is sent to the classical processing unit so that the classical processing unit can determine the integer decomposition result of the data to be decomposed based on the measurement result sequence.

[0009] Optionally, the quantum data decomposition circuit further includes a first H gate, a phase rotation logic gate, and a second H gate acting sequentially on the control bit. The first H gate acts on the control bit after the quantum state is set to zero. The phase rotation logic gate acts on the control bit after the control bit controls the modular multiplication unit to perform modular multiplication. The second H gate acts on the control bit and then measures the quantum state of the control bit.

[0010] Optionally, the phase-rotating logic gate R K The matrix form is as follows:

[0011]

[0012] The parameter θ of the phase-rotation logic gate k Calculated using the following formula:

[0013]

[0014] Where k represents the k-th action of the rotation logic gate on the control bit, m j This represents the measurement result obtained by the control bit in the j-th measurement.

[0015] Optionally, the random number takes values ​​in the range [1, N-1], and the random number is coprime to the data to be decomposed.

[0016] According to a second aspect of the embodiments of this application, a method for processing a data decomposition task is provided, the method being applied to a classical processing unit, comprising:

[0017] Obtain the data decomposition task, which is a task to decompose the data to be decomposed into integers;

[0018] A random number is determined based on the data to be decomposed, and a quantum data decomposition circuit is constructed including multiple cascaded modular multiplication units and control bits. The control bits are used to sequentially control each modular multiplication unit to calculate the preset exponent of the random number and the modulus of the data to be decomposed.

[0019] The quantum processing unit sends the data to be decomposed, the random number, and the quantum data decomposition circuit to the quantum processing unit so that the quantum processing unit runs the quantum data decomposition circuit. For each modular multiplication unit, after the control bit controls the current modular multiplication unit to perform modular multiplication, the quantum state of the control bit is measured, and the quantum state of the control bit is set to zero to control the next modular multiplication unit to perform modular multiplication, thereby obtaining a sequence of measurement results.

[0020] The measurement result sequence sent by the quantum processing unit is received, and the integer decomposition result of the data to be decomposed is determined based on the measurement result sequence.

[0021] Optionally, determining the integer decomposition result of the data to be decomposed based on the measurement result sequence includes:

[0022] The measurement result sequence is converted into a decimal number, and the decimal number is expanded into a continued fraction to obtain the order of the random number in the multiplicative group formed by modulo the data to be decomposed.

[0023] If the order of the random number is even, then the integer decomposition result of the data to be decomposed is solved based on the order of the random number, the random number, the data to be decomposed, and the greatest common divisor function.

[0024] Optionally, the method further includes:

[0025] If the order of the random number is odd, then a new random number is determined based on the data to be decomposed, and the process returns to the step of constructing a quantum data decomposition circuit including multiple cascaded modular multiplication units and control bits, until the order of the random number is even.

[0026] Optionally, the integer factorization result of the data to be decomposed can be obtained according to the following formula:

[0027] gcd(a r / 2 ±1,N)

[0028] Where gcd() is the greatest common divisor function, a is the random number, N is the data to be decomposed, and r is the order of the data to be decomposed and the random number.

[0029] Optionally, the random number takes values ​​in the range [1, N-1], and the random number is coprime to the data to be decomposed.

[0030] According to a third aspect of the embodiments of this application, a processing apparatus for a data decomposition task is provided. The apparatus is applied to a quantum processing unit, and the data decomposition task is a task of integer decomposing data to be decomposed, including:

[0031] The receiving module is used to receive the data to be decomposed, the random number, and the quantum data decomposition circuit sent by the classical processing unit. The quantum data decomposition circuit includes multiple cascaded modular multiplication units and control bits. The control bits are used to sequentially control each modular multiplication unit to calculate the preset exponent of the random number and the modulus of the data to be decomposed.

[0032] The running module is used to run the quantum data decomposition circuit. For each modular multiplication unit, after the control bit controls the current modular multiplication unit to perform modular multiplication, the quantum state of the control bit is measured, and the quantum state of the control bit is set to zero to control the next modular multiplication unit to perform modular multiplication, so as to obtain a sequence of measurement results.

[0033] The sending module is used to send the measurement result sequence to the classical processing unit, so that the classical processing unit can determine the integer decomposition result of the data to be decomposed based on the measurement result sequence.

[0034] According to a fourth aspect of the embodiments of this application, a processing apparatus for a data decomposition task is provided, characterized in that the apparatus is applied to a classical processing unit and includes:

[0035] The acquisition module is used to acquire the data decomposition task, which is a task of performing integer decomposition on the data to be decomposed.

[0036] A construction module is used to determine random numbers based on the data to be decomposed, and to construct a quantum data decomposition circuit including multiple cascaded modular multiplication units and control bits. The control bits are used to sequentially control each modular multiplication unit to calculate the preset exponent of the random number and the modulus of the data to be decomposed.

[0037] The sending module is used to send the data to be decomposed, the random number, and the quantum data decomposition circuit to the quantum processing unit, so that the quantum processing unit runs the quantum data decomposition circuit. For each modular multiplication unit, after the control bit controls the current modular multiplication unit to perform modular multiplication, the quantum state of the control bit is measured, and the quantum state of the control bit is set to zero to control the next modular multiplication unit to perform modular multiplication, thereby obtaining a sequence of measurement results.

[0038] A receiving module is used to receive a sequence of measurement results sent by the quantum processing unit, and to determine the integer decomposition result of the data to be decomposed based on the sequence of measurement results.

[0039] A fifth aspect of this application provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps of the method described in any one of the first or second aspects above when running.

[0040] A sixth aspect of this application 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 perform the steps of the method described in any one of the first or second aspects above.

[0041] Based on the above technical solution, by receiving the data to be decomposed, random numbers, and a quantum data decomposition circuit sent by a classical processing unit, the quantum data decomposition circuit includes multiple cascaded modular multiplication units and control bits. The control bits are used to sequentially control each modular multiplication unit to calculate the preset exponent of the random number and the modulus of the data to be decomposed. The quantum data decomposition circuit is run, and for each modular multiplication unit, after the control bit controls the current modular multiplication unit to perform a modular multiplication operation, the quantum state of the control bit is measured, and the quantum state of the control bit is set to zero to control the next modular multiplication unit to perform a modular multiplication operation, resulting in a measurement result sequence. The measurement result sequence is sent to the classical processing unit so that the classical processing unit can determine the integer decomposition result of the data to be decomposed based on the measurement result sequence. This application uses one control bit to control multiple modular multiplication units to perform modular multiplication operations, measures the quantum state of the control bit, and obtains a measurement result sequence, enabling the classical unit to determine the integer decomposition based on the measurement result sequence, thus reducing the occupation of quantum bits. Attached Figure Description

[0042] Figure 1 This is a hardware structure block diagram of a computer terminal illustrating a data decomposition task processing method according to an exemplary embodiment.

[0043] Figure 2 This is a flowchart illustrating a data decomposition task processing method according to an exemplary embodiment;

[0044] Figure 3 This is a schematic diagram of the structure of a quantum data decomposition circuit according to an exemplary embodiment;

[0045] Figure 4 This is a schematic diagram of another quantum data decomposition circuit according to an exemplary embodiment;

[0046] Figure 5 This is a flowchart illustrating another method for processing a data decomposition task according to an exemplary embodiment;

[0047] Figure 6 This is a block diagram illustrating a data decomposition task processing apparatus according to an exemplary embodiment;

[0048] Figure 7 This is a block diagram illustrating a data decomposition task processing apparatus according to an exemplary embodiment. Detailed Implementation

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

[0050] This application first provides a method for processing data decomposition tasks. This method can be applied to electronic devices, such as computer terminals, specifically ordinary computers, quantum computers, etc.

[0051] The following detailed explanation uses a computer terminal as an example. Figure 1 This is a system network block diagram for processing a data decomposition task according to an embodiment of this application. The system applied to processing the data decomposition task may include a network 110, a server 120, a wireless device 130, a client 140, a storage unit 150, a classical processing unit 160, a quantum processing unit 170, and may also include additional memory, a classical processor, a quantum processor, and other devices not shown.

[0052] Network 110 is a medium that provides communication links between various devices and computers connected together within a system network for processing data decomposition tasks. This includes, but is 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.

[0053] 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.

[0054] The classical processing unit 160 (quantum processing unit 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 data decomposition task processing method provided in the embodiments of this application.

[0055] Any data or information stored or generated in the classical processing unit 160 (quantum processing unit 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.

[0056] 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 unit 160, which is responsible for performing classical calculations and control; and the quantum processing unit 170, which is responsible for running quantum programs to achieve quantum computing.

[0057] The aforementioned classical processing unit 160 and quantum processing unit 170 can be integrated into a single device or distributed across two different devices. For example, a first device including the classical processing unit 160 runs a classical computer operating system, providing 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 a second device including the quantum processing unit 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.

[0058] In the classic silicon-based processing unit 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 such 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.

[0059] Unlike the logic units in the classical processing unit 160, the basic computational unit of the quantum processor 171 in the quantum processing unit 170 is the qubit. The input of a qubit is limited by coherence and coherence time; that is, a qubit is limited by its usage time and is not always 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), X gates, RY gates, RZ gates, CNOT gates, CR gates, iSWAP gates, Tofoli gates, etc., quantum computing requires combining a limited number of qubits with diverse logic function combinations to achieve computational effects.

[0060] 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) is crucial to improving the computational performance of quantum computers and requires special design. The aforementioned design considerations for qubits are technical problems that ordinary computing devices do not need to address. Therefore, this application proposes a method, apparatus, storage medium, and electronic device for processing data factorization tasks in quantum computing, aiming to achieve large-scale integer factorization and reduce qubit occupancy.

[0061] See Figure 2 , Figure 2 This is a flowchart illustrating a data decomposition task processing method according to an exemplary embodiment. This application provides a data decomposition task processing method applied to a quantum processing unit. The data decomposition task is an integer decomposition task of data to be decomposed, including:

[0062] S201: Receives the data to be decomposed, random numbers, and quantum data decomposition circuit sent by the classical processing unit.

[0063] The quantum data decomposition circuit includes multiple cascaded modular multiplication units and control bits. The control bits are used to sequentially control each modular multiplication unit to calculate the preset exponent of the random number and the modulus of the data to be decomposed.

[0064] In this embodiment, the random number ranges from [1, N-1], and the random number and the data to be decomposed are coprime. The preset exponent can be determined as follows:

[0065] If the data to be decomposed is an integer N, and the random number is a, then determine... The default exponent is 2. 2n-1-i The calculation of the i-th cascaded modular multiplication unit in a multi-cascaded modular multiplication unit ( The value of (mod N).

[0066] In this embodiment of the application, the data decomposition task is a task in the encryption algorithm scenario that requires integer decomposition of the data to be decomposed. The encryption algorithm can be RSA, Elliptic Curve Cryptography (ECC), and Elliptic Curve Digital Signature Algorithm (ECDSA), etc.

[0067] S202. Run the quantum data decomposition circuit. For each modular multiplication unit, after the control bit controls the current modular multiplication unit to perform modular multiplication, measure the quantum state of the control bit and set the quantum state of the control bit to zero to control the next modular multiplication unit to perform modular multiplication, and obtain the measurement result sequence.

[0068] In this embodiment, the initial quantum state of the control bit is zero, and the control bit can be reused. After the control bit controls the modular multiplication unit to perform modular multiplication, the quantum state of the control bit can be reset to zero so that the control bit can continue to control the next modular multiplication unit to perform modular multiplication.

[0069] It should be noted that the process of the control bit controlling each modular multiplication unit to perform modular multiplication is a quantum entanglement process. After the control bit controls the current modular multiplication unit to perform modular multiplication, the quantum state of the control bit can be measured to obtain the measurement result, which is either a 0 state or a 1 state.

[0070] It is understood that after the control bit controls each modular multiplication unit in the embodiments of this application, the quantum state of the control bit will be measured to obtain a measurement result sequence, which can be represented as 0 or 1.

[0071] S203. Send the measurement result sequence to the classical processing unit so that the classical processing unit can determine the integer decomposition result of the data to be decomposed based on the measurement result sequence.

[0072] In another embodiment of this application, the quantum data decomposition circuit further includes a first H gate, a phase rotation logic gate, and a second H gate acting sequentially on the control bit. The first H gate acts on the control bit after the quantum state is set to zero. The phase rotation logic gate acts on the control bit after the control bit controls the modular multiplication unit to perform modular multiplication. The second H gate acts on the control bit and then measures the quantum state of the control bit.

[0073] like Figure 3 As shown, Figure 3 This is a schematic diagram of a quantum data decomposition circuit provided in an embodiment of this application. Figure 3 The quantum data decomposition circuit shown includes a control bit with an initial state of zero. A first H-gate, a phase-rotation logic gate, and a second H-gate act sequentially on the control bit. However, when the control bit controls the first modular multiplication unit, only the first and second H-gates act on the control bit. The control bit controls 2n cascaded modular multiplication units to perform modular multiplication operations. (See figure.)

[0074] Figure 3In addition to the control bit controlling the first modular multiplication unit, the first H gate is applied to the control bit, which then controls the modular multiplication unit to perform a modular multiplication operation. Next, a phase rotation logic gate and a second H gate are applied to the control bit. The quantum state of the control bit is then measured to obtain the measurement result, which is either 0 or 1. The control bit's operation on the modular multiplication unit affects the measurement result; that is, the measurement operation after quantum entanglement is a de-entanglement process, so the measurement result is either 0 or 1.

[0075] Among them, the aforementioned phase-rotation logic gate R K The matrix form is as follows:

[0076]

[0077] In this embodiment, the parameters of the phase-rotation logic gate acting on the current control bit are determined based on the measurement results before the control bit is set to zero. Specifically, the parameters θ of the phase-rotation logic gate are... k The following formula is used for calculation:

[0078]

[0079] Where k represents the k-th action of the rotation logic gate on the control bit, m j This represents the measurement result obtained by the control bit in the j-th measurement, and its value is either 0 or 1.

[0080] Figure 3 This section will only introduce quantum logic gates that operate on control bits. The following section will combine... Figure 4 A brief description of the modular multiplication unit in the embodiments of this application will be given.

[0081] like Figure 4 As shown, Figure 4 This is a schematic diagram of another quantum data decomposition circuit provided in an embodiment of this application. Figure 4 This diagram illustrates a quantum data decomposition circuit consisting of four quantum registers, with the initial quantum states of the four quantum registers being |0>1|00…1> n |0> n |0>1, where the first quantum register contains only one control bit |0>1, and the remaining quantum registers are used to construct modular multiplication units. The second quantum register contains n qubits, and the least significant bit is flipped using an X-gate to obtain |00…1> n That is, the initial quantum state of the least significant bit of the second quantum register is 1, the initial quantum state of the first n-1 qubits is 0, and the third quantum register, which includes n qubits, and the fourth quantum register, which includes 1 qubit, are auxiliary registers. The quantum data decomposition circuit is implemented by a total of 2n+2 qubits.

[0082] The operations of the first H gate and the second H gate in the above embodiments can be represented by the following formula:

[0083]

[0084] The operation of the control modular multiplication unit of the control bits to the 2nth order in the above embodiments can be expressed by the following formula:

[0085]

[0086] In the above embodiments, the phase-rotating logic gate R k The action on the control bits can be represented by the following formula:

[0087]

[0088]

[0089] Measuring the quantum state of the control bit yields the measurement result {m}. l} 0≤l≤2n If the sequence of measurement results is represented as decimal m, then

[0090] The modular multiplication unit in the above embodiments can be implemented based on a constant modular multiplication circuit.

[0091] In this embodiment, the system receives data to be decomposed, a random number, and a quantum data decomposition circuit from a classical processing unit. The quantum data decomposition circuit includes multiple cascaded modular multiplication units and a control bit. The control bit is used to sequentially control each modular multiplication unit to calculate a preset exponent of the random number and the modulus of the data to be decomposed. The quantum data decomposition circuit is run, and for each modular multiplication unit, after the control bit controls the current modular multiplication unit to perform a modular multiplication operation, the quantum state of the control bit is measured, and the quantum state of the control bit is set to zero to control the next modular multiplication unit to perform a modular multiplication operation, resulting in a measurement result sequence. The measurement result sequence is then sent to the classical processing unit so that the classical processing unit can determine the integer decomposition result of the data to be decomposed based on the measurement result sequence. This application uses one control bit to control multiple modular multiplication units to perform modular multiplication operations, measures the quantum state of the control bit, and obtains a measurement result sequence, enabling the classical unit to determine the integer decomposition based on the measurement result sequence, thus reducing the occupancy of quantum bits.

[0092] like Figure 5 As shown, Figure 5 A flowchart illustrating a data decomposition task processing method provided in this application embodiment, the method being applied to a classic processing unit, including:

[0093] S501. Obtain the data decomposition task. The data decomposition task is the task of performing integer decomposition on the data to be decomposed.

[0094] The data to be decomposed is the data that needs to be decomposed into integers in the encryption algorithm. The encryption algorithm can be RSA, Elliptic Curve Cryptography (ECC), and Elliptic Curve Digital Signature Algorithm (ECDSA), etc.

[0095] S502. Determine random numbers based on the data to be decomposed, and construct a quantum data decomposition circuit including multiple cascaded modular multiplication units and control bits. The control bits are used to sequentially control each modular multiplication unit to calculate the preset exponent of the random number and the modulus of the data to be decomposed.

[0096] In this embodiment, the random number ranges from [1, N-1], and the random number and the data to be decomposed are coprime. The preset exponent can be determined as follows:

[0097] If the data to be decomposed is an integer N, and the random number is a, then determine... The default power is 2. 2n-1-i The i-th cascaded modular multiplication unit in a multi-cascaded modular multiplication unit is calculated ( The value of (mod N).

[0098] S503: Send the data to be decomposed, random numbers, and quantum data decomposition circuit to the quantum processing unit so that the quantum processing unit runs the quantum data decomposition circuit. For each modular multiplication unit, after the control bit controls the current modular multiplication unit to perform modular multiplication, measure the quantum state of the control bit and set the quantum state of the control bit to zero to control the next modular multiplication unit to perform modular multiplication, and obtain the measurement result sequence.

[0099] In this embodiment, the initial quantum state of the control bit is zero, and the control bit can be reused. After the control bit controls the modular multiplication unit to perform modular multiplication, the quantum state of the control bit can be reset to zero so that the control bit can continue to control the next modular multiplication unit to perform modular multiplication.

[0100] It should be noted that the process of the control bit controlling each modular multiplication unit to perform modular multiplication is a quantum entanglement process. After the control bit controls the current modular multiplication unit to perform modular multiplication, the quantum state of the control bit can be measured to obtain the measurement result, which is either a 0 state or a 1 state.

[0101] It is understood that after the control bit controls each modular multiplication unit in the embodiments of this application, the quantum state of the control bit will be measured to obtain a measurement result sequence, which can be represented as a binary number composed of 0 or 1.

[0102] S504. Receive the measurement result sequence sent by the quantum processing unit, and determine the integer decomposition result of the data to be decomposed based on the measurement result sequence.

[0103] Specifically, the measurement result sequence can be converted into a decimal number, and the decimal number can be expanded into a continued fraction to obtain the order of the random number in the multiplicative group formed by the data to be decomposed.

[0104] As can be seen from the above embodiments, the measurement result sequence is {m} l} 0≤l≤2n The decimal representation of is right By performing a continued fraction expansion, we can obtain the expanded result s / r. When the expanded result satisfies... When , take the denominator r as the order of amod N.

[0105] If the order of the random number is even, then the integer decomposition result of the data to be decomposed is obtained by using the order of the random number, the random number, the data to be decomposed, and the greatest common divisor function.

[0106] Specifically, the integer factorization result of the data to be factored can be obtained using the following formula:

[0107] gcd(a r / 2 ±1,N)

[0108] Where gcd() is the greatest common divisor function, a is a random number, N is the data to be decomposed, and r is the order of the random number in the multiplicative group formed by modulo the data to be decomposed.

[0109] If the order of the random number is odd, then the random number is re-determined based on the data to be decomposed, and the process returns to S502 to execute the steps of constructing a quantum data decomposition circuit including multiple cascaded modular multiplication units and control bits, until the order of the random number is even.

[0110] In this embodiment, a data decomposition task is acquired, which is to perform integer decomposition on the data to be decomposed. A random number is determined based on the data to be decomposed, and a quantum data decomposition circuit is constructed, comprising multiple cascaded modular multiplication units and control bits. The control bits are used to sequentially control each modular multiplication unit to calculate the preset exponent of the random number and the modulus of the data to be decomposed. The data to be decomposed, the random number, and the quantum data decomposition circuit are sent to the quantum processing unit, causing the quantum processing unit to run the quantum data decomposition circuit. For each modular multiplication unit, after the control bit controls the current modular multiplication unit to perform a modular multiplication operation, the quantum state of the control bit is measured, and the quantum state of the control bit is set to zero to control the next modular multiplication unit to perform a modular multiplication operation, resulting in a measurement result sequence. The measurement result sequence sent by the quantum processing unit is received, and the integer decomposition result of the data to be decomposed is determined based on the measurement result sequence. This application uses one control bit to control multiple modular multiplication units to perform modular multiplication operations, measures the quantum state of the control bit, and obtains a measurement result sequence. The classical unit can determine the integer decomposition based on the measurement result sequence, thus reducing the occupancy of quantum bits.

[0111] Based on the same inventive concept, embodiments of this application also provide a processing apparatus for a data decomposition task. This apparatus is applied to a quantum processing unit, and the data decomposition task is the task of performing integer decomposition on the data to be decomposed, such as... Figure 6 As shown, the device includes:

[0112] The receiving module 601 is used to receive the data to be decomposed, random numbers, and quantum data decomposition circuit sent by the classical processing unit. The quantum data decomposition circuit includes multiple cascaded modular multiplication units and control bits. The control bits are used to sequentially control each modular multiplication unit to calculate the preset exponent of the random number and the modulus of the data to be decomposed.

[0113] The running module 602 is used to run the quantum data decomposition circuit. For each modular multiplication unit, after the control bit controls the current modular multiplication unit to perform modular multiplication, the quantum state of the control bit is measured, and the quantum state of the control bit is set to zero to control the next modular multiplication unit to perform modular multiplication, so as to obtain the measurement result sequence.

[0114] The sending module 603 is used to send the measurement result sequence to the classical processing unit so that the classical processing unit can determine the integer decomposition result of the data to be decomposed based on the measurement result sequence.

[0115] Optionally, the quantum data decomposition circuit further includes a first H gate, a phase rotation logic gate, and a second H gate acting sequentially on the control bit. The first H gate acts on the control bit after the quantum state is set to zero. The phase rotation logic gate acts on the control bit after the control bit controls the modular multiplication unit to perform modular multiplication. The second H gate acts on the control bit and then measures the quantum state of the control bit.

[0116] Optional, phase-rotating logic gate R K The matrix form is as follows:

[0117]

[0118] The parameter θ of the phase-rotating logic gate k Calculated using the following formula:

[0119]

[0120] Where k represents the k-th action of the rotation logic gate on the control bit, m j This represents the measurement result obtained by the control bit in the j-th measurement.

[0121] Optionally, the random number can take values ​​in the range [1, N-1], and the random number is coprime with the data to be decomposed.

[0122] Based on the same inventive concept, embodiments of this application also provide a processing apparatus for a data decomposition task, which is applied to a classical processing unit, such as... Figure 7 As shown, the device includes:

[0123] The acquisition module 701 is used to acquire data decomposition tasks, which are tasks that perform integer decomposition on the data to be decomposed.

[0124] Module 702 is used to determine random numbers based on the data to be decomposed and to construct a quantum data decomposition circuit including multiple cascaded modular multiplication units and control bits. The control bits are used to sequentially control each modular multiplication unit to calculate the preset exponent of the random number and the modulus of the data to be decomposed.

[0125] The transmitting module 703 is used to transmit the data to be decomposed, random numbers, and quantum data decomposition circuit to the quantum processing unit, so that the quantum processing unit runs the quantum data decomposition circuit. For each modular multiplication unit, after the control bit controls the current modular multiplication unit to perform modular multiplication operation, the quantum state of the control bit is measured, and the quantum state of the control bit is set to zero to control the next modular multiplication unit to perform modular multiplication operation, so as to obtain the measurement result sequence.

[0126] The receiving module 704 is used to receive the measurement result sequence sent by the quantum processing unit and determine the integer decomposition result of the data to be decomposed based on the measurement result sequence.

[0127] Optionally, the receiving module 704 is specifically used for:

[0128] The measurement result sequence is converted into a decimal number, and the decimal number is expanded into a continued fraction to obtain the order of the random number in the multiplicative group formed by the modulo of the data to be decomposed.

[0129] If the order of the random number is even, then the integer decomposition result of the data to be decomposed is obtained by using the order of the random number, the random number, the data to be decomposed, and the greatest common divisor function.

[0130] Optionally, the receiver module 704 is also used for:

[0131] If the order of the random number is odd, then the random number is re-determined based on the data to be decomposed, and the process returns to the step of constructing a quantum data decomposition circuit including multiple cascaded modular multiplication units and control bits, until the order of the random number is even.

[0132] Optionally, the receiving module 704 calculates the integer factorization result of the data to be factored according to the following formula:

[0133] gcd(a r / 2 ±1,N)

[0134] Where gcd() is the greatest common divisor function, a is a random number, N is the data to be decomposed, and r is the order of the random number in the multiplicative group formed by modulo the data to be decomposed.

[0135] Optionally, the random number can take values ​​in the range [1, N-1], and the random number is coprime with the data to be decomposed.

[0136] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0137] Another embodiment of this application provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps in the above-described data decomposition task processing method embodiment when running.

[0138] Specifically, in this embodiment, the storage medium may include, but is not limited to, USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks, and other media capable of storing computer programs.

[0139] Another embodiment of this application 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 perform the steps in the above-described data decomposition task processing method embodiment.

[0140] 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.

[0141] Specifically, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0142] Step 1: Receive the data to be decomposed, random numbers, and quantum data decomposition circuit sent by the classical processing unit.

[0143] Step 2: Run the quantum data decomposition circuit. For each modular multiplication unit, after the control bit controls the current modular multiplication unit to perform modular multiplication, measure the quantum state of the control bit and set the quantum state of the control bit to zero to control the next modular multiplication unit to perform modular multiplication, and obtain the measurement result sequence.

[0144] Step 3: Send the measurement result sequence to the classical processing unit so that the classical processing unit can determine the integer decomposition result of the data to be decomposed based on the measurement result sequence.

[0145] The above description, based on the embodiments shown in the drawings, details the structure, features, and effects of this application. The above description is only a preferred embodiment of this application, but this application does not limit the scope of implementation to what is shown in the drawings. Any changes made in accordance with the concept of this application, or modifications to equivalent embodiments, that do not exceed the spirit covered by the specification and drawings, should be within the protection scope of this application.

Claims

1. A method for processing data decomposition tasks, characterized in that, The method is applied to a quantum processing unit, and the data decomposition task is a task of performing integer decomposition on the data to be decomposed, including: The system receives the data to be decomposed, the random number, and the quantum data decomposition circuit sent by the classical processing unit. The quantum data decomposition circuit includes multiple cascaded modular multiplication units and control bits, as well as a first H gate, a phase rotation logic gate, and a second H gate that act sequentially on the control bits. The control bits are used to sequentially control each modular multiplication unit to calculate the preset exponent of the random number and the modulus of the data to be decomposed. The quantum data decomposition circuit is run. For each modular multiplication unit, after the control bit controls the current modular multiplication unit to perform a modular multiplication operation, the quantum state of the control bit is measured, and the quantum state of the control bit is set to zero to control the next modular multiplication unit to perform a modular multiplication operation, thus obtaining a sequence of measurement results. Wherein, the first H gate acts on the control bit after the quantum state is set to zero, the phase rotation logic gate acts on the control bit after the control bit controls the modular multiplication unit to perform modular multiplication, and the second H gate acts on the control bit to measure the quantum state of the control bit; The measurement result sequence is sent to the classical processing unit so that the classical processing unit can determine the integer decomposition result of the data to be decomposed based on the measurement result sequence.

2. The method according to claim 1, characterized in that, The phase rotation logic gate R K The matrix form is as follows: = The parameters of the phase-rotation logic gate Calculated using the following formula: =- / Where k represents the k-th action of the rotation logic gate on the control bit, m j This represents the measurement result obtained by the control bit in the j-th measurement.

3. The method according to any one of claims 1-2, characterized in that, The random number takes values ​​in the range [1, N-1], and the random number is coprime to the data to be decomposed.

4. A method for processing data decomposition tasks, characterized in that, The method is applied to a classical processing unit, including: Obtain the data decomposition task, which is a task to decompose the data to be decomposed into integers; A random number is determined based on the data to be decomposed, and a quantum data decomposition circuit is constructed, which includes multiple cascaded modular multiplication units and control bits, as well as a first H gate, a phase rotation logic gate and a second H gate acting sequentially on the control bits. The control bits are used to sequentially control each modular multiplication unit to calculate the preset exponent of the random number and the modulus of the data to be decomposed. The quantum processing unit sends the data to be decomposed, the random number, and the quantum data decomposition circuit to the quantum processing unit so that the quantum processing unit runs the quantum data decomposition circuit. For each modular multiplication unit, after the control bit controls the current modular multiplication unit to perform modular multiplication, the quantum state of the control bit is measured, and the quantum state of the control bit is set to zero to control the next modular multiplication unit to perform modular multiplication, thereby obtaining a sequence of measurement results. Wherein, the first H gate acts on the control bit after the quantum state is set to zero, the phase rotation logic gate acts on the control bit after the control bit controls the modular multiplication unit to perform modular multiplication, and the second H gate acts on the control bit to measure the quantum state of the control bit; The measurement result sequence sent by the quantum processing unit is received, and the integer decomposition result of the data to be decomposed is determined based on the measurement result sequence.

5. The method according to claim 4, characterized in that, Determining the integer decomposition result of the data to be decomposed based on the measurement result sequence includes: The measurement result sequence is converted into a decimal number, and the decimal number is expanded into a continued fraction to obtain the order of the random number in the multiplicative group formed by modulo the data to be decomposed. If the order of the random number is even, then the integer decomposition result of the data to be decomposed is solved based on the order of the random number, the random number, the data to be decomposed, and the greatest common divisor function.

6. The method according to claim 5, characterized in that, The method further includes: If the order of the random number is odd, then a new random number is determined based on the data to be decomposed, and the process returns to the step of constructing a quantum data decomposition circuit including multiple cascaded modular multiplication units and control bits, until the order of the random number is even.

7. The method according to claim 5 or 6, characterized in that, The integer factorization result of the data to be factored is obtained using the following formula: in, Let be the greatest common divisor function, a be the random number, N be the data to be decomposed, and r be the order of the data to be decomposed and the random number.

8. The method according to any one of claims 4-7, characterized in that, The random number takes values ​​in the range [1, N-1], and the random number is coprime to the data to be decomposed.

9. A processing apparatus for a data decomposition task, characterized in that, The device is applied to a quantum processing unit, and the data decomposition task is a task of performing integer decomposition on the data to be decomposed, including: The receiving module is used to receive the data to be decomposed, the random number, and the quantum data decomposition circuit sent by the classical processing unit. The quantum data decomposition circuit includes multiple cascaded modular multiplication units and control bits, as well as a first H gate, a phase rotation logic gate, and a second H gate that act sequentially on the control bits. The control bits are used to sequentially control each modular multiplication unit to calculate the preset exponent of the random number and the modulus of the data to be decomposed. The running module is used to run the quantum data decomposition circuit. For each modular multiplication unit, after the control bit controls the current modular multiplication unit to perform modular multiplication, the quantum state of the control bit is measured, and the quantum state of the control bit is set to zero to control the next modular multiplication unit to perform modular multiplication, so as to obtain a sequence of measurement results. Wherein, the first H gate acts on the control bit after the quantum state is set to zero, the phase rotation logic gate acts on the control bit after the control bit controls the modular multiplication unit to perform modular multiplication, and the second H gate acts on the control bit to measure the quantum state of the control bit; The sending module is used to send the measurement result sequence to the classical processing unit, so that the classical processing unit can determine the integer decomposition result of the data to be decomposed based on the measurement result sequence.

10. A processing apparatus for a data decomposition task, characterized in that, The device is applied to a classical processing unit and includes: The acquisition module is used to acquire the data decomposition task, which is a task of performing integer decomposition on the data to be decomposed. A construction module is used to determine random numbers based on the data to be decomposed, and to construct a quantum data decomposition circuit including multiple cascaded modular multiplication units and control bits, as well as a first H gate, a phase rotation logic gate and a second H gate acting sequentially on the control bits. The control bits are used to sequentially control each modular multiplication unit to calculate the preset exponent of the random number and the modulus of the data to be decomposed. The sending module is used to send the data to be decomposed, the random number, and the quantum data decomposition circuit to the quantum processing unit, so that the quantum processing unit runs the quantum data decomposition circuit. For each modular multiplication unit, after the control bit controls the current modular multiplication unit to perform modular multiplication, the quantum state of the control bit is measured, and the quantum state of the control bit is set to zero to control the next modular multiplication unit to perform modular multiplication, thereby obtaining a sequence of measurement results. Wherein, the first H gate acts on the control bit after the quantum state is set to zero, the phase rotation logic gate acts on the control bit after the control bit controls the modular multiplication unit to perform modular multiplication, and the second H gate acts on the control bit to measure the quantum state of the control bit; A receiving module is used to receive a sequence of measurement results sent by the quantum processing unit, and to determine the integer decomposition result of the data to be decomposed based on the sequence of measurement results.

11. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1 to 3 or claims 4 to 8 when it is run.

12. 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 perform the method described in any one of claims 1 to 3 or 4 to 8.