BKZ reduction method and device based on adaptive Grover algorithm and medium

By combining the BKZ algorithm with the adaptive Grover algorithm, the problem is transformed into an unconstrained binary quadratic optimization problem in quantum computing systems. By utilizing the parallel processing characteristics of quantum superposition states, the problem of high computational complexity of the BKZ algorithm in large-scale shortest vector problems is solved, and efficient lattice basis reduction is achieved.

CN121860086APending Publication Date: 2026-04-14NO 30 INST OF CHINA ELECTRONIC TECH GRP CORP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-30
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

The existing BKZ algorithm has high computational complexity when solving large-scale shortest vector problems, resulting in low efficiency and difficulty in efficiently handling large-dimensional lattice reduction.

Method used

The adaptive Grover algorithm is adopted to transform the problem of the shortest vector of the projected sublattice in the lattice basis reduction process into an unconstrained binary quadratic optimization problem that can be executed by a quantum computing system. By taking advantage of the parallel processing characteristics of quantum superposition, the algorithm combines quantum dictionary and Grover search to optimize the combination of quantum logic gates and dynamically adjusts the search parameters to improve the solution efficiency.

Benefits of technology

It significantly improves the data processing convergence speed of the lattice reduction process, achieves quadratic acceleration, reduces the depth and complexity of quantum logic gate operations, and improves the stability and accuracy of solving large-scale lattice reduction problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121860086A_ABST
    Figure CN121860086A_ABST
Patent Text Reader

Abstract

The invention provides a BKZ reduction method and device based on an adaptive Grover algorithm and a medium, and relates to the technical field of quantum computing. The method comprises the following steps: firstly, obtaining a lattice base to be reduced and a preset block size, determining a projection sub-lattice of the lattice base, and converting an SVP problem on the projection sub-lattice into a QUBO problem by adopting a binary variable coding method; then, constructing a quantum circuit containing a quantum dictionary and Grover search, and carrying out evolution on a quantum system; performing physical measurement on the evolved quantum register, and adaptively updating a search threshold value or adjusting a search parameter according to a measurement result until the shortest vector of the current projection sub-lattice is obtained; and finally, updating the lattice basis by using the shortest vector of the projection sub-lattice obtained by solving to generate a BKZ reduced basis. Compared with a classical violent enumeration method, square acceleration is realized by utilizing the parallel advantage of quantum calculation, and lattice base reduction efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of quantum computing technology, and more specifically, to a BKZ reduction method, device, and medium based on the adaptive Grover algorithm. Background Technology

[0002] The Shortest Vector Problem (SVP) aims to find the shortest non-zero vector in a given Euclidean space, which is a fundamental guarantee of the security of many current lattice cryptography protocols. To solve the SVP, the BlockKorkine-Zolotarev algorithm (BKZ algorithm) is a typical lattice basis reduction method. By calling an algorithm module known as the shortest vector black box, it sequentially solves the shortest vector problem on a series of projected sublattices, thereby achieving efficient reduction of the lattice basis and obtaining a reduced lattice basis with shorter lengths and nearly orthogonal basis vectors. This method has wide applications in practice.

[0003] The output of the BKZ algorithm is called the BKZ reduction basis, and its reduction capability is determined by its pre-selected projected subgrid size, i.e., the block size. The decision is made based on the block size. When the block size is small, the BKZ algorithm runs in a shorter time, but the shortest vector in the BKZ-reduced basis is far from the true shortest vector in the lattice. When the block size is large, the BKZ algorithm runs in a longer time, but the shortest vector in the BKZ-reduced basis is closer to the true shortest vector. In the extreme case, when the block size... When the block size is equal to the original lattice dimension, the BKZ reduction basis is equivalent to the LLL reduction basis, and the shortest vector in the BKZ reduction basis is an exponential multiple of the true shortest vector. When the block size is equal to the original lattice dimension, the BKZ reduction basis is equivalent to the HKZ reduction basis, and the shortest vector in the reduction basis is the true shortest vector on the lattice. However, as the block size increases, the time complexity required by existing shortest vector black boxes to solve the problem of shortest vectors on projected sublattices typically increases exponentially. This sharp increase in computational complexity greatly limits the performance of the BKZ algorithm in solving large-scale shortest vector problems, resulting in low efficiency in large-dimensional lattice basis reduction. Therefore, how to design a shortest vector black box that can reduce computational complexity and improve solution efficiency to enhance the processing power of the BKZ algorithm is a pressing technical problem to be solved in this field. Summary of the Invention

