Data generation methods, devices, quantum computing systems, media and electronic devices

By constructing a quantum circuit based on Toffoli gates and preset de-positioners, and combining classical and quantum computing units, the target data in GF(2k) is generated efficiently, solving the problem of low data generation efficiency in existing technologies and achieving the effect of accelerating the cracking of classical encryption algorithms.

CN118780376BActive Publication Date: 2026-11-17ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310324600.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2026-11-17
Estimated Expiration
2043-03-29

AI Technical Summary

Technical Problem

Existing technologies struggle to efficiently generate target data in GF(2k), thus hindering the cracking of classic encryption algorithms.

Method used

By receiving data to generate tasks, a quantum circuit is constructed based on the Toffoli gate and a preset de-positioner. The quantum circuit is designed using a classical computing unit and sent to the quantum computing unit to instruct the evolution of the qubits and obtain measurement results. The classical computing unit determines the target data based on the measurement results.

Benefits of technology

It achieves efficient generation of target data in GF(2k), thereby accelerating the cracking of classic encryption algorithms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118780376B_ABST
    Figure CN118780376B_ABST
Patent Text Reader

Abstract

This invention discloses a data generation method, apparatus, quantum computing system, medium, and electronic device. It involves receiving a data generation task to generate target data corresponding to input data; then constructing a quantum circuit corresponding to the data generation task based on a Toffoli gate and a preset reorder point; sending the input data and the quantum circuit to a quantum computing unit, instructing the quantum computing unit to excite qubits to an initial quantum state, and driving the qubits to evolve from the initial quantum state based on the quantum circuit to obtain the measurement result of the qubits, wherein the initial quantum state includes a quantum state obtained by encoding the input data; finally, receiving the measurement result sent by the quantum computing unit, and determining the target data corresponding to the input data based on the measurement result, aiming to efficiently generate GF(2)... k The target data in the data can then be used to accelerate the cracking of classic encryption algorithms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of quantum computing technology, specifically a data generation method, apparatus, quantum computing system, medium, and electronic device. 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] Finite fields, also known as Galois fields (GF), are a crucial concept in many disciplines, including abstract algebra and cryptography. Taking cryptography as an example, the discrete logarithm problem over finite fields is one of the two core difficult problems in classical public-key cryptography. GF(2 k Furthermore, GF(2) occupies a special position among many finite fields. How can we efficiently generate GF(2)? k The target data in the data can then be used to accelerate the cracking of classic encryption algorithms. Summary of the Invention

[0004] The purpose of this invention is to provide a data generation method, apparatus, quantum computing system, medium, and electronic device, aiming to efficiently generate GF(2) data. k The target data in the data can then be used to accelerate the cracking of classic encryption algorithms.

[0005] One embodiment of the present invention provides a data generation method applied to a classical computing unit, the method comprising:

[0006] Receive a data generation task, the data generation task being used to generate target data corresponding to the input data;

[0007] The quantum circuit corresponding to the data generation task is constructed based on the Toffoli gate and the preset retractor.

[0008] The input data and the quantum circuit are sent to the quantum computing unit, which instructs the quantum computing unit to excite the qubit to an initial quantum state, and drives the qubit to evolve from the initial quantum state based on the quantum circuit, thereby obtaining the measurement result of the qubit. The initial quantum state includes the quantum state obtained by encoding the input data.

[0009] The measurement results sent by the quantum computing unit are received, and the target data corresponding to the input data is determined based on the measurement results.

[0010] Optionally, the input data includes two polynomials to be multiplied, wherein the highest degree of the polynomials is k-1; the two polynomials are each encoded with k data bits, and the qubits include 2k data bits.

[0011] Optionally, the qubits further include 2k-1 result bits; the construction of the quantum circuit corresponding to the data generation task based on the Toffoli gate and a preset reorder includes:

[0012] The Toffoli gate is applied to 2k data bits and 2k-1 result bits to obtain the general multiplication operation circuit corresponding to the data generation task, where the data bits are control bits; the general multiplication result of the two polynomials is mapped to 2k-1 result bits;

[0013] The preset retraction device is applied to 2k-1 of the result bits to obtain the retraction line corresponding to the data generation task, and the target data corresponding to the two polynomials are mapped onto k of the result bits.

[0014] Optionally, the method further includes:

[0015] Obtain the irreducible polynomial, and construct the preset retractor based on the irreducible polynomial and the CONT gate.

[0016] Optionally, constructing the preset retractor based on the irreducible polynomial and the CONT gate includes:

[0017] The preset reorder is obtained by using the qubits corresponding to the non-highest terms in the irreducible polynomial as the controlled bits of the CNOT gate, and the qubits corresponding to the highest terms in the irreducible polynomial as the control bits of the CNOT gate.

[0018] Another embodiment of the present invention provides a data generation method applied to a quantum computing unit, the method comprising:

[0019] The system receives input data and a quantum circuit corresponding to a data generation task sent by a classical computing unit. The data generation task is used to generate target data corresponding to the input data. The quantum circuit is constructed by the classical computing unit based on a Toffoli gate and a preset retractor.

[0020] The qubit is excited to an initial quantum state, and the qubit is driven to evolve from the initial quantum state based on the quantum circuit to obtain the measurement result of the qubit, wherein the initial quantum state includes a quantum state obtained by encoding the input data;

[0021] The measurement results are sent to the classical computing unit so that the classical computing unit can determine the target data corresponding to the input data based on the measurement results.

[0022] Optionally, the input data includes two polynomials to be multiplied, wherein the highest degree of the polynomials is k-1; the qubits include 2k data bits and 2k-1 result bits; the step of exciting the qubits to an initial quantum state includes:

[0023] Excite k of the data bits to a first quantum state corresponding to one of the polynomials, excite another k of the data bits to a second quantum state corresponding to another polynomial, and excite 2k-1 of the result bits to the ground state.

[0024] Another embodiment of the present invention provides a quantum computing system, the quantum computing system comprising classical computing units and quantum computing units;

[0025] The classical computing unit is used to perform the following steps:

[0026] Receive a data generation task, the data generation task being used to generate target data corresponding to the input data;

[0027] The quantum circuit corresponding to the data generation task is constructed based on the Toffoli gate and the preset retractor.

[0028] The input data and the quantum circuit are sent to the quantum computing unit, which instructs the quantum computing unit to excite the qubit to an initial quantum state, and drives the qubit to evolve from the initial quantum state based on the quantum circuit, thereby obtaining the measurement result of the qubit. The initial quantum state includes the quantum state obtained by encoding the input data.

[0029] The measurement results sent by the quantum computing unit are received, and the target data corresponding to the input data is determined based on the measurement results.

[0030] The quantum computing unit is used to perform the following steps:

[0031] The system receives input data and a quantum circuit corresponding to a data generation task sent by a classical computing unit. The data generation task is used to generate target data corresponding to the input data. The quantum circuit is constructed by the classical computing unit based on a Toffoli gate and a preset retractor.

[0032] The qubit is excited to an initial quantum state, and the qubit is driven to evolve from the initial quantum state based on the quantum circuit to obtain the measurement result of the qubit, wherein the initial quantum state includes the quantum state corresponding to the input data;

[0033] The measurement results are sent to the classical computing unit so that the classical computing unit can determine the target data corresponding to the input data based on the measurement results.

[0034] Another embodiment of the present invention provides a data generation apparatus applied to a classical computing unit, the apparatus comprising:

[0035] A receiving module is used to receive a data generation task, wherein the data generation task is used to generate target data corresponding to the input data;

[0036] The construction module is used to construct the quantum circuit corresponding to the data generation task based on the Toffoli gate and the preset retractor;

[0037] A transmitting module is used to transmit the input data and the quantum circuit to a quantum computing unit, instruct the quantum computing unit to excite the qubit to an initial quantum state, and drive the qubit to evolve from the initial quantum state based on the quantum circuit to obtain the measurement result of the qubit, wherein the initial quantum state includes a quantum state obtained by encoding the input data;

[0038] The receiving module is further configured to receive the measurement results sent by the quantum computing unit, and to determine the target data corresponding to the input data based on the measurement results.

[0039] Another embodiment of the present invention provides a data generation device applied to a quantum computing unit, the device comprising:

[0040] The receiving module is used to receive input data and quantum circuits corresponding to data generation tasks sent by the classical computing unit. The data generation task is used to generate target data corresponding to the input data. The quantum circuits are constructed by the classical computing unit based on Toffoli gates and preset retractors.

[0041] A computing module is used to excite a qubit to an initial quantum state, and drive the qubit to evolve from the initial quantum state based on the quantum circuit to obtain the measurement result of the qubit, wherein the initial quantum state includes the quantum state corresponding to the input data;

[0042] The sending module is used to send the measurement results to the classical computing unit, so that the classical computing unit can determine the target data corresponding to the input data based on the measurement results.

[0043] Another embodiment of the present invention provides a storage medium storing a computer program, wherein the computer program is configured to execute the method described in any of the preceding claims when running.

[0044] Another embodiment of the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the method described in any of the preceding claims.

[0045] Compared with existing technologies, the present invention provides a data generation method, apparatus, quantum computing system, medium, and electronic device, which involves receiving a data generation task for generating target data corresponding to input data; then constructing a quantum circuit corresponding to the data generation task based on a Toffoli gate and a preset reorder point; sending the input data and the quantum circuit to a quantum computing unit, instructing the quantum computing unit to excite the qubits to an initial quantum state, and driving the qubits to evolve from the initial quantum state based on the quantum circuit to obtain the measurement result of the qubits, wherein the initial quantum state includes a quantum state obtained by encoding the input data; and finally receiving the measurement result sent by the quantum computing unit and determining the target data corresponding to the input data based on the measurement result.

[0046] This invention processes GF(2) using both classical and quantum computing units. k In the data generation task of GF(2), the classical computing unit focuses on the design of the quantum circuit, and the quantum computing unit efficiently executes the quantum circuit, thereby realizing GF(2). k The efficient generation of target data in the algorithm can help accelerate the cracking of classic encryption algorithms. Attached Figure Description

[0047] Figure 1 A network block diagram of a data generation system provided in an embodiment of the present invention;

[0048] Figure 2 This is a flowchart illustrating a data generation method provided in an embodiment of the present invention;

[0049] Figure 3 This is a schematic diagram of the structure of an ejector provided in an embodiment of the present invention;

[0050] Figure 4 A GF(2) provided for embodiments of the present invention k The quantum circuit diagram corresponding to multiplication operations;

[0051] Figure 5 A flowchart illustrating another data generation method provided in an embodiment of the present invention;

[0052] Figure 6 This is a schematic diagram of the structure of a data generation device provided in an embodiment of the present invention;

[0053] Figure 7This is a schematic diagram of another data generation device provided in an embodiment of the present invention;

[0054] Figure 8 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation

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

[0056] Figure 1 This is a network block diagram of a data generation system provided in an embodiment of the present invention. The data generation system may include a network 110, a server 120, a wireless device 130, a client 140, storage 150, a classical computing unit 160, a quantum computing unit 170, and may also include additional memory, a classical processor, a quantum processor, and other devices not shown.

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

[0058] Server 120, wireless device 130, and client 140 are conventional data processing systems that may contain data and application programs 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.

[0059] The classical computing unit 160 (quantum computing unit 170) may include a classical processor 161 (quantum processor 171) for processing classical data (quantum data) and a memory 162 (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 163 (application program 173). The application program 163 (application program 173) may be used to implement a quantum algorithm compiled by the data generation method provided in the embodiments of the present invention.

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

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

[0062] The aforementioned classical computing unit 160 and quantum computing unit 170 can be integrated into a single device or distributed across two different devices. For example, a first device including the classical computing 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 programs using the quantum application development tools and services on the second device, and send these quantum programs to a second device including the quantum computing unit 170 via the network services. The second device runs a quantum computer operating system, which parses and compiles the quantum program's code into instructions that the quantum processor 170 can recognize and execute. The quantum processor 170 then implements the quantum algorithm corresponding to the quantum program based on these instructions.

[0063] The computing units of the classic processor 161 within the classic computing unit 160 are based on CMOS transistors on a silicon chip. 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 single classic processor 161 contains tens of thousands of computing units. Given this sufficient number of computing units and the fixed selectable computing logic of the CMOS transistors (e.g., AND logic), computational performance is achieved by combining a large number of CMOS transistors with a limited set of logic functions during operation.

[0064] In the quantum computing unit 170, the basic computing unit of the quantum processor 171 is the qubit. The input of a qubit is limited by coherence and coherence time; that is, a qubit is limited by its available usage time and is not always readily available. Making full use of qubits within their available usage time is a key challenge in quantum computing. Furthermore, the number of qubits in a quantum computer is one of the representative indicators of its performance. Each qubit performs computational functions through on-demand configured logical functions. Given the limited number of qubits and the diverse logical 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 logical function combinations to achieve computational effects.

[0065] Based on these differences, the design of classical logic functions applied to CMOS transistors and the design of quantum logic functions applied to qubits are significantly and fundamentally different. The design of classical logic functions applied to CMOS transistors does not need to consider the individuality of CMOS transistors. For example, the representation of a CMOS transistor in a silicon chip is its individual identifier, location, and usable time of each CMOS transistor. Therefore, classical algorithms composed of classical logic functions only express the operational relationship of the algorithm, not the algorithm's dependence on individual CMOS transistors.

[0066] Quantum logic functions applied to qubits need to consider the individuality of each qubit, such as its position within the quantum chip, its relationship with surrounding qubits, and the duration of its usable time. Therefore, quantum algorithms composed of quantum logic functions not only express the computational relationships within the algorithm but also its dependence on the individual qubits.

[0067] For example:

[0068] Quantum Algorithm 1: H1, H2, CNOT(1,3), H3, CNOT(2,3);

[0069] Quantum Algorithm 2: H1, H2, CNOT(1,2), H3, CNOT(2,3);

[0070] Where 1 / 2 / 3 represent three sequentially connected qubits Q1, Q2, Q3 or interconnected qubits Q1, Q2, Q3, respectively;

[0071] An exemplary explanation of how quantum algorithms are affected by the coherence time of qubits is as follows:

[0072] Define the execution time of a single-qubit logic gate as t, and the execution time of two single-qubit logic gates operating on adjacent qubits as 2t; then:

[0073] When Q1, Q2, and Q3 are interconnected, the computation of Quantum Algorithm 1 requires 6t, which is divided into 4 time periods. The duration of each time period is t, 2t, t, and 2t, respectively. The operations performed in each time period are: H1, H2; CNOT(1,3); H3; CNOT(2,3);

[0074] The computation of Quantum Algorithm 1 requires 5t, which is divided into 3 time periods. The duration of each time period is t, 2t, and 2t respectively. The operations performed in each time period are: H1, H2, H3; CNOT(1,2); CNOT(2,3);

[0075] When Q1, Q2, and Q3 are connected sequentially, Quantum Algorithm 1 needs to be equivalent to: H1, H2; swap(1,2), CNOT(2,3), swap(1,2); H3; CNOT(2,3). The computation of the equivalent Quantum Algorithm 1 requires 10t, divided into 4 time periods, with each time period requiring durations of t, 6t, t, and 2t respectively. The operations performed in each time period are: H1, H2; swap(1,2), CNOT(2,3), swap(1,2); H3; CNOT(2,3).

[0076] Therefore, the application of quantum logic functions in the design of qubits (including the design of whether qubits are used and the design of the efficiency of each qubit) is key to improving the computational performance of quantum computers and requires special design. This is the unique characteristic of quantum algorithms based on quantum logic functions, and is fundamentally and significantly different from classical algorithms based on classical logic functions. The aforementioned design considerations for qubits are technical problems that ordinary computing devices do not need to consider or address. Based on this, this invention proposes a data generation method, apparatus, quantum computing system, medium, and electronic device, aiming to efficiently generate GF(2... k The target data in the data can then be used to accelerate the cracking of classic encryption algorithms.

[0077] See Figure 2 , Figure 2 This is a flowchart illustrating a data generation method provided in an embodiment of the present invention, applied to a classical computing unit. The method includes:

[0078] Step 201: Receive a data generation task, wherein the data generation task is used to generate target data corresponding to the input data;

[0079] GF(2 kThe elements in the polynomial are polynomials with coefficients consisting of 0 and 1. More precisely, they are residue classes composed of polynomials. The equivalence relations within these polynomials are characterized by modularly dividing (modular division means taking the remainder of a polynomial) an irreducible polynomial of degree k. An irreducible polynomial is one that, in the current number field, has no other polynomials as factors besides 1 and the polynomial itself.

[0080] For current binary system computers, GF(2) k This is particularly important because many encryption standard algorithms use bytes as the unit of processing; for example, each byte can be considered as GF(2). 8 An element in (k=8) corresponds to a polynomial of degree no more than 7, a7a6a5a4a3a2a1a0=7x 7 +a6x 6 +5x 5 +4x 4 +3x 3 +2x 2 +1x 1 +0.

[0081] The target data can be, for example, GF(2). k The result of the multiplication operation, the input data may include, for example, two polynomials to be multiplied, the highest degree of the polynomials being k-1; the two polynomials are each encoded with k data bits, and the qubits include 2k data bits.

[0082] Where k is an integer greater than or equal to 1; for a polynomial, since its coefficients can only be 0 or 1, the coefficients of the polynomial can be encoded onto the data bits through a NOT gate.

[0083] Step 202: Construct the quantum circuit corresponding to the data generation task based on the Toffoli gate and the preset retractor;

[0084] Specifically, the qubits also include 2k-1 result bits; the construction of the quantum circuit corresponding to the data generation task based on the Toffoli gate and the preset reorderer includes:

[0085] The Toffoli gate is applied to 2k data bits and 2k-1 result bits to obtain the general multiplication operation circuit corresponding to the data generation task, where the data bits are control bits; the general multiplication result of the two polynomials is mapped to 2k-1 result bits;

[0086] The preset retraction device is applied to 2k-1 of the result bits to obtain the retraction line corresponding to the data generation task, and the target data corresponding to the two polynomials are mapped onto k of the result bits.

[0087] Since the highest degree of the polynomial is k-1, the highest degree of its multiplication result is 2(k-1), and the lowest degree is 0. Therefore, 2k-1 result bits are needed to store the multiplication result, and the total number of qubits required is 4k-1.

[0088] It should be noted that the highest degree of the two polynomials can be different. For example, one can be k1-1 and the other k2-1, in which case the number of data bits required is k1+k2. Similarly, the number of result bits required is k1+k2-1. The total number of qubits required is 2k1+2k2-1.

[0089] When multiplying a term in one polynomial with a term in another polynomial, the coefficients of both terms must be 1 for the multiplication to occur. Therefore, this can be achieved using a Tooffoli gate. A Tooffoli gate consists of a C-CNOT gate, which is a control-control-notify gate. The data bits encoding these two terms can be used as control bits in the Tooffoli gate.

[0090] The preset reorder unit is used to reduce the order of the result of a general multiplication operation on a polynomial. This reordering can occur once, twice, or multiple times, without limitation. General multiplication refers to the multiplication operation in ordinary arithmetic operations, distinct from GF(2) in this application. k Multiplication operation.

[0091] Step 203: Send the input data and the quantum circuit to the quantum computing unit, instruct the quantum computing unit to excite the qubit to the initial quantum state, and drive the qubit to evolve from the initial quantum state based on the quantum circuit to obtain the measurement result of the qubit, wherein the initial quantum state includes the quantum state obtained by encoding the input data;

[0092] Specifically, the step of driving the qubit to evolve from the initial quantum state based on the quantum circuit to obtain the measurement result of the qubit includes applying the corresponding control waveform to the corresponding qubit according to the quantum logic gate in the quantum circuit and the qubit that the quantum logic gate acts on, the timing of the action, etc., to drive the qubit to evolve from the initial quantum state. After the evolution is completed, the measurement waveform is applied to the corresponding qubit to obtain the feedback measurement result.

[0093] Step 204: Receive the measurement result sent by the quantum computing unit, and determine the target data corresponding to the input data based on the measurement result.

[0094] Specifically, determining the target data corresponding to the input data based on the measurement results includes parsing the measurement results to obtain the target data represented by them.

[0095] Compared with existing technologies, this invention receives a data generation task for generating target data corresponding to input data; then constructs a quantum circuit corresponding to the data generation task based on a Toffoli gate and a preset reorder point; sends the input data and the quantum circuit to a quantum computing unit, instructing the quantum computing unit to excite the qubit to an initial quantum state, and drives the qubit to evolve from the initial quantum state based on the quantum circuit to obtain the measurement result of the qubit, wherein the initial quantum state includes a quantum state obtained by encoding the input data; finally, it receives the measurement result sent by the quantum computing unit and determines the target data corresponding to the input data based on the measurement result.

[0096] This invention processes GF(2) using both classical and quantum computing units. k In the data generation task of GF(2), the classical computing unit focuses on the design of the quantum circuit, and the quantum computing unit efficiently executes the quantum circuit, thereby realizing GF(2). k The efficient generation of target data in the algorithm can help accelerate the cracking of classic encryption algorithms.

[0097] Specifically, applying the Toffoli gate to the 2k data bits and the 2k-1 result bits includes:

[0098] Iterative execution applies the Toffoli gate to the data bit a corresponding to one of the polynomials. i Another data bit b corresponding to the polynomial. j and the result bit c i+j This continues until i and j = k-1, where the initial values ​​of i and j are 0.

[0099] Where i and j are integers greater than or equal to 0 and less than or equal to k-1. In the specific implementation program, it can be implemented using a double loop. One approach is to first set i = i + 1, keep j unchanged, execute the above steps to implement the first loop, and then when i = k-1, set j = j + 1 and execute the above steps to implement the second loop; another approach is to first set j = j + 1, keep i unchanged, execute the above steps to implement the first loop, and then when j = k-1, set i = i + 1 and execute the above steps to implement the second loop; no specific limitation is imposed here.

[0100] For example, for the polynomial x 5 With polynomial x 8 For multiplication, simply apply the Toffoli gate to the encoded x. 5Data bit a5, encoding x 8 Data bits b8 and result bits c 13 Above, the measurement result bit c 13 Then you can get the multiplication result x. 13 .

[0101] Furthermore, the method also includes:

[0102] Obtain the irreducible polynomial, and construct the preset retractor based on the irreducible polynomial and the CONT gate.

[0103] When executing GF(2) k In the modulo operation of GF(2), the irreducible polynomial to be removed is preset. k In the polynomial, since the coefficients of the polynomial come from the binary field (1 = -1), a preset reorder can be constructed using a CNOT gate. The control bit and the controlled bit of the CNOT gate are determined based on the irreducible polynomial.

[0104] For example, the two polynomials being multiplied are 1 + x 2 and x 2 Using the Toffoli gate in the above embodiments, the general product x can be obtained. 2 +x 4 If the irreducible polynomial is 1 + x 2 +x 3 If = 0, then the irreducible polynomial is equivalent to 1 + x 2 =x 3 Execute the reorder function once to obtain x. 2 +x·(1+x 2 )=x+x 2 +x 3 Execute the reorder function again to get x + x 2 +1+x 2 =1+x, thus reducing the degree to 1+x. 2 and x 2 GF(2) k The result of the multiplication operation is 1+x.

[0105] Specifically, constructing the preset retraction device based on the irreducible polynomial and the CONT gate includes:

[0106] The preset reorder is obtained by using the qubits corresponding to the non-highest terms in the irreducible polynomial as the controlled bits of the CNOT gate, and the qubits corresponding to the highest terms in the irreducible polynomial as the control bits of the CNOT gate.

[0107] Further, the highest degree of the irreducible polynomial is k; the step of using the qubits corresponding to the non-highest degree terms in the irreducible polynomial as the controlled bits of the CNOT gate, and using the qubits corresponding to the highest degree terms in the irreducible polynomial as the control bits of the CNOT gate, includes:

[0108] Iterative execution applies the CNOT gate to the qubit m h and m k Until h = 0, the initial value of h is k-1, and the m h For the controlled bits corresponding to the non-highest terms in the irreducible polynomial, m k is the control bit corresponding to the highest term in the irreducible polynomial.

[0109] In this embodiment, the control bits of multiple CNOT gates are all qubits corresponding to the highest term, and the controlled bits are qubits corresponding to the non-highest term as control bits of CNOT gates. Therefore, the timing of the operation of multiple CNOT gates does not affect the overall borrowing operation. The above embodiment is one of the implementation methods provided by the present invention.

[0110] like Figure 3 As shown, Figure 3 This is a schematic diagram of the structure of an ejector provided in an embodiment of the present invention. Figure 3 In the equation, the irreducible polynomial is 1 + x. 2 +x 3 =0, the irreducible polynomial is equivalent to 1+x 2 =x 3 Therefore, a reordering device can be obtained by applying CNOT gates to qubits m3 and m2, and to qubits m3 and m0, where qubit m3 is the control bit and qubits m2 and m0 are the controlled bits. The timing relationship between the CNOT gates applied to qubits m3 and m2 and to qubits m3 and m0 is not restricted.

[0111] Specifically, the step of applying a preset recursion device to 2k-1 of the resulting bits to obtain the recursion line corresponding to the data generation task includes:

[0112] Apply k-1 preset retraction devices to 2k-1 of the resulting bits to obtain the retraction line corresponding to the data generation task.

[0113] More specifically, the step of applying k-1 preset rewinders to 2k-1 of the result bits includes:

[0114] The iterative execution applies a preset retractor to the 2k-1-th to k-2-qth result bits until q = k-1, where the initial value of q is 0.

[0115] The preset reordering device is applied to the result bits from the 2k-1-th to the k-2-qth bits until q = k-1, that is, the reordering is applied, and the order is reduced layer by layer from the high order to the low order.

[0116] like Figure 4 As shown, Figure 4 A GF(2) provided for embodiments of the present invention k The quantum circuit diagram corresponding to the multiplication operation. k=3. This quantum circuit includes 3 data bits a2, a1, a0, used to encode one of the polynomials; it also includes 3 data bits b2, b1, b0, used to encode the other polynomial; and it also includes 2×3-1=5 result bits c4, c3, c2, c1, c0, used to store the result of the multiplication operation of the two polynomials or GF(2 k The result of the multiplication operation.

[0117] Since each of the two polynomials in the diagram contains 3 terms, 3 are needed. 2 There are 10 Tooffoli gates, each Tooffoli gate acts on one data bit a. i One data bit b j And a result bit c i+j The timing of its action is not limited.

[0118] The highest term of the irreducible polynomial used to construct the recalculators has a degree of 3, therefore two recalculators are needed. Each recalculator acts on 4 qubits. First, the recalculator is applied to the resulting bits c4, c3, c2, c1, then the recalculator is applied to the resulting bits c3, c2, c1, c0, such that the GF(2^3) of the two polynomials is equal to the degree of 3. k The result of the multiplication operation is mapped to three result bits: c2, c1, and c0.

[0119] See Figure 5 , Figure 5 This is a flowchart illustrating another data generation method provided in an embodiment of the present invention, applied to a quantum computing unit. The method includes:

[0120] Step 501: Receive input data and quantum circuits corresponding to the data generation task sent by the classical computing unit. The data generation task is used to generate target data corresponding to the input data. The quantum circuits are constructed by the classical computing unit based on Toffoli gates and preset retractors.

[0121] Step 502: Excite the qubit to an initial quantum state, and drive the qubit to evolve from the initial quantum state based on the quantum circuit to obtain the measurement result of the qubit, wherein the initial quantum state includes a quantum state obtained by encoding the input data;

[0122] Step 503: Send the measurement results to the classical computing unit so that the classical computing unit can determine the target data corresponding to the input data based on the measurement results.

[0123] Specifically, the input data includes two polynomials to be multiplied, wherein the highest degree of the polynomials is k-1; the qubits include 2k data bits and 2k-1 result bits; the process of exciting the qubits to an initial quantum state includes:

[0124] Excite k of the data bits to a first quantum state corresponding to one of the polynomials, excite another k of the data bits to a second quantum state corresponding to another polynomial, and excite 2k-1 of the result bits to the ground state.

[0125] For example, the two polynomials being multiplied are 1 + x 2 and x 2 If the first quantum state is |101>, the second quantum state is |100>, and the resulting bit's quantum state is |00000>, then the initial quantum state is |00000100101>. A quantum bit can be excited to a specific quantum state using an X-gate. For example, all quantum bits can be initialized to the ground state |0>, and then the quantum bit that needs to be excited to the excited state |1> can be determined. The control waveform corresponding to the X-gate can then be applied to that quantum bit.

[0126] For a detailed implementation of this embodiment, please refer to the application to the classical computing unit side. Figure 2 The embodiments shown are not described in detail here.

[0127] Another embodiment of the present invention provides a quantum computing system, the quantum computing system comprising classical computing units and quantum computing units;

[0128] The classical computing unit is used to perform the following steps:

[0129] Receive a data generation task, the data generation task being used to generate target data corresponding to the input data;

[0130] The quantum circuit corresponding to the data generation task is constructed based on the Toffoli gate and the preset retractor.

[0131] The input data and the quantum circuit are sent to the quantum computing unit, which instructs the quantum computing unit to excite the qubit to an initial quantum state, and drives the qubit to evolve from the initial quantum state based on the quantum circuit, thereby obtaining the measurement result of the qubit. The initial quantum state includes the quantum state obtained by encoding the input data.

[0132] The measurement results sent by the quantum computing unit are received, and the target data corresponding to the input data is determined based on the measurement results.

[0133] The quantum computing unit is used to perform the following steps:

[0134] The system receives input data and a quantum circuit corresponding to a data generation task sent by a classical computing unit. The data generation task is used to generate target data corresponding to the input data. The quantum circuit is constructed by the classical computing unit based on a Toffoli gate and a preset retractor.

[0135] The qubit is excited to an initial quantum state, and the qubit is driven to evolve from the initial quantum state based on the quantum circuit to obtain the measurement result of the qubit, wherein the initial quantum state includes the quantum state corresponding to the input data;

[0136] The measurement results are sent to the classical computing unit so that the classical computing unit can determine the target data corresponding to the input data based on the measurement results.

[0137] See Figure 6 , Figure 6 This is a schematic diagram of a data generation device provided in an embodiment of the present invention, applied to a classical computing unit. The device includes:

[0138] The receiving module 601 is used to receive a data generation task, wherein the data generation task is used to generate target data corresponding to the input data;

[0139] Module 602 is used to construct the quantum circuit corresponding to the data generation task based on the Toffoli gate and the preset retractor;

[0140] The transmitting module 603 is used to transmit the input data and the quantum circuit to the quantum computing unit, instruct the quantum computing unit to excite the qubit to an initial quantum state, and drive the qubit to evolve from the initial quantum state based on the quantum circuit to obtain the measurement result of the qubit, wherein the initial quantum state includes a quantum state obtained by encoding the input data;

[0141] The receiving module 601 is further configured to receive the measurement results sent by the quantum computing unit, and to determine the target data corresponding to the input data based on the measurement results.

[0142] See Figure 7 , Figure 7 This is a schematic diagram of another data generation device provided in an embodiment of the present invention, applied to a quantum computing unit. The device includes:

[0143] The receiving module 701 is used to receive input data and quantum circuits corresponding to data generation tasks sent by the classical computing unit. The data generation task is used to generate target data corresponding to the input data. The quantum circuits are constructed by the classical computing unit based on Toffoli gates and preset retractors.

[0144] The computing module 702 is used to excite the qubit to an initial quantum state, and drive the qubit to evolve from the initial quantum state based on the quantum circuit to obtain the measurement result of the qubit, wherein the initial quantum state includes the quantum state corresponding to the input data;

[0145] The sending module 703 is used to send the measurement result to the classical computing unit, so that the classical computing unit can determine the target data corresponding to the input data based on the measurement result.

[0146] The specific functions and effects of the data generation device can be explained by referring to other embodiments in this specification, and will not be repeated here. Each module in the data generation device can be implemented entirely or partially through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the computer device in hardware form, or it can be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0147] Please see Figure 8 This specification also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor, when executing the computer program, implements the data generation method of any of the above embodiments. Please refer to... Figure 8 The computer device can be a classical computer or a quantum computer.

[0148] This specification also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer, causes the computer to perform the data generation method described in any of the above embodiments.

[0149] This specification also provides a computer program product containing instructions that, when executed by a computer, cause the computer to perform the data generation method described in any of the above embodiments.

[0150] It is understood that the specific examples in this specification are only intended to help those skilled in the art better understand the implementation methods described herein, and are not intended to limit the scope of the invention.

[0151] It is understood that in the various embodiments of this specification, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not limit the implementation process of the embodiments of this specification in any way.

[0152] It is understood that the various implementation methods described in this specification can be implemented individually or in combination, and the implementation methods in this specification are not limited in this respect.

[0153] Unless otherwise stated, all technical and scientific terms used in the embodiments of this specification have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this specification. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items. The singular forms "a," "the," and "the" as used in the embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0154] It is understood that the processor in the embodiments of this specification can be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this specification. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this specification can be directly implemented by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above methods.

[0155] It is understood that the memory in the embodiments of this specification may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM). It should be noted that the memory in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0156] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this specification.

[0157] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the aforementioned method implementations, and will not be repeated here.

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

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

[0160] In addition, the functional units in the various embodiments of this specification 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.

[0161] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of this specification, in essence, or the parts that contribute to the prior art, or parts of the technical solutions, can be embodied in the form of software products. These computer software products are stored in a storage medium and include 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 specification. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0162] The above description is merely a specific embodiment of this specification, but the scope of protection of this invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this specification should be included within the scope of protection of this specification. Therefore, the scope of protection of this invention should be determined by the scope of the claims.

