Black box quantum state preparation method based on grouping processing
Through grouping processing and unitary operator linear combination algorithm optimization quantum state preparation, the problem of low proportion of target states is solved, efficient quantum state preparation is achieved, computational complexity and quantum amplification times are reduced, and the efficiency of quantum computing is improved.
Patent Information
- Application Number
- CN202510922579.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-07-04
AI Technical Summary
In the preparation of quantum states, the proportion of target states that meet the needs of quantum computing is low, resulting in a low probability of collapse to the target state during measurement, which cannot meet the needs of quantum computing, poor user experience, and traditional methods require multiple quantum amplifications, which increases the computational complexity.
Through the grouping processing method, the input data vector is divided into large term groups and small term groups. The unitary operator linear combination algorithm and quantum amplitude estimation algorithm are used to determine the precise proportion estimation of the target state and the orthogonal state respectively, reduce the number of quantum amplification times, and optimize the quantum state preparation process.
It reduces the complexity of quantum state preparation, improves the success rate of target quantum state preparation, reduces the number of quantum amplification times, and improves the computing efficiency.
Smart Images

Figure CN120409727A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of quantum computing, and more specifically, to a method for preparing a black-box quantum state based on grouped processing. Background Art
[0002] Based on the unique physical properties of qubits, quantum computing exhibits significant theoretical advantages over classical computing paradigms when dealing with specific complex problems. In related technologies, quantum state preparation is a key link in quantum computing, providing a data carrier for quantum computing. However, in quantum state preparation, the target states that meet the requirements of quantum computing often account for a relatively low proportion, resulting in a low probability of collapsing to the target state during measurement, unable to meet the requirements of quantum computing, and poor user experience. Summary of the Invention
[0003] The present application provides a method for preparing a black-box quantum state based on grouped processing.
[0004] An embodiment of the present application provides a method for preparing a black-box quantum state based on grouped processing, the method comprising: Determining a rough proportion estimate of the target state according to the marked bit and the initial quantum state, wherein the initial quantum state is a superposition state obtained by processing the input data vector based on the black box; When the rough proportion estimate is less than the grouping threshold, separating the initial quantum state according to the first auxiliary bit to determine a first intermediate quantum state, wherein the grouping threshold is determined based on the number of the input data vectors, the first intermediate quantum state includes a target state part and an orthogonal state part, the target state part includes a first sub-quantum state, and the orthogonal state part includes a second sub-quantum state; Determining a first precise proportion estimate corresponding to the first sub-quantum state and a second precise proportion estimate corresponding to the second sub-quantum state according to the first intermediate quantum state to achieve the quantum state preparation.
[0005] In this way, the computer device determines the rough occupation ratio estimation of the target state based on the marked bit and the initial quantum state, where the initial quantum state is a superposition state obtained by processing the input data vector based on the black box. Then, when the rough occupation ratio estimation is less than the grouping threshold, the computer device performs a separation process on the initial quantum state according to the first auxiliary bit to determine the first intermediate quantum state. The grouping threshold is determined based on the number of input data vectors. The first intermediate quantum state includes a target state part and an orthogonal state part. The target state part includes a first sub-quantum state, and the orthogonal state part includes a second sub-quantum state. Finally, the computer device determines the first precise occupation ratio estimation corresponding to the first sub-quantum state and the second precise occupation ratio estimation corresponding to the second sub-quantum state based on the first intermediate quantum state to achieve quantum state preparation. In this way, when the rough occupation ratio estimation is less than the grouping threshold, the initial quantum state is separated based on the data distribution characteristics of the initial quantum state to determine the first intermediate quantum state, and then the first precise occupation ratio estimation and the second precise occupation ratio estimation are determined based on the first intermediate quantum state, thus avoiding directly performing quantum amplitude amplification on the overall data and reducing the number of quantum amplitude amplifications.
[0006] In some embodiments, the method further includes: Based on the black box, the input data vector is processed by loading it in the form of a superposition state to generate the initial quantum state, where the initial quantum state includes an address register and a data register.
[0007] In this way, based on the black box, the computer device processes the input data vector by loading it in the form of a superposition state to generate the initial quantum state, where the initial quantum state includes an address register and a data register. In this way, by loading the superposition state through the black box, an efficient conversion from classical data to a quantum state is achieved. Moreover, since the initial quantum state retains the amplitude of the input data vector, the original data distribution of the input data vector can be directly correlated through subsequent quantum amplitude estimation and measurement operations, thereby providing a basis for subsequent rough occupation ratio estimation and separation processing.
[0008] In some embodiments, the determining the rough occupation ratio estimation of the target state according to the marked bit and the initial quantum state includes: Based on a controlled NOT gate, the data register in the initial quantum state and the marked bit are entangled; Based on a preset number of measurement times, the marked bit is measured to determine the frequency of the target collapse state; According to the frequency of the target collapse state and the preset number of measurement times, the rough occupation ratio estimation is determined.
[0009] In this way, based on the controlled NOT gate, the computer device entangles the data register and the flag bit in the initial quantum state. Then, based on the preset number of measurements, the computer device measures the flag bit to determine the frequency of the target collapsed state. Finally, the computer device determines the rough occupancy ratio estimate according to the frequency of the target collapsed state and the preset number of measurements. In this way, by entangling the data register and the flag bit, the abstract quantum state occupancy ratio is converted into the measurable probability of the flag bit. Without analyzing the high-dimensional initial quantum state, only by measuring the flag bit, the occupancy ratio information of the target state can be indirectly obtained.
[0010] In some embodiments, the initial quantum state includes a data register. In the case where the rough occupancy ratio estimate is less than the grouping threshold, according to the first auxiliary bit, the initial quantum state is separated to determine the first intermediate quantum state, including: Based on the controlled NOT gate, the first auxiliary bit and the highest bit information of the data register are associated; Based on a preset rule, using the first auxiliary bit as the control bit, the data register is compared to determine the first intermediate quantum state.
[0011] In this way, based on the controlled NOT gate, the computer device associates the first auxiliary bit and the highest bit information of the data register. Then, based on a preset rule, the computer device uses the first auxiliary bit as the control bit to compare the data register to determine the first intermediate quantum state. In this way, by associating the first auxiliary bit and the highest bit information of the data register, the amplitude information in the data register is converted into the quantum state of the first auxiliary bit, avoiding full-bit measurement of the data register, so that the separation of the first sub-quantum state and the second sub-quantum state can be achieved only through comparison processing.
[0012] In some embodiments, determining the first refined occupancy ratio estimate corresponding to the first sub-quantum state and the second refined occupancy ratio estimate corresponding to the second sub-quantum state according to the first intermediate quantum state includes: Based on a first preset algorithm, according to the target state part, the first refined occupancy ratio estimate is determined; Based on the first preset algorithm, according to the orthogonal state part, the second refined occupancy ratio estimate is determined.
[0013] In this way, based on a first preset algorithm, the computer device determines the first refined occupancy ratio estimate according to the target state part. Then, based on the first preset algorithm, the computer device determines the second refined occupancy ratio estimate according to the orthogonal state part. In this way, by separately solving the first refined occupancy ratio estimate and the second refined occupancy ratio estimate based on the first preset algorithm, there is no need to measure the average value of each bit to estimate the ratio, reducing the number of quantum amplitude amplification times.
[0014] In some embodiments, determining the first precise occupancy ratio estimate according to the target state part based on the first preset algorithm includes: Simplifying the first intermediate quantum state to determine a second intermediate quantum state; Converting the second intermediate quantum state to determine a third intermediate quantum state in the form of a linear combination of eigenvectors; Based on the first preset algorithm, determining the first precise occupancy ratio estimate according to the third intermediate quantum state.
[0015] In this way, the computer device simplifies the first intermediate quantum state to determine a second intermediate quantum state. Then, the computer device converts the second intermediate quantum state to determine a third intermediate quantum state in the form of a linear combination of eigenvectors. Finally, based on the first preset algorithm, the computer device determines the first precise occupancy ratio estimate according to the third intermediate quantum state. In this way, by converting the simplified second intermediate quantum state, a third intermediate quantum state in the form of a linear combination of eigenvectors is determined, and the amplitude estimation problem is converted into a phase estimation problem, reducing the computational complexity.
[0016] In some embodiments, determining the first precise occupancy ratio estimate according to the third intermediate quantum state based on the first preset algorithm includes: Measuring the third intermediate quantum state to determine the phase in the third intermediate quantum state; Determining the amplitude according to the phase in the third intermediate quantum state; Determining the first precise occupancy ratio estimate according to the amplitude.
[0017] In this way, the computer device measures the third intermediate quantum state to determine the phase in the third intermediate quantum state. Then, the computer device determines the amplitude according to the phase in the third intermediate quantum state. Finally, the computer device determines the first precise occupancy ratio estimate according to the amplitude. In this way, the third intermediate quantum state encodes the target state amplitude as a phase through a linear combination of eigenvectors, and measuring the first auxiliary qubit can improve the phase accuracy, thereby reducing the estimation error of the amplitude and further reducing the estimation error of the first precise occupancy ratio estimate.
[0018] In some embodiments, the method further includes: Based on a second preset algorithm, determining a target quantum state according to the first precise occupancy ratio estimate and the second precise occupancy ratio estimate to implement the quantum state preparation.
[0019] Thus, based on the second preset algorithm, the computer device determines the target quantum state according to the first refined occupation ratio estimation and the second refined occupation ratio estimation to achieve quantum state preparation. In this way, through the second preset algorithm, linear superposition is performed on the first refined occupation ratio estimation and the second refined occupation ratio estimation, thereby realizing the synthesis of the target quantum state with a constant-level operation complexity and reducing the number of quantum amplitude amplifications.
[0020] In some embodiments, the determining of the target quantum state according to the first refined occupation ratio estimation and the second refined occupation ratio estimation based on the second preset algorithm includes: Determining a rotation angle according to the first refined occupation ratio estimation and the second refined occupation ratio estimation; Based on a preset quantum gate, performing correlation processing on the first quantum state of the first sub-quantum state and the second auxiliary qubit according to the rotation angle to determine a first combined quantum state; Based on the preset quantum gate, performing correlation processing on the second quantum state of the second sub-quantum state and the second auxiliary qubit according to the rotation angle to determine a second combined quantum state; Determining the target quantum state according to the first combined quantum state and the second combined quantum state.
[0021] Thus, the computer device determines the rotation angle according to the first refined occupation ratio estimation and the second refined occupation ratio estimation. Then, based on the preset quantum gate, the computer device performs correlation processing on the first quantum state of the first sub-quantum state and the second auxiliary qubit according to the rotation angle to determine a first combined quantum state. However, based on the preset quantum gate, the computer device performs correlation processing on the second quantum state of the second sub-quantum state and the second auxiliary qubit according to the rotation angle to determine a second combined quantum state. Finally, the computer device determines the target quantum state according to the first combined quantum state and the second combined quantum state. In this way, a constant-level quantum gate operation can be used to replace the polynomial-level amplification, reducing the computational complexity. And, precise weight control can be achieved by using the second auxiliary qubit and the rotation gate, improving the success rate of target quantum state preparation.
[0022] In some embodiments, the method further includes: When the rough occupation ratio estimation is greater than or equal to the grouping threshold, performing quantum amplitude amplification processing on the initial quantum state based on a third preset algorithm to determine the target quantum state.
[0023] Thus, when the rough occupation ratio estimation is greater than or equal to the grouping threshold, based on the third preset algorithm, the computer device performs quantum amplitude amplification processing on the initial quantum state to determine the target quantum state. In this way, when the rough occupation ratio estimation is greater than or equal to the grouping threshold, the third preset algorithm is directly used to efficiently amplify the probability of the target state to determine the target quantum state.
[0024] Additional aspects and advantages of embodiments of the present application will be given in part in the following description, become apparent in part from the following description, or be learned by practice of the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood from the description of the embodiments in conjunction with the following drawings, in which: Figure 1 is one of the schematic flowcharts of the black-box quantum state preparation method based on grouped processing according to an embodiment of the present application; Figure 2 is a schematic diagram of the standard black-box quantum state preparation according to an embodiment of the present application; Figure 3 is the second schematic flowchart of the black-box quantum state preparation method based on grouped processing according to an embodiment of the present application; Figure 4 is the third schematic flowchart of the black-box quantum state preparation method based on grouped processing according to an embodiment of the present application; Figure 5 is the fourth schematic flowchart of the black-box quantum state preparation method based on grouped processing according to an embodiment of the present application; Figure 6 is a schematic diagram of the first quantum state proportion estimation circuit module according to an embodiment of the present application; Figure 7 is the fifth schematic flowchart of the black-box quantum state preparation method based on grouped processing according to an embodiment of the present application; Figure 8 is the sixth schematic flowchart of the black-box quantum state preparation method based on grouped processing according to an embodiment of the present application; Figure 9 is the seventh schematic flowchart of the black-box quantum state preparation method based on grouped processing according to an embodiment of the present application; Figure 10 is the eighth schematic flowchart of the black-box quantum state preparation method based on grouped processing according to an embodiment of the present application; Figure 11 is the ninth schematic flowchart of the black-box quantum state preparation method based on grouped processing according to an embodiment of the present application; Figure 12 is a schematic diagram of the implementation of the LCU algorithm according to an embodiment of the present application; Figure 13 is the tenth schematic flowchart of the black-box quantum state preparation method based on grouped processing according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0026] The embodiments of the present application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of the present application, and should not be understood as limiting the embodiments of the present application.
[0027] Based on the unique physical properties of quantum bits - quantum superposition and quantum entanglement, quantum computing has shown significant theoretical advantages over classical computing paradigms in dealing with specific complex problems. Unlike classical bits that can only represent two discrete states, 0 or 1, a single quantum bit can be in and Quantum computing can process arbitrary superpositions of qubits, while entanglement between multiple qubits can form high-dimensional correlated states, giving quantum computing a natural ability to process information in parallel. In classical computing, many complex problems, such as prime factorization of large integers, have computational complexity that increases exponentially with the value, making it difficult for classical computers to solve them within a reasonable time. However, quantum computing, with its unique physical properties, demonstrates great potential in solving prime factorization problems.
[0028] In related technologies, quantum state preparation is a key step in quantum computing, providing the data carrier for quantum computing. It is responsible for loading classical data (such as information in the form of binary strings) or quantum data into the amplitude of the quantum state, forming an initial state that can be processed by quantum algorithms.
[0029] However, during quantum state preparation, the proportion of target states that meet quantum computing requirements is often low, resulting in a low probability of collapse to the target state during measurement, which fails to meet quantum computing requirements and leads to a poor user experience. Specifically, the proportion of the target state in the overall quantum state is determined by the data distribution. If most elements in the data vector have small values, the initial proportion of the target state may be far less than 1, or even close to 0. In this case, the probability of the target state collapsing during direct measurement is extremely low, and quantum amplitude amplification algorithms must be used to increase the probability. However, this significantly increases the number of operations and the depth of the quantum circuit, reducing the operating efficiency of a real quantum computer.
[0030] Based on the above questions, please refer to Figure 1 , an embodiment of the present application provides a black box quantum state preparation method based on group processing, the method comprising: 01: Determine the rough proportion estimate of the target state based on the marker bit and the initial quantum state; 02: When the coarse proportion estimate is less than the grouping threshold, the initial quantum state is separated according to the first auxiliary bit to determine the first intermediate quantum state; 03: Determine a first refined occupancy ratio estimate corresponding to the first sub - quantum state and a second refined occupancy ratio estimate corresponding to the second sub - quantum state according to the first intermediate quantum state, so as to achieve quantum state preparation.
[0031] Embodiments of the present application also provide a computer device, including a memory and a processor. The black - box quantum state preparation method based on grouped processing according to embodiments of the present application can be implemented by the computer device according to embodiments of the present application. Specifically, a computer program is stored in the memory, and the processor is configured to determine a rough occupancy ratio estimate of the target state according to the marked bit and the initial quantum state. And in the case where the rough occupancy ratio estimate is less than the grouping threshold, separate the initial quantum state according to the first auxiliary bit to determine the first intermediate quantum state. And determine a first refined occupancy ratio estimate corresponding to the first sub - quantum state and a second refined occupancy ratio estimate corresponding to the second sub - quantum state according to the first intermediate quantum state, so as to achieve quantum state preparation.
[0032] Embodiments of the present application also provide a quantum state preparation device. The black - box quantum state preparation method based on grouped processing according to embodiments of the present application can be implemented by the quantum state preparation device according to embodiments of the present application. Specifically, the quantum circuit simulation device includes a determination module. The determination module is configured to determine a rough occupancy ratio estimate of the target state according to the marked bit and the initial quantum state. And in the case where the rough occupancy ratio estimate is less than the grouping threshold, separate the initial quantum state according to the first auxiliary bit to determine the first intermediate quantum state. And determine a first refined occupancy ratio estimate corresponding to the first sub - quantum state and a second refined occupancy ratio estimate corresponding to the second sub - quantum state according to the first intermediate quantum state, so as to achieve quantum state preparation.
[0033] Specifically, grouped processing means dividing the input data vector into several groups according to the size difference of the elements in the input data vector, and the data size difference within each group is relatively small. That is to say, first, in the case of meeting certain conditions (the rough occupancy ratio estimate is less than the grouping threshold), based on a specific processing method, the input data vector is divided into a part with larger values (large - item group) and a part with smaller values (small - item group). Subsequently, it is further determined whether the above - mentioned conditions (the rough occupancy ratio estimate is less than the grouping threshold) are still met in the part with smaller values. If so, further division is carried out until the above - mentioned conditions (the rough occupancy ratio estimate is less than the grouping threshold) are not met. In this way, through grouped processing, each group can separately adopt the standard black - box quantum state preparation process, and the number of quantum amplitude amplification times is reduced by using the uniform data distribution within the group. The groups are linearly combined through the Linear Combination of Unitaries (LCU) algorithm to avoid the high complexity caused by uneven global data distribution.
[0034] The unitary operator linear combination algorithm is a probabilistic quantum algorithm that can implement the summation operation of unitary operators in a quantum circuit. Let the operator U (which may not be a unitary operator) be decomposable into a linear combination of multiple unitary operators Vi , where are coefficients. This algorithm is a probabilistic algorithm, that is, its output state is not the result of U acting on the input state with 100% probability. Therefore, quantum amplitude amplification (QAA) needs to be used to amplify the probability of the target state to 100%. In the black-box quantum state preparation method based on grouped processing provided in the embodiments of this application, the unitary operator linear combination algorithm can be used to superimpose and synthesize the quantum states of large-term groups and small-term groups according to their respective proportions to form a complete target state, reducing the complexity of quantum state preparation.
[0035] Quantum amplitude amplification is used to increase the probability of the target quantum state. Suppose there is a quantum state , where is the target state is a non-target state orthogonal to the target state; the coefficients satisfy the normalization condition , and the proportion of the initial target state is . At this time, the QAA algorithm needs to be used to amplify the proportion of in to 1, and finally amplify α to 1 and reduce β to 0.
[0036] Black-Box Quantum State Preparation (BBQSP) refers to the process of preparing data in the form of a binary string onto the quantum state amplitude to form a normalized state , where represents the two-norm of the vector , that is, the square root of the sum of the squared moduli, which is a mathematical operation. The data source can be classical data or the superposition state basis vectors output by a quantum circuit, and it is named because the data source is abstracted as a "black box". The core of black-box quantum state preparation is to load data onto the quantum state amplitude and utilize quantum parallelism to accelerate calculations. However, it should be noted that the traditional black-box quantum state preparation method is affected by the data distribution of the input data vector, and the proportion of the target state may be extremely low, and it needs to be amplified multiple times through QAA. Please refer to Figure 2 , Figure 2 is a schematic diagram of standard black-box quantum state preparation. The black-box quantum state preparation process is divided into three steps: First, through the black-box module, the data is loaded into the quantum circuit in the form of a superposition state. At this time, the form of the quantum state can be expressed as:
[0037] Among them, is the address register, is the data register, is the flag bit.
[0038] Second, the compare module compares with n, and entangles the proportion with the state of the flag bit (implemented by a controlled NOT gate). At this time, the quantum state of the system becomes:
[0039] Among them, is the target state part, is the orthogonal quantum state part (i.e., the orthogonal state part).
[0040] Third, at this time, the proportion of the target state in the state is , unless is uniformly distributed, otherwise this proportion must be less than 1. Therefore, it is necessary to use the QAA algorithm to amplify the proportion to 1, so as to obtain the deterministic target state indicated by :
[0041] Among them, can disentangle the data by executing the black-box module once.
[0042] The black-box quantum state preparation method based on grouped processing provided by the embodiments of the present application optimizes the above quantum amplitude amplification process through grouped processing, thereby reducing the number of quantum amplitude amplifications.
[0043] The flag bit flag refers to the auxiliary bit in the quantum circuit, which is used to indicate whether the target state is successfully prepared. That is, by measuring the collapse frequency of the flag bit, the proportion of the target state in the overall quantum state (coarse proportion estimation) can be estimated.
[0044] A quantum circuit is a tool for quantum computing, which is used to transform an abstract quantum algorithm into a sequence of physical operations that can be executed on quantum computing hardware. Its essence is a graphical model that describes the evolution process of quantum bits (Qubits), similar to the logic circuit in a classical computer, but the operation object is quantum bits with the characteristics of quantum superposition and quantum entanglement.
[0045] A quantum bit (Qubit) refers to the basic unit of a quantum circuit and is the carrier of quantum information, which can be in the states |0>, |1> and their superposition states.
[0046] The initial quantum state refers to the quantum state in which the input data vector is processed into a superposition state through the black box module, and the form is: , where is the address register, is the data register, is the marker bit. The initial quantum state is not normalized and amplitude amplified, and the proportion of the target state depends on the data distribution, which is the basis for subsequent grouping processing.
[0047] The target state refers to the normalized quantum state to be prepared, and the form is: , that is, the quantum state after the data vector is loaded into the amplitude and normalized.
[0048] The input data vector refers to the data in the form of a binary string to be prepared into a quantum state, which determines the complexity of preparing the target state, denoted as , where each is a decimal number between 0 and 1, which can be expressed as an m-bit binary decimal.
[0049] The rough proportion estimation refers to roughly estimating the proportion of the target state in the initial quantum state by measuring the collapse frequency of the marker bit, and the formula is: rough proportion estimation = , which can be used to judge whether grouping processing is required.
[0050] The grouping threshold is the critical value for judging whether to start grouping processing. It is determined based on the number n of input data vectors and is usually set to . If the rough proportion estimation is lower than the grouping threshold, it means that the proportion of the target state is too small. Direct quantum amplitude amplification requires a large number of times and high complexity, so it is necessary to perform grouping processing first to separate the large item group and the small item group.
[0051] The first auxiliary bit anc refers to the quantum bit used to assist in separating data. It is associated with the highest bit of the data register through a controlled NOT gate to mark the size characteristics of the input vector data.
[0052] The first intermediate quantum state refers to the quantum state after being separated by the first auxiliary bit, corresponding to the second step in the standard black box quantum state preparation process, and the form is: , and further it can be deduced that: . Among them, is the target state part, the first sub-quantum state is , is the quantum state part orthogonal to (i.e., the orthogonal state part), is the large item group, = is the two-norm of. The orthogonal state part also includes the second sub-quantum state.
[0053] The first precise occupation ratio estimation refers to the ratio of the target state part (the first sub - quantum state) in the first intermediate quantum state, that is , which is estimated by the Quantum Amplitude Estimation (QAE) algorithm.
[0054] The second precise occupation ratio estimation refers to the ratio of the second sub - quantum state in the first intermediate quantum state, that is , where = is the two - norm of , and is also estimated by the QAE algorithm. The first precise occupation ratio estimation and the second precise occupation ratio estimation are used for weight calculation in the subsequent linear combination of the LCU algorithm.
[0055] It should be noted that a single grouping process only divides the data into two groups of sub - quantum states, namely the first sub - quantum state of the large - item group and the second sub - quantum state of the small - item group. If, after the grouping process, the amount of data contained in the orthogonal state part is still huge, resulting in too many quantum amplitude amplification times, then the small - item group of the orthogonal state part can be further grouped. This processing method is consistent with the method of the initial grouping process. For the convenience of description, the embodiments of the present application only describe the initial grouping process.
[0056] The quantum amplitude estimation algorithm refers to an algorithm for estimating the amplitude size corresponding to a certain basis vector in a quantum state. Specifically, for the quantum state , the goal of the quantum amplitude estimation algorithm is to estimate the amplitude value.
[0057] First, the computer device determines the rough occupation ratio estimation of the target state according to the flag bit and the initial quantum state .
[0058] Then, if the rough occupation ratio estimation is less than the grouping threshold (the grouping threshold is determined by the data volume n and is ), the initial quantum state is separated by the first auxiliary bit to obtain the first intermediate quantum state . The first intermediate quantum state includes a target state part and an orthogonal state part. The target state part includes the first sub - quantum state, and the orthogonal state part includes the second sub - quantum state.
[0059] Finally, the computer device determines the first precise occupation ratio estimation corresponding to the first sub - quantum state and the second precise occupation ratio estimation corresponding to the second sub - quantum state respectively according to the first intermediate quantum state .
[0060] The following takes the input data vector {0.03, 0.03, 0.04, 0.04, 0.03, 0.03, 0.04, 1.0} as an example to illustrate the black-box quantum state preparation method based on grouped processing provided by the embodiments of the present application. It can be seen that among the eight data (n = 8), the first seven are very small and only the last one is very large, and the ratio between them is relatively large. Then, if according to Figure 2 the standard black-box quantum state preparation process shown, there is
[0061] This is a number that is not much different from , so the number of amplification times required is O( ).
[0062] First, execute the quantum circuit as shown in Figure 2 , but do not execute the QAA circuit at the back. Determine the rough occupation ratio estimate of the target state according to the marked bit and the initial quantum state.
[0063] Next, when the rough occupation ratio estimate is less than the grouping threshold, perform a separation process on the initial quantum state according to the first auxiliary bit to determine the first intermediate quantum state .
[0064] Finally, according to the first intermediate quantum state, determine the first refined occupation ratio estimate corresponding to the first sub-quantum state and the second refined occupation ratio estimate corresponding to the second sub-quantum state to achieve quantum state preparation.
[0065] In summary, in the black-box quantum state preparation method based on grouped processing provided by the embodiments of the present application, the computer device determines the rough occupation ratio estimate of the target state according to the marked bit and the initial quantum state, where the initial quantum state is a superposition state obtained by processing the input data vector based on the black box. Next, when the rough occupation ratio estimate is less than the grouping threshold, the computer device performs a separation process on the initial quantum state according to the first auxiliary bit to determine the first intermediate quantum state, where the grouping threshold is determined based on the number of the input data vector, the first intermediate quantum state includes a target state part and an orthogonal state part, the target state part includes a first sub-quantum state, and the orthogonal state part includes a second sub-quantum state. Finally, the computer device determines the first refined occupation ratio estimate corresponding to the first sub-quantum state and the second refined occupation ratio estimate corresponding to the second sub-quantum state according to the first intermediate quantum state to achieve quantum state preparation. In this way, when the rough occupation ratio estimate is less than the grouping threshold, by using the data distribution characteristics of the initial quantum state, the initial quantum state is separated to determine the first intermediate quantum state, and then the first refined occupation ratio estimate and the second refined occupation ratio estimate are determined according to the first intermediate quantum state, thereby avoiding directly performing quantum amplitude amplification on the overall data and reducing the number of quantum amplitude amplification times.
[0066] Please refer toFigure 3 , in some embodiments, the method further includes: 04: Based on the black box, perform a superposition state form loading process on the input data vector to generate an initial quantum state.
[0067] In some embodiments, the determination module is further configured to perform a superposition state form loading process on the input data vector based on the black box to generate an initial quantum state.
[0068] In some embodiments, the processor is further configured to perform a superposition state form loading process on the input data vector based on the black box to generate an initial quantum state.
[0069] Specifically, through the black box, the input data vector is loaded into the quantum circuit in the form of a quantum superposition state to generate an initial quantum state . The form of the initial quantum state is , where is the address register, is the data register, is the flag bit. The address register is used to store the data index (i is in the form of a binary string), and the final target state is prepared in this register. The data register is used to store the amplitude of the data vector ( is an m-bit binary decimal, such as = ), supports entanglement operations with the flag bit and auxiliary bits, and by retaining the binary structure of the input data vector, it is convenient for subsequent grouping and separation through features such as the highest bit.
[0070] The initial quantum state is a superposition state, directly retaining the amplitude of the original data , rather than pre-normalization, which avoids information loss, enabling the subsequent compare module to directly entangle with the flag bit through a controlled NOT gate, providing the original data support for the fine occupancy ratio estimation.
[0071] In this way, based on the black box, the computer device performs a superposition state form loading process on the input data vector to generate an initial quantum state, where the initial quantum state includes an address register and a data register. In this way, by loading the superposition state through the black box, an efficient conversion from classical data to a quantum state is achieved. And, since the initial quantum state is a superposition state, directly retaining the amplitude of the input data vector, avoiding information loss caused by pre-normalization, the subsequent quantum amplitude estimation and measurement operations can directly correlate with the original data distribution of the input data vector, and further provide a basis for subsequent rough occupancy ratio estimation and separation processing.
[0072] Please refer to Figure 4, in some embodiments, step 01 (determining a rough occupation ratio estimate of the target state based on the marked bit and the initial quantum state) includes: 011: Entangling the data register and the marked bit in the initial quantum state based on a controlled NOT gate; 012: Measuring the marked bit based on a preset number of measurements to determine the frequency of the target collapsed state; 013: Determining the rough occupation ratio estimate according to the frequency of the target collapsed state and the preset number of measurements.
[0073] In some embodiments, the determining module is further configured to entangle the data register and the marked bit in the initial quantum state based on a controlled NOT gate. And measure the marked bit based on a preset number of measurements to determine the frequency of the target collapsed state. And determine the rough occupation ratio estimate according to the frequency of the target collapsed state and the preset number of measurements.
[0074] In some embodiments, the processor is further configured to entangle the data register and the marked bit in the initial quantum state based on a controlled NOT gate. And measure the marked bit based on a preset number of measurements to determine the frequency of the target collapsed state. And determine the rough occupation ratio estimate according to the frequency of the target collapsed state and the preset number of measurements.
[0075] Specifically, the controlled NOT gate refers to a quantum gate operation, which consists of a control bit and a target bit. Generally speaking, the control logic of the controlled NOT gate is: when the control bit is , the state of the target bit flips. When the control bit is , the state of the target bit remains unchanged. Through the controlled NOT gate, the state of the marked bit is associated with the amplitude of the data register , such that the probability of the marked bit being in state is directly related to the target state occupation ratio. That is, after entangling with the marked bit through the controlled NOT gate, the occupation ratio of the state of the marked bit is , which is the square of the probability amplitude of the target state in the whole.
[0076] The preset number of measurements refers to the number of classical repeated measurements of the marked bit. Each measurement causes the quantum state to collapse to the eigenstate or of the marked bit, and the target state occupation ratio is estimated by statistically counting the frequency of the measurement results.
[0077] The target collapsed state is the eigenstate of the target state corresponding to the marked bit after measurement, usually state. Since has been entangled with the marked bit, the frequency of the target collapsed state directly reflects the occupation ratio of the target state in the overall quantum state.
[0078] Continuing with the above example, the preset number of measurements is 100 times. The initial quantum state obtained with the input data vector {0.03, 0.03, 0.04, 0.04, 0.03, 0.03, 0.04, 1.0} entangles the data register and the flag bit. Subsequently, the flag bit is measured 100 times to determine the occurrence frequency. Finally, based on the occurrence frequency and the preset number of measurements 100, the rough occupancy ratio estimate is determined.
[0079] In this way, based on the controlled NOT gate, the computer device entangles the data register and the flag bit in the initial quantum state. Then, based on the preset number of measurements, the computer device measures the flag bit to determine the frequency of the target collapsed state. Finally, the computer device determines the rough occupancy ratio estimate according to the frequency of the target collapsed state and the preset number of measurements. In this way, by entangling the data register and the flag bit, the abstract quantum state occupancy ratio is converted into the measurable probability of the flag bit. Without analyzing the high-dimensional initial quantum state, only by measuring the flag bit, the occupancy ratio information of the target state can be indirectly obtained.
[0080] Please refer to Figure 5 , in some embodiments, the initial quantum state includes a data register. Step 02 (in the case where the rough occupancy ratio estimate is less than the grouping threshold, according to the first auxiliary bit, perform a separation process on the initial quantum state to determine the first intermediate quantum state) includes: 021: Based on the controlled NOT gate, perform an association process on the first auxiliary bit and the highest bit information of the data register; 022: Based on a preset rule, use the first auxiliary bit as the control bit to perform a comparison process on the data register to determine the first intermediate quantum state.
[0081] In some embodiments, the determination module is further configured to perform an association process on the first auxiliary bit and the highest bit information of the data register based on the controlled NOT gate. And based on a preset rule, use the first auxiliary bit as the control bit to perform a comparison process on the data register to determine the first intermediate quantum state.
[0082] In some embodiments, the processor is further configured to perform an association process on the first auxiliary bit and the highest bit information of the data register based on the controlled NOT gate. And based on a preset rule, use the first auxiliary bit as the control bit to perform a comparison process on the data register to determine the first intermediate quantum state.
[0083] Specifically, each data in the data register is stored in the form of an m-bit binary decimal, that is = ), where the highest bit information is the first bit of the binary fraction .
[0084] The correlation processing refers to entangling the first auxiliary bit anc with the highest bit of the data register based on the controlled NOT gate (CNOT gate), so that the state of the auxiliary bit directly reflects the value of. The operation logic is as follows: , that is, when = 1, the auxiliary bit flips to ; when = 0, the auxiliary bit remains . In this way, the continuous amplitude information can be converted into the discrete quantum state of the auxiliary bit ( ), providing a manipulable qubit marker for subsequent group separation.
[0085] The comparison processing refers to using the first auxiliary bit (anc) as the control bit to perform a conditional comparison operation on the data register, separating the quantum states of the large item group = 1 and the small item group = 0. The operation logic is: when the auxiliary bit is (large item group), perform an operation to entangle the target state part with the marker bit, generating state. When the auxiliary bit is (small item group), the target state part remains in the orthogonal state with the flag bit . In this way, through a single conditional operation (using the auxiliary bit as the control bit), the initial quantum state is divided into a target state part (large item group) and an orthogonal state part (small item group), forming a structured first intermediate quantum state .
[0086] Continuing with the above example, please refer to Figure 6 , Figure 6 which is a schematic diagram of the line module for estimating the proportion of the first quantum state (large item group). Through the entanglement of the auxiliary bit anc and the marker bit flag, an accurate estimate of the proportion of the main component in the non-uniform data is achieved. In the case where the rough proportion estimate is less than the grouping threshold, the QAE algorithm needs to be used to estimate the proportion of the sum of the squares of the roots of the larger terms in, that is, estimate , where represents the larger term in, that is, 1.0 among 8 data; the corresponding quantum circuit for this step is as Figure 6 shown, and the quantum state is ; introducing the first auxiliary bit anc and using the CNOT gate to associate the information of the highest bit of the data with the first auxiliary bit anc, the quantum state at this time is
[0087] Among them, represents the value of the highest bit of the data.
[0088] Subsequently, the first auxiliary bit anc is used as the control bit of the compare comparison module, and the amplitude from the basis vector to the marked bit with the highest bit being 1 is transformed to obtain the quantum state:
[0089] , and further it can be deduced that: . Among them, is the target state part, the first sub-quantum state is , is the quantum state part orthogonal to (i.e., the orthogonal state part), is the large term group, = is the two-norm of. The orthogonal state part also includes the second sub-quantum state.
[0090] It should be noted that if multiple grouping processes are required, the first grouping is controlled by the highest bit of being 1; the second grouping is controlled by the highest bit and the second highest bit of
[0091] being 01, and so on, which will not be elaborated here.
[0092] Please refer to Figure 7 , in some embodiments, step 03 (determining the first fine occupancy ratio estimate corresponding to the first sub-quantum state and the second fine occupancy ratio estimate corresponding to the second sub-quantum state according to the first intermediate quantum state) includes: 031: Based on the first preset algorithm, determining the first fine occupancy ratio estimate according to the target state part; 032: Based on the first preset algorithm, determining the second fine occupancy ratio estimate according to the orthogonal state part.
[0093] In some embodiments, the determination module is further configured to determine a first precise occupancy ratio estimate based on a first preset algorithm according to the target state part, and determine a second precise occupancy ratio estimate based on the first preset algorithm according to the orthogonal state part.
[0094] In some embodiments, the processor is further configured to determine a first precise occupancy ratio estimate based on a first preset algorithm according to the target state part, and determine a second precise occupancy ratio estimate based on the first preset algorithm according to the orthogonal state part.
[0095] Specifically, the first preset algorithm refers to the quantum amplitude estimation algorithm.
[0096] The quantum amplitude estimation algorithm is used to perform a precise occupancy ratio estimation on the grouped quantum states. That is, based on the quantum amplitude estimation algorithm, for the target state part, its amplitude a is estimated, and then the first precise occupancy ratio is calculated. Based on the quantum amplitude estimation algorithm, for the orthogonal state part, its amplitude b is estimated, and then the second precise occupancy ratio is calculated.
[0097] In this way, based on the first preset algorithm, the computer device determines the first precise occupancy ratio estimate according to the target state part. Then, based on the first preset algorithm, the computer device determines the second precise occupancy ratio estimate according to the orthogonal state part. In this manner, by separately solving the first precise occupancy ratio estimate and the second precise occupancy ratio estimate based on the first preset algorithm, there is no need to measure the average value of each bit to estimate the ratio, reducing the number of times of quantum amplitude amplification.
[0098] Please refer to Figure 8 , in some embodiments, step 031 (determine a first precise occupancy ratio estimate based on a first preset algorithm according to the target state part) includes: 0311: Simplify the first intermediate quantum state to determine a second intermediate quantum state; 0312: Transform the second intermediate quantum state to determine a third intermediate quantum state in the form of a linear combination of eigenvectors; 0313: Based on the first preset algorithm, determine the first precise occupancy ratio estimate according to the third intermediate quantum state.
[0099] In some embodiments, the determination module is further configured to simplify the first intermediate quantum state to determine a second intermediate quantum state, transform the second intermediate quantum state to determine a third intermediate quantum state in the form of a linear combination of eigenvectors, and based on the first preset algorithm, determine the first precise occupancy ratio estimate according to the third intermediate quantum state.
[0100] In some embodiments, the processor is further configured to simplify the first intermediate quantum state to determine a second intermediate quantum state, transform the second intermediate quantum state to determine a third intermediate quantum state in the form of a linear combination of eigenvectors, and based on the first preset algorithm, determine the first precise occupancy ratio estimate according to the third intermediate quantum state.
[0101] Specifically, the simplification process refers to simplifying the first intermediate quantum state in terms of its mathematical form, separating the amplitude coefficients of the target state part and the orthogonal state part, so as to facilitate the subsequent application of the Quantum Amplitude Estimation (QAE) algorithm. That is, for the first intermediate quantum state processed by the compare module it is simplified to obtain the second intermediate quantum state , where is the amplitude coefficient of the target state part, satisfying ; is the first sub-quantum state; is the second sub-quantum state, . In this way, through simplification, the complex quantum state expression is simplified into a separated form of the target state and the orthogonal state on the marked qubits, highlighting the amplitude coefficient a of the target state, laying a foundation for estimating the value of a by the subsequent QAE algorithm.
[0102] The transformation process refers to further transforming the simplified second intermediate quantum state into a linear combination form of eigenvectors that can be directly processed by the Quantum Amplitude Estimation (QAE) algorithm, so as to accurately measure the amplitude of the target state through QAE.
[0103] The specific steps of the transformation process are as follows: Express the second intermediate quantum state as a linear combination of the eigenvectors and of a certain operator A: , where is the phase related to the amplitude a, satisfying ; and are the orthogonal eigenvectors of operator A, corresponding to the eigenvalues and . In this way, through the third intermediate quantum state the amplitude a of the target state is encoded as the phase , transforming the amplitude estimation problem into a phase estimation problem, and the QAE algorithm can accurately measure the phase through operations such as the quantum Fourier transform, and thus inversely deduce the value of a.
[0104] The computer device simplifies the first intermediate quantum state, separates the amplitude coefficients of the target state and the orthogonal state, and determines the second intermediate quantum state. Then, the computer device performs a transformation process on the second intermediate quantum state, converts the amplitude coefficient into phase information, adapts to the measurement mechanism of QAE, and determines the third intermediate quantum state in the form of a linear combination of eigenvectors. Finally, based on the first preset algorithm, the computer device determines the first precise occupation ratio estimate by measuring the phase according to the third intermediate quantum state.
[0105] Thus, the computer device simplifies the first intermediate quantum state to determine the second intermediate quantum state. Then, the computer device performs a transformation process on the second intermediate quantum state to determine the third intermediate quantum state in the form of a linear combination of eigenvectors. Finally, based on the first preset algorithm, the computer device determines the first precise occupancy ratio estimate according to the third intermediate quantum state. In this way, by performing a transformation process on the second intermediate quantum state after the simplification process to determine the third intermediate quantum state in the form of a linear combination of eigenvectors, the amplitude estimation problem is transformed into a phase estimation problem, reducing the computational complexity.
[0106] Please refer to Figure 9 , in some embodiments, step 0313 (determining the first precise occupancy ratio estimate according to the third intermediate quantum state based on the first preset algorithm) includes: 03131: Measure the third intermediate quantum state to determine the phase in the third intermediate quantum state; 03132: Determine the amplitude according to the phase in the third intermediate quantum state; 03133: Determine the first precise occupancy ratio estimate according to the amplitude.
[0107] In some embodiments, the determination module is further configured to measure the third intermediate quantum state to determine the phase in the third intermediate quantum state. And determine the amplitude according to the phase in the third intermediate quantum state. And determine the first precise occupancy ratio estimate according to the amplitude.
[0108] In some embodiments, the processor is further configured to measure the third intermediate quantum state to determine the phase in the third intermediate quantum state. And determine the amplitude according to the phase in the third intermediate quantum state. And determine the first precise occupancy ratio estimate according to the amplitude.
[0109] Specifically, the process of extracting the precise occupancy ratio estimate of the target state from the third intermediate quantum state based on the quantum amplitude estimation algorithm (i.e., the first preset algorithm) is as follows: The form of the third intermediate quantum state is , where is the phase related to the amplitude a, satisfying ; and are the orthogonal eigenvectors of the operator A, corresponding to the eigenvalues and .
[0110] First, determine the phase in the third intermediate quantum state. In some embodiments, by adding t auxiliary qubits to the third intermediate quantum state and performing a quantum Fourier transform, the phase Convert to measurable classical binary information: First, initialize the auxiliary qubit, which becomes a uniform superposition state after passing through the Hadamard gate. Second, perform a controlled-phase gate on each auxiliary qubit to entangle the phase of the auxiliary qubit with the target state. Third, perform a quantum Fourier transform on the auxiliary qubit and then measure to obtain the result m.
[0111] Next, determine the amplitude according to the mathematical mapping between the phase and the amplitude. In some embodiments, the phase estimation value corresponding to the measurement result m is: , substitute into to obtain the amplitude a of the target state. For example, if t = 0 (10 auxiliary qubits) and the measured m = 341, then: , .
[0112] Finally, determine the first refined occupancy ratio estimate according to the amplitude. The amplitude a represents the probability amplitude of the target state part in the first intermediate quantum state, and its modulus square is the collapse probability of the target state in the intermediate state. In the grouping scenario, , where is the two-norm of the large item group data, and n is the total amount of data in the input data vector. The first refined occupancy ratio estimate is the normalized ratio of the target state part in the overall data and needs to be calculated in combination with the overall two-norm . If a = 0.353 (corresponding to n = 8), , then the first refined occupancy ratio estimate = .
[0113] It should be noted that the calculation of the second refined occupancy ratio estimate is the same, except that the corresponding parameters are transformed to obtain , which will not be elaborated here.
[0114] In this way, the computer device measures the third intermediate quantum state to determine the phase in the third intermediate quantum state. Then, the computer device determines the amplitude according to the phase in the third intermediate quantum state. Finally, the computer device determines the first refined occupancy ratio estimate according to the amplitude. In this way, the third intermediate quantum state encodes the target state amplitude as a phase through a linear combination of eigenvectors, and measuring the first auxiliary qubit can improve the phase accuracy, thereby reducing the estimation error of the amplitude and further reducing the estimation error of the first refined occupancy ratio estimate.
[0115] Please refer to Figure 10 , in some embodiments, the method further includes: 05: Based on the second preset algorithm, determine the target quantum state according to the first refined occupancy ratio estimate and the second refined occupancy ratio estimate to achieve quantum state preparation.
[0116] In some embodiments, the determination module is further configured to determine a target quantum state based on a second preset algorithm according to the first refined occupation ratio estimation and the second refined occupation ratio estimation, so as to implement quantum state preparation.
[0117] In some embodiments, the processor is further configured to determine a target quantum state based on a second preset algorithm according to the first refined occupation ratio estimation and the second refined occupation ratio estimation, so as to implement quantum state preparation.
[0118] Specifically, the second preset algorithm refers to the linear combination algorithm of unitary operators. The core of the linear combination algorithm of unitary operators is to linearly combine two or more unitary operators by weights, and the formula is: , where and correspond to the unitary transformations of the large item group and the small item group respectively, , are combination coefficients (i.e., refined occupation ratio estimations).
[0119] Based on the linear combination algorithm of unitary operators, the computer device determines a target quantum state according to the first refined occupation ratio estimation and the second refined occupation ratio estimation, so as to implement quantum state preparation.
[0120] In this way, based on the second preset algorithm, the computer device determines a target quantum state according to the first refined occupation ratio estimation and the second refined occupation ratio estimation, so as to implement quantum state preparation. In this way, through the second preset algorithm, the first refined occupation ratio estimation and the second refined occupation ratio estimation are linearly superimposed, and then the target quantum state is synthesized with a constant-level operation complexity, reducing the number of quantum amplitude amplifications.
[0121] Please refer to Figure 11 , in some embodiments, step 05 (determining a target quantum state based on a second preset algorithm according to the first refined occupation ratio estimation and the second refined occupation ratio estimation) includes: 051: Determine a rotation angle according to the first refined occupation ratio estimation and the second refined occupation ratio estimation; 052: Based on a preset quantum gate, perform an association process on the first sub-quantum state and the first quantum state of the second auxiliary qubit according to the rotation angle to determine a first combined quantum state; 053: Based on a preset quantum gate, perform an association process on the second sub-quantum state and the second quantum state of the second auxiliary qubit according to the rotation angle to determine a second combined quantum state; 054: Determine a target quantum state according to the first combined quantum state and the second combined quantum state.
[0122] In some embodiments, the determining module is further configured to determine a rotation angle according to the first refined occupation ratio valuation and the second refined occupation ratio valuation. And based on a preset quantum gate, according to the rotation angle, perform an association process on the first sub-quantum state and the first quantum state of the second auxiliary qubit to determine a first combined quantum state. The determining module is further configured to, based on the preset quantum gate, according to the rotation angle, perform an association process on the second sub-quantum state and the second quantum state of the second auxiliary qubit to determine a second combined quantum state. And determine a target quantum state according to the first combined quantum state and the second combined quantum state.
[0123] In some embodiments, the processor is further configured to determine a rotation angle according to the first refined occupation ratio valuation and the second refined occupation ratio valuation. And based on a preset quantum gate, according to the rotation angle, perform an association process on the first sub-quantum state and the first quantum state of the second auxiliary qubit to determine a first combined quantum state. The processor is further configured to, based on the preset quantum gate, according to the rotation angle, perform an association process on the second sub-quantum state and the second quantum state of the second auxiliary qubit to determine a second combined quantum state. And determine a target quantum state according to the first combined quantum state and the second combined quantum state.
[0124] Specifically, the rotation angle refers to the quantum gate rotation parameter calculated according to the first refined occupation ratio valuation and the second refined occupation ratio valuation for controlling the superposition weight of the linear combination of unitary operators (LCU), and the formula is: 。
[0125] The preset quantum gate refers to the Ry gate (Y-axis rotation gate) that realizes the linear combination, which belongs to a single-qubit rotation gate, and its function is to rotate the quantum state around the Y-axis by a specified angle 。 Through the Ry gate operation, the first quantum state of the second auxiliary qubit can be associated with the amplitude weight of the first sub-quantum state, and the second quantum state of the second auxiliary qubit can be associated with the amplitude weight of the second sub-quantum state, realizing the linear combination of unitary operators.
[0126] The association process refers to that the preset quantum gate (Ry gate) entangles the quantum state of the second auxiliary qubit with the amplitude weight of the grouped quantum state (the first sub-quantum state or the second sub-quantum state), so that the measurement result of the second auxiliary qubit can indicate the successful preparation of the target state. In this way, through the association process, the abstract linear combination weight can be converted into a measurable quantum state parameter.
[0127] The second auxiliary qubit anc1 refers to a single-qubit auxiliary register introduced in the LCU algorithm, which is used to store the weight information of the linear combination and mark the successful preparation of the target state.
[0128] The first quantum state of the second auxiliary qubit refers to the state of the second auxiliary qubit anc1.
[0129] The second quantum state of the second auxiliary qubit refers to that of the second auxiliary qubit anc1 state.
[0130] The target quantum state refers to the complete normalized quantum state obtained by linearly combining the large term group and the small term group according to the proportion by the LCU algorithm.
[0131] Continuing with the above example, please refer to Figure 12 , Figure 12 which is a schematic diagram of the implementation of the LCU algorithm. Let the input data vector be {0.03, 0.03, 0.04, 0.04, 0.03, 0.03, 0.04, 1.0}, and the first refined proportion estimate and the second refined proportion estimate obtained are 1.0084 and 0.0084 respectively. Then the rotation angle is . The 0 state of this auxiliary qubit indicates the target state. In this example, its proportion is 1 / 1.0871 = 0.92. Therefore, there is no need to perform amplitude amplification anymore. Each time the auxiliary qubit anc1 is measured, the lower b-b register will collapse to the target state with a probability of 84.6%. If amplitude amplification is not performed either, then by simultaneously measuring its flag qubit and the auxiliary qubit anc1 of the LCU, a measurement of 10 is obtained to indicate the successful preparation of the target state, with a probability of 63.5%. The probability of obtaining the target state at least once in 3 consecutive measurements is 95.1%.
[0132] In this way, the computer device determines the rotation angle according to the first refined proportion estimate and the second refined proportion estimate. Then, based on the preset quantum gates, the computer device performs correlation processing on the first sub-quantum state and the first quantum state of the second auxiliary qubit according to the rotation angle to determine the first combined quantum state. However, based on the preset quantum gates, the computer device performs correlation processing on the second sub-quantum state and the second quantum state of the second auxiliary qubit according to the rotation angle to determine the second combined quantum state. Finally, the computer device determines the target quantum state according to the first combined quantum state and the second combined quantum state. In this way, a constant-level quantum gate operation can be used to replace the polynomial-level amplification, reducing the computational complexity. And, precise weight control can be achieved by using the second auxiliary qubit and the rotation gate, improving the success rate of preparing the target quantum state.
[0133] Please refer to Figure 13 , in some embodiments, the method further includes: 06: When the rough proportion estimate is greater than or equal to the grouping threshold, perform quantum amplitude amplification processing on the initial quantum state based on the third preset algorithm to determine the target quantum state.
[0134] In some embodiments, the confirmation module is further configured to, when the rough proportion estimate is greater than or equal to the grouping threshold, perform quantum amplitude amplification processing on the initial quantum state based on a third preset algorithm to determine the target quantum state.
[0135] In some embodiments, the processor is further configured to, when the rough proportion estimate is greater than or equal to the grouping threshold, perform quantum amplitude amplification processing on the initial quantum state based on a third preset algorithm to determine the target quantum state.
[0136] Specifically, when the data distribution is relatively uniform (the rough proportion estimate is greater than or equal to the grouping threshold), the quantum amplitude amplification algorithm is directly used to prepare the target quantum state.
[0137] In this way, when the rough proportion estimate is greater than or equal to the grouping threshold, based on the third preset algorithm, the computer device performs quantum amplitude amplification processing on the initial quantum state to determine the target quantum state. Thus, when the rough proportion estimate is greater than or equal to the grouping threshold, the third preset algorithm is directly used to efficiently amplify the probability of the target state to determine the target quantum state.
[0138] This application also provides a computer-readable storage medium containing a computer program. When the computer program is executed by one or more processors, one or more processors are caused to execute the method of this application.
[0139] It can be understood that the computer program includes computer program code. The computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable storage medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), and software distribution media, etc.
[0140] In the description of this specification, the descriptions referring to terms such as "specifically", "further", "specially", "understandably", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiments or examples are included in at least one embodiment or example of this application. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0141] Any process or method description, whether in a flowchart or otherwise described herein, can be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a specific logical function or process. The scope of the preferred embodiments of the present application includes additional implementations, where functions may be performed in a substantially simultaneous manner or in a reverse order according to the functions involved, rather than in the order shown or discussed. This should be understood by those skilled in the art to which the embodiments of the present application pertain.
[0142] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present application. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.
Claims
1. A method for preparing a black-box quantum state based on grouped processing, characterized in that, The method includes: Determining a rough occupation ratio estimation of the target state according to a marked bit and an initial quantum state, where the initial quantum state is a superposition state obtained by processing an input data vector based on the black box; When the rough occupation ratio estimation is less than a grouping threshold, separating the initial quantum state according to a first auxiliary bit to determine a first intermediate quantum state, where the grouping threshold is determined based on the number of the input data vectors, the first intermediate quantum state includes a target state part and an orthogonal state part, the target state part includes a first sub-quantum state, and the orthogonal state part includes a second sub-quantum state; Determining a first precise occupation ratio estimation corresponding to the first sub-quantum state and a second precise occupation ratio estimation corresponding to the second sub-quantum state according to the first intermediate quantum state to implement the quantum state preparation.
2. The method according to claim 1, wherein The method further includes: Performing a superposition state form loading process on the input data vector based on the black box to generate the initial quantum state, where the initial quantum state includes an address register and a data register.
3. The method according to claim 1, characterized in that The determining a rough occupation ratio estimation of the target state according to a marked bit and an initial quantum state includes: Entangling the data register in the initial quantum state and the marked bit based on a controlled NOT gate; Measuring the marked bit based on a preset number of measurements to determine the frequency of the target collapsed state; Determining the rough occupation ratio estimation according to the frequency of the target collapsed state and the preset number of measurements.
4. The method according to claim 1, characterized in that The initial quantum state includes a data register. When the rough occupation ratio estimation is less than a grouping threshold, separating the initial quantum state according to a first auxiliary bit to determine a first intermediate quantum state includes: Associating the first auxiliary bit with the highest bit information of the data register based on a controlled NOT gate; Taking the first auxiliary bit as a control bit and performing a comparison process on the data register based on a preset rule to determine the first intermediate quantum state.
5. The method according to claim 4, wherein The determining a first precise occupation ratio estimation corresponding to the first sub-quantum state and a second precise occupation ratio estimation corresponding to the second sub-quantum state according to the first intermediate quantum state includes: Determining the first precise occupation ratio estimation according to the target state part based on a first preset algorithm; Determining the second precise occupation ratio estimation according to the orthogonal state part based on the first preset algorithm.
6. The method according to claim 5, wherein The determining the first precise occupation ratio estimation according to the target state part based on a first preset algorithm includes: Simplifying the first intermediate quantum state to determine a second intermediate quantum state; Performing a transformation process on the second intermediate quantum state to determine a third intermediate quantum state in the form of a linear combination of eigenvectors; Determining the first precise occupation ratio estimation according to the third intermediate quantum state based on the first preset algorithm.
7. The method according to claim 6, wherein The determining the first precise occupation ratio estimation according to the third intermediate quantum state based on the first preset algorithm includes: Measuring the third intermediate quantum state to determine the phase in the third intermediate quantum state; Determining the amplitude according to the phase in the third intermediate quantum state; Determining the first precise occupation ratio estimation according to the amplitude.
8. The method according to claim 1, characterized in that The method further includes: Based on a second preset algorithm, determining a target quantum state according to the first precise occupation ratio estimate and the second precise occupation ratio estimate to achieve the quantum state preparation.
9. The method according to claim 8, wherein The determining, based on a second preset algorithm, of a target quantum state according to the first precise occupation ratio estimate and the second precise occupation ratio estimate includes: Determining a rotation angle according to the first precise occupation ratio estimate and the second precise occupation ratio estimate; Based on a preset quantum gate, performing a correlation process on the first sub-quantum state and the first quantum state of the second auxiliary qubit according to the rotation angle to determine a first combined quantum state; Based on the preset quantum gate, performing a correlation process on the second sub-quantum state and the second quantum state of the second auxiliary qubit according to the rotation angle to determine a second combined quantum state; Determining the target quantum state according to the first combined quantum state and the second combined quantum state.
10. The method according to claim 1, wherein The method further includes: In the case where the rough occupation ratio estimate is greater than or equal to the grouping threshold, performing a quantum amplitude amplification process on the initial quantum state based on a third preset algorithm to determine a target quantum state.
Citation Information
Patent Citations
Single-quantum-bit rapid quantum adiabatic shortcut control method
CN116108925A
Data classification method and related equipment
CN116257668A
Preparation method and device of quantum state
CN116911391A
Non-uniform information quantum state preparation method and device
CN116957088A
Approximate query processing optimization method based on quantum amplitude amplification technology
CN118364006A