[0004] The present invention aims to solve at least one of the aforementioned technical problems existing in the prior art.

[0005] To this end, the first aspect of the present invention provides a BKZ reduction method based on the adaptive Grover algorithm.

[0006] A second aspect of the present invention provides a computer device.

[0007] A third aspect of the present invention provides a computer-readable storage medium.

[0008] The BKZ reduction method based on the adaptive Grover algorithm proposed in this invention is applied to quantum computing systems. The method includes: Obtain the lattice basis to be reduced and the preset block size, and determine the projected sub-lattices of the current lattice basis during the execution of the BKZ algorithm; the original lattice basis is represented as... ,in, Let i be the lattice basis vectors, i = 1, 2, ..., n, where n is the lattice rank; The shortest vector problem on the projected sublattice is mapped to an unconstrained binary quadratic optimization problem using a binary variable encoding method to determine the objective function for the evolution of the quantum system; the shortest vector problem is defined as finding a non-zero vector. Make:

[0009] in, A vector of integer coefficients. Denotes the Euclidean norm; An adaptive Grover search is used to solve for the evolution of a quantum system, including: initializing search parameters and a search threshold; initializing the quantum bond register and quantum value register in the quantum computing system to a uniform superposition state; constructing a quantum circuit containing a quantum dictionary and a Grover search; first, applying the quantum dictionary to the quantum bond register and quantum value register to write the target function parameters, and then repeatedly applying the Grover search a random number of times to amplify the amplitude of the target state; performing physical measurements on the evolved quantum bond register and quantum value register; if the function value obtained from the measurement result is less than the current search threshold, updating the search threshold and the current shortest vector; otherwise, adjusting the search parameters until a preset iteration stopping condition is met; and updating the lattice basis using the shortest vector of the solved projected sublattice to generate a BKZ reduced basis.

[0010] The BKZ reduction method based on the adaptive Grover algorithm according to the above-described technical solution of the present invention may also have the following additional technical features: In the above technical solution, the step of mapping the shortest vector problem on the projected subgrid to an unconstrained binary quadratic optimization problem using a binary variable encoding method includes: Determine the modulus expression of any vector on the projected subgrid, determine the number of bits in the two's complement based on the preset upper bound of the coordinate variables in the modulus expression, and use the two's complement to represent the coordinate variables in the modulus expression; Substituting the two's complement of the coordinate variables in the modulus expression into the modulus expression yields an objective function containing the correlation coefficients of the binary variables. Minimizing the objective function yields the shortest vector coordinates under the current lattice basis.

[0011] In the above technical solution, the construction of a quantum circuit including a quantum dictionary and Grover search is described. The quantum dictionary is used to store the uniform superposition state of the coordinate-corresponding binary variables and their corresponding function values ​​minus the current search threshold. The quantum dictionary includes an Adama transform module, a parameter encoding module, and an inverse quantum Fourier transform module. The first step of applying the quantum dictionary to the quantum bond register and quantum value register includes: using the Hadamard transform module to convert the quantum bond register and quantum value register into a uniform superposition state; using the parameter encoding module to apply a parametric rotation gate to the quantum value register to write the result of subtracting the objective function from the current search threshold into the phase of the quantum state; and using the inverse quantum Fourier transform module to transform the calculation result into the quantum state.

