Quantum system eigenstate acquisition method and device, computer equipment and storage medium
By constructing and optimizing quantum circuits, calculating the probability distribution and loss function of the quantum system, and performing gradient descent optimization, the problem of difficulty in preparing arbitrary excited states of quantum systems in the prior art is solved, and the efficiency of preparing eigenstates on quantum computers is improved.
Patent Information
- Application Number
- CN202411317468.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2024-12-20
AI Technical Summary
The existing quantum computing methods are difficult to prepare any excited state of the quantum system, and preparing multiple excited states requires multiple variational optimization processes, which is inefficient.
By constructing probability distributions, initializing equal probability distributions, building quantum circuits, sampling bit strings, calculating target loss function and gradient value, and performing gradient descent optimization until the variable free energy of the quantum circuit model converges, and obtaining the decreasingly sorted bit string as calculation The corresponding energy eigenstate is obtained on the sorted calculation basis through the action of the quantum circuit.
It realizes that any eigenstate of the target quantum system can be prepared in a quantum computer with just one gradient descent optimization process, which improves efficiency and reduces time and quantum resource consumption.
Smart Images

Figure CN119168078A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of quantum computing technology, and in particular to a method, device, computer equipment and storage medium for acquiring eigenstates of a quantum system. Background Art
[0002] Quantum computing is a new computing technology that is expected to surpass classical computing technology in solving some complex problems. Quantum computing uses quantum superposition principle and quantum entanglement as computing resources and has natural parallel computing capabilities. At present, the development of quantum computing is in the noisy medium-scale stage. The main goal of this stage is to use quantum computing as a means to assist classical computers and provide quantum acceleration in the process of solving certain problems. At this stage, the research and development of quantum algorithms tends to be classical-quantum hybrid variational quantum algorithms. There are many types of variational quantum algorithms, which can be applied to various practical problems, such as quantum chemistry simulation, quantum finance, and new drug development. Among them, quantum machine learning and quantum neural networks use quantum circuits as part of classical neural networks, bringing new development directions for artificial intelligence and deep learning technology. The current methods for solving eigenstates are mainly variational quantum eigensolver and its derivative methods. In addition, there are methods that do not contain variational processes, such as quantum imaginary time evolution. Existing methods on quantum computers can often only prepare the ground state or certain low-energy excited states of a quantum system, but cannot prepare arbitrary excited states of a quantum system, and preparing multiple excited states requires multiple variational optimization processes. Summary of the invention
[0003] Based on this, a method, device, computer equipment and storage medium for obtaining the eigenstate of a quantum system are provided to solve the technical problem that existing methods on quantum computers can often only prepare the ground state or certain low-energy excited states of a quantum system, but cannot obtain any excited state of the quantum system.
[0004] On the one hand, a method for obtaining an eigenstate of a quantum system is provided, the method comprising:
[0005] Constructing a probability distribution, and initializing the probability distribution to obtain an equal probability distribution;
[0006] Constructing a quantum circuit, sampling a bit string of the equal probability distribution and generating an initial quantum state, and applying the initial quantum state to the quantum circuit to obtain an initial state effect result;
[0007] Calculate the target loss function and the gradient value of the target loss function according to the initial state action result;
[0008] Inputting the gradient value of the target loss function into a gradient descent optimizer for gradient descent optimization until the variational free energy of the quantum circuit model converges, and obtaining the probability of the bit string and the quantum circuit obtained by variation;
[0009] The probabilities of the bit strings are sorted in descending order, the bit strings in descending order are obtained as a calculation basis, and the corresponding energy eigenstates are obtained by applying the quantum circuits obtained by variation to the sorted calculation basis.
[0010] In one embodiment, the steps of constructing a probability distribution and initializing the probability distribution to obtain an equal probability distribution include:
[0011] Let the probability distribution be p φ (x), carrying the variational parameter φ, where φ i ∈[0,1] represents the i-th bit x i The probability of being 1, x is a bit string, x i is the i-th bit;
[0012] Use the activation function to convert φ i Parameterized as φ i (a) = 1 / (1 + e -a ), where a is a parameter;
[0013] Initialize all parameters a to 0 and initialize the probability distribution p φ (x) is an equiprobable distribution.
[0014] In one embodiment, the steps of constructing a quantum circuit, sampling a bit string of the equal probability distribution and generating an initial quantum state, and applying the initial quantum state to the quantum circuit to obtain an initial state action result include:
[0015] According to the form of the target Hamiltonian, the quantum circuit is constructed as Carrying the variational parameter θ, where the variational parameter θ is the angle parameter on the single-bit rotating door;
[0016] For the probability distribution, let p φ (x) Sampling the bit string x and generating the corresponding initial quantum state |x>;
[0017] Apply the initial quantum state |x> to the quantum circuit to obtain the initial state action result.
[0018] In one embodiment, the step of calculating the target loss function and the gradient value of the target loss function according to the initial state action result includes:
[0019] The target loss function is the variational free energy, and the formula of the target loss function is:
[0020] where is the mathematical expectation when the probability distribution of the bit string x satisfies p φ (x), is the Hamiltonian of the target quantum system, β is the reciprocal of the temperature,
[0021] The formula for the gradient value of the target loss function is: where is the variational free energy, is the mathematical expectation when the probability distribution of the bit string x satisfies p φ , H is the Hamiltonian, is the Hermitian conjugate of, |x> and <x| are the initial quantum state and its Hermitian conjugate respectively;
[0022] Based on the average energy then where
[0023] Calculate lnp related to entropy in the variational free energy φ (x) and
[0024] Take and Perform sample averaging to obtain the gradient value of the target loss function.
[0025] In one embodiment, in the step of obtaining the gradient value of the target loss function, is calculated by the parameter translation rule, where
[0026] In one embodiment, the steps of inputting the gradient value of the target loss function into a gradient descent optimizer for gradient descent optimization until the variational free energy of the quantum circuit model converges to obtain the probability of the bit string and the variational quantum circuit include:
[0027] Input the calculated gradient value into a gradient descent optimizer for gradient descent optimization to obtain new variational parameters, and update the probability distribution p φ (x) and the quantum circuit
[0028] Repeat the calculation of the gradient value and execute the previous step for gradient descent optimization until the variational free energy of the quantum circuit model converges.
[0029] In one embodiment, the step of sorting the probabilities of the bit strings in descending order, obtaining the descending ordered bit strings as a calculation basis, and obtaining the corresponding energy eigenstates by applying the quantum circuits obtained by variation to the sorted calculation basis comprises:
[0030] The density matrix of the target quantum system at a certain temperature is expressed as in is the Hamiltonian of the target quantum system, β is the inverse of temperature, is the partition function of the quantum system;
[0031] According to the ensemble representation of quantum mixed states, Representing the variational assumption of the corresponding problem, we get Where E n is the energy of the nth eigenstate |n> of the quantum system, and the function With the quantum system energy E n Monotonically decreasing;
[0032] Among them, the nth eigenstate |n> of the quantum system is obtained by:
[0033] Take the bit string x as the calculation basis and get all the calculation basis probabilities And sort them from large to small, the order of the sorted bit string x is the order of the energy of the quantum system from low to high after removing the energy degenerate state;
[0034] After sorting The bit string x corresponding to the nth probability in n Take it out and use the optimized quantum circuit to prepare the state Get the nth eigenstate |n>.
[0035] On the other hand, a device for obtaining eigenstates of a quantum system is provided, the device comprising:
[0036] A classic probability generation module is used to construct a probability distribution and initialize the probability distribution to obtain an equal probability distribution;
[0037] A loss function and gradient calculation module is used to construct a quantum circuit, sample a bit string of the equal probability distribution and generate an initial quantum state, apply the initial quantum state to the quantum circuit to obtain an initial state action result; and calculate a target loss function and a gradient value of the target loss function according to the initial state action result;
[0038] An optimization processing module, used for inputting the gradient value of the target loss function into a gradient descent optimizer for gradient descent optimization, until the variational free energy of the quantum circuit model converges, and obtaining the probability of the bit string and the quantum circuit obtained by variation;
[0039] The quantum state calculation module is used to sort the probabilities of the bit strings in descending order, obtain the descendingly sorted bit strings as a calculation basis, and obtain the corresponding energy eigenstate by applying the quantum circuit obtained by variation to the sorted calculation basis.
[0040] In another aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0041] Constructing a probability distribution, and initializing the probability distribution to obtain an equal probability distribution;
[0042] Constructing a quantum circuit, sampling a bit string of the equal probability distribution and generating an initial quantum state, and applying the initial quantum state to the quantum circuit to obtain an initial state effect result;
[0043] Calculate the target loss function and the gradient value of the target loss function according to the initial state action result;
[0044] Inputting the gradient value of the target loss function into a gradient descent optimizer for gradient descent optimization until the variational free energy of the quantum circuit model converges, and obtaining the probability of the bit string and the quantum circuit obtained by variation;
[0045] The probabilities of the bit strings are sorted in descending order, the bit strings in descending order are obtained as a calculation basis, and the corresponding energy eigenstates are obtained by applying the quantum circuits obtained by variation to the sorted calculation basis.
[0046] In another aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0047] Constructing a probability distribution, and initializing the probability distribution to obtain an equal probability distribution;
[0048] Constructing a quantum circuit, sampling a bit string of the equal probability distribution and generating an initial quantum state, and applying the initial quantum state to the quantum circuit to obtain an initial state effect result;
[0049] Calculate the target loss function and the gradient value of the target loss function according to the initial state action result;
[0050] Inputting the gradient value of the target loss function into a gradient descent optimizer for gradient descent optimization until the variational free energy of the quantum circuit model converges, and obtaining the probability of the bit string and the quantum circuit obtained by variation;
[0051] The probabilities of the bit strings are sorted in descending order, the bit strings in descending order are obtained as a calculation basis, and the corresponding energy eigenstates are obtained by applying the quantum circuits obtained by variation to the sorted calculation basis.
[0052] The above-mentioned method, device, computer equipment and storage medium for obtaining the eigenstate of a quantum system can prepare any eigenstate of the target quantum system by performing only one gradient descent optimization process, which greatly improves the efficiency of preparing the eigenstate of the quantum system on a quantum computer and reduces the consumption of time resources and quantum resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0054] Figure 1 This is an application environment diagram of a method for acquiring eigenstates of a quantum system in one embodiment of the present application;
[0055] Figure 2 This is a flow chart of a method for obtaining eigenstates of a quantum system in one embodiment of the present application;
[0056] Figure 3 This is a structural block diagram of a device for acquiring eigenstates of a quantum system in one embodiment of the present application;
[0057] Figure 4 This is a diagram of the internal structure of a computer device in one embodiment of the present application. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0059] The method for obtaining the eigenstate of a quantum system provided in this application can be applied to Figure 1 In the application environment shown in the figure, the classical probability generation module calculates the classical probability p φ (x) and generate a sample x according to the probability distribution, which is input into the quantum state calculation module for calculation The quantum state calculation module can be a device that provides quantum circuit execution such as quantum hardware, quantum simulator backend or quantum cloud platform backend, which is called quantum processor QPU. The loss function and gradient calculation module accepts the measurement results returned by the quantum processor QPU and the classical probability calculation loss function and gradient input into the classical optimizer, and the classical optimizer generates new variational parameters θ and φ for the next round of optimization. The classical optimizer is preferably a gradient descent optimizer. Finally, the quantum state calculation module generates the corresponding quantum eigenstate.
[0060] The variational quantum thermalization method is a variational quantum algorithm used to prepare finite-temperature quantum states. In the present invention, the variational quantum thermalization method is applied to the preparation of eigenstates of quantum systems.
[0061] Variational quantum algorithms are a type of quantum algorithm suitable for the era of noisy medium-scale quantum computing. Unlike traditional quantum algorithms such as Shor's algorithm and Grover's algorithm, variational quantum algorithms do not rely on fault-tolerant quantum bits. The noise in existing quantum computers has less impact on them than traditional quantum algorithms, so it is easier for them to exert quantum advantages over noisy quantum computers. The process of applying variational quantum algorithms to a problem is as follows: select a parameterized quantum circuit U(θ) as the variational assumption of the problem, and encode the parameter θ corresponding to the classical problem into the quantum circuit. The loss function or gradient of the corresponding problem is obtained by measuring the quantum state obtained by running the quantum circuit. Use a classical optimizer to optimize the loss function (generally a gradient descent algorithm) to obtain new parameters. Use the new parameterized circuit to further iterate until the loss function converges.
[0062] In the quantum thermalization method, the density matrix of the target system at a certain temperature is expressed as in is the Hamiltonian of the target system, β is the inverse of temperature, is the partition function of the system. According to the ensemble representation of quantum mixed states, To represent the variational assumption of the problem, the variational assumption is different from the general assumption in that it contains the classic probability assumption p φ (x). Where {|x>} represents a set of computational bases of the system, p φ (x) is the probability distribution of the quantum ensemble, carrying the variational parameter φ, is a variational quantum circuit, carrying a variational parameter θ. According to the variational principle of quantum mechanics, the loss function of this variational problem is the variational free energy, which can be written as The probability distribution of the bit string x satisfies p φ (x), is the Hamiltonian of the target quantum system, β is the inverse of temperature,
[0063] The target density matrix can be obtained by optimizing the loss function.
[0064] In one embodiment, Figure 2 As shown, a method for obtaining the eigenstate of a quantum system is provided, comprising the following steps:
[0065] Step S1, constructing a probability distribution, and initializing the probability distribution to obtain an equal probability distribution;
[0066] Step S2, constructing a quantum circuit, sampling bit strings of the equal probability distribution and generating an initial quantum state, and applying the initial quantum state to the quantum circuit to obtain an initial state action result;
[0067] Step S3, calculating the target loss function and the gradient value of the target loss function according to the initial state action result;
[0068] Step S4, inputting the gradient value of the target loss function into a gradient descent optimizer for gradient descent optimization until the variational free energy of the quantum circuit model converges, and obtaining the probability of the bit string and the quantum circuit obtained by variation;
[0069] Step S5, sorting the probabilities of the bit strings in descending order, obtaining the descendingly sorted bit strings as a calculation basis, and obtaining corresponding energy eigenstates by applying the quantum circuits obtained by variation to the sorted calculation basis.
[0070] Specifically, only one gradient descent optimization process is required to prepare any eigenstate of the target quantum system, which greatly improves the efficiency of preparing the eigenstates of the quantum system on a quantum computer and reduces the consumption of time and quantum resources.
[0071] In this embodiment, the steps of constructing a probability distribution and initializing the probability distribution to obtain an equal probability distribution include:
[0072] Let the probability distribution be p φ (x), carrying the variational parameter φ, where φ i ∈[0,1] represents the i-th bit x i The probability of being 1, x is a bit string, x i is the i-th bit;
[0073] Use the activation function to convert φ i Parameterized as φ i (a) = 1 / (1 + e -a ), where a is a parameter;
[0074] Initialize all parameters a to 0 and initialize the probability distribution p φ(x) is an equiprobable distribution.
[0075] The quantum ensemble composed of classical probability distribution and quantum pure state is used as a variational quantum hypothesis. The bit string x is a character string.
[0076] Preferably, the activation function is a sigmoid function. The classical probability distribution takes the form of a product, and the sigmoid function is used to convert the constrained optimization problem into an unconstrained optimization problem. In order to obtain an equal probability distribution, all a are initialized to 0.
[0077] In this embodiment, the steps of constructing a quantum circuit, sampling a bit string of the equal probability distribution and generating an initial quantum state, and applying the initial quantum state to the quantum circuit to obtain an initial state action result include:
[0078] According to the form of the target Hamiltonian, the quantum circuit is constructed as Carrying the variational parameter θ, where the variational parameter θ is the angle parameter on the single-bit rotating door;
[0079] For the probability distribution, let p φ (x) Sampling the bit string x and generating the corresponding initial quantum state |x>;
[0080] Apply the initial quantum state |x> to the quantum circuit to obtain the initial state action result.
[0081] The parameter θ corresponding to the classical problem is encoded into the quantum circuit. The loss function or gradient of the corresponding problem is obtained by measuring the quantum state obtained by running the quantum circuit.
[0082] In this embodiment, the step of calculating the target loss function and the gradient value of the target loss function according to the initial state action result includes:
[0083] The objective loss function is the variational free energy, and the formula of the objective loss function is:
[0084] in The probability distribution of the bit string x satisfies p φ (x), is the Hamiltonian of the target quantum system, β is the inverse of temperature,
[0085] The formula for the gradient value of the target loss function is: in is the variational free energy, The probability distribution of the bit string x satisfies p φ , H is the Hamiltonian, for Hermitian conjugate, |x> and <x| are the initial quantum state and its Hermitian conjugate respectively;
[0086] Based on the average energy Then Where
[0087] Calculate lnp related to entropy in the variational free energy φ (x) and
[0088] Let and Perform sample averaging to obtain the gradient value of the target loss function.
[0089] Where Is calculated by the parameter shift rule, that is
[0090] Among them, the final state is obtained by applying a quantum circuit to the sampled initial state, the average energy is calculated using a quantum computer, and the part related to entropy in the loss function is calculated using a classical computer. The value of the loss function and the gradient value of the current step are obtained by averaging all the sampling results.
[0091] In this embodiment, the steps of inputting the gradient value of the target loss function into a gradient descent optimizer for gradient descent optimization until the variational free energy of the quantum circuit model converges to obtain the probability of the bit string and the variational quantum circuit include:
[0092] Input the calculated gradient value into a gradient descent optimizer for gradient descent optimization to obtain new variational parameters and update the probability distribution p φ (x) and the quantum circuit
[0093] Repeat the calculation of the gradient value and perform the previous step for gradient descent optimization until the variational free energy of the quantum circuit model converges.
[0094] Among them, the loss function is optimized using a classical optimizer, and the optimization method is the gradient descent algorithm to obtain new parameters.
[0095] More specifically, the step of repeating the calculation of the gradient value and performing the previous step for gradient descent optimization until the variational free energy of the quantum circuit model converges includes:
[0096] Obtain the gradient value after gradient descent optimization and judge whether the variational free energy corresponding to the current gradient value converges;
[0097] If it converges, the finite-temperature density matrix of the quantum system represented by the pure state ensemble is obtained, and its form is where φ * and θ * To optimize the variational parameters, |x> represents a set of computational bases of the quantum system;
[0098] If it does not converge, the current gradient value is input into the gradient descent optimizer again for gradient descent optimization to obtain new variational parameters and update the probability distribution p. φ (x) and quantum circuits
[0099] Re-obtain the gradient value after gradient descent optimization, and determine whether the variational freedom corresponding to the current gradient value has converged, until the variational freedom converges.
[0100] Among them, the new parameterized circuit is further iterated until the loss function converges. Each iteration obtains new parameters, calculates the current gradient value, and judges whether the variational freedom corresponding to the current gradient value converges based on the current gradient value. Iterates multiple times until the variational freedom converges, and obtains the finite temperature density matrix of the quantum system represented by the pure state ensemble.
[0101] After the optimization step is completed, the finite temperature density matrix of the system represented by the pure state ensemble is obtained, which is in the form of where φ * and θ * is the optimized variational parameter. If the optimization is accurate enough, we will get Where E n is the energy of the nth eigenstate |n> of the system.
[0102] In this embodiment, the steps of sorting the probabilities of the bit strings in descending order, obtaining the descending sorted bit strings as a calculation basis, and obtaining the corresponding energy eigenstates by applying the quantum circuits obtained by variation to the sorted calculation basis include:
[0103] The density matrix of the target quantum system at a certain temperature is expressed as in is the Hamiltonian of the target quantum system, β is the inverse of temperature, is the partition function of the quantum system;
[0104] According to the ensemble representation of quantum mixed states, Representing the variational assumption of the corresponding problem, we get Where E n is the energy of the nth eigenstate |n> of the quantum system, and the function With the quantum system energy E n Monotonically decreasing;
[0105] Among them, the nth eigenstate |n> of the quantum system is obtained by:
[0106] Take the bit string x as the calculation basis and get all the calculation basis probabilities And sort them from large to small, the order of the sorted bit string x is the order of the energy of the quantum system from low to high after removing the energy degenerate state;
[0107] After sorting The bit string x corresponding to the nth probability in n Take it out and use the optimized quantum circuit to prepare the state Get the nth eigenstate |n>.
[0108] It should be noted that due to can be calculated using classical computers, and the function With the system energy E n is monotonically decreasing. In this way, any eigenstate of the system |n> can be obtained by the following steps: For all calculation bases, that is, bit strings x, calculate the basis probability And sort them from large to small, and the order of the corresponding sorted bit string x is the order of the system energy from low to high (excluding energy degenerate states). To get the nth eigenstate, just sort the sorted The bit string x corresponding to the nth probability in n Take it out and use the optimized quantum circuit to prepare the state That's it.
[0109] In the above-mentioned method for obtaining the eigenstates of a quantum system, only one gradient descent optimization process is required to prepare any eigenstate of the target quantum system, which greatly improves the efficiency of preparing the eigenstates of the quantum system on a quantum computer and reduces the consumption of time resources and quantum resources.
[0110] In one embodiment, Figure 3 As shown, a device 10 for acquiring eigenstates of a quantum system is provided, comprising: a classical probability generation module 1, a loss function and gradient calculation module 2, an optimization processing module 3, and a quantum state calculation module 4.
[0111] The classical probability generation module 1 is used to construct a probability distribution and initialize the probability distribution to obtain an equal probability distribution.
[0112] The loss function and gradient calculation module 2 is used to construct a quantum circuit, sample the bit string of the equal probability distribution and generate an initial quantum state, apply the initial quantum state to the quantum circuit to obtain the initial state action result; and calculate the target loss function and the gradient value of the target loss function according to the initial state action result.
[0113] The optimization processing module 3 is used to input the gradient value of the target loss function into the gradient descent optimizer for gradient descent optimization until the variational free energy of the quantum circuit model converges, thereby obtaining the probability of the bit string and the quantum circuit obtained by variation.
[0114] The quantum state calculation module 4 is used to sort the probabilities of the bit strings in descending order, obtain the descendingly sorted bit strings as a calculation basis, and obtain the corresponding energy eigenstate by applying the quantum circuit obtained by variation to the sorted calculation basis.
[0115] In this embodiment, the steps of constructing a probability distribution and initializing the probability distribution to obtain an equal probability distribution include:
[0116] The probability distribution is assumed to be p φ (x), carrying the variational parameter φ, where φ i ∈[0,1] represents the i-th bit x i The probability of being 1, x is a bit string, x i is the i-th bit;
[0117] Use the activation function to convert φ i Parameterized as φ i (a) = 1 / (1 + e -a ), where a is a parameter;
[0118] Initialize all parameters a to 0 and initialize the probability distribution p φ (x) is an equiprobable distribution.
[0119] In this embodiment, the steps of constructing a quantum circuit, sampling a bit string of the equal probability distribution and generating an initial quantum state, and applying the initial quantum state to the quantum circuit to obtain an initial state action result include:
[0120] According to the form of the target Hamiltonian, the quantum circuit is constructed as Carrying the variational parameter θ, where the variational parameter θ is the angle parameter on the single-bit rotating gate;
[0121] For the probability distribution, let p φ (x) Sampling the bit string x and generating the corresponding initial quantum state |x>;
[0122] Apply the initial quantum state |x> to the quantum circuit to obtain the initial state action result.
[0123] In this embodiment, the step of calculating the target loss function and the gradient value of the target loss function according to the initial state action result includes:
[0124] The target loss function is the variational free energy, and the formula of the target loss function is:
[0125] where is the mathematical expectation when the probability distribution of the bit string x satisfies p φ (x), is the Hamiltonian of the target quantum system, β is the reciprocal of the temperature,
[0126] The formula for the gradient value of the target loss function is: where is the variational free energy, is the mathematical expectation when the probability distribution of the bit string x satisfies p φ , H is the Hamiltonian, is the Hermitian conjugate of, |x> and <x| are the initial quantum state and its Hermitian conjugate respectively;
[0127] Based on the average energy then where
[0128] Calculate lnp related to entropy in the variational free energy φ (x) and
[0129] Take lnp φ (x) and for sample averaging to obtain the gradient value of the target loss function.
[0130] where is calculated by the parameter shift rule, that is
[0131] In this embodiment, the steps of inputting the gradient value of the target loss function into a gradient descent optimizer for gradient descent optimization until the variational free energy of the quantum circuit model converges to obtain the probability of the bit string and the quantum circuit obtained by variational include:
[0132] Input the calculated gradient value into a gradient descent optimizer for gradient descent optimization to obtain new variational parameters, and update the probability distribution p φ (x) and the quantum circuit
[0133] Repeat the calculation of the gradient value and execute the previous step for gradient descent optimization until the variational free energy of the quantum circuit model converges to obtain the finite-temperature density matrix of the quantum system represented by the pure state ensemble, in the form of where φ * and θ * To optimize the variational parameters, |x> represents a set of computational bases of the quantum system.
[0134] In this embodiment, the steps of sorting the probabilities of the bit strings in descending order, obtaining the descending sorted bit strings as a calculation basis, and obtaining the corresponding energy eigenstates by applying the quantum circuits obtained by variation to the sorted calculation basis include:
[0135] The density matrix of the target quantum system at a certain temperature is expressed as in is the Hamiltonian of the target quantum system, β is the inverse of temperature, is the partition function of the quantum system;
[0136] According to the ensemble representation of quantum mixed states, Representing the variational assumption of the corresponding problem, we get Where E n is the energy of the nth eigenstate |n> of the quantum system, and the function With the quantum system energy E n Monotonically decreasing;
[0137] Among them, the nth eigenstate |n> of the quantum system is obtained by:
[0138] Take the bit string x as the calculation basis and get all the calculation basis probabilities And sort them from large to small, the order of the sorted bit string x is the order of the energy of the quantum system from low to high after removing the energy degenerate state;
[0139] After sorting The bit string x corresponding to the nth probability in n Take it out and use the optimized quantum circuit to prepare the state Get the nth eigenstate |n>.
[0140] In the above-mentioned quantum system eigenstate acquisition device, only one gradient descent optimization process is required to prepare any eigenstate of the target quantum system, which greatly improves the efficiency of preparing the eigenstate of the quantum system on the quantum computer and reduces the consumption of time resources and quantum resources.
[0141] For the specific definition of the quantum system eigenstate acquisition device, please refer to the definition of the quantum system eigenstate acquisition method above, which will not be repeated here. Each module in the above-mentioned quantum system eigenstate acquisition device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0142] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0143] Constructing a probability distribution, and initializing the probability distribution to obtain an equal probability distribution;
[0144] Constructing a quantum circuit, sampling a bit string of the equal probability distribution and generating an initial quantum state, and applying the initial quantum state to the quantum circuit to obtain an initial state effect result;
[0145] Calculate the target loss function and the gradient value of the target loss function according to the initial state action result;
[0146] Inputting the gradient value of the target loss function into a gradient descent optimizer for gradient descent optimization until the variational free energy of the quantum circuit model converges, and obtaining the probability of the bit string and the quantum circuit obtained by variation;
[0147] The probabilities of the bit strings are sorted in descending order, the bit strings in descending order are obtained as a calculation basis, and the corresponding energy eigenstates are obtained by applying the quantum circuits obtained by variation to the sorted calculation basis.
[0148] In this embodiment, the steps of constructing a probability distribution and initializing the probability distribution to obtain an equal probability distribution include:
[0149] Let the probability distribution be p φ (x), carrying the variational parameter φ, where φ i ∈[0,1] represents the i-th bit x i The probability of being 1, x is a bit string, x i is the i-th bit;
[0150] Use the activation function to convert φ i Parameterized as φ i (a) = 1 / (1 + e -a ), where a is a parameter;
[0151] Initialize all parameters a to 0 and initialize the probability distribution pφ (x) is an equiprobable distribution.
[0152] In this embodiment, the steps of constructing a quantum circuit, sampling a bit string from the equiprobable distribution and generating an initial quantum state, and applying the initial quantum state to the quantum circuit to obtain a result of the initial state application include:
[0153] Construct a quantum circuit according to the form of the target Hamiltonian and assume it to be Carrying variational parameter θ, where the variational parameter θ is the angle parameter on the single-bit rotation gate;
[0154] Sample the bit string x from the assumed probability distribution p φ (x) and generate the corresponding initial quantum state |x>;
[0155] Apply the initial quantum state |x> to the quantum circuit to obtain a result of the initial state application.
[0156] In this embodiment, the steps of calculating the target loss function and the gradient value of the target loss function according to the result of the initial state application include:
[0157] The target loss function is the variational free energy, and the formula of the target loss function is:
[0158] Where is the mathematical expectation when the probability distribution of the bit string x satisfies p φ (x), is the Hamiltonian of the target quantum system, β is the reciprocal of the temperature,
[0159] The formula of the gradient value of the target loss function is: Where is the variational free energy, is the mathematical expectation when the probability distribution of the bit string x satisfies p φ (x), H is the Hamiltonian, is the Hermitian conjugate of, |x> and <x| are the initial quantum state and its Hermitian conjugate respectively;
[0160] Based on the energy average Then Where
[0161] Calculate lnp related to entropy in the variational free energy φ (x) and
[0162] And lnp φ (x) and Perform sample averaging to obtain the gradient value of the target loss function.
[0163] in It is calculated by the parameter translation rule, that is,
[0164] In this embodiment, the step of inputting the gradient value of the target loss function into a gradient descent optimizer for gradient descent optimization until the variational free energy of the quantum circuit model converges, and obtaining the probability of the bit string and the quantum circuit obtained by variation includes:
[0165] The calculated gradient value is input into the gradient descent optimizer for gradient descent optimization to obtain the new variational parameter and update the probability distribution p φ (x) and quantum circuits
[0166] Repeat the calculation of the gradient value and perform the previous step to perform gradient descent optimization until the variational free energy of the quantum circuit model converges, and the finite temperature density matrix of the quantum system represented by the pure state ensemble is obtained, which is in the form of where φ * and θ * To optimize the variational parameters, |x> represents a set of computational bases of the quantum system.
[0167] In this embodiment, the steps of sorting the probabilities of the bit strings in descending order, obtaining the descending sorted bit strings as a calculation basis, and obtaining the corresponding energy eigenstates by applying the quantum circuits obtained by variation to the sorted calculation basis include:
[0168] The density matrix of the target quantum system at a certain temperature is expressed as in is the Hamiltonian of the target quantum system, β is the inverse of temperature, is the partition function of the quantum system;
[0169] According to the ensemble representation of quantum mixed states, Representing the variational assumption of the corresponding problem, we get Where E n is the energy of the nth eigenstate |n> of the quantum system, and the function With the quantum system energy E n Monotonically decreasing;
[0170] Among them, the nth eigenstate |n> of the quantum system is obtained by:
[0171] Take the bit string x as the calculation basis and get all the calculation basis probabilities And sort them from large to small, the order of the sorted bit string x is the order of the energy of the quantum system from low to high after removing the energy degenerate state;
[0172] After sorting The bit string x corresponding to the nth probability in n Take it out and use the optimized quantum circuit to prepare the state Get the nth eigenstate |n>.
[0173] For the specific limitations on the steps implemented when the computer program is executed by the processor, please refer to the limitations on the method for obtaining the eigenstates of the quantum system mentioned above, which will not be repeated here.
[0174] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store quantum system eigenstate acquisition data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for acquiring a quantum system eigenstate is implemented.
[0175] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0176] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0177] Constructing a probability distribution, and initializing the probability distribution to obtain an equal probability distribution;
[0178] Constructing a quantum circuit, sampling a bit string of the equal probability distribution and generating an initial quantum state, and applying the initial quantum state to the quantum circuit to obtain an initial state effect result;
[0179] Calculate the target loss function and the gradient value of the target loss function according to the initial state action result;
[0180] Inputting the gradient value of the target loss function into a gradient descent optimizer for gradient descent optimization until the variational free energy of the quantum circuit model converges, and obtaining the probability of the bit string and the quantum circuit obtained by variation;
[0181] The probabilities of the bit strings are sorted in descending order, the bit strings in descending order are obtained as a calculation basis, and the corresponding energy eigenstates are obtained by applying the quantum circuits obtained by variation to the sorted calculation basis.
[0182] In this embodiment, the steps of constructing a probability distribution and initializing the probability distribution to obtain an equal probability distribution include:
[0183] The probability distribution is assumed to be p φ (x), carrying the variational parameter φ, where φ i ∈[0,1] represents the i-th bit x i The probability of being 1, x is a bit string, x i is the i-th bit;
[0184] Use the activation function to convert φ i Parameterized as φ i (a) = 1 / (1 + e -a ), where a is a parameter;
[0185] Initialize all parameters a to 0 and initialize the probability distribution p φ (x) is an equiprobable distribution.
[0186] In this embodiment, the steps of constructing a quantum circuit, sampling a bit string of the equal probability distribution and generating an initial quantum state, and applying the initial quantum state to the quantum circuit to obtain an initial state action result include:
[0187] According to the form of the target Hamiltonian, the quantum circuit is constructed as Carrying the variational parameter θ, where the variational parameter θ is the angle parameter on the single-bit rotating gate;
[0188] For the probability distribution, let p φ (x) Sampling the bit string x and generating the corresponding initial quantum state |x>;
[0189] Apply the initial quantum state |x> to the quantum circuit to obtain the initial state action result.
[0190] In this embodiment, the step of calculating the target loss function and the gradient value of the target loss function according to the initial state action result includes:
[0191] The target loss function is the variational free energy, and the formula of the target loss function is:
[0192] where is the mathematical expectation when the probability distribution of the bit string x satisfies p φ (x), is the Hamiltonian of the target quantum system, β is the reciprocal of the temperature,
[0193] The formula for the gradient value of the target loss function is: where is the variational free energy, is the mathematical expectation when the probability distribution of the bit string x satisfies p φ , H is the Hamiltonian, is the Hermitian conjugate of, |x> and <x| are the initial quantum state and its Hermitian conjugate respectively;
[0194] Based on the energy average then where
[0195] Calculate lnp related to entropy in the variational free energy φ (x) and
[0196] Take lnp φ (x) and Perform sample averaging to obtain the gradient value of the target loss function.
[0197] where is calculated by the parameter shift rule, that is
[0198] In this embodiment, the steps of inputting the gradient value of the target loss function into a gradient descent optimizer for gradient descent optimization until the variational free energy of the quantum circuit model converges to obtain the probability of the bit string and the quantum circuit obtained by variation include:
[0199] Input the calculated gradient value into a gradient descent optimizer for gradient descent optimization to obtain new variational parameters, and update the probability distribution p φ (x) and the quantum circuit
[0200] Repeat the calculation of the gradient value and execute the previous step for gradient descent optimization until the variational free energy of the quantum circuit model converges to obtain the finite-temperature density matrix of the quantum system represented by the pure state ensemble, and its form is where φ * and θ * To optimize the variational parameters, |x> represents a set of computational bases of the quantum system.
[0201] In this embodiment, the steps of sorting the probabilities of the bit strings in descending order, obtaining the descending sorted bit strings as a calculation basis, and obtaining the corresponding energy eigenstates by applying the quantum circuits obtained by variation to the sorted calculation basis include:
[0202] The density matrix of the target quantum system at a certain temperature is expressed as in is the Hamiltonian of the target quantum system, β is the inverse of temperature, is the partition function of the quantum system;
[0203] According to the ensemble representation of quantum mixed states, Representing the variational assumption of the corresponding problem, we get Where E n is the energy of the nth eigenstate |n> of the quantum system, and the function With the quantum system energy E n Monotonically decreasing;
[0204] Among them, the nth eigenstate |n> of the quantum system is obtained by:
[0205] Take the bit string x as the calculation basis and get all the calculation basis probabilities And sort them from large to small, the order of the sorted bit string x is the order of the energy of the quantum system from low to high after removing the energy degenerate state;
[0206] After sorting The bit string x corresponding to the nth probability in n Take it out and use the optimized quantum circuit to prepare the state Get the nth eigenstate |n>.
[0207] For the specific limitations on the steps implemented when the processor executes the computer program, please refer to the limitations on the method for obtaining the eigenstates of the quantum system mentioned above, which will not be repeated here.
[0208] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0209] Constructing a probability distribution, and initializing the probability distribution to obtain an equal probability distribution;
[0210] Constructing a quantum circuit, sampling a bit string of the equal probability distribution and generating an initial quantum state, and applying the initial quantum state to the quantum circuit to obtain an initial state effect result;
[0211] Calculate the target loss function and the gradient value of the target loss function according to the initial state action result;
[0212] Inputting the gradient value of the target loss function into a gradient descent optimizer for gradient descent optimization until the variational free energy of the quantum circuit model converges, and obtaining the probability of the bit string and the quantum circuit obtained by variation;
[0213] The probabilities of the bit strings are sorted in descending order, the bit strings in descending order are obtained as a calculation basis, and the corresponding energy eigenstates are obtained by applying the quantum circuits obtained by variation to the sorted calculation basis.
[0214] In this embodiment, the steps of constructing a probability distribution and initializing the probability distribution to obtain an equal probability distribution include:
[0215] Let the probability distribution be p φ (x), carrying the variational parameter φ, where φ i ∈[0,1] represents the i-th bit x i The probability of being 1, x is a bit string, x i is the i-th bit;
[0216] Use the activation function to convert φ i Parameterized as φ i (a) = 1 / (1 + e -a ), where a is a parameter;
[0217] Initialize all parameters a to 0 and initialize the probability distribution p φ (x) is an equiprobable distribution.
[0218] In this embodiment, the steps of constructing a quantum circuit, sampling a bit string of the equal probability distribution and generating an initial quantum state, and applying the initial quantum state to the quantum circuit to obtain an initial state action result include:
[0219] According to the form of the target Hamiltonian, the quantum circuit is constructed as Carrying the variational parameter θ, where the variational parameter θ is the angle parameter on the single-bit rotating gate;
[0220] For the probability distribution, let p φ (x) Sampling the bit string x and generating the corresponding initial quantum state |x>;
[0221] Apply the initial quantum state |x> to the quantum circuit to obtain the result of the initial state application.
[0222] In this embodiment, the steps of calculating the target loss function and the gradient value of the target loss function according to the result of the initial state application include:
[0223] The target loss function is the variational free energy, and the formula of the target loss function is:
[0224] Where is the mathematical expectation when the probability distribution of the bit string x satisfies p φ (x), is the Hamiltonian of the target quantum system, β is the reciprocal of the temperature,
[0225] The formula for the gradient value of the target loss function is: Where is the variational free energy, is the mathematical expectation when the probability distribution of the bit string x satisfies p φ (x), H is the Hamiltonian, and represent the quantum gate operations on the left and right sides respectively, |x> and <x| are the initial quantum state and the final quantum state respectively;
[0226] Based on the energy average value Then Where
[0227] Calculate lnp related to entropy in the variational free energy φ (x) and
[0228] Take lnp φ (x) and Perform sample averaging to obtain the gradient value of the target loss function.
[0229] Where is calculated by the parameter shift rule, that is
[0230] In this embodiment, the steps of inputting the gradient value of the target loss function into the gradient descent optimizer for gradient descent optimization until the variational free energy of the quantum circuit model converges to obtain the probability of the bit string and the quantum circuit obtained by variational method include:
[0231] Input the calculated gradient value into the gradient descent optimizer for gradient descent optimization to obtain new variational parameters and update the probability distribution p φ(x) and quantum circuits
[0232] Repeat the calculation of the gradient value and perform the previous step to perform gradient descent optimization until the variational free energy of the quantum circuit model converges, and the finite temperature density matrix of the quantum system represented by the pure state ensemble is obtained, which is in the form of where φ * and θ * To optimize the variational parameters, |x> represents a set of computational bases of the quantum system.
[0233] In this embodiment, the steps of sorting the probabilities of the bit strings in descending order, obtaining the descending sorted bit strings as a calculation basis, and obtaining the corresponding energy eigenstates by applying the quantum circuits obtained by variation to the sorted calculation basis include:
[0234] The density matrix of the target quantum system at a certain temperature is expressed as in is the Hamiltonian of the target quantum system, β is the inverse of temperature, is the partition function of the quantum system;
[0235] According to the ensemble representation of quantum mixed states, Representing the variational assumption of the corresponding problem, we get Where E n is the energy of the nth eigenstate |n> of the quantum system, and the function With the quantum system energy E n Monotonically decreasing;
[0236] Among them, the nth eigenstate |n> of the quantum system is obtained by:
[0237] Take the bit string x as the calculation basis and get all the calculation basis probabilities And sort them from large to small, the order of the sorted bit string x is the order of the energy of the quantum system from low to high after removing the energy degenerate state;
[0238] After sorting The bit string x corresponding to the nth probability in n Take it out and use the optimized quantum circuit to prepare the state Get the nth eigenstate |n>.
[0239] For the specific limitations on the steps implemented when the computer program is executed by the processor, please refer to the limitations on the method for obtaining the eigenstates of the quantum system mentioned above, which will not be repeated here.
[0240] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0241] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0242] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for obtaining eigenstates of a quantum system, characterized in that: include: Constructing a probability distribution, and initializing the probability distribution to obtain an equal probability distribution; Constructing a quantum circuit, sampling a bit string of the equal probability distribution and generating an initial quantum state, and applying the initial quantum state to the quantum circuit to obtain an initial state effect result; Calculate the target loss function and the gradient value of the target loss function according to the initial state action result; Inputting the gradient value of the target loss function into a gradient descent optimizer for gradient descent optimization until the variational free energy of the quantum circuit model converges, and obtaining the probability of the bit string and the quantum circuit obtained by variation; The probabilities of the bit strings are sorted in descending order, the bit strings in descending order are obtained as a calculation basis, and the corresponding energy eigenstates are obtained by applying the quantum circuits obtained by variation to the sorted calculation basis.
2. The method for obtaining the eigenstate of a quantum system according to claim 1, characterized in that: The steps of constructing a probability distribution and initializing the probability distribution to obtain an equal probability distribution include: The probability distribution is assumed to be p φ (x), carrying the variational parameter φ, where φ i ∈[0,1] represents the i-th bit x i The probability of being 1, x is a bit string, x i is the i-th bit; Use the activation function to convert φ i Parameterized as φ i (a) = 1 / (1 + e -a ), where a is a parameter; Initialize all parameters a to 0 and initialize the probability distribution p φ (x) is an equiprobable distribution.
3. The method for obtaining the eigenstate of a quantum system according to claim 2, characterized in that: The steps of constructing a quantum circuit, sampling a bit string of the equal probability distribution and generating an initial quantum state, and applying the initial quantum state to the quantum circuit to obtain an initial state action result include: According to the form of the target Hamiltonian, the quantum circuit is constructed as Carrying the variational parameter θ, where the variational parameter θ is the angle parameter on the single-bit rotating gate; For the probability distribution, let p φ (x) Sampling the bit string x and generating the corresponding initial quantum state |x>; Apply the initial quantum state |x> to the quantum circuit to obtain the initial state action result.
4. The method for obtaining the eigenstate of a quantum system according to claim 3, characterized in that: The step of calculating the target loss function and the gradient value of the target loss function according to the initial state action result includes: The objective loss function is the variational free energy, and the formula of the objective loss function is: in The probability distribution of the bit string x satisfies p φ (x), is the Hamiltonian of the target quantum system, β is the inverse of temperature, The formula for the gradient value of the target loss function is as follows: where is the variational free energy, is the mathematical expectation when the probability distribution of the bit string x satisfies p φ , H is the Hamiltonian, is the Hermitian conjugate of, |x> and <x| are the initial quantum state and its Hermitian conjugate, respectively. Based on energy average but in Calculate the entropy-related lnp in variational free energy φ (x) and Will lnp φ (x) and Perform sample averaging to obtain the gradient value of the target loss function.
5. The method for obtaining the eigenstate of a quantum system according to claim 4, characterized in that: In the step of obtaining the gradient value of the target loss function, Calculated by the parameter translation rule, where 6. The method for obtaining the eigenstate of a quantum system according to claim 2, characterized in that: The step of inputting the gradient value of the target loss function into a gradient descent optimizer for gradient descent optimization until the variational free energy of the quantum circuit model converges, and obtaining the probability of the bit string and the quantum circuit obtained by variation includes: The calculated gradient value is input into the gradient descent optimizer for gradient descent optimization to obtain the new variational parameter and update the probability distribution p φ (x) and quantum circuits The gradient value is calculated repeatedly and the previous step is executed to perform gradient descent optimization until the variational free energy of the quantum circuit model converges.
7. The method for obtaining eigenstates of a quantum system according to claim 6, characterized in that: The step of sorting the probabilities of the bit strings in descending order, obtaining the descendingly sorted bit strings as a calculation basis, and obtaining the corresponding energy eigenstate by applying the quantum circuit obtained by variation to the sorted calculation basis comprises: The density matrix of the target quantum system at a certain temperature is expressed as in is the Hamiltonian of the target quantum system, β is the inverse of temperature, is the partition function of the quantum system; According to the ensemble representation of quantum mixed states, Representing the variational assumption of the corresponding problem, we get Where E n is the energy of the nth eigenstate |n> of the quantum system, and the function With the quantum system energy E n Monotonically decreasing; Among them, the nth eigenstate |n> of the quantum system is obtained by: Take the bit string x as the calculation basis and get all the calculation basis probabilities And sort them from large to small, the order of the sorted bit string x is the order of the energy of the quantum system from low to high after removing the energy degenerate state; After sorting The bit string x corresponding to the nth probability in n Take it out and use the optimized quantum circuit to prepare the state Get the nth eigenstate |n>.
8. A device for acquiring eigenstates of a quantum system, characterized in that: The device comprises: A classic probability generation module is used to construct a probability distribution and initialize the probability distribution to obtain an equal probability distribution; A loss function and gradient calculation module is used to construct a quantum circuit, sample a bit string of the equal probability distribution and generate an initial quantum state, apply the initial quantum state to the quantum circuit to obtain an initial state action result; and calculate a target loss function and a gradient value of the target loss function according to the initial state action result; An optimization processing module, used for inputting the gradient value of the target loss function into a gradient descent optimizer for gradient descent optimization, until the variational free energy of the quantum circuit model converges, and obtaining the probability of the bit string and the quantum circuit obtained by variation; The quantum state calculation module is used to sort the probabilities of the bit strings in descending order, obtain the descendingly sorted bit strings as a calculation basis, and obtain the corresponding energy eigenstate by applying the quantum circuit obtained by variation to the sorted calculation basis.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Quantum state construction method, quantum computer equipment and storage medium
CN119940565A
A method for constructing a quantum state, a quantum computer device, and a storage medium
CN119940565B
Control method and optimization system for energy loss of intelligent power plant
CN121028718A
Method and system for determining reactivity of material molecules based on quantum computing
CN121260327A
