Data generation methods, devices, quantum computing systems, media and electronic devices
By constructing quantum circuits and driving the evolution of qubits, the problem of low efficiency in GF(2k) data generation in existing technologies has been solved, and the target data generation for efficiently cracking classical encryption algorithms has been achieved.
Patent Information
- Application Number
- CN202310324919.5
- 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
Existing technologies struggle to efficiently generate target data in GF(2k), resulting in low efficiency in cracking classic encryption algorithms.
A quantum circuit is constructed using classical computing units. The initial quantum state of the qubit is generated by controlled addition, single multiplication, and transpose conjugate of single multiplication, and the qubit is driven to evolve to compute the target data in GF(2k).
It achieves efficient generation of target data in GF(2k), thereby accelerating the cracking of classic encryption algorithms.
Smart Images

Figure CN118780377B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of quantum computing technology, specifically data generation methods, devices, quantum computing systems, media, and electronic devices. 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 controlled addition, single multiplication, and transpose conjugate of single multiplication. The single multiplication is used to calculate the result of a finite field multiplication of an arbitrary polynomial with a single unknown.
[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 qubit further includes k result bits and 1 auxiliary bit; the construction of the quantum circuit corresponding to the data generation task based on controlled addition, one multiplication, and the transpose-conjugate operation of one multiplication includes:
[0012] By alternating k controlled addition operations and k-1 single-order multiplication operations on 2k data bits, 1 auxiliary bit, and k result bits, and then applying the transpose-conjugate operation of k-1 single-order multiplication operations to k of the data bits and 1 auxiliary bit, the quantum circuit corresponding to the data generation task is obtained.
[0013] Optionally, the controlled addition operation is applied to one data bit corresponding to one polynomial, k data bits corresponding to another polynomial, 1 auxiliary bit, and k result bits, wherein the data bit corresponding to one of the polynomials is the control bit of the controlled addition operation.
[0014] Optionally, the first multiplication operation and the transpose-conjugate operation of the first multiplication operation are applied to k data bits and 1 auxiliary bit corresponding to another polynomial.
[0015] Optionally, the method further includes:
[0016] The first multiplication operation is constructed based on a downward translation operation, a preset retraction mechanism, and a CNOT gate.
[0017] Optionally, constructing the first multiplication operation based on the downward translation operation, the preset retractor, and the CNOT gate includes:
[0018] The downward shift operation and the preset retraction operator are applied sequentially to the data bits and auxiliary bits of an arbitrary polynomial, and the CNOT gate is applied to the data bits corresponding to the constant terms in the arbitrary polynomial and the auxiliary bits, resulting in a multiplication operation. The data bits corresponding to the constant terms in the arbitrary polynomial are the control bits in the CNOT gate.
[0019] Another embodiment of the present invention provides a data generation method applied to a quantum computing unit, the method comprising:
[0020] 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 controlled addition, a single multiplication, and the transpose-conjugate of a single multiplication. The single multiplication is used to calculate the result of a finite field multiplication of an arbitrary polynomial with a single unknown.
[0021] 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;
[0022] 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.
[0023] 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, 1 auxiliary bit, and k result bits; the step of exciting the qubits to an initial quantum state includes:
[0024] 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 1 auxiliary bit and k result bits to the ground state.
[0025] Another embodiment of the present invention provides a quantum computing system, the quantum computing system comprising a classical computing unit and a quantum computing unit;
[0026] The classical computing unit is used to perform the following steps:
[0027] Receive a data generation task, the data generation task being used to generate target data corresponding to the input data;
[0028] The quantum circuit corresponding to the data generation task is constructed based on controlled addition, single multiplication, and transpose conjugate of single multiplication. The single multiplication is used to calculate the result of a finite field multiplication of an arbitrary polynomial with a single unknown.
[0029] 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.
[0030] 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.
[0031] The quantum computing unit is used to perform the following steps:
[0032] 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 controlled addition, a single multiplication, and the transpose-conjugate of a single multiplication. The single multiplication is used to calculate the result of a finite field multiplication of an arbitrary polynomial with a single unknown.
[0033] 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;
[0034] 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.
[0035] Another embodiment of the present invention provides a data generation apparatus applied to a classical computing unit, the apparatus comprising:
[0036] A receiving unit is used to receive a data generation task, wherein the data generation task is used to generate target data corresponding to the input data;
[0037] The construction unit is used to construct the quantum circuit corresponding to the data generation task based on the controlled addition operation, the first multiplication operation, and the transpose conjugate operation of the first multiplication operation. The first multiplication operation is used to calculate the result of a finite field multiplication operation between an arbitrary polynomial and a first unknown quantity.
[0038] A transmitting unit is configured 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;
[0039] The receiving unit 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.
[0040] Another embodiment of the present invention provides a data generation device applied to a quantum computing unit, the device comprising:
[0041] The receiving unit 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 controlled addition, a single multiplication, and the transpose-conjugate operation of a single multiplication. The single multiplication is used to calculate the result of a finite field multiplication of an arbitrary polynomial with a single unknown.
[0042] A computing unit is configured 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 a quantum state obtained by encoding the input data;
[0043] A sending unit 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.
[0044] 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.
[0045] 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.
[0046] Compared with existing technologies, the present invention provides a data generation task, apparatus, quantum computing system, medium, and electronic device. It receives a data generation task for generating target data corresponding to input data, constructs a quantum circuit corresponding to the data generation task based on controlled addition, a single multiplication operation, and the transpose-conjugate operation of a single multiplication operation. The single multiplication operation is used to calculate the result of a finite field multiplication of an arbitrary polynomial with a single unknown quantity. Then, the input data and the quantum circuit are sent 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. The initial quantum state includes the quantum state obtained by encoding the input data. Finally, the measurement result sent by the quantum computing unit is received, and the target data corresponding to the input data is determined based on the measurement result.
[0047] GF(2) is processed by both classical and quantum computing units. kIn the data generation task of GF(2), the classical computing unit focuses on the design of the quantum circuit, while the quantum computing unit efficiently executes the quantum circuit. Through this division of labor and collaboration, they jointly achieve the goal of GF(2). k The efficient generation of target data in the algorithm can help accelerate the cracking of classic encryption algorithms. Attached Figure Description
[0048] Figure 1 A network block diagram of a data generation system provided in an embodiment of the present invention;
[0049] Figure 2 This is a flowchart illustrating a data generation method provided in an embodiment of the present invention;
[0050] Figure 3 A GF(2) provided for embodiments of the present invention k The quantum circuit diagram corresponding to multiplication operations;
[0051] Figure 4 A quantum circuit diagram corresponding to a single multiplication operation is provided in an embodiment of the present invention;
[0052] Figure 5 This is a schematic diagram of the structure of an ejector provided in an embodiment of the present invention;
[0053] Figure 6 A flowchart illustrating another data generation method provided in an embodiment of the present invention;
[0054] Figure 7 This is a schematic diagram of the structure of a data generation device provided in an embodiment of the present invention;
[0055] Figure 8 This is a schematic diagram of another data generation device provided in an embodiment of the present invention;
[0056] Figure 9 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0057] 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.
[0058] 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.
[0059] 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.
[0060] 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.
[0061] 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.
[0062] 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.
[0063] 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.
[0064] 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.
[0065] 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.
[0066] 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.
[0067] 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.
[0068] 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.
[0069] For example:
[0070] Quantum Algorithm 1: H1, H2, CNOT(1,3), H3, CNOT(2,3);
[0071] Quantum Algorithm 2: H1, H2, CNOT(1,2), H3, CNOT(2,3);
[0072] Where 1 / 2 / 3 represent three sequentially connected qubits Q1, Q2, Q3 or interconnected qubits Q1, Q2, Q3, respectively;
[0073] An exemplary explanation of how quantum algorithms are affected by the coherence time of qubits is as follows:
[0074] 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:
[0075] 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);
[0076] 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);
[0077] 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).
[0078] 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. 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.
[0079] 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:
[0080] Step 201: Receive a data generation task, wherein the data generation task is used to generate target data corresponding to the input data;
[0081] GF(2 k The 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.
[0082] 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=a7x 7 +a6x 6 +a5x 5 +a4x4 +a3x 3 +a2x 2 +a1x 1 +a0.
[0083] 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.
[0084] 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.
[0085] Step 202: Construct the quantum circuit corresponding to the data generation task based on the controlled addition operation, a single multiplication operation, and the transpose conjugate operation of the single multiplication operation. The single multiplication operation is used to calculate the result of a finite field multiplication operation between an arbitrary polynomial and a single unknown quantity.
[0086] The multiplication of any two polynomials over a finite field can be decomposed into the multiplication of each term of one polynomial over the finite field of the other polynomial. Since GF(2... k The elements in ) are polynomials with coefficients consisting of 0 and 1. Therefore, it can be regarded as another polynomial being continuously multiplied by x (i.e., a multiplication operation with x as the unknown). All the resulting polynomials are summed by addition operations, and each addition operation is controlled by the coefficient of the corresponding term in one of the polynomials.
[0087] For example, let the two polynomials be a = a0 + a1x + a2x. 2 b = b0 + b1x + b2x 2 a·b=(a0+a1x+a2x) 2 (b0+b1x+b2x) 2 )
[0088] =a0(b0+b1x+b2x) 2 )+a1x(b0+b1x+b2x 2 )
[0089] +a2x 2 (b0+b1x+b2x 2 )
[0090] Therefore, the finite field multiplication operation of two polynomials can be decomposed into a0 and (b0 + b1x + b2x) 2 Finite field multiplication operations, a1x and (b0+b1x+b2x) 2Finite field multiplication operation, a2x 2 Finite field multiplication with (b0+b1x+b2x2).
[0091] The three finite field multiplication operations mentioned above can be viewed as polynomials b0 + b1x + b2x 2 Repeatedly perform the ×x operation (i.e., a single multiplication operation with the unknown x) to sum all the resulting polynomials using addition operations. Each addition operation is controlled by the coefficients (a0, a1, a2) of the corresponding term in one of the polynomials.
[0092] Finally, considering the reversibility of the quantum circuit, it is necessary to restore another polynomial. If a multiplication operation is reversible, then it is only necessary to perform a transpose-conjugate operation on the qubits encoding the other polynomial.
[0093] Specifically, the qubits further include k result bits and 1 auxiliary bit; the construction of the quantum circuit corresponding to the data generation task based on controlled addition, one multiplication, and the transpose-conjugate operation of one multiplication includes:
[0094] By alternating k controlled addition operations and k-1 single-order multiplication operations on 2k data bits, 1 auxiliary bit, and k result bits, and then applying the transpose-conjugate operation of k-1 single-order multiplication operations to k of the data bits and 1 auxiliary bit, the quantum circuit corresponding to the data generation task is obtained.
[0095] Since each polynomial requires k data bits for encoding, and the GF(2) of the two polynomials... k The result of the multiplication operation also requires k bits for encoding. This is necessary when calculating the GF(2)... k When performing multiplication, one auxiliary bit is needed for auxiliary calculation, so the total number of qubits required is 3k+1.
[0096] 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 required number of data bits is k1+k2. The number of result bits required subsequently is the larger of k1 and k2. The total number of qubits required is 2k1+k2+1 or k1+2k2+1.
[0097] The controlled addition operation is applied to one data bit corresponding to one polynomial, k data bits corresponding to another polynomial, 1 auxiliary bit, and k result bits, wherein the data bit corresponding to one of the polynomials is the control bit of the controlled addition operation.
[0098] The first multiplication operation and the transpose-conjugate operation of the first multiplication operation are applied to k data bits and 1 auxiliary bit corresponding to another polynomial.
[0099] like Figure 3 As shown, Figure 3 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 to encode one polynomial; 3 data bits b2, b1, b0 to encode the other polynomial; and 1 auxiliary bit c and 3 result bits r2, r1, r0 to store the GF(2) of the two polynomials. k The result of the multiplication operation.
[0100] For the first controlled addition operation, applied to data bits a0, b2, b1, b0, auxiliary bit c, and result bits r2, r1, r0, the quantum state of result bits r2, r1, r0 evolves to the quantum state corresponding to the result of the finite field multiplication operation a0(b0+b1x+b2x2). For the first ×x operation, applied to data bits b2, b1, b0, and auxiliary bit c, the quantum state of data bits b2, b1, b0 evolves to b0x+b1x. 2 +b2x 3 The quantum state corresponding to the result of the finite field multiplication operation; for the second controlled addition operation, acting on data bits a1, b2, b1, b0, auxiliary bit c, and result bits r2, r1, r0, the quantum state of result bits c2, c1, c0 evolves to a0(b0+b1x+b2x). 2 )+a1(b0x+b1x 2 +b2x 3 The quantum state corresponding to the result of a finite field multiplication operation; for the second ×x operation, acting on data bits b2, b1, b0 and auxiliary bit c, the quantum state of data bits b2, b1, b0 evolves into b0x. 2 +b1x 3 +b2x 4 The quantum state corresponding to the result of the finite field multiplication operation; for the third controlled addition operation, acting on data bits a2, b2, b1, b0, auxiliary bit c, and result bits r2, r1, r0, the quantum state of result bits c2, c1, c0 is a0(b0+b1x+b2x). 2 )+a1(b0x+b1x 2 +b2x 3 )+a2(b0x 2 +b1x 3 +b2x 4 The quantum state corresponding to the result of a finite field multiplication operation.
[0101] Finally, the transpose conjugate operation of the two first-order multiplication operations is applied to the data bits b2, b1, b0 and the auxiliary bit c to restore the quantum states of the data bits b2, b1, b0 and the auxiliary bit c.
[0102] 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;
[0103] The initial quantum state includes a quantum state obtained by encoding the input data, and also includes a quantum state of auxiliary bits and a result bit initialized to |0>.
[0104] 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.
[0105] 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.
[0106] 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.
[0107] Compared with existing technologies, the present invention provides a data generation task, apparatus, quantum computing system, medium, and electronic device. It receives a data generation task for generating target data corresponding to input data, constructs a quantum circuit corresponding to the data generation task based on controlled addition, a single multiplication operation, and the transpose-conjugate operation of a single multiplication operation, where the single multiplication operation is used to calculate the result of a general multiplication of an arbitrary polynomial with a single unknown quantity; then, it sends 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 drives the qubits to evolve from the initial quantum state based on the quantum circuit to obtain the measurement result of the qubits, where the initial quantum state includes the 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.
[0108] GF(2) is processed by 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, while the quantum computing unit efficiently executes the quantum circuit. Through this division of labor and collaboration, they jointly achieve the goal of GF(2). k The efficient generation of target data in the algorithm can help accelerate the cracking of classic encryption algorithms.
[0109] Furthermore, the method also includes:
[0110] The first multiplication operation is constructed based on a downward translation operation, a preset retraction mechanism, and a CNOT gate.
[0111] The calculation of the result of a finite field multiplication of an arbitrary polynomial with a linear unknown involves first calculating a general multiplication of the arbitrary polynomial with the linear unknown, which can be achieved through a downward shift operation; then reducing the degree of the general multiplication result to obtain the finite field multiplication result, which can be achieved through a pre-defined borrowing operator. Since an auxiliary bit is introduced to record the most significant bit during the downward shift operation, the auxiliary bit needs to be reset to achieve a reversible quantum circuit. This can be achieved by constructing a CNOT gate between the least significant bit and the auxiliary bit. Because the constant term of the irreducible polynomial must be 1 (otherwise it contains the factor x), the borrowing operation will inevitably cause the least significant bit (which was previously 0 due to the shift operation) to be the same as the auxiliary bit. Therefore, the CNOT gate can achieve the restoration and construct a reversible quantum circuit.
[0112] Specifically, the construction of the first multiplication operation based on the downward translation operation, the preset retraction device, and the CNOT gate includes:
[0113] The downward shift operation and the preset retraction operator are applied sequentially to the data bits and auxiliary bits of an arbitrary polynomial, and the CNOT gate is applied to the data bits corresponding to the constant terms in the arbitrary polynomial and the auxiliary bits, resulting in a multiplication operation. The data bits corresponding to the constant terms in the arbitrary polynomial are the control bits in the CNOT gate.
[0114] like Figure 4 As shown, Figure 4 This invention provides a quantum circuit diagram corresponding to a single multiplication operation. The quantum circuit includes data bits b2, b1, b0 encoding an arbitrary polynomial and auxiliary bits c. First, a downward shift operation is applied to the data bits b2, b1, b0 and auxiliary bits c, causing the quantum states of the data bits b2, b1, b0 and auxiliary bits c to change from b0 + b1x + b2x. 2 The corresponding quantum state evolves to b0x+b1x 2 +b2x 3The corresponding quantum state; then the reordering device is applied to data bits b2, b1, b0 and auxiliary bit c, so that the quantum states of data bits b2, b1, b0 and auxiliary bit c change from b0x+b1x 2 +b2x 3 The corresponding quantum state evolves to the quantum state corresponding to the result in the finite field; finally, by applying the CNOT gate to the data bit b0 and the auxiliary bit c, the quantum state of the auxiliary bit c is reset to |0>, where the data bit b0 is the control bit and the auxiliary bit c is the controlled bit.
[0115] Furthermore, the method also includes:
[0116] Obtain the irreducible polynomial, and construct the preset retractor based on the irreducible polynomial and the CONT gate.
[0117] 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.
[0118] 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.
[0119] Specifically, constructing the preset retraction device based on the irreducible polynomial and the CONT gate includes:
[0120] 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.
[0121] 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:
[0122] 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.
[0123] 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.
[0124] like Figure 5 As shown, Figure 5 This is a schematic diagram of the structure of an ejector provided in an embodiment of the present invention. Figure 5 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.
[0125] See Figure 6 , Figure 6 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:
[0126] Step 601: Receive the input data and the quantum circuit corresponding to the data generation task sent by the classical computing unit. The data generation task is used to generate the target data corresponding to the input data. The quantum circuit is constructed by the classical computing unit based on the controlled addition operation, the first multiplication operation, and the transpose and conjugate operation of the first multiplication operation. The first multiplication operation is used to calculate the result of the finite field multiplication operation of an arbitrary polynomial and a first unknown quantity.
[0127] Step 602: 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;
[0128] Step 603: 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.
[0129] 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, 1 auxiliary bit, and k result bits; the process of exciting the qubits to an initial quantum state includes:
[0130] 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 1 auxiliary bit and k result bits to the ground state.
[0131] The ground state is |0>, and the excited state is |1>.
[0132] For example, the two polynomials being multiplied are 1 + x 2 and x 2 The first quantum state is |101>, the second quantum state is |100>, the quantum state of the auxiliary bit is |0>, the quantum state of the result bit is |000>, and the initial quantum state is |0000100101>. 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.
[0133] 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.
[0134] Another embodiment of the present invention provides a quantum computing system, the quantum computing system comprising classical computing units and quantum computing units;
[0135] The classical computing unit is used to perform the following steps:
[0136] Receive a data generation task, the data generation task being used to generate target data corresponding to the input data;
[0137] The quantum circuit corresponding to the data generation task is constructed based on controlled addition, single multiplication, and transpose conjugate of single multiplication. The single multiplication is used to calculate the result of a finite field multiplication of an arbitrary polynomial with a single unknown.
[0138] 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.
[0139] 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.
[0140] The quantum computing unit is used to perform the following steps:
[0141] 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 controlled addition, a single multiplication, and the transpose-conjugate of a single multiplication. The single multiplication is used to calculate the result of a finite field multiplication of an arbitrary polynomial with a single unknown.
[0142] 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;
[0143] 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.
[0144] See Figure 7 , Figure 7 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:
[0145] The receiving unit 701 is used to receive a data generation task, wherein the data generation task is used to generate target data corresponding to the input data;
[0146] The construction unit 702 is used to construct the quantum circuit corresponding to the data generation task based on the controlled addition operation, a single multiplication operation, and the transpose conjugate operation of the single multiplication operation. The single multiplication operation is used to calculate the result of a finite field multiplication operation between an arbitrary polynomial and a single unknown quantity.
[0147] The transmitting unit 703 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;
[0148] The receiving unit 701 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.
[0149] See Figure 8 , Figure 8 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:
[0150] The receiving unit 801 is used to receive input data and a quantum circuit corresponding to a 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 circuit is constructed by the classical computing unit based on controlled addition, a single multiplication, and the transpose-conjugate of a single multiplication. The single multiplication is used to calculate the result of a finite field multiplication of an arbitrary polynomial with a single unknown.
[0151] The computing unit 802 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 a quantum state obtained by encoding the input data;
[0152] The sending unit 803 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.
[0153] 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.
[0154] Please see Figure 9 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 9 The computer device can be a classical computer or a quantum computer.
[0155] 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.
[0156] 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.
[0157] 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.
[0158] 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.
[0159] 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.
[0160] 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.
[0161] 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.
[0162] 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.
[0163] 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.
[0164] 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.
[0165] 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.
[0166] 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.
[0167] 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.
[0168] 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.
[0169] 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 generation method, characterized in that, Applied to classical computing units, the method includes: A data generation task is received, which is used to generate target data corresponding to the input data; wherein, the input data includes two polynomials to be multiplied, and the highest degree of the polynomials is k-1; the two polynomials are encoded by k data bits respectively, and the qubits include 2k data bits; the qubits also include k result bits and 1 auxiliary bit; K controlled addition operations and k-1 linear multiplication operations are alternately applied to 2k data bits, 1 auxiliary bit, and k result bits. The transpose-conjugate operation of k-1 linear multiplication operations is applied to k data bits and 1 auxiliary bit to obtain the quantum circuit corresponding to the data generation task. The linear multiplication operation is used to calculate the result of a finite field multiplication operation between an arbitrary polynomial and a linear unknown. 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. 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 controlled addition operation is applied to one data bit corresponding to one polynomial, k data bits corresponding to another polynomial, 1 auxiliary bit, and k result bits, wherein the data bit corresponding to one of the polynomials is the control bit of the controlled addition operation.
3. The method of claim 2, wherein, The first multiplication operation and the transpose conjugate operation of the first multiplication operation are applied to k data bits and 1 auxiliary bit corresponding to another polynomial.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: The first multiplication operation is constructed based on a downward translation operation, a preset retraction mechanism, and a CNOT gate.
5. The method of claim 4, wherein, The construction of the first multiplication operation based on the downward translation operation, the preset retraction device, and the CNOT gate includes: The downward shift operation and the preset retraction operator are applied sequentially to the data bits and auxiliary bits of an arbitrary polynomial, and the CNOT gate is applied to the data bits corresponding to the constant terms in the arbitrary polynomial and the auxiliary bits, resulting in a multiplication operation. The data bits corresponding to the constant terms in the arbitrary polynomial are the control bits in the CNOT gate.
6. 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 controlled addition, a single multiplication, and the transpose-conjugate of a single multiplication. The single multiplication is used to calculate the result of a finite field multiplication of an arbitrary polynomial with a single unknown. The input data includes two polynomials to be multiplied, and the highest degree of the polynomials is k-1. The quantum bits include 2k data bits, 1 auxiliary bit, and k result bits. The process involves exciting a 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 process of exciting the qubit to the initial quantum state includes: exciting k data bits to a first quantum state corresponding to one of the polynomials; exciting another k data bits to a second quantum state corresponding to another polynomial; and exciting one auxiliary bit and k result bits to the ground state. 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.
7. 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: A data generation task is received, which is used to generate target data corresponding to the input data; wherein, the input data includes two polynomials to be multiplied, and the highest degree of the polynomials is k-1; the two polynomials are encoded by k data bits respectively, and the qubits include 2k data bits; the qubits also include k result bits and 1 auxiliary bit; K controlled addition operations and k-1 linear multiplication operations are alternately applied to 2k data bits, 1 auxiliary bit, and k result bits. The transpose-conjugate operation of k-1 linear multiplication operations is applied to k data bits and 1 auxiliary bit to obtain the quantum circuit corresponding to the data generation task. The linear multiplication operation is used to calculate the result of a finite field multiplication operation between an arbitrary polynomial and a linear unknown. 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. 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 controlled addition, a single multiplication, and the transpose and conjugate of a single multiplication. The single multiplication is used to calculate the result of a finite field multiplication of an arbitrary polynomial with a single unknown. The process involves exciting a 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 process of exciting the qubit to the initial quantum state includes: exciting k data bits to a first quantum state corresponding to one of the polynomials; exciting another k data bits to a second quantum state corresponding to another polynomial; and exciting one auxiliary bit and k result bits to the ground state. 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.
8. A data generating apparatus characterized by comprising: The device, applied to a classical computing unit, includes: A receiving unit is used to receive a data generation task, which generates target data corresponding to the input data; wherein, the input data includes 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; the qubits also include k result bits and 1 auxiliary bit; A construction unit is used to alternately apply k controlled addition operations and k-1 first-order multiplication operations to 2k data bits, 1 auxiliary bit, and k result bits, and to apply the transpose conjugate operation of k-1 first-order multiplication operations to k data bits and 1 auxiliary bit to obtain the quantum circuit corresponding to the data generation task. The first-order multiplication operation is used to calculate the result of a finite field multiplication operation between an arbitrary polynomial and a first-order unknown. A transmitting unit is configured 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; The receiving unit 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.
9. A data generating apparatus characterized by comprising: The device, applied to a quantum computing unit, includes: A receiving unit 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 controlled addition, a single multiplication, and the transpose-conjugate of a single multiplication. The single multiplication is used to calculate the result of a finite field multiplication of an arbitrary polynomial with a single unknown. The input data includes two polynomials to be multiplied, and the highest degree of the polynomials is k-1. The quantum bits include 2k data bits, 1 auxiliary bit, and k result bits. A computing unit is configured 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 a quantum state obtained by encoding the input data. The process of exciting the qubit to the initial quantum state includes: exciting k data bits to a first quantum state corresponding to one of the polynomials; exciting another k data bits to a second quantum state corresponding to another polynomial; and exciting one auxiliary bit and k result bits to the ground state. A sending unit 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.
10. 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 6 when it is run. 11.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 6.
Citation Information
Patent Citations
Quantum multiplication operation method and device, electronic device and storage medium
CN112114776A
Quantum subtraction method and device, electronic device and storage medium
CN112214200A