[0012] In the above technical solution, the parameter encoding module contains a parameterized rotation gate composed of multiple quantum phase gates. The quantum phase gates apply phase rotations of different angles according to the coefficients in the objective function sub-terms, so as to write the coefficients in the objective function sub-terms into the quantum value register.

[0013] In the above technical solution, the application of the parameterized rotating gate adopts a controlled operation mode. Different controlled modes are selected according to whether the indices of the binary variables in the objective function are the same: when the indices of the binary variables are the same, the parameterized rotating gate is controlled by a single qubit; when the indices of the binary variables are different, the parameterized rotating gate is jointly controlled by two corresponding qubits. The joint control of the two corresponding qubits is achieved through a combination circuit of a controlled NOT gate and a controlled phase gate.

[0014] In the above technical solution, the Grover search includes a Grover black box circuit and an amplitude amplification circuit; the Grover black box circuit is used to query the target state that satisfies the objective function value being less than the current search threshold. It is achieved by judging whether the highest bit of the binary two's complement of the difference between the objective function value stored in the quantum value register and the current search threshold is 1. When the highest bit is 1, the phase of the target state is flipped using an auxiliary quantum bit.

[0015] In the above technical solution, the amplitude amplification circuit includes two Adama operations and one conditional phase shift operation; the conditional phase shift operation is used to add a negative phase before all quantum states except the zero state. This operation is implemented by introducing auxiliary qubits and using a multi-bit zero-controlled NOT gate, which is composed of multiple Pauli X gates and multi-bit controlled NOT gates.

[0016] In the above technical solution, the step after physically measuring the evolved quantum bond register and quantum value register further includes: if the measured function value is not less than the current search threshold, then keep the current search threshold and the current shortest vector unchanged, and amplify and update the random number selection range parameter of Grover search according to the preset amplification factor, and return to the step of randomly selecting the number of times Grover search is repeated.

[0017] The present invention provides a computer device, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is loaded and executed by the processor, it implements the BKZ reduction method based on the adaptive Grover algorithm as described in any of the above technical solutions.

[0018] The present invention provides a computer-readable storage medium storing a program that, when loaded by a processor, implements the BKZ reduction method based on the adaptive Grover algorithm as described in any of the above technical solutions.

[0019] In summary, due to the adoption of the above-mentioned technical features, the beneficial effects of the present invention are: This invention proposes a BKZ reduction method based on the adaptive Grover algorithm. By constructing a shortest vector solution path based on a quantum evolution architecture, the shortest vector search task of the projected sublattice in the traditional lattice basis reduction process is transformed into an unconstrained binary quadratic optimization process executable by a quantum computing system. By utilizing the physical characteristics of parallel processing of quantum superposition states, the convergence speed of data processing in the lattice basis reduction process is significantly improved, achieving a quadratic speedup compared to the classical brute-force enumeration method.

[0020] This invention addresses the physical characteristics of quantum computing systems by specifically designing an adapted quantum dictionary, Grover black-box circuitry, and conditional phase shift operation circuitry. Through optimized combinations of quantum logic gates, it achieves precise parameter encoding and efficient amplification of the target state amplitude. While ensuring a quadratic speedup compared to classical enumeration methods, it effectively reduces the depth and complexity of quantum logic gate operations required for quantum search tasks, thereby reducing the hardware resource overhead of the quantum computing system. Furthermore, this invention employs an adaptive threshold update mechanism based on physical measurement feedback, which dynamically adjusts the system's evolution parameters and search range according to the actual readings of the quantum registers. This avoids search failures or wasted computing power due to fixed parameter settings, improving the operational stability and data processing accuracy of the quantum computing system when solving large-scale lattice problems.

[0021] Additional aspects and advantages of the invention will become apparent in the following description or may be learned by practice of the invention. Attached Figure Description

