Expectation value estimation method and system in quantum system

By using neural networks for quantum error elimination on noisy hardware, the problem of high resource consumption in the existing technology is solved, the training process is simplified and the need for noise simulation is reduced, and efficient quantum error elimination is achieved.

CN114202072BActive Publication Date: 2024-09-13TENCENT TECHNOLOGY (SHENZHEN) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111197696.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-14
Publication Date
2024-09-13
Estimated Expiration
2041-10-14

AI Technical Summary

Technical Problem

Existing quantum error elimination methods such as the ZNE scheme require expectation value estimation under multiple noise intensities, resulting in high resource consumption, and require noise simulation under noise-free conditions, which complicates the training process.

Method used

By using neural networks for variational optimization on noisy parameterized quantum circuits and performing QEM directly on noisy hardware, the training process is simplified, resource consumption is reduced, and the noise is error eliminated through the neural network.

Benefits of technology

It achieves efficient quantum error elimination on noisy hardware, simplifies the training process, reduces resource consumption, and does not require noise simulation in the absence of noise, improving computing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114202072B
    Figure CN114202072B
Patent Text Reader

Abstract

The present application discloses an expectation value estimation method and system in a quantum system, belonging to the field of quantum technology. The present application performs variational optimization of a neural network directly on noisy hardware (including parameterized quantum circuits with noise), so that the parameters of the neural network can offset the influence of quantum noise to a certain extent, and achieve the effect of QEM of quantum noise through the neural network, so that the expected value of the objective function finally obtained is the expected value after QEM. This solution does not require noise simulation in a noise-free situation, simplifies the training process, and reduces resource consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of quantum technology, and in particular to a method and system for estimating an expected value in a quantum system. Background Art

[0002] At present, a ZNE (Zero-noise Extrapolation) solution has been proposed to achieve QEM (Quantum Error Mitigation). QEM uses some pre-processing methods in a noisy quantum system to offset the error caused by the noise, so that the error caused by the noise is as invisible as possible in the final result.

[0003] The ZNE scheme measures the same observation under different noise intensities to obtain different expected values ​​of this observation under different noise intensities. Through polynomial or exponential fitting methods, the expected values ​​obtained under different noise intensities are extended to the zero noise limit, thereby obtaining the expected value of the observation under the zero noise limit, which is used as the expected value of the observation after QEM.

[0004] However, the ZNE scheme requires expected value estimation under multiple different noise intensities, which requires several times the number of quantum hardware measurements required for conventional expected value estimation and consumes a lot of resources. Summary of the invention

[0005] The embodiment of the present application provides a method and system for estimating expected value in a quantum system. The technical solution is as follows:

[0006] According to one aspect of an embodiment of the present application, a method for estimating an expectation value in a quantum system is provided, the method comprising:

[0007] The input quantum state of n quantum bits is transformed through a noisy parameterized quantum circuit to obtain an output quantum state of the n quantum bits; wherein the expected value of the objective function under the output quantum state of the n quantum bits is a weighted sum of the expected values ​​of multiple Pauli strings obtained by decomposing the objective function, and n is a positive integer;

[0008] Post-processing the output quantum states of the n quantum bits using a neural network to obtain expected values ​​of the multiple Pauli strings;

[0009] Calculating the expected value of the objective function according to the expected values ​​of the multiple Pauli strings; wherein the expected value of the objective function is the result of quantum error elimination of the noise of the parameterized quantum circuit by the neural network;

[0010] Taking the convergence of the expected value of the objective function as a goal, adjusting the parameters of the target object, the target object including the neural network;

[0011] In the case that the expected value of the objective function satisfies a convergence condition, a convergence expected value of the objective function is obtained, where the convergence expected value refers to an expected value that satisfies the convergence condition.

[0012] According to one aspect of an embodiment of the present application, there is provided an expectation value estimation system in a quantum system, the system comprising: a parameterized quantum route with noise, a post-processing module and an optimizer;

[0013] The parameterized quantum circuit is used to transform the input quantum state of n quantum bits to obtain the output quantum state of the n quantum bits; wherein the expected value of the objective function under the output quantum state of the n quantum bits is the weighted sum of the expected values ​​of multiple Pauli strings obtained by decomposing the objective function, and n is a positive integer;

[0014] The post-processing module is used to post-process the output quantum states of the n quantum bits using a neural network to obtain the expected values ​​of the multiple Pauli strings; and calculate the expected value of the objective function according to the expected values ​​of the multiple Pauli strings; wherein the expected value of the objective function is the result of quantum error elimination of the noise of the parameterized quantum circuit by the neural network;

[0015] The optimizer is used to adjust the parameters of the target object with the convergence of the expected value of the objective function as the goal, and the target object includes the neural network; when the expected value of the objective function meets the convergence condition, the convergence expected value of the objective function is obtained, and the convergence expected value refers to the expected value that meets the convergence condition.

[0016] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0017] By performing variational optimization of the neural network directly on noisy hardware (including noisy parameterized quantum circuits), the parameters of the neural network can offset the influence of quantum noise to a certain extent, achieving the effect of QEM of quantum noise through the neural network, so that the expected value of the objective function finally obtained is the expected value after QEM. This solution does not require noise simulation under noise-free conditions, simplifies the training process, and reduces resource consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 is a schematic diagram of a VQNHE framework provided by an embodiment of the present application;

[0020] Figure 2 is a flow chart of an expectation value estimation method in a quantum system provided by an embodiment of the present application;

[0021] Figure 3 is a schematic diagram of experimental results of two retraining methods provided in one embodiment of the present application;

[0022] Figure 4 is a schematic diagram of the least noise-sensitive point in an adiabatic reaction provided by an embodiment of the present application;

[0023] Figure 5 is a flow chart of an expectation value estimation method in a quantum system provided by another embodiment of the present application;

[0024] Figure 6 is a schematic diagram of triple optimization provided by an embodiment of the present application;

[0025] Figure 7 is a flow chart of an expectation value estimation method in a quantum system provided by another embodiment of the present application;

[0026] Figure 8 is a schematic diagram of experimental results provided by an embodiment of the present application;

[0027] Fig. 9 It is a schematic diagram of experimental results provided by another embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0029] Before introducing the technical solution of the present application, some key terms involved in the present application are explained.

[0030] 1. Quantum computing: A computing method based on quantum logic. The basic unit of data storage is the quantum bit (qubit).

[0031] 2. Quantum bit: the basic unit of quantum computing. Traditional computers use 0 and 1 as the basic units of binary. The difference is that quantum computing can process 0 and 1 at the same time, and the system can be in a linear superposition state of 0 and 1: |ψ>=α|0>+β|1>, where α and β represent the complex probability amplitude of the system at 0 and 1. Their squared modulus |α| 2 ,|β| 2 represent the probabilities of being 0 and 1 respectively.

[0032] 3. Quantum circuit: A representation of a quantum universal computer, representing the hardware implementation of the corresponding quantum algorithm / program under the quantum gate model. If the quantum circuit contains adjustable parameters for controlling quantum gates, it is called a parameterized quantum circuit (PQC) or a variational quantum circuit (VQC), which are the same concept.

[0033] 4. Hamiltonian: A Hermitian conjugate matrix that describes the total energy of a quantum system. Hamiltonian is a physical term, an operator that describes the total energy of a system, usually represented by H.

[0034] 5. Eigenstate: For a Hamiltonian matrix H, the solution that satisfies the equation: H|ψ>=E|ψ> is called the eigenstate |ψ> of H, with eigenenergy E. The ground state corresponds to the lowest energy eigenstate of the quantum system.