Claims

1. A data generating method characterized by comprising: Applied to classical computing units, the method includes: Receive a data generation task, the data generation task being used to generate target data corresponding to the input data; The quantum circuit corresponding to the data generation task is constructed based on the Toffoli gate and the preset reorder; wherein, the irreducible polynomial is obtained, the qubits corresponding to the non-highest terms in the irreducible polynomial are used as the controlled bits of the CNOT gate, and the qubits corresponding to the highest terms in the irreducible polynomial are used as the control bits of the CNOT gate, thus obtaining the preset reorder. The input data and the quantum circuit are sent to the quantum computing unit, which is instructed to excite the qubit to an initial quantum state and drive the qubit to evolve from the initial quantum state based on the quantum circuit, thereby obtaining the measurement result of the qubit. The initial quantum state includes a quantum state obtained by encoding the input data. The input data includes two polynomials to be multiplied, with the highest degree of the polynomials being k-1. The two polynomials are each encoded using k data bits, and the qubit includes 2k data bits. The qubit also includes 2k-1 result bits. The measurement results sent by the quantum computing unit are received, and the target data corresponding to the input data is determined based on the measurement results.

2. The method of claim 1, wherein, The construction of the quantum circuit corresponding to the data generation task based on the Toffoli gate and the preset retraction device includes: The Toffoli gate is applied to 2k data bits and 2k-1 result bits to obtain the general multiplication operation circuit corresponding to the data generation task, where the data bits are control bits; the general multiplication result of the two polynomials is mapped to 2k-1 result bits; The preset retraction device is applied to 2k-1 of the result bits to obtain the retraction line corresponding to the data generation task, and the target data corresponding to the two polynomials are mapped onto k of the result bits.