[0022] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 This is a flowchart of a BKZ reduction method based on the adaptive Grover algorithm according to an embodiment of the present invention; Figure 2 This is a quantum dictionary combination diagram in the BKZ reduction method based on the adaptive Grover algorithm according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the quantum value register encoding principle in the BKZ reduction method based on the adaptive Grover algorithm according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the quantum dictionary parameterized rotating gate circuit structure in the BKZ reduction method based on the adaptive Grover algorithm according to an embodiment of the present invention; Figure 5 This is a schematic diagram of a quantum dictionary controlled rotating gate in the BKZ reduction method based on the adaptive Grover algorithm according to an embodiment of the present invention; Figure 6 This is a schematic diagram of a single-control-bit controlled rotating door in the BKZ reduction method based on the adaptive Grover algorithm according to an embodiment of the present invention; Figure 7 This is a schematic diagram of a dual-control bit controlled rotating gate in the BKZ reduction method based on the adaptive Grover algorithm according to an embodiment of the present invention; Figure 8 This is a diagram of the adaptive Grover search structure in the BKZ reduction method based on the adaptive Grover algorithm according to an embodiment of the present invention. Figure 9 This is a Grover black-box quantum circuit structure diagram in the BKZ reduction method based on the adaptive Grover algorithm according to an embodiment of the present invention; Figure 10 This is a quantum circuit structure diagram of the phase shift operation in the BKZ reduction method based on the adaptive Grover algorithm according to an embodiment of the present invention; Figure 11 This is an equivalent circuit diagram of a multi-bit control gate in the BKZ reduction method based on the adaptive Grover algorithm according to an embodiment of the present invention. Detailed Implementation

[0023] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0024] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.

[0025] The following reference Figures 1 to 11 This describes a BKZ reduction method, apparatus, and medium based on the adaptive Grover algorithm provided according to some embodiments of the present invention.

[0026] Some embodiments of this application provide a BKZ reduction method based on the adaptive Grover algorithm.

[0027] The first embodiment of the present invention proposes a BKZ reduction method based on the adaptive Grover algorithm, which is applied to a quantum computing system. The method includes the following steps S1 to S3.

[0028] S1. Obtain the lattice basis to be reduced and the preset block size, and determine the projected sub-lattice of the current lattice basis during the execution of the BKZ algorithm.

[0029] Specifically, for grid Its primitive lattice basis is represented as ,in, Let i be the lattice basis vectors, i = 1, 2, ..., n, where n is the lattice rank.

[0030] To solve the SVP problem, the BKZ algorithm pre-sets the block size. Furthermore, by invoking the shortest vector black box, the SVP problem on the projected sublattice composed of the j-th to k-th lattice bases is solved sequentially, where... , Ultimately, the BKZ reduced base is generated.

[0031] S2. The shortest vector problem on the projected sublattice is mapped to an unconstrained binary quadratic optimization problem (QUBO problem) using a binary variable encoding method to determine the objective function of the quantum system evolution; use Representing vectors Given the Euclidean norm, the SVP (Shortest Vector Problem) on a lattice can be defined as finding the shortest non-zero vector. , so that:

[0032] in, It is a vector of integer coefficients.

[0033] S3. An adaptive Grover search is used to solve the evolution of the quantum system, including: initializing search parameters and a search threshold; initializing the quantum bond register and quantum value register in the quantum computing system to a uniform superposition state; constructing a quantum circuit containing a quantum dictionary and a Grover search; first, applying the quantum dictionary to the quantum bond register and quantum value register to write the target function parameters, then repeatedly applying a random number of Grover searches to amplify the target state amplitude; performing physical measurements on the evolved quantum bond register and quantum value register; if the function value obtained from the measurement result is less than the current search threshold, updating the search threshold and the current shortest vector; otherwise, adjusting the search parameters until a preset iteration stopping condition is met; updating the lattice basis using the shortest vector of the solved projected sublattice to generate a BKZ reduced basis.

[0034] In the specific execution process of some embodiments, the execution flow for generating the BKZ reduced base is as follows: Figure 1 As shown, the process includes the following steps S301-S311. It should be noted that in this embodiment, the transformation from the SVP problem to the QUBO problem in step S2 is integrated into the execution flow for generating the BKZ reduced base. In actual operation, it can also be executed independently in advance as needed.