[0035] 6. Quantum Architecture Search (QAS): A general term for a series of works and schemes that attempt to automate and programmatically search for the structure, pattern, and arrangement of quantum circuits. Traditionally, quantum architecture search work usually uses greedy algorithms, reinforcement learning, or genetic algorithms as its core technology. The latest developed technologies include differentiable quantum architecture search and predictor-based structure search schemes.

[0036] 7. Quantum-classical hybrid computing: A computing paradigm that uses quantum circuits (such as PQC) to calculate the corresponding physical quantities or loss functions in the inner layer, and uses traditional classical optimizers to adjust the variational parameters of quantum circuits in the outer layer. This can maximize the advantages of quantum computing and is believed to be one of the important directions with the potential to prove quantum advantage.

[0037] 8. NISQ (Noisy Intermediate-Scale Quantum): The recent medium-scale noisy quantum hardware is the current stage of quantum computing development and the focus of research. At this stage, quantum computing cannot be used as a general computing engine due to the limitations of scale and noise, but on some problems, it can achieve results that surpass the most powerful classical computers, which is usually called quantum hegemony or quantum advantage.

[0038] 9. Quantum Error Mitigation: Corresponding to Quantum Error Correction, it is a series of quantum error mitigation and noise suppression solutions with lower resource costs under NISQ era hardware. Compared with complete quantum error correction, the resources required are significantly reduced, and it may only be applicable to specific tasks rather than a general solution.

[0039] 10. Variational Quantum Eigensolver (VQE): It estimates the ground state energy of a specific quantum system through variational circuits (i.e. PQC / VQC). It is a typical quantum-classical hybrid computing paradigm and has wide applications in the field of quantum chemistry.

[0040] 11. Jastrow factor: A factor commonly used in variational Monte Carlo wave function simulation, used to strengthen the mean field non-interaction wave function in order to characterize more quantum correlation information. Its basic form is where φ is the variational parameter, Z is a quantum operator that gives ±1 eigenvalues ​​on the measurement basis, and k and l represent different qubit degrees of freedom, with k representing the kth qubit and l representing the lth qubit.

[0041] 12. Non-unitary: A unitary matrix is ​​one that satisfies All matrices of, all evolution processes directly allowed by quantum mechanics, can be described by unitary matrices. Among them, U is a unitary matrix, also called a unitary matrix, a unitary matrix, etc. is the conjugate transpose of U. In addition, matrices that do not meet this condition are non-unitary, which requires auxiliary means or even exponentially more resources to be realized experimentally, but non-unitary matrices often have stronger expression capabilities and faster ground state projection effects. The above-mentioned "exponentially more resources" means that the demand for resources increases exponentially with the increase in the number of quantum bits. The exponentially more resources can refer to the total number of quantum circuits that need to be measured is exponentially more, that is, the corresponding exponentially more computing time is required.

[0042] 13. Pauli string: A term consisting of the direct product of multiple Pauli operators at different lattice points. The general Hamiltonian can usually be decomposed into the sum of a set of Pauli strings. The measurement of VQE is also generally measured item by item according to the Pauli string decomposition.

[0043] 14. Pauli operator: also known as Pauli matrix, is a set of three 2×2 unitary Hermitian complex matrices (also known as unitary matrices), generally represented by the Greek letter σ (sigma). Among them, the Pauli X operator is The Pauli Y operator is The Pauli Z operator is

[0044] 15. Bit string: A string of numbers consisting of 0 and 1. The classical result of each measurement of a quantum circuit can be represented by 0 or 1 respectively according to the upper and lower spin configurations on the measurement basis, so that the total measurement result corresponds to a bit string.

[0045] The technical solution provided by the present application performs variational optimization of the neural network directly on noisy hardware (including noisy parameterized quantum circuits) so that the parameters of the neural network can offset the influence of quantum noise to a certain extent, thereby achieving the effect of performing QEM on quantum noise through the neural network, so that the expected value of the objective function finally obtained is the expected value after QEM. This solution does not require noise simulation in a noise-free situation, simplifies the training process, and reduces resource consumption.

[0046] The variational quantum neural network hybrid eigensolver (VQNHE) framework provided by an exemplary embodiment of the present application is as follows: Figure 1 As shown, it includes a parameterized quantum circuit (PQC) 10, a neural network 20 and an optimizer 30. Among them, the parameterized quantum circuit 10 can be noisy, and the parameterized quantum circuit 10 is used to transform the input quantum state of n quantum bits to obtain the output quantum state of the n quantum bits, where n is a positive integer. The expected value of the objective function under the output quantum state of the n quantum bits is the weighted sum of the expected values ​​of multiple Pauli strings obtained by decomposing the objective function. The neural network 20 is used to post-process the output quantum state of the n quantum bits. Based on the post-processing results of the neural network 20, the expected values ​​of multiple Pauli strings are obtained, and then the expected value of the objective function is calculated. The optimizer 30 is used to adjust the parameters of the target object (such as the parameterized quantum circuit 10 and / or the neural network 20) ​​with the expected value of the objective function converging as the goal. When the expected value of the objective function meets the convergence condition, the converged expected value of the objective function is obtained.

[0047] Figure 1 The parameterized quantum circuit (PQC) 10 in the upper left corner is consistent with the traditional VQE framework, and its output wave function |ψ> is processed by the neural network post-processing box. The enhanced quantum-neural network hybrid wave function is obtained by acting on both: In order to be able to measure the estimated |ψ f >The expected value of the corresponding objective function can be obtained in the following manner: for each of the multiple Pauli strings mentioned above, the bit string of the output quantum state of n quantum bits on the measurement basis corresponding to the Pauli string is measured respectively, and the metadata for calculating the expected value of the Pauli string is outputted by the neural network 20 according to the bit string, and then the expected value of the Pauli string is calculated according to these metadata, and finally the expected value of multiple Pauli strings is weighted summed to obtain the expected value of the objective function. Once the expected value of the objective function is obtained, we can respectively apply parameter translation and back propagation to calculate the derivative of the expected value with respect to the parameter θ of the parameterized quantum circuit 10 and the parameter φ of the neural network 20. With this derivative information, the gradient-based optimizer 30 (such as Adam) developed by the classical machine learning community can be used to update the corresponding parameters, thereby completing a round of iteration of the quantum-classical hybrid computing paradigm until the expected value obtained converges, and its value can be used as an approximate estimate of the maximum or minimum value of the objective function.