3. A data generating method characterized by comprising: Applied to quantum computing units, the method includes: The system receives input data and a quantum circuit corresponding to a data generation task sent by a classical computing unit. The data generation task is used to generate target data corresponding to the input data. The quantum circuit is constructed by the classical computing unit based on a Toffoli gate and a preset recursion device. Specifically, the system obtains an irreducible polynomial, uses the qubits corresponding to the non-highest terms in the irreducible polynomial as the controlled bits of a CNOT gate, and uses the qubits corresponding to the highest terms in the irreducible polynomial as the control bits of a CNOT gate to obtain the preset recursion device. The qubit is excited to an initial quantum state, and the qubit is driven to evolve from the initial quantum state based on the quantum circuit to obtain the measurement result of the qubit. The initial quantum state includes a quantum state obtained by encoding the input data. The input data includes two polynomials to be multiplied, and the highest degree of the polynomials is k-1. The two polynomials are encoded with k data bits respectively, and the qubit includes 2k data bits. The qubit also includes 2k-1 result bits. The measurement results are sent to the classical computing unit so that the classical computing unit can determine the target data corresponding to the input data based on the measurement results.

4. The method of claim 3, wherein, The process of exciting a qubit to its initial quantum state includes: Excite k of the data bits to a first quantum state corresponding to one of the polynomials, excite another k of the data bits to a second quantum state corresponding to another polynomial, and excite 2k-1 of the result bits to the ground state.