[0035] S301. Setting and initializing related parameters, mainly including setting the upper limit of Grover search iterations. Set the magnification factor Initialize Grover iteration count and the total number of algorithm iterations .

[0036] S302. Transform the SVP problem on the projected sublattice into a QUBO problem and construct the objective function. .

[0037] In some embodiments, a binary variable encoding method is used to transform the SVP problem on the projected subgrid (corresponding to step S2).

[0038] Specifically, the method of mapping the shortest vector problem on the projected subgrid to an unconstrained binary quadratic optimization problem using a binary variable encoding method includes: Determine the modulus expression of any vector on the projected subgrid. Determine the number of bits in the two's complement of the coordinate variables in the modulus expression based on the preset upper bound of the coordinate variables in the modulus expression. Use the two's complement of the coordinate variables in the modulus expression to represent the coordinate variables in the modulus expression. Substitute the two's complement of the coordinate variables in the modulus expression into the modulus expression to obtain an objective function containing the correlation coefficients of the binary variables. Minimize the objective function to obtain the shortest vector coordinates under the current lattice basis.

[0039] Specifically, consider projected subgrids , its base Abbreviated as Then any vector on that subgrid The modulus can be expressed as follows:

[0040] Assuming for each variable There exists an upper bound. This embodiment uses two's complement representation. ;for Two's complement binary code can represent integers ranging from 1 to 2. ,therefore Need to meet ,Right now At this point, for any ,have:

[0041] in, satisfy:

[0042] Will Substituting the two's complement representation From the expression for the modulus, we can obtain the objective function used to solve the SVP problem on the projected sublattice, which has the following form:

[0043] in, Representing binary variables and The associated coefficients. In this way, the function can be minimized. This allows us to obtain the coordinates of the shortest vector under the current lattice basis, thus transforming the SVP problem on the projected sublattice into a QUBO problem for solution.

[0044] S303, Regarding variables The search domain X is randomly selected based on a uniform distribution. And calculate the corresponding function value:

[0045] This is used as the initial threshold for adaptive Grover search.

[0046] S304. Determine if i is greater than or equal to N. If yes, terminate the algorithm; otherwise, continue with the subsequent steps.

[0047] S305, Random selection .

[0048] S306, Initialize a Bit quantum bond register and one The bit quantum value register is That is, initializing the quantum bond register and quantum value register in the quantum computing system to a superposition state, expressed as:

[0049] in, This represents the initial superposition state of the quantum bond register and the quantum value register.

[0050] S307, Constructing a quantum dictionary and Grover search .

[0051] In some embodiments, in the construction of the quantum circuit including the quantum dictionary and Grover search, the quantum dictionary is used to store the uniform superposition state of the coordinate-corresponding binary variables and their corresponding function values ​​minus the current search threshold. The quantum dictionary includes an Adama transform module, a parameter encoding module, and an inverse quantum Fourier transform module. The first step of applying the quantum dictionary to the quantum bond register and quantum value register includes: using the Hadamard transform module to convert the quantum bond register and quantum value register into a uniform superposition state; using the parameter encoding module to apply a parametric rotation gate to the quantum value register to write the result of subtracting the objective function from the current search threshold into the phase of the quantum state; and using the inverse quantum Fourier transform module to transform the calculation result into the quantum state.

[0052] Specifically, the quantum dictionary Its purpose is for storage and their corresponding function values and The uniform superposition state of the subtraction results is shown below:

[0053] To achieve this goal, this embodiment proposes a circuit design scheme as follows: Figure 2 As shown, it consists of three parts: the Hadamard transform, parameter encoding, and the inverse quantum Fourier transform. The Hadamard transform is mainly used to convert the quantum bond register and the quantum value register into a uniform superposition state, and then the parameter encoding module is used to write the relevant parameters of the QUBO problem into the quantum system.