[0048] Optionally, the VQNHE framework may further include a measurement circuit ( Figure 1 (not shown in the figure). The measurement circuit may include multiple groups of measurement circuits. For example, the number of groups of measurement circuits may be equal to the number of Pauli strings obtained by decomposing the objective function, so that the multiple groups of measurement circuits correspond to multiple Pauli strings one by one. Taking the target measurement circuit corresponding to the target Pauli string as an example, the target measurement circuit is used to perform a transformation process corresponding to the target Pauli string on the output quantum state of n quantum bits to obtain the transformed output quantum state. The neural network 20 is used to post-process the transformed output quantum state. Based on the post-processing result of the neural network 20, the energy expectation value of the target Pauli string is obtained. For the above-mentioned multiple Pauli strings, the above-mentioned operations are performed respectively to obtain the expected values ​​corresponding to the multiple Pauli strings respectively, and then the weighted sum is performed to obtain the expected value of the objective function.

[0049] The technical solution provided by this application is mainly aimed at the QEM solution under the VQNHE framework. This application proposes a solution for adaptive retraining on noisy hardware, so that the parameters of the entire variational framework can offset the influence of quantum noise to a certain extent. The effect of this retraining becomes significant after the introduction of the neural network post-processing module. That is, the QEM solution proposed in this application is particularly suitable for the VQNHE framework. This error correction capability shows that the VQNHE framework exceeds the noise robustness of ordinary VQE.

[0050] For adaptive retraining, this application provides a variety of different parameter adjustment mechanisms. This application refers to the method of re-optimizing the parameters of the parameterized quantum circuit and the parameters of the neural network under noisy hardware as "joint retraining". In addition, it is also possible to adjust the parameters of the parameterized quantum circuit alone without adjusting the parameters of the neural network. This method is called "quantum circuit retraining"; or, it is also possible to adjust the parameters of the neural network alone without adjusting the parameters of the parameterized quantum circuit. This method is called "neural network retraining".

[0051] In order to measure the QEM capabilities of different sub-schemes, this application uses the estimated decrease in expected value brought about by retraining as an estimation indicator of QEM capability. Specifically, for the noise-free case, the optimal parameters of the quantum path and the neural network are θ0 and φ0, respectively. When these parameters are loaded in a noisy system, the noisy estimate of the expected value E0 is obtained. For gradient descent optimization directly on noisy hardware, the optimal parameters obtained are θ and φ, and the expected value is estimated to be E θ,φ , since the optimization goal is to minimize the expected value, E θ,φ In this application, the retraining energy difference is defined as δE=E θ,φ -E0, the larger the absolute value of this value is, the stronger the QEM error correction capability of the system is and the more stable its performance against quantum noise is.

[0052] In addition, for the retraining of a single quantum route, the retraining energy difference is defined as δE = E θ -E0, for the retraining of a single neural network, the retraining energy difference is defined as δE = E φ -E0.

[0053] It should be noted that although the optimal parameters of the noise-free limit are used in the measurement indicators, in actual experiments, the so-called adaptive "retraining" in this application can start from any line parameters, and there is no need to know the prior knowledge of the noise-free optimal parameters in advance. In other words, the so-called "retraining" is actually the first training. Therefore, the actual operation is to perform variational optimization directly on noisy quantum hardware. Our discussion and comparison of performance under the noise-free limit parameters is only to characterize the size of the intrinsic QEM capability, and has nothing to do with the workflow required by QEM.

[0054] Figure 2 2 is a flow chart of an expectation value estimation method in a quantum system provided by an embodiment of the present application. The method can be applied to the VQNHE framework introduced above. The method may include the following steps (210-250):

[0055] Step 210, transforming the input quantum state of n quantum bits through a noisy parameterized quantum circuit to obtain an output quantum state of n quantum bits; wherein the expected value of the objective function under the output quantum state of n quantum bits is the weighted sum of the expected values ​​of multiple Pauli strings obtained by decomposing the objective function, and n is a positive integer.

[0056] The objective function is a function whose expected value is solved by applying the VQNHE framework. The objective function has a convergent expected value, which can be the minimum expected value of the objective function or the maximum expected value of the objective function.

[0057] Optionally, the objective function is the Hamiltonian of the target quantum system. The energy expectation value of the Hamiltonian of the target quantum system under the output quantum state of n quantum bits is solved, and the parameters of the parameterized quantum circuit and / or neural network are adjusted so that the energy expectation value satisfies the convergence condition (such as minimization), and the energy expectation value satisfying the convergence condition is determined as the ground state energy of the target quantum system.

[0058] The input quantum state of the parameterized quantum circuit can generally use the all-zero state, uniform superposition state or Hartree-Fock state, which is also called a trial state. The objective function can be decomposed into the direct product of multiple Pauli strings, for example, the objective function can be decomposed into the direct product of k Pauli strings, k is usually an integer greater than 1, but in some special cases k can also be equal to 1, that is, the objective function can be regarded as a Pauli string. Therefore, in the VQE framework, the output of the parameterized quantum circuit is used to approximate the output quantum state of the target quantum system, and the expected value of the objective function of the target quantum system in the output quantum state of the parameterized quantum circuit is estimated by measuring, and the convergence of the expected value is taken as the optimization goal (such as minimizing or maximizing the expected value as the optimization goal), and the parameters of the parameterized quantum circuit are continuously optimized to adjust its output quantum state, so that the expected value of the objective function of the target quantum system in the output quantum state tends to converge (such as the expected value tends to be minimum or maximum), and finally the converged expected value of the objective function is obtained.

[0059] Exemplarily, if the objective function is the Hamiltonian of the target quantum system, then the minimum expected value of the energy of the Hamiltonian of the target quantum system in the above output quantum state can be solved in the above manner as the ground state energy of the target quantum system.

[0060] Step 220, post-processing the output quantum states of the n quantum bits using a neural network to obtain expected values ​​of multiple Pauli strings.

[0061] In the VQNHE framework provided in this application, a neural network is used to post-process the wave function output by the parameterized quantum circuit. The neural network can act as a universal function approximator with strong expression ability and convergence expectation value approximation ability, which helps to improve the accuracy of convergence expectation value estimation.

[0062] Optionally, step 220 may include: obtaining a measurement result corresponding to an output quantum state of n quantum bits, the measurement result may include multiple bit strings; processing the measurement result through a neural network to obtain an output result of the neural network; and calculating expected values ​​of multiple Pauli strings based on the output result of the neural network.

[0063] Exemplarily, it is assumed that the objective function is decomposed to obtain k Pauli strings, where k is a positive integer. For a target Pauli string among the k Pauli strings, a measurement circuit corresponding to the target Pauli string is used to perform a transformation process corresponding to the target Pauli string on the output quantum state of n quantum bits to obtain a transformed output quantum state; a bit string of the transformed output quantum state on a specified measurement basis is measured; metadata for calculating the expected value of the target Pauli string is output based on the bit string through a neural network; and the expected value of the target Pauli string is calculated based on the metadata. In the above manner, after the expected values ​​corresponding to the k Pauli strings are calculated, the expected value of the objective function can be calculated based on the expected values ​​corresponding to the k Pauli strings.

[0064] In the embodiments of the present application, the specific structure of the neural network is not limited. It can be a simple fully connected structure or other more complex structures, and the present application does not limit this.

[0065] Step 230, calculating the expected value of the objective function according to the expected values ​​of the multiple Pauli strings; wherein the expected value of the objective function is the result of quantum error elimination of the noise of the parameterized quantum circuit by the neural network.

[0066] In some embodiments, the expected values ​​of the multiple Pauli strings are weighted and summed according to the weight values ​​corresponding to the multiple Pauli strings to obtain the expected value of the objective function. The weight values ​​corresponding to the multiple Pauli strings can be set values ​​or values ​​that are updated and optimized synchronously during the parameter training process of the variational framework, which is not limited in this application.

[0067] In the embodiment of the present application, variational optimization of the neural network is performed directly on noisy hardware (including noisy parameterized quantum circuits), so that the parameters of the neural network can offset the influence of quantum noise to a certain extent, thereby achieving the effect of QEM of quantum noise through the neural network, so that the expected value of the objective function finally obtained is the expected value after QEM, which is more accurate.

[0068] Step 240, adjusting the parameters of the target object with the goal of converging the expected value of the target function, where the target object includes a neural network.

[0069] For joint retraining, the target objects include parameterized quantum circuits and neural networks. With the goal of converging the expected value of the objective function, the parameters of the parameterized quantum circuits and the parameters of the neural network are adjusted respectively.

[0070] For neural network retraining, the target object includes the neural network but does not include the parameterized quantum circuit. The parameters of the neural network are adjusted with the goal of converging the expected value of the objective function.

[0071] For quantum circuit retraining, the target objects include parameterized quantum circuits but do not include neural networks. The parameters of the parameterized quantum circuits are adjusted with the goal of converging the expected value of the objective function.

[0072] After experiments, it was found that the convergence expectation value obtained by joint retraining has the highest accuracy, the convergence expectation value obtained by neural network retraining has the second highest accuracy, and the convergence expectation value obtained by quantum circuit retraining cannot meet the accuracy requirements. Specific experimental data can be found in the following description. Therefore, this application will focus on the joint retraining and neural network retraining schemes.

[0073] For the joint retraining scheme, the derivatives of the expected value of the objective function with respect to the parameters of the parameterized quantum circuit and the derivatives of the expected value of the objective function with respect to the parameters of the neural network can be calculated respectively. In the present application, in order to simplify the description, the derivative of the expected value of the objective function with respect to the parameters of the parameterized quantum circuit is called the second derivative, and the derivative of the expected value of the objective function with respect to the parameters of the neural network is called the third derivative. Then, based on the second derivative and the third derivative, the parameters of the parameterized quantum circuit and the parameters of the neural network are adjusted respectively by the gradient descent method so that the expected value of the objective function converges.

[0074] Taking the Hamiltonian of the target quantum system as an example, the derivatives of the energy expectation value of the Hamiltonian with respect to the parameters of the parameterized quantum circuit and the derivatives with respect to the parameters of the neural network are calculated respectively. Then, based on the derivative information, the parameters of the parameterized quantum circuit and the parameters of the neural network are adjusted respectively by the gradient descent method so that the energy expectation value of the Hamiltonian tends to be minimized.

[0075] For the scheme of neural network retraining, the derivative of the expected value of the objective function with respect to the parameters of the neural network can be calculated. That is, only the second derivative needs to be calculated. Then, based on the second derivative, the parameters of the neural network are adjusted using the gradient descent method so that the expected value of the objective function converges.

[0076] Taking the Hamiltonian of the target quantum system as an example, the derivative of the energy expectation value of the Hamiltonian with respect to the parameters of the neural network is calculated. Then, based on the derivative information, the parameters of the neural network are adjusted using the gradient descent method to minimize the energy expectation value of the Hamiltonian.

[0077] The joint retraining scheme and the neural network retraining scheme each have their own advantages. Compared with the neural network retraining scheme, the joint retraining scheme has higher accuracy, but the complexity of the scheme is also higher; compared with the joint retraining scheme, the neural network retraining scheme has lower accuracy, but the complexity of the scheme is lower. However, we can use some other means to improve the accuracy of the neural network retraining scheme, which will be introduced below.

[0078] In addition, for the joint retraining scheme, the parameter optimization process of the parameterized quantum circuit and the parameter optimization process of the neural network can be performed simultaneously or successively, and this application does not limit this.

[0079] Step 250, when the expected value of the objective function satisfies the convergence condition, obtain the convergence expected value of the objective function, where the convergence expected value refers to the expected value that satisfies the convergence condition.

[0080] Finally, after multiple parameter adjustments, the expected value of the objective function tends to converge. When the expected value of the objective function meets the convergence condition, the converged expected value of the objective function is obtained.

[0081] Taking the Hamiltonian of the target quantum system as an example, the energy expectation value that minimizes the Hamiltonian is determined as the ground state energy of the target quantum system.

[0082] In addition, in the embodiments of the present application, the Hamiltonian of the target quantum system is mainly used as an example for illustration, but any target function with a convergent expected value can be solved by the scheme provided in the present application. For example, the original Hamiltonian is used as the target function, and it is minimized to obtain the ground state of the system. At the same time, the other parts of the energy spectrum corresponding to the Hamiltonian are called excited states. These excited states can be obtained by minimizing the variance of the Hamiltonian, that is, the target function is: <H 2 >- <h> 2 , H represents the Hamiltonian of the target quantum system. Mathematically, we know that the objective function is always positive. For the excited state of the matrix H, this value is 0, which is the minimum value of the objective function. Therefore, we can obtain the excited state of Hamiltonian H by minimizing the objective function. After the objective function is expanded, it is essentially the sum of a series of Pauli strings, so the practical operation process is exactly the same as the ordinary VQNHE process. This application does not limit the expression of the objective function.

[0083] The technical solution provided in the embodiment of the present application performs variational optimization of the neural network directly on noisy hardware (including noisy parameterized quantum circuits) so that the parameters of the neural network can offset the influence of quantum noise to a certain extent, thereby achieving the effect of performing QEM on quantum noise through the neural network, so that the expected value of the objective function finally obtained is the expected value after QEM. This solution does not require noise simulation in a noise-free situation, simplifies the training process, and reduces resource consumption.

[0084] In real experiments, in order to accurately estimate smaller gradients, a large number of quantum circuit runs and measurements are required. But if we only want to retrain the neural network, there is a very efficient biased alternative. Considering that the parameterized quantum circuit remains unchanged during neural network retraining, we only measure the circuit N times and record the corresponding measurement results for the expected value evaluation. After each expected value is calculated, the parameter φ of the neural network is gradient descended. In other words, the same measurement results are used as input to the neural network before and after the parameters of the neural network are adjusted. This retraining method is actually biased (biased means there is a systematic error), because the expected value estimation based on the measurement results obtained by N measurements itself has a sampling error. Then, further optimizing the neural network based on these fixed measurement results may have an overfitting problem, thereby overestimating the error correction ability of the neural network retraining.

[0085] In fact, through running and data analysis on a noisy simulator and actual quantum hardware, we found that the energy difference E biased and the unbiased intrinsic retraining energy difference E unbiased The relationship is δE biased =δE unbiased +A / N, where A is a negative constant related to the Hamiltonian of the system, and N is the number of measurements on the line. In other words, a larger number of measurements N can better control the systematic error of the biased QEM estimation, which is better than traditional measurement. The fluctuation scale of is more friendly. While the system error is controllable, in addition to starting the measurement of the quantum circuit N times, this biased retraining is faster and more stable because it only uses classical computing resources.

[0086] In some embodiments, the ground state energy estimation problem of the five-point transverse field Ising model is used to study the scaling between the QEM capability (retraining energy difference) and the noise intensity. The scaling refers to the quantitative relationship between two quantities. The corresponding Hamiltonian as follows:

[0087]

[0088] Where Z represents the Pauli Z operator, X represents the Pauli X operator, n is a positive integer, and i is a positive integer less than or equal to n. The quantum error model we simulated is to add a corresponding depolarizing error (deploarizing error) with an intensity of p after each two-bit quantum gate of the PQC. The above quantum error model is also the simulated noise, which is placed after each two-bit quantum gate in the PQC circuit. This error is the most common in the practice and research of quantum circuits, and its transformation to the density matrix is:

[0089]

[0090] Among them, ρ represents the density matrix, ρ′ represents the transformed density matrix, p represents the intensity of depolarization error, and I is the unit matrix.

[0091] The corresponding simulation results are as follows Figure 3 As shown. Figure 3 In the figure, the horizontal axis represents the equivalent total noise intensity p eff , the vertical axis represents the QEM energy difference δE. The equivalent total noise intensity p eff It is obtained by the following formula: 1-p eff =E noise / E noiseless Among them, E noise and E noiseless These are the simulation results in a noisy environment and a noise-free environment with the same line parameters. Figure 3 In the figure, line 31 shows the result of neural network retraining, and line 32 shows the result of joint retraining of neural network and quantum path adjustment. For neural network retraining, its QEM energy difference is a quadratic function of noise intensity, that is, δE∝p 2 , while for the joint retraining of the neural network and quantum path parameters, the QEM energy difference is significantly improved and qualitatively changed, the scale becomes linear δE∝p, where p in the two equations is p above eff It is worth noting that when the noise intensity is small, the retraining of the quantum route alone can hardly alleviate the impact of the depolarization noise. In other words, the noise resilience presented here is a unique property of VQNHE, and VQE does not have such good noise resilience. Noise resilience is the robustness of noise, which means that the system is not easily affected by noise, or the impact is very small.

[0092] The quadratic scaling of neural network retraining can explain why the difference between biased retraining and unbiased retraining in our QEM energy estimation is 1 / N. eff is unknown, and is a random variable estimated through measurement. By definition, it is linear with the energy estimate of the measurement, that is, p eff The standard deviation of The order of magnitude, its variance Δp eff ∝1 / N, then the QEM energy difference is:

[0093] δE∝ <p eff 2 >= <p eff 2 >+Δp eff =δE unbiased +A / N

[0094] in, <p eff 2 > is p eff The expectation of the squared estimate, <p eff > 2 It is right eff The estimated expected squares are not the same, and the difference is exactly p eff The above formula just explains the scaling of biased retraining with the number of measurements N.

[0095] from Figure 3 It can be seen that the scaling of QEM capabilities will be qualitatively different for different retraining mechanisms. Let us analyze the reason from an analytical point of view. Assume that the state output by the quantum route is ideally a strict ground state ρ0=|ψ0><ψ0|, and the corresponding ground state energy is E0. Still considering the depolarized noise model, the noisy output state is ρ, and the energy difference of the neural network retraining is δE=E QEM -E N , where E N =E0(1-p) is the noisy energy estimate under ideal parameters. To show the scale, the corresponding term is Taylor expanded with respect to the noise intensity: And only focusing on the first-order terms, if it can be proved that the energy difference is 0 up to the first-order terms, then the scale of the QEM energy difference is at most a quadratic term. According to:

[0096]

[0097] Where Tr is the matrix product, n is the number of quantum bits, is the diagonal matrix of the neural network post-processing, is the system Hamiltonian, ρ0 is the quantum ground state when there is no noise, and p is the noise intensity, which is p in the above text. eff .

[0098] At this time, the zero-order term of the energy difference is obviously 0. For the first-order term, there is At the same time, it is assumed that the optimal post-processing module is the adiabatic evolution of the noise-free case f≈I+pf1, where f1 is a given constant matrix. Then:

[0099]

[0100] Among them, Tr(f1ρ0H)-E0Tr(f1ρ0)=<ψ0|Hf1|ψ0>-E0<ψ0|f1|ψ0>=0.

[0101] We have That is, the first-order term of the energy difference is also 0. More generally, as long as we assume that the noisy solution is an adiabatic evolution of the noise-free solution, then the QEM energy difference is at most quadratic in the noise intensity.

[0102] The following further explains why joint retraining can lead to a scaling of QEM capabilities. The key is that the optimal parameters with noise are not adiabatically connected to the default optimal parameters without noise, that is, the expansion approximation of the post-processing module f with respect to the noise intensity p does not hold. The reason behind this is that if the quantum path parameters are allowed to change, there are infinite optimal parameter sets for the noise-free case. Even if the quantum circuit does not directly give the ground state, VQNHE can still give a strict ground state energy through a suitable non-identical neural network module. This phenomenon can be seen in Figure 4 In part (a), under such an energy surface, when the noise is turned on, different optimal parameter solutions have different sensitivities to the noise, so the optimal parameter solution that is least sensitive to the noise becomes the optimal parameter when there is noise. At this time, the corresponding solution is not the default solution, and there is no connection with the adiabatic approximation, so the first-order scaling law is not 0. This process is similar to symmetry breaking, which can be referred to Figure 4 In part (b), hexagon 41 is the default solution. Hexagon 41 has a fixed horizontal coordinate value and can only move up and down the vertical coordinate. For example, the horizontal coordinate of hexagon 41 in the figure is always r = 0. Hexagon 42 is the position of the optimal parameters with noise. r = 0 corresponds to the same post-processing module. θ represents the parameters of the quantum circuit.

[0103] The two retraining mechanisms have different corresponding noise scales because their QEM capabilities come from different mechanisms. For neural network retraining, its QEM capability comes from the adiabatic adaptive evolution of the identity post-processing module. For joint retraining, its QEM comes from selecting the most noise-resistant set from an infinite number of equivalent parameter combinations.

[0104] By using biased neural network retraining, the error can be controlled and subsequent iterations no longer require parameterized quantum route processing. Only classical computing resources are required. While ensuring a certain level of accuracy, the retraining process is simplified, making retraining more efficient.

[0105] Figure 5 is a flowchart of an expectation value estimation method in a quantum system provided by another embodiment of the present application, which can be applied to Figure 1 In the VQNHE framework shown, the method may include the following steps (510-560):

[0106] Step 510, transforming the input quantum state of n quantum bits through a noisy parameterized quantum circuit to obtain an output quantum state of n quantum bits; wherein the expected value of the objective function under the output quantum state of n quantum bits is the weighted sum of the expected values ​​of multiple Pauli strings obtained by decomposing the objective function, and n is a positive integer.

[0107] The objective function is a function whose expected value is solved by applying the VQNHE framework. The objective function has a convergent expected value, which can be the minimum expected value of the objective function or the maximum expected value of the objective function.

[0108] Optionally, the objective function is a parameterized objective function, which is an objective function obtained by performing parameter transformation on the original objective function; wherein the parameterized objective function and the original objective function have the same convergence expected value.

[0109] Taking the Hamiltonian of the target quantum system as an example, by introducing the parameterized Hamiltonian transformation, triple optimization with stronger expression and error correction capabilities is achieved. The so-called triple optimization refers to the optimization of the parameters of the parameterized quantum circuit, the parameters of the neural network, and the weight parameters. The reason is that from the perspective of the quantum channel, the post-processing module f is just a diagonal matrix. We introduce the virtual Hamiltonian transformation to enhance the ability of the classical post-processing quantum channel.

[0110] In a possible implementation, the parameterized objective function is an objective function obtained by performing a unitary transformation on the original objective function.

[0111] Taking the Hamiltonian as an example, in the case of unitary transformation, the unitary matrix in the same Hilbert space as the system Hamiltonian is introduced Then the expression of the transformed Hamiltonian is: in, is a unitary matrix, is the Hamiltonian, is the transformed Hamiltonian. The transformed Hamiltonian With the original Hamiltonian The same energy spectrum and ground state. This is guaranteed by the similarity transformation corresponding to the unitary matrix. In fact, the parameterized transformation W (that is, the unitary matrix ) can also be non-unitary, and the corresponding non-unitary part can be regarded as absorbed into the variational quantum state. Due to the existence of denominator normalization, the lower boundary of its variational optimization is still the ground state energy. It should be noted that the parameterized transformation W must satisfy the restriction so that the transformed Hamiltonian still maintains the Pauli string of polynomial terms, which is also the key to the efficiency and scalability of the parameterized Hamiltonian transformation method.

[0112] In another possible implementation, the parameterized objective function is an objective function obtained by performing a non-unitary transformation on the original objective function.

[0113] Taking the Hamiltonian as an example, in the case of non-unitary transformation, for non-unitary W, it is not possible to simply use similarity transformation to ensure The energy spectrum remains unchanged, but it can still be applied to triple optimization. The lower bound is still the ground state energy. The understanding is as follows. At this time, we regard W as acting on the output state of VQNHE and as part of the state. That is, the normalized output state is:

[0114]

[0115] Then in this state, the corresponding The energy expectation is:

[0116]

[0117] That is, the molecule is measured on the VQNHE output state The expectation of, and the denominator is measured on the VQNHE state expectations.

[0118] In summary, the analytical expression for energy estimation combining VQNHE and parameterized Hamiltonian transformation is:

[0119]

[0120] in, refers to the diagonal matrix corresponding to the neural network post-processing, is the Hamiltonian of the system, and ρ is the density matrix corresponding to the output state of the parameterized quantum circuit PQC. After combining the parameterized objective function, the equivalent post-processing diagonal matrix Became more complex Enhanced capabilities for classical post-processing of quantum channels.

[0121] Step 520, post-processing the output quantum states of the n quantum bits using a neural network to obtain expected values ​​of multiple Pauli strings.

[0122] Optionally, a measurement result corresponding to an output quantum state of n quantum bits is obtained, and the measurement result may include multiple bit strings; the measurement result is processed by a neural network to obtain an output result of the neural network; and expected values ​​of multiple Pauli strings are calculated based on the output result of the neural network.

[0123] Step 530, performing weighted summation on the expected values ​​of the multiple Pauli strings according to the weight values ​​corresponding to the multiple Pauli strings, to obtain the expected value of the objective function; wherein the expected value of the objective function is the result of quantum error elimination of the noise of the parameterized quantum circuit by the neural network.

[0124] In this embodiment, the weight values ​​corresponding to each Pauli string are calculated based on the weight parameter. During the iterative optimization process, the weight parameter will also be iteratively updated, and the corresponding weight values ​​corresponding to each Pauli string will also change.

[0125] Step 540, adjusting the parameters of the target object with the goal of converging the expected value of the target function, where the target object includes a neural network.

[0126] For joint retraining, the target objects include parameterized quantum circuits and neural networks. With the goal of converging the expected value of the objective function, the parameters of the parameterized quantum circuits and the parameters of the neural network are adjusted respectively.

[0127] For neural network retraining, the target object includes the neural network but does not include the parameterized quantum circuit. The parameters of the neural network are adjusted with the goal of converging the expected value of the objective function.

[0128] In addition, regarding the method of adjusting the parameters of the parameterized quantum circuit and the parameters of the neural network, please refer to the introduction in the above embodiment, which will not be repeated here.

[0129] Step 550, adjusting the weight parameter with the goal of convergence of the expected value of the objective function; wherein the weight parameter is used to calculate the weight values ​​corresponding to the plurality of Pauli strings.

[0130] Optionally, a first derivative is calculated, where the first derivative refers to the derivative of the expected value of the objective function with respect to the weight parameter; based on the first derivative, the weight parameter is adjusted using a gradient descent method so that the expected value of the objective function converges.

[0131] Taking the Hamiltonian of the target quantum system as an example, the derivative of the energy expectation value of the Hamiltonian with respect to the weight parameter is calculated. Then, based on the derivative information, the weight parameter is adjusted using the gradient descent method to minimize the energy expectation value of the Hamiltonian.

[0132] Step 560, when the expected value of the objective function satisfies the convergence condition, obtain the convergence expected value of the objective function, where the convergence expected value refers to the expected value that satisfies the convergence condition.

[0133] This embodiment adjusts the weight parameters of the Pauli string synchronously during the neural network training process, so that the convergence expected value of the objective function obtained in the end is more accurate, and the error caused by noise is further reduced. In addition, a parameterized objective function is obtained by parameterizing the objective function, and it is ensured that the parameterized objective function and the original objective function have the same convergence expected value, but the parameterized objective function has stronger expression and error correction capabilities than the original objective function, thereby further improving the accuracy of the convergence expected value obtained in the end.

[0134] In some embodiments, Figure 6 As shown, it shows a schematic diagram of a complete triple optimization framework. Among them, structure a is the part of the parameterized quantum route, structure b is the part of the neural network, and structure c is the part of the parameterized objective function. The original objective function is parameterized to obtain a parameterized objective function, and the parameterized objective function has the same convergence expectation value as the original objective function. In the iterative optimization process of the variational framework, with the convergence of the expected value of the parameterized objective function as the goal, the parameters of the parameterized quantum circuit, the parameters of the neural network, and the weight parameters corresponding to the Pauli string are adjusted and optimized, thereby achieving a triple optimization with stronger expression and error correction capabilities, and fully reducing the errors caused by noisy hardware.

[0135] Figure 7 is a flowchart of an expectation value estimation method in a quantum system provided by another embodiment of the present application, which can be applied to Figure 1 In the VQNHE framework shown, the method may include the following steps (710-770):

[0136] Step 710, performing parameter transformation on the original objective function to obtain a parameterized objective function.

[0137] For example, a unitary transformation is performed on the original objective function to obtain a parameterized objective function. For another example, a non-unitary transformation is performed on the original objective function to obtain a parameterized objective function. The parameterized objective function and the original objective function have the same convergence expectation value. Moreover, the parameterized objective function can also be decomposed into multiple Pauli strings.

[0138] Taking the Hamiltonian of the target quantum system as an example, a unitary matrix in the same Hilbert space as the original Hamiltonian can be introduced, and the unitary matrix is ​​used to perform a unitary transformation on the original Hamiltonian to obtain a parameterized Hamiltonian. The parameterized Hamiltonian has the same energy spectrum and ground state as the original Hamiltonian, and the parameterized Hamiltonian still maintains the Pauli string of the polynomial terms.

[0139] Step 720, transforming the input quantum state of n quantum bits through a noisy parameterized quantum circuit to obtain an output quantum state of n quantum bits; wherein the expected value of the parameterized objective function under the output quantum state of n quantum bits is the weighted sum of the expected values ​​of multiple Pauli strings obtained by decomposing the parameterized objective function, and n is a positive integer.

[0140] Optionally, the parameterized objective function is decomposed to obtain multiple Pauli strings, and then the expected values ​​corresponding to the multiple Pauli strings are solved through the VQNHE framework.

[0141] Step 730, post-processing the output quantum states of the n quantum bits using a neural network to obtain expected values ​​of multiple Pauli strings.

[0142] Step 740, performing weighted summation on the expected values ​​of the multiple Pauli strings according to the weight values ​​corresponding to the multiple Pauli strings, to obtain the expected value of the parameterized objective function; wherein the expected value of the parameterized objective function is the result of quantum error elimination of the noise of the parameterized quantum circuit by the neural network.

[0143] Step 750, adjusting the parameters of the neural network with the goal of converging the expected value of the parameterized objective function.

[0144] Optionally, the parameters of the neural network are adjusted using the biased neural network retraining scheme described above, that is, only the parameterized quantum route is measured N times, the corresponding measurement results are recorded, and the corresponding expected values ​​are calculated. In each iteration, the same set of measurement results is used for post-processing of the neural network. In this way, the number of measurements can be fully reduced and the operation process can be simplified.

[0145] Optionally, with the goal of converging the expected value of the parameterized objective function, the parameters of the parameterized quantum circuit and the parameters of the neural network are adjusted respectively.

[0146] Step 760, adjusting the weight parameter with the goal of convergence of the expected value of the parameterized objective function; wherein the weight parameter is used to calculate the weight values ​​corresponding to the plurality of Pauli strings.

[0147] Step 770 , when the expected value of the parameterized objective function satisfies the convergence condition, obtain the converged expected value of the parameterized objective function, where the converged expected value refers to the expected value that satisfies the convergence condition.

[0148] For details not described in detail in this embodiment, please refer to the introduction and description in other embodiments above, which will not be repeated here.

[0149] In this embodiment, by adjusting the parameters of the neural network and the weight parameters corresponding to the Pauli string, a biased neural network is retrained, but the parameters of the parameterized quantum route that has a smaller impact on the error are not adjusted. While ensuring a strong error correction capability, the training process is simplified and resource consumption is reduced. At the same time, by parameterizing the objective function, the convergence value of the objective function is closer to the maximum or minimum value.

[0150] In an exemplary experiment, the QEM scheme based on the VQNHE framework combined with adaptive retraining provided by this application is applied to the transverse field Ising model. Considering the one-dimensional transverse field Ising model with five grid points and open boundaries, the objective function adopts Hamiltonian, and the parameterized Hamiltonian transformation used is the rotation of a single point, that is:

[0151]

[0152] The corresponding transformed Hamiltonian still has only polynomial terms:

[0153]

[0154] where Z and X represent Pauli operators, τ i and τ i+1 Represents a weight parameter, and the item in front of the Pauli string represents the weight value corresponding to each Pauli string obtained based on the weight parameter.

[0155] Consider adding degraded noise after the two-bit gate, and the corresponding experimental results of different retraining schemes are as follows: Figure 8 shown.

[0156] The q, n, and t in the figure represent parameterized quantum circuits, neural networks, and weight parameters, respectively. Figure 8 In the figure, line 81 represents the experimental result of adjusting only the weight parameters, i.e., t; line 82 represents the experimental result of adjusting only the parameters of the parameterized quantum route, i.e., q; line 83 represents the experimental result of adjusting only the parameters of the neural network, i.e., n; line 84 represents the experimental result of adjusting the parameters of the quantum route and the parameters of the neural network, i.e., q+n; line 85 represents the adjustment of the parameters of the neural network and the weight parameters, i.e., n+t; line 86 represents the adjustment of the parameters of the parameterized quantum route, the parameters of the neural network, and the weight parameters, i.e., triple optimization, i.e., q+n+t. It can be seen that the error correction effect of the pure classical n+t QEM that can be realized through biased retraining can be close to triple optimization, and has exceeded the traditional q+n joint retraining.

[0157] In another exemplary experiment, the QEM scheme based on the VQNHE framework combined with adaptive retraining provided by this application is applied to the Heisenberg model. Considering the Heisenberg model with six grid points and open boundaries, the objective function adopts the Hamiltonian, and the corresponding Hamiltonian is:

[0158]

[0159] Here, X, Y, and Z represent Pauli operators. Since the Heisenberg model has SU(2) symmetry, we adopted a parameterized quantum circuit structure consisting of the initial state of the Bell pair and the parameterized SWAP gate to maintain its symmetry and accelerate convergence. For the parameterized Hamiltonian transformation, we also adopted a geometrically compatible half-layer SWAP gate to ensure that the transformed Hamiltonian still has only the Pauli string of polynomial terms.

[0160] Among them, the SWAP gate is a swap gate, which is used to ensure that the transformed Hamiltonian still has only the Pauli string of polynomial terms.

[0161]

[0162] In addition, complex parameters are used for both neural networks and parameter transformation (non-unitary). The noise model still uses depolarization noise added after the two-bit gate of the parameterized quantum circuit. The experimental results given by different retraining schemes are as follows: Fig. 9 shown.

[0163] The q, n, and t in the figure represent parameterized quantum circuits, neural networks, and weight parameters, respectively. Fig. 9 In the figure, line 90 represents the energy value corresponding to the optimal parameters in the noise-free case under different noise conditions. Line 91 represents the experimental results of adjusting only the parameters of the parameterized quantum route, i.e., q; line 92 represents the experimental results of adjusting only the weight parameters, i.e., t; line 93 represents the experimental results of adjusting the parameters and weight parameters of the parameterized quantum route, i.e., q+t; line 94 represents the experimental results of adjusting only the parameters of the neural network, i.e., n; line 95 represents the experimental results of adjusting the parameters of the parameterized quantum route and the parameters of the neural network, i.e., joint retraining, i.e., q+n; line 96 represents the experimental results of adjusting the parameters and weight parameters of the neural network, i.e., n+t; line 97 represents the adjustment of the parameters of the parameterized quantum route, the parameters of the neural network, and the weight parameters, i.e., triple optimization, i.e., q+n+t. It can be seen that the pure classical n+t QEM can be realized through biased retraining, and the error correction effect can be close to triple optimization, and has exceeded the traditional q+n joint retraining.

[0164] Figure 8 and Fig. 9 Experiments have shown that the QEM scheme corresponding to VQNHE has a very efficient error correction effect, and this feature is unique to VQNHE. For energy estimation, after adding neural network post-processing, significant improvement over standard VQE estimation can be achieved on noisy quantum hardware. The triple optimization framework of parameterized Hamiltonian + VQNHE gives better approximate expression ability and error correction effect than VQNHE.

[0165] The following is a system embodiment of the present application. The system embodiment corresponds to the above-mentioned method embodiment and belongs to the same inventive concept. For details not described in detail in the system embodiment, please refer to the method embodiment of the present application.

[0166] An exemplary embodiment of the present application also provides an expectation value estimation system in a quantum system, which may include: a parameterized quantum route with noise, a post-processing module, and an optimizer;

[0167] The parameterized quantum circuit is used to transform the input quantum state of n quantum bits to obtain the output quantum state of n quantum bits; wherein the expected value of the objective function under the output quantum state of n quantum bits is the weighted sum of the expected values ​​of multiple Pauli strings obtained by decomposing the objective function, and n is a positive integer;

[0168] The post-processing module is used to post-process the output quantum state of n quantum bits by using a neural network to obtain the expected values ​​of multiple Pauli strings; according to the expected values ​​of multiple Pauli strings, the expected value of the objective function is calculated; wherein the expected value of the objective function is the result of quantum error elimination of the noise of the parameterized quantum circuit by the neural network;

[0169] The optimizer is used to adjust the parameters of the target object with the goal of converging the expected value of the objective function, and the target object includes a neural network; when the expected value of the objective function meets the convergence condition, the convergence expected value of the objective function is obtained, and the convergence expected value refers to the expected value that meets the convergence condition.

[0170] In some embodiments, the objective function is a parameterized objective function, which is an objective function obtained by performing parameter transformation on the original objective function; wherein the parameterized objective function and the original objective function have the same convergence expected value.

[0171] In some embodiments, the parameterized objective function is an objective function obtained by performing a unitary transformation on the original objective function.

[0172] In some embodiments, the parameterized objective function is an objective function obtained by performing a non-unitary transformation on the original objective function.

[0173] In some embodiments, the post-processing module is used to perform weighted summation on the expected values ​​of the multiple Pauli strings according to the weight values ​​corresponding to the multiple Pauli strings respectively, so as to obtain the expected value of the objective function.

[0174] In some embodiments, the optimizer is further used to adjust the weight parameters with the goal of converging the expected value of the objective function; wherein the weight parameters are used to calculate the weight values ​​corresponding to the multiple Pauli strings respectively.

[0175] In some embodiments, the optimizer is used to:

[0176] Calculate the first derivative, which refers to the derivative of the expected value of the objective function with respect to the weight parameter;

[0177] Based on the first derivative, the gradient descent method is used to adjust the weight parameters so that the expected value of the objective function converges.

[0178] In some embodiments, the post-processing module is used to:

[0179] Obtain the measurement results corresponding to the output quantum states of n quantum bits;

[0180] The measurement results are processed by the neural network to obtain the output results of the neural network;

[0181] The expected values ​​of multiple Pauli strings are calculated based on the output results of the neural network;

[0182] Here, the same measurement results are used as input to the neural network before and after the parameters of the neural network are adjusted.

[0183] In some embodiments, the target object also includes a parameterized quantum circuit.

[0184] In some embodiments, the optimizer is used to:

[0185] Calculate the second derivative and the third derivative, the second derivative refers to the derivative of the expected value of the objective function with respect to the parameters of the parameterized quantum circuit, and the third derivative refers to the derivative of the expected value of the objective function with respect to the parameters of the neural network;

[0186] Based on the second derivative and the third derivative, the gradient descent method is used to adjust the parameters of the parameterized quantum circuit and the parameters of the neural network respectively so that the expected value of the objective function converges.

[0187] It should be understood that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. In addition, the step numbers described in this article only illustrate a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to the diagram. The embodiments of the present application are not limited to this.

[0188] The above are merely exemplary embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.< / h>

Claims

1. A method for estimating expected value in a quantum system, characterized in that: The method comprises: The input quantum state of n quantum bits is transformed through a noisy parameterized quantum circuit to obtain an output quantum state of the n quantum bits; wherein the expected value of the objective function under the output quantum state of the n quantum bits is a weighted sum of the expected values ​​of multiple Pauli strings obtained by decomposing the objective function, and n is a positive integer; Post-processing the output quantum states of the n quantum bits using a neural network to obtain expected values ​​of the multiple Pauli strings; Calculating the expected value of the objective function according to the expected values ​​of the multiple Pauli strings; wherein the expected value of the objective function is the result of quantum error elimination of the noise of the parameterized quantum circuit by the neural network; Calculating a second derivative and a third derivative, wherein the second derivative refers to a derivative of an expected value of the objective function with respect to a parameter of the parameterized quantum circuit, and the third derivative refers to a derivative of an expected value of the objective function with respect to a parameter of the neural network; Based on the second derivative and the third derivative, the parameters of the parameterized quantum circuit and the parameters of the neural network are adjusted respectively by using a gradient descent method so that the expected value of the objective function converges; In the case that the expected value of the objective function satisfies a convergence condition, a convergence expected value of the objective function is obtained, where the convergence expected value refers to an expected value that satisfies the convergence condition.

2. The method according to claim 1, characterized in that The objective function is a parameterized objective function, which is an objective function obtained by performing parameter transformation on the original objective function; wherein the parameterized objective function and the original objective function have the same convergence expected value.

3. The method according to claim 2, characterized in that The parameterized objective function is an objective function obtained by performing a unitary transformation on the original objective function; or, The parameterized objective function is an objective function obtained by performing a non-unitary transformation on the original objective function.

4. The method according to claim 1, characterized in that: The calculating the expected value of the objective function according to the expected values ​​of the multiple Pauli strings comprises: According to the weight values ​​respectively corresponding to the multiple Pauli strings, the expected values ​​of the multiple Pauli strings are weightedly summed to obtain the expected value of the objective function.

5. The method according to claim 4, characterized in that The method further comprises: The weight parameter is adjusted with the goal of converging the expected value of the objective function; wherein the weight parameter is used to calculate the weight values ​​corresponding to the multiple Pauli strings respectively.

6. The method according to claim 5, characterized in that The step of adjusting the weight parameters with the goal of converging the expected value of the objective function includes: Calculating a first derivative, where the first derivative refers to a derivative of an expected value of the objective function with respect to the weight parameter; Based on the first derivative, the weight parameter is adjusted by using a gradient descent method so that the expected value of the objective function converges.

7. The method according to claim 1, characterized in that The post-processing of the output quantum states of the n quantum bits by using a neural network to obtain expected values ​​of the multiple Pauli strings includes: Obtaining measurement results corresponding to the output quantum states of the n quantum bits; Processing the measurement result through the neural network to obtain an output result of the neural network; Calculating expected values ​​of the plurality of Pauli strings based on output results of the neural network; Wherein, before and after the parameters of the neural network are adjusted, the same measurement results are used as input into the neural network.

8. An expectation value estimation system in a quantum system, characterized in that: The system includes: a parameterized quantum route with noise, a post-processing module and an optimizer; The parameterized quantum circuit is used to transform the input quantum state of n quantum bits to obtain the output quantum state of the n quantum bits; wherein the expected value of the objective function under the output quantum state of the n quantum bits is the weighted sum of the expected values ​​of multiple Pauli strings obtained by decomposing the objective function, and n is a positive integer; The post-processing module is used to post-process the output quantum states of the n quantum bits using a neural network to obtain the expected values ​​of the multiple Pauli strings; and calculate the expected value of the objective function according to the expected values ​​of the multiple Pauli strings; wherein the expected value of the objective function is the result of quantum error elimination of the noise of the parameterized quantum circuit by the neural network; The optimizer is used to calculate a second derivative and a third derivative, wherein the second derivative refers to a derivative of an expected value of the objective function with respect to a parameter of the parameterized quantum circuit, and the third derivative refers to a derivative of an expected value of the objective function with respect to a parameter of the neural network; based on the second derivative and the third derivative, the parameters of the parameterized quantum circuit and the parameters of the neural network are adjusted respectively by a gradient descent method so that the expected value of the objective function converges; when the expected value of the objective function satisfies a convergence condition, a converged expected value of the objective function is obtained, wherein the converged expected value refers to an expected value that satisfies the convergence condition.

9. The system according to claim 8, characterized in that The objective function is a parameterized objective function, which is an objective function obtained by performing parameter transformation on the original objective function; wherein the parameterized objective function and the original objective function have the same convergence expected value.

10. The system according to claim 9, characterized in that The parameterized objective function is an objective function obtained by performing a unitary transformation on the original objective function; or, The parameterized objective function is an objective function obtained by performing a non-unitary transformation on the original objective function.

11. The system according to claim 8, characterized in that The post-processing module is used to perform weighted summation on the expected values ​​of the multiple Pauli strings according to the weight values ​​respectively corresponding to the multiple Pauli strings, so as to obtain the expected value of the objective function.

12. The system according to claim 11, characterized in that The optimizer is further used to adjust the weight parameters with the convergence of the expected value of the objective function as the goal; wherein the weight parameters are used to calculate the weight values ​​corresponding to the multiple Pauli strings respectively.

13. The system according to claim 12, characterized in that The optimizer is used to: Calculating a first derivative, where the first derivative refers to a derivative of an expected value of the objective function with respect to the weight parameter; Based on the first derivative, the weight parameter is adjusted by using a gradient descent method so that the expected value of the objective function converges.

14. The system according to claim 8, characterized in that The post-processing module is used for: Obtaining measurement results corresponding to the output quantum states of the n quantum bits; Processing the measurement result through the neural network to obtain an output result of the neural network; Calculating expected values ​​of the plurality of Pauli strings based on output results of the neural network; Wherein, before and after the parameters of the neural network are adjusted, the same measurement results are used as input into the neural network.