5. A quantum computing system, comprising: The quantum computing system includes classical computing units and quantum computing units; The classical computing unit is used to perform the following steps: Receive a data generation task, the data generation task being used to generate target data corresponding to the input data; The quantum circuit corresponding to the data generation task is constructed based on the Toffoli gate and the preset reorder; wherein, the irreducible polynomial is obtained, the qubits corresponding to the non-highest terms in the irreducible polynomial are used as the controlled bits of the CNOT gate, and the qubits corresponding to the highest terms in the irreducible polynomial are used as the control bits of the CNOT gate, thus obtaining the preset reorder. The input data and the quantum circuit are sent to the quantum computing unit, which is instructed to excite the qubit to an initial quantum state and drive the qubit to evolve from the initial quantum state based on the quantum circuit, thereby obtaining the measurement result of the qubit. The initial quantum state includes a quantum state obtained by encoding the input data. The input data includes two polynomials to be multiplied, with the highest degree of the polynomials being k-1. The two polynomials are each encoded using k data bits, and the qubit includes 2k data bits. The qubit also includes 2k-1 result bits. Receive the measurement results sent by the quantum computing unit, and determine the target data corresponding to the input data based on the measurement results; The quantum computing unit is used to perform the following steps: The system receives input data and a quantum circuit corresponding to a data generation task sent by a classical computing unit. The data generation task is used to generate target data corresponding to the input data. The quantum circuit is constructed by the classical computing unit based on a Toffoli gate and a preset retractor. The qubit is excited to an initial quantum state, and the qubit is driven to evolve from the initial quantum state based on the quantum circuit to obtain the measurement result of the qubit, wherein the initial quantum state includes the quantum state corresponding to the input data; The measurement results are sent to the classical computing unit so that the classical computing unit can determine the target data corresponding to the input data based on the measurement results.