[0054] Specifically, considering the objective function of the quantum system evolution, the coefficient of each component is denoted as... By applying a parametric rotating gate to the quantum value register can Write it into the phase of the following quantum state, namely:

[0055] In this way, by applying a quantum inverse Fourier transform process, The information is transformed into a quantum state to achieve... Figure 3 The transformation shown.

[0056] In one specific embodiment, the parameter encoding module contains a parametric rotation gate composed of multiple quantum phase gates. The quantum phase gates apply phase rotations of different angles according to the coefficients in the objective function sub-terms, so as to write the coefficients in the objective function sub-terms into the quantum value register.

[0057] Considering a specific implementation circuit, to generate the quantum state shown in the above equation, a single parametric rotating gate... can be A quantum phase gate representation, namely:

[0058] Its specific implementation path is as follows: Figure 4 As shown.

[0059] Furthermore, consider a certain term of the objective function. If and only if hour, Only then is it necessary to write to the quantum value register; therefore, this embodiment adopts the following method: Figure 5 The controlled operation shown implements the relevant functions. Specifically, the application of the parametric rotating gate adopts a controlled operation mode. Different controlled modes are selected according to whether the indices of the two variables in the objective function are the same: when the indices of the two variables are the same, the parametric rotating gate is controlled by a single qubit; when the indices of the two variables are different, the parametric rotating gate is jointly controlled by two corresponding qubits. The joint control of the two corresponding qubits is achieved through a combination circuit of a controlled NOT gate and a controlled phase gate.

[0060] It is important to note that in the objective function In, there exists Same and The different cases result in different numbers of control bits for the corresponding controlled rotation operation. When When the parameters are the same, the revolving door includes parameters. Controlled by only a single bit, so as to be controlled by Taking the quantum value register as an example, its corresponding circuit structure is as follows: Figure 6 As shown. When At different times, revolving doors with parameters Depend on Two corresponding qubits control the circuit. Based on quantum circuit equivalence, this circuit structure can be generated using controlled NOT gates and controlled phase gates; its specific form is shown in [reference needed]. Figure 7The yellow part is equivalent to a controlled rotation gate acting on the first bit of the quantum value register, and the blue part is equivalent to a controlled rotation gate acting on the second bit of the quantum value register.

[0061] In some embodiments, the Grover search includes a Grover black box circuit and an amplitude amplification circuit; the Grover black box circuit is used to query the target state that satisfies the objective function value being less than the current search threshold. It is achieved by determining whether the highest bit of the two's complement of the difference between the objective function value stored in the quantum value register and the current search threshold is 1. When the highest bit is 1, the phase of the target state is flipped using an auxiliary quantum bit.

[0062] Specifically, regarding Grover search Its purpose is to exert The Grover iteration finds values ​​less than the current threshold. of and their corresponding independent variables , and thus This serves as the threshold for the next algorithm iteration. Based on Grover's search principle, its circuit structure is as follows: Figure 8 As shown, it consists of two parts: a Grover black box and an amplitude amplification circuit. The main purpose of the Grover black box is to query circuits that satisfy... The target state, i.e., calculating the Boolean function:

[0063] Make the quantum state in the quantum bond register satisfy Specifically, as can be seen from the quantum dictionary preparation process, the information stored in the quantum value register is the result of calculations. The result is represented in two's complement binary; therefore, when the highest-order qubit in the value register is 1, the corresponding function value is less than 0. Therefore, this embodiment uses the following... Figure 9 The quantum circuit shown can perform the relevant operations by using an additional auxiliary qubit.

[0064] After applying the Grover black-box circuitry, the amplitude of the target quantum state needs to be further amplified using an amplitude amplification circuit. In some embodiments, the amplitude amplification circuitry includes two Hadamard operations and a conditional phase shift operation; the conditional phase shift operation is used to add a negative phase before all quantum states except the zero state. This operation is implemented by introducing auxiliary qubits and utilizing a multi-qubit zero-controlled NOT gate, which is composed of a combination of multiple Pauli X gates and multi-qubit controlled NOT gates.

[0065] Specifically, the Hadamard operation is accomplished by applying an Hadamard gate to each qubit in the quantum value register. For the conditional phase shift operation, its effect is... In addition, in all other Add a -1 phase before the state, that is:

[0066] This operation can be achieved by using an additional auxiliary qubit, first applying a -1 phase to the entire quantum system, and then canceling... The -1 phase before the state is sufficient, and its basic circuit can be obtained by means of, for example Figure 10 Implemented as shown.

[0067] It's important to note that to implement this operation, an n-bit controlled NOT gate operation is required. This operation can be transformed into an n-bit controlled NOT gate operation using 2^n Pauli X gates. For example, a 3-bit controlled operation would have the following structure: Figure 11 As shown. For multi-bit controlled NOT gates, n-1 auxiliary qubits can be introduced, thereby enabling the use of... A Tofoli gate is implemented with a single CNOT gate.

[0068] S308, Evolutionary Quantum System, First Functions: Quantum Dictionary Secondly, the effect of repetition. Grover search As shown below:

[0069] S309, Perform Measurement The measurement result x and the corresponding function value y are obtained based on the measurement results of the quantum bond register and the quantum value register, respectively.

[0070] S310. Determine if y is less than... If so, then update. , Otherwise, let , ,and .

[0071] In other words, the steps after physically measuring the evolved quantum bond register and quantum value register further include: if the measured function value is not less than the current search threshold, then keep the current search threshold and the current shortest vector unchanged, and amplify and update the random number selection range parameter of Grover search according to the preset amplification factor, and return to the step of randomly selecting the number of times Grover search is repeated.

[0072] S311. Update the total number of iterations i = i + 1, and return to step 4.

[0073] Other embodiments of the present invention provide a computer device including a processor and a memory, wherein the memory stores a computer program that, when loaded and executed by the processor, implements the BKZ reduction method based on the adaptive Grover algorithm as described in any of the above embodiments.

[0074] Some embodiments of the present invention provide a computer-readable storage medium storing a program that, when loaded by a processor, implements the BKZ reduction method based on the adaptive Grover algorithm as described in any of the above embodiments.

[0075] In this specification, the illustrative expressions of the terms used do not necessarily refer to the same embodiments or examples. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0076] Any modifications, equivalent substitutions, or improvements made within the spirit and principles of this invention shall be included within the scope of protection of this invention.

Claims

1. A BKZ reduction method based on adaptive Grover's algorithm, characterized in that, Applied to quantum computing systems, the methods include: Obtain the lattice basis to be reduced and the preset block size, and determine the projected sub-lattices of the current lattice basis during the execution of the BKZ algorithm; the original lattice basis is represented as... ,in, Let i be the lattice basis vectors, i = 1, 2, ..., n, where n is the lattice rank; The shortest vector problem on the projected sublattice is mapped to an unconstrained binary quadratic optimization problem using a binary variable encoding method to determine the objective function for the evolution of the quantum system; the shortest vector problem is defined as finding a non-zero vector. Make: in, A vector of integer coefficients. Denotes the Euclidean norm; An adaptive Grover search is used to solve for the evolution of a quantum system, including: initializing search parameters and a search threshold; initializing the quantum bond register and quantum value register in the quantum computing system to a uniform superposition state; constructing a quantum circuit containing a quantum dictionary and a Grover search; first, applying the quantum dictionary to the quantum bond register and quantum value register to write the target function parameters, and then repeatedly applying the Grover search a random number of times to amplify the amplitude of the target state; performing physical measurements on the evolved quantum bond register and quantum value register; if the function value obtained from the measurement result is less than the current search threshold, updating the search threshold and the current shortest vector; otherwise, adjusting the search parameters until a preset iteration stopping condition is met; and updating the lattice basis using the shortest vector of the solved projected sublattice to generate a BKZ reduced basis.