6. A data generating apparatus characterized by comprising: The device, applied to a classical computing unit, includes: A receiving module is used to receive a data generation task, wherein the data generation task is used to generate target data corresponding to the input data; A construction module is used to construct the quantum circuit corresponding to the data generation task based on the Toffoli gate and a preset retractor; wherein, an irreducible polynomial is obtained, the qubits corresponding to the non-highest terms in the irreducible polynomial are used as the controlled bits of the CNOT gate, and the qubits corresponding to the highest terms in the irreducible polynomial are used as the control bits of the CNOT gate, thereby obtaining the preset retractor; A transmitting module is used to transmit the input data and the quantum circuit to a quantum computing unit, instructing the quantum computing unit to excite the qubit to an initial quantum state, and driving the qubit to evolve from the initial quantum state based on the quantum circuit to obtain the measurement result of the qubit. The initial quantum state includes a quantum state obtained by encoding the input data. The input data includes two polynomials to be multiplied, with the highest degree of the polynomials being k-1. The two polynomials are each encoded using k data bits, and the qubit includes 2k data bits. The qubit also includes 2k-1 result bits. The receiving module is further configured to receive the measurement results sent by the quantum computing unit, and to determine the target data corresponding to the input data based on the measurement results.

7. A data generating apparatus characterized by comprising: The device, applied to a quantum computing unit, includes: A receiving module is used to receive input data and a quantum circuit corresponding to a data generation task sent by a classical computing unit. The data generation task is used to generate target data corresponding to the input data. The quantum circuit is constructed by the classical computing unit based on a Toffoli gate and a preset recursion device. Specifically, an irreducible polynomial is obtained, and the qubits corresponding to the non-highest terms in the irreducible polynomial are used as the controlled bits of a CNOT gate, and the qubits corresponding to the highest terms in the irreducible polynomial are used as the control bits of a CNOT gate, thereby obtaining the preset recursion device. A computation module is used to excite a qubit to an initial quantum state and drive the qubit to evolve from the initial quantum state based on the quantum circuit to obtain the measurement result of the qubit. The initial quantum state includes the quantum state corresponding to the input data. The input data includes two polynomials to be multiplied, with the highest degree of the polynomials being k-1. The two polynomials are encoded using k data bits respectively, and the qubit includes 2k data bits. The qubit also includes 2k-1 result bits. The sending module is used to send the measurement results to the classical computing unit, so that the classical computing unit can determine the target data corresponding to the input data based on the measurement results.

8. A storage medium, characterized by 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 4 when it is run. 9.An electronic device comprising a memory and a processor, the electronic device characterized by, The memory stores a computer program, and the processor is configured to run the computer program to perform the method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Realization method of AES encryption system hardware module based on quantum reversible logic

    CN108650076A

  • AES hardware encryption system implementation method based on quantum reversible circuit

    CN110120867A