2. The BKZ reduction method based on adaptive Grover's algorithm according to claim 1, characterized in that, The method of mapping the shortest vector problem on the projected subgrid to an unconstrained binary quadratic optimization problem using a binary variable encoding method includes: Determine the modulus expression of any vector on the projected subgrid, determine the number of bits in the two's complement based on the preset upper bound of the coordinate variables in the modulus expression, and use the two's complement to represent the coordinate variables in the modulus expression; Substituting the two's complement of the coordinate variables in the modulus expression into the modulus expression yields an objective function containing the correlation coefficients of the binary variables. Minimizing the objective function yields the shortest vector coordinates under the current lattice basis.

3. The BKZ reduction method based on adaptive Grover's algorithm according to claim 1, characterized in that, In the construction of the quantum circuit including the quantum dictionary and Grover search, the quantum dictionary is used to store the uniform superposition state of the coordinate-corresponding binary variables and their corresponding function values ​​and the result of subtracting the current search threshold. The quantum dictionary includes an Adama transform module, a parameter encoding module and an inverse quantum Fourier transform module. The first step of applying the quantum dictionary to the quantum bond register and quantum value register includes: using the Hadamard transform module to convert the quantum bond register and quantum value register into a uniform superposition state; using the parameter encoding module to apply a parametric rotation gate to the quantum value register to write the result of subtracting the objective function from the current search threshold into the phase of the quantum state; and using the inverse quantum Fourier transform module to transform the calculation result into the quantum state.

4. The BKZ reduction method based on the adaptive Grover algorithm according to claim 3, characterized in that, The parameter encoding module contains a parameterized rotation gate composed of multiple quantum phase gates. The quantum phase gates apply phase rotations of different angles to the coefficients in the objective function components to write the coefficients in the objective function components into the quantum value register.

5. The BKZ reduction method based on the adaptive Grover algorithm according to claim 4, characterized in that, The application of the parameterized rotating gate adopts a controlled operation mode. Different controlled modes are selected according to whether the subscripts of the binary variables in the objective function are the same: when the subscripts of the binary variables are the same, the parameterized rotating gate is controlled by a single quantum bit. When the subscripts of the binary variables are different, the parameterized rotation gate is jointly controlled by two corresponding qubits, and the joint control of the two corresponding qubits is achieved through a combination circuit of a controlled NOT gate and a controlled phase gate.

6. The BKZ reduction method based on adaptive Grover's algorithm according to claim 1, characterized in that, The Grover search includes a Grover black box circuit and an amplitude amplification circuit. The Grover black box circuit is used to query the target state that satisfies the objective function value being less than the current search threshold. It is achieved by determining whether the highest bit of the two's complement of the difference between the objective function value stored in the quantum value register and the current search threshold is 1. When the highest bit is 1, the phase of the target state is flipped using an auxiliary quantum bit.

7. The BKZ reduction method based on the adaptive Grover algorithm according to claim 6, characterized in that, The amplitude amplification circuit includes two Adama operations and a conditional phase shift operation. The conditional phase shift operation is used to add a negative phase before all quantum states except the zero state. This operation is implemented by introducing auxiliary qubits and using a multi-qubit zero-controlled NOT gate, which is composed of multiple Pauli X gates and multi-qubit controlled NOT gates.

8. The BKZ reduction method based on adaptive Grover's algorithm according to claim 1, characterized in that, The steps following the physical measurement of the evolved quantum bond register and quantum value register further include: if the measured function value is not less than the current search threshold, then the current search threshold and the current shortest vector remain unchanged, and the random number selection range parameter of Grover search is amplified and updated according to the preset amplification factor, and the step of randomly selecting the number of Grover search repetitions is returned.

9. A computer device, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program that, when loaded and executed by the processor, implements the BKZ reduction method based on the adaptive Grover algorithm as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The system stores a program that, when loaded by a processor, implements the BKZ reduction method based on the adaptive Grover algorithm as described in any one of claims 1 to 8.