VaR value calculation method and VaR value calculation model based on quantum circuit

By acquiring and fitting the distribution function, preparing it into a qubit, and calculating the VaR value using a quantum comparator, the problem of low calculation efficiency of VaR value in quantum computing is solved, and efficient quantum parallel computing is achieved.

CN118940847APending Publication Date: 2024-11-12ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD

Patent Information

Application Number
CN202310534321.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-12
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

Existing algorithms are difficult to efficiently calculate VaR values ​​in quantum computing, and there is a lack of effective methods and models based on quantum circuits.

Method used

By obtaining the distribution function of at least two subject matter, fitting the probability density function, and preparing it into multiple quantum bits, quantum operations are performed using a quantum comparator to estimate the VaR value, and VaR value calculation in quantum computing is realized.

Benefits of technology

VaR value calculation in quantum computing is realized, and the use of quantum parallel computing power greatly improves the computing speed and saves computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118940847A_ABST
    Figure CN118940847A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a VaR value calculation method and a VaR value calculation model based on a quantum circuit, and the method comprises the steps: obtaining the distribution functions of at least two subject matters, carrying out the fitting of each distribution function, obtaining a fitting probability density function, preparing the probability distribution of the fitting probability density function into a plurality of first quantum bits, and obtaining the VaR value of at least two subject matters. And performing quantum operation on the plurality of first quantum bits by using a quantum comparator, and performing amplitude estimation on an operation result to obtain a VaR value. The VaR value is calculated through quantum calculation, and the quantum calculation can control 2n states of n quantum bits at the same time, so that the parallel calculation capability is realized, a large number of operation resources are saved, and the calculation speed of the VaR value is greatly increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of quantum computing technology, and in particular to a VaR value calculation method and a VaR value calculation model based on quantum circuits. Background Art

[0002] From a statistical point of view, the VaR value (Value at Risk) is a number in itself, but the VaR value can be used to predict losses. For example, for complex systems with relatively high risks such as power grid systems, calculating the VaR value of the power grid system is of great significance for predicting the losses of the power grid system; the losses of the power grid system can be estimated based on the VaR value, so that repair preparations can be made in advance. After the power grid system fails, it can be repaired quickly to increase the normal operation time of the power grid system. It can be seen that the VaR value is of great significance to ensure the normal operation of the power grid system.

[0003] The calculation of VaR value has been realized in classical algorithms, but with the development of quantum computing technology, how to realize the calculation of VaR value in quantum computing has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] The purpose of the embodiment of the present application is to provide a VaR value calculation method and VaR value calculation model based on quantum circuits, so as to realize the calculation of VaR value using quantum computing. The specific technical solution is as follows:

[0005] In a first aspect, an embodiment of the present application provides a method for calculating VaR value based on quantum circuits, the method comprising:

[0006] Obtaining distribution functions of at least two objects;

[0007] Fitting each of the distribution functions to obtain a fitted probability density function;

[0008] preparing a probability distribution of the fitted probability density function into a plurality of first quantum bits;

[0009] A quantum comparator is used to perform quantum operations on the plurality of first quantum bits, and an amplitude estimation is performed on the operation results to obtain a VaR value.

[0010] In a possible implementation, obtaining the distribution function of at least two objects includes:

[0011] Obtaining the sampling point distribution of at least two objects;

[0012] For each of the at least two targets, a cubic polynomial fitting is performed on the sampling point distribution of the target to obtain a distribution function of the target.

[0013] In a possible implementation, fitting each of the distribution functions to obtain a fitted probability density function includes:

[0014] The copula function is used to fit each of the distribution functions to obtain a fitted probability density function.

[0015] In a possible implementation, fitting each of the distribution functions to obtain a fitted probability density function includes:

[0016] The distribution functions are fitted using a Gaussian mixture model to obtain a fitted probability density function.

[0017] In a possible implementation, fitting each of the distribution functions using a copula function to obtain a fitted probability density function includes:

[0018] For each distribution function, transform the distribution function to obtain a random variable function corresponding to the distribution function, wherein the random variable function corresponding to each of the distribution functions is a strictly monotonically increasing function;

[0019] The random variable function corresponding to each of the distribution functions is used as the variable function of the copula function, and the copula function is expressed to obtain the fitted probability density function.

[0020] In a possible implementation, preparing the probability distribution of the fitted probability density function into a plurality of first qubits includes:

[0021] Sampling the fitted probability density function yields 2 N sampling points;

[0022] The 2 N The values ​​and probability distributions of the sampling points are prepared into the N first qubits.

[0023] In a second aspect, an embodiment of the present application provides a VaR value calculation model based on quantum circuits, the model comprising:

[0024] A data preprocessing module, used to obtain the distribution function of at least two objects; fit each of the distribution functions to obtain a fitted probability density function;

[0025] A distribution preparation module, used to prepare the probability distribution of the fitted probability density function into a plurality of first quantum bits;

[0026] A quantum comparator, used to perform quantum operations on the plurality of first quantum bits to prepare an amplitude of a second quantum bit in the quantum comparator;

[0027] An amplitude estimation module is used to estimate the amplitude of the second quantum bit to obtain a VaR value.

[0028] In a possible implementation, the data preprocessing module is specifically used to obtain the sampling point distribution of each of at least two targets; for each of the at least two targets, a cubic polynomial fitting is performed on the sampling point distribution of the target to obtain a distribution function of the target.

[0029] In a possible implementation, the data preprocessing module is specifically configured to fit each of the distribution functions using a copula function to obtain a fitted probability density function.

[0030] In a possible implementation, the distribution preparation module is specifically used to sample the fitted probability density function to obtain 2 N sampling points; N The values ​​and probability distributions of the sampling points are prepared into N quantum bits.

[0031] Beneficial effects of the embodiments of the present application:

[0032] The VaR value calculation method and VaR value calculation model based on quantum circuit provided in the embodiment of the present application obtain the distribution function of at least two targets, fit each distribution function to obtain a fitted probability density function; prepare the probability distribution of the fitted probability density function into multiple first quantum bits, and then use a quantum comparator to perform quantum operations on the multiple first quantum bits, and estimate the amplitude of the operation results to obtain the VaR value. The calculation of the VaR value using quantum computing is realized, and quantum computing can simultaneously manipulate 2 of n quantum bits. n states, thereby realizing parallel computing capabilities, saving a lot of computing resources, and greatly increasing the calculation speed of VaR value.

[0033] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0035] Figure 1 The hardware structure block diagram of the computer terminal of the VaR value calculation method based on quantum circuits in the embodiment of the present application;

[0036] Figure 2A schematic diagram of a VaR value calculation method based on quantum circuits according to an embodiment of the present application;

[0037] Figure 3 The first schematic diagram is a comparison between the cumulative probability density function of the increase / decrease rate distribution of the subject matter in the embodiments of the present application and the standard normal distribution;

[0038] Figure 4 A schematic diagram of the fitting effect of a cubic polynomial in an embodiment of the present application;

[0039] Figure 5a The first schematic diagram is a fitting result using the original Gaussian distribution;

[0040] Figure 5b The second schematic diagram is the fitting result using the original Gaussian distribution;

[0041] Figure 6a The first schematic diagram is a fitting result using a cubic term fit;

[0042] Figure 6b The second schematic diagram is a fitting result using a cubic fitting;

[0043] Figure 7a The first schematic diagram is a fitting result using a Gaussian mixture model;

[0044] Figure 7b A second schematic diagram of the fitting results using the Gaussian mixture model;

[0045] Figure 8 A schematic diagram of a VaR value calculation model based on quantum circuits according to an embodiment of the present application;

[0046] Fig. 9 A schematic diagram of a quantum circuit according to an embodiment of the present application. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.

[0048] The following describes it in detail by taking running on a computer terminal as an example. Figure 1 FIG. 1 is a hardware structure block diagram of a computer terminal for a VaR value calculation method based on a quantum circuit according to an exemplary embodiment. Figure 1 As shown, the computer terminal may include one or more ( Figure 1Only one is shown in the figure) processor 102 (processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing the quantum circuit-based VaR value calculation method. Optionally, the computer terminal may also include a transmission device 106 for communication functions and an input and output device 108. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0049] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / modules corresponding to the VaR value calculation method based on quantum circuits in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0050] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0051] It should be noted that a true quantum computer is a hybrid structure, which consists of two parts: one part is a classical computer, which is responsible for performing classical calculations and control; the other part is a quantum device, which is responsible for running quantum programs and thus realizing quantum computing. A quantum program is a sequence of instructions written in a quantum language such as QRunes that can be run on a quantum computer, which supports quantum logic gate operations and ultimately realizes quantum computing. Specifically, a quantum program is a sequence of instructions that operate quantum logic gates in a certain sequence.

[0052] In practical applications, due to the limitations of the development of quantum device hardware, quantum computing simulation is usually required to verify quantum algorithms, quantum applications, etc. Quantum computing simulation is the process of simulating the operation of quantum programs corresponding to specific problems using a virtual architecture (i.e., quantum virtual machine) built with the resources of ordinary computers. Usually, it is necessary to build a quantum program corresponding to a specific problem. The quantum program referred to in the embodiment of the present invention is a program written in a classical language to characterize quantum bits and their evolution, in which quantum bits, quantum logic gates, etc. related to quantum computing are represented by corresponding classical codes.

[0053] Quantum circuits, as a manifestation of quantum programs, are also called quantum logic circuits. They are the most commonly used general quantum computing model. They represent circuits that operate on quantum bits in an abstract concept. They are composed of quantum bits, circuits (timelines), and various quantum logic gates. Finally, the results often need to be read out through quantum measurement operations.

[0054] Unlike traditional circuits that are connected by metal wires to transmit voltage or current signals, in quantum circuits, the circuits can be seen as connected by time, that is, the state of the quantum bit evolves naturally over time, following the instructions of the Hamiltonian operator until it encounters a logic gate and is operated.

[0055] A quantum program as a whole corresponds to a total quantum circuit. The quantum program described in the present invention refers to the total quantum circuit, wherein the total number of quantum bits in the total quantum circuit is the same as the total number of quantum bits in the quantum program. It can be understood that a quantum program can be composed of a quantum circuit, measurement operations on quantum bits in the quantum circuit, registers for storing measurement results, and control flow nodes (jump instructions). A quantum circuit can contain dozens, hundreds, or even thousands of quantum logic gate operations. The execution process of a quantum program is the process of executing all quantum logic gates in a certain time sequence. It should be noted that the time sequence is the time order in which a single quantum logic gate is executed.

[0056] It should be noted that in classical computing, the most basic unit is the bit, and the most basic control mode is the logic gate, which can achieve the purpose of controlling the circuit through the combination of logic gates. Similarly, the way to process quantum bits is quantum logic gates. Using quantum logic gates, quantum states can evolve. Quantum logic gates are the basis of quantum circuits. Quantum logic gates include single-bit quantum logic gates, such as Hadamard gates (H gates, Hadamard gates), Pauli-X gates (X gates, Pauli X gates), Pauli-Y gates (Y gates, Pauli Y gates), Pauli-Z gates (Z gates, Pauli Z gates), RX gates (RX revolving gates), RY gates (RY revolving gates), RZ gates (RZ revolving gates), etc.; multi-bit quantum logic gates, such as CNOT gates, CR gates, iSWAP gates, Toffoli gates, etc. Quantum logic gates are generally represented by unitary matrices, and unitary matrices are not only in matrix form, but also a type of operation and transformation. The general function of quantum logic gates on quantum states is to calculate by multiplying the unitary matrix on the left by the vector corresponding to the right vector of the quantum state.

[0057] The following further describes the VaR value calculation method based on quantum circuits and the VaR value calculation model based on quantum circuits according to the embodiments of the present application.

[0058] See also Figure 2 , Figure 2 A method for calculating VaR value based on quantum circuits according to an embodiment of the present application may include the following steps:

[0059] S201, obtaining distribution functions of at least two objects.

[0060] The subject matter can be selected according to the actual usage scenario. For example, for the scenario of the power grid system, the subject matter can be a subject matter used to represent the power grid loss, for example, the subject matter can be the loss caused by the damage of the transmission line, the loss caused by the damage of the transformer, the loss caused by the damage of the transmission tower, etc. When the loss distribution of the subject matter is known, the probability distribution function of the loss distribution can be statistically analyzed to obtain the distribution function.

[0061] In one example, taking the subject matter including the first subject matter and the second subject matter as an example, the first distribution function of the first subject matter and the second distribution function of the second subject matter are obtained. For example, the first subject matter may be the loss caused by the damage to the transmission line, and the second subject matter may be the loss caused by the damage to the transformer. When the loss distribution caused by the damage to the transmission line is known, the probability distribution function of the loss distribution can be statistically analyzed to obtain the first distribution function; when the loss distribution caused by the damage to the transformer is known, the probability distribution function of the loss distribution can be statistically analyzed to obtain the second distribution function.

[0062] S202, fitting each of the above distribution functions to obtain a fitted probability density function.

[0063] Although each distribution function is a different distribution function, there is a certain connection between their internal distributions. For example, in the scenario of the power grid system, high temperature weather can cause damage to transformers, which can also cause damage to transmission lines; snowy weather can cause damage to transmission lines, which can also cause damage to transmission towers, etc. Therefore, it is necessary to connect the distribution functions in a related manner. In an example, taking the subject matter including the first subject matter and the second subject matter as an example, the first distribution function and the second distribution function can be fitted to obtain a fitted probability density function.

[0064] S203, preparing the probability distribution of the above-mentioned fitted probability density function into multiple first quantum bits.

[0065] The numerical value and probability distribution of the fitted probability density function are prepared into the plurality of first qubits. In one possible implementation, the probability distribution of the fitted probability density function is prepared into the plurality of first qubits, including: sampling the fitted probability density function to obtain 2 N sampling points; the above 2 N The values ​​and probability distributions of the sampling points are prepared into the N first quantum bits.

[0066] S204, using a quantum comparator to perform quantum operations on the plurality of first quantum bits, and performing amplitude estimation on the operation results to obtain a VaR value.

[0067] A quantum comparator is used to perform quantum operations on multiple first quantum bits, and the quantum operation results are prepared on the second quantum bit. The amplitude of the second quantum bit is estimated to obtain the VaR value.

[0068] In the embodiment of the present application, the distribution function of at least two targets is obtained, each distribution function is fitted to obtain a fitted probability density function, and the probability distribution of the fitted probability density function is prepared into multiple first quantum bits, so that quantum operations are performed on the multiple first quantum bits using a quantum comparator, and the amplitude of the operation result is estimated to obtain the VaR value. The calculation of the VaR value using quantum computing is realized, and quantum computing can simultaneously manipulate 2 of n quantum bits. n states, thereby realizing parallel computing capabilities, saving a lot of computing resources, and greatly increasing the calculation speed of VaR value.

[0069] The distribution function of the underlying asset can be obtained by fitting any monotonic function, such as the normal distribution function, quadratic polynomial function, etc. In many scenarios, for example, in the risk assessment of stock price fluctuations, the distribution of the underlying asset's fluctuation rate is compared with the cumulative probability density function of the standard normal distribution. Figure 3 As shown, it can be seen that the distribution of the underlying asset does not obey the normal distribution (it can be seen that it does not present the relationship of y=x). In its head and tail parts, there is a characteristic large slope. The corresponding market relationship is that both declines and increases are prone to be unexpected.

[0070] In view of this, a cubic polynomial can be used to fit the sampling point distribution to obtain a distribution function. In a possible implementation, the above-mentioned obtaining the distribution function of at least two targets includes:

[0071] Step 1: Obtain the sampling point distribution of at least two objects.

[0072] Step 2: For each of the at least two targets, a cubic polynomial fitting is performed on the sampling point distribution of the target to obtain a distribution function of the target.

[0073] A cubic polynomial is a monomial with a maximum degree of 3. For example, a common cubic polynomial can be y=ax 3 +d,y=ax 3 +bx 2 +d,y=ax 3 +bx 2 +cx+d, etc. A cubic polynomial is fitted to the sampling point distribution of each target object respectively, so as to obtain the distribution function of each target object. In an example, taking the target object including the first target object and the second target object as an example, the sampling point distribution of the first target object and the sampling point distribution of the second target object are obtained. A cubic polynomial is fitted to the sampling point distribution of the first target object to obtain the first distribution function of the first target object; a cubic polynomial is fitted to the sampling point distribution of the second target object to obtain the second distribution function of the second target object. In an example, the fitting effect of the cubic polynomial can be as follows: Figure 4 As shown, it can be seen that the distribution of sampling points is more complex than the distribution function obtained by fitting a cubic polynomial.

[0074] The fitting method of fitting each distribution function to a probability density function can be selected according to the actual situation. For example, a copula function can be used for fitting, or a GMM (Gaussian Mixture Model) can be used for fitting.

[0075] In a possible implementation, fitting each of the above distribution functions to obtain a fitted probability density function includes:

[0076] The copula function is used to fit the above distribution functions to obtain the fitted probability density function.

[0077] Copula functions include elliptic copula functions, Archimedean copula functions, and Gaussian copula functions. You can select a copula function based on the actual scenario. For example, you can select a Gaussian copula function to fit each distribution function. For the process of fitting each distribution function using a copula function, refer to the relevant copula function algorithm. Using copula to connect related relationships can still retain the related relationships when the edge function is transformed.

[0078] In a possible implementation, the copula function is used to fit each of the above distribution functions to obtain a fitted probability density function, including:

[0079] Step 1: for each distribution function, transform the distribution function to obtain the random variable function corresponding to the distribution function, wherein the random variable function corresponding to each of the distribution functions is a strictly monotonically increasing function.

[0080] Step 2: Using the random variable function corresponding to each of the distribution functions as the variable function of the copula function, and expressing the copula function to obtain the fitted probability density function.

[0081] In an example, taking the subject matter including the first subject matter and the second subject matter as an example, the first distribution function is transformed to obtain the first random variable function; the second distribution function is transformed to obtain the second random variable function: wherein the first random variable function and the second random variable function are both strictly monotonically increasing functions. The first random variable function and the second random variable function are used as variable functions of the copula function, and the copula function is expressed to obtain the fitted probability density function.

[0082] The corresponding derivation of the two targets, for the Gaussian copula function, is:

[0083]

[0084] The integrand is denoted as q(s, t, ρ); ρ represents the correlation coefficient of the fit, t and s represent the integrand variables; Φ -1 Represents the inverse function of the cumulative probability density of the standard normal distribution; u1 and u2 represent the expectations of the two targets respectively.

[0085] The first distribution function is represented by U1, and the second distribution function is represented by U2. The two are deformed accordingly to obtain the first random variable function and the second random variable function; then the first random variable function V1 and the second random variable function V2 can be expressed as:

[0086] V1=f1(U1),V2=f2(U2)

[0087] It is necessary to ensure that f is a strictly monotonically increasing function to ensure the transformation results. The corresponding cumulative probability density functions are: F1, F2. The cumulative density function needs to be input in the copula function. At this time, V1 and V2 continue to use the copula function, so:

[0088] F(v)=p{V+μ≤v}=p{U≤f -1 (v-μ)}=Φ(f -1 (v-μ))

[0089] The final fitted probability density function can be expressed as:

[0090]

[0091] Among them, f1 -1 (V1) is the inverse function of V1 = f1(U1), f2 -1 (V2) is the inverse function of V2=f2(U2).

[0092] As described above, a Gaussian mixture model may also be used for fitting. In a possible implementation, the above distribution functions are fitted to obtain a fitting probability density function, including:

[0093] The Gaussian mixture model is used to fit the above distribution functions to obtain the fitted probability density function.

[0094] The core idea of ​​GMM is to assume that all sampling points come from multiple Gaussian distributions with different parameters, and data points from the same distribution are divided into the same category. The algorithm result returns the probability that the sampling points belong to different categories; assuming that there are multiple sampling points in the first distribution function and the second distribution function that obey the Gaussian distribution with the same parameters, but the parameters of the Gaussian distribution are unknown, find suitable distribution parameters so that the Gaussian distribution can include more of the above sampling points, thereby obtaining a fitted probability density function; in one example, in order to make the personality of each sampling point more prominent, a smaller variance can be used, for example, 1 can be used as the variance. The process of fitting the sampling points of two distribution functions using the GMM algorithm can refer to the relevant GMM algorithm, which will not be repeated in this application.

[0095] In an example, a schematic diagram of the result of fitting the sampling points of the first distribution function and the second distribution function using the original Gaussian distribution can be shown as follows: Figure 5a and Figure 5b As shown, Figure 5b for Figure 5a Top view of the .

[0096] The schematic diagram of the result of fitting the sampling points of the first distribution function and the second distribution function using the cubic term can be shown as follows: Figure 6a and Figure 6b As shown, Figure 6b for Figure 6a Top view of the .

[0097] The schematic diagram of the result of fitting the sampling points of the first distribution function and the second distribution function using the Gaussian mixture model can be shown as follows: Figure 7a and Figure 7b As shown, Figure 7b for Figure 7a Top view of the .

[0098] It can be seen that the distribution of the results of fitting with GMM is more realistic. The fitting results of GMM can be directly used as sampling points for quantum sampling.

[0099] The present application also provides a VaR value calculation model based on quantum circuits, see Figure 8 , the above model includes:

[0100] The data preprocessing module 801 is used to obtain the distribution function of at least two objects; fit each of the above distribution functions to obtain a fitted probability density function;

[0101] A distribution preparation module 802, used to prepare the probability distribution of the above-mentioned fitting probability density function into a plurality of first quantum bits;

[0102] A quantum comparator 803, used to perform quantum operations on the plurality of first quantum bits to prepare an amplitude of a second quantum bit in the quantum comparator;

[0103] The amplitude estimation module 804 is used to estimate the amplitude of the second quantum bit to obtain a VaR value.

[0104] In a possible implementation, the data preprocessing module 801 is specifically used to obtain the sampling point distribution of each of the at least two objects; for each of the at least two objects, a cubic polynomial fitting is performed on the sampling point distribution of the object to obtain a distribution function of the object.

[0105] In a possible implementation, the data preprocessing module 801 is specifically configured to fit each of the distribution functions using a copula function to obtain a fitted probability density function.

[0106] In a possible implementation manner, the distribution preparation module 802 is specifically used to sample the fitted probability density function to obtain 2 N sampling points; the above 2 NThe values ​​and probability distributions of the sampling points are prepared into N quantum bits.

[0107] The data preprocessing module 801 can be implemented by relying on the hardware of a classical computer. For example, the data preprocessing module 801 can be a software process running on a classical computer. A classical computer may include: a processor, a memory, a communication interface, and a communication bus; wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; the memory is used to store computer programs; when the processor is used to execute the computer programs stored in the above memory, the function of the data preprocessing module 801 is realized. In an example, if only a simple normal distribution preparation is performed in a classical computer, and no copula function fitting is performed, then Fig. 9 As shown, it is necessary to add a quantum connection function in the quantum circuit, perform copula connection transformation, piecewise linear transformation or cubic transformation on the quantum state, and then use a quantum summation comparator to perform amplitude estimation to obtain the VaR value.

[0108] The communication bus mentioned in the above-mentioned classic computer can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0109] The communication interface is used for communication between the above-mentioned classical computers and other devices.

[0110] The memory may include RAM (Random Access Memory) or NVM (Non-Volatile Memory), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0111] The above-mentioned processor can be a general-purpose processor, including a CPU (Central Processing Unit), an NP (Network Processor), etc.; it can also be a DSP (Digital Signal Processing), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0112] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, any of the VaR value calculation methods based on quantum circuits described in the present application is implemented.

[0113] In another embodiment provided in the present application, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute the VaR value calculation method based on quantum circuits described in any of the above embodiments.

[0114] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidState Disk (SSD)), etc.

[0115] It should be noted that, in this article, the technical features in each optional solution can be combined to form a solution as long as there is no contradiction, and these solutions are all within the scope disclosed in this application. Relational terms such as first and second, etc. are only used to distinguish an entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only include those elements, but also include other elements that are not clearly listed, or also include elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements limited by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements.

[0116] Each embodiment in this specification is described in a related manner. Each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referenced to each other.

[0117] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A method for calculating VaR value based on quantum circuits, characterized in that: The method comprises: Obtaining distribution functions of at least two objects; Fitting each of the distribution functions to obtain a fitted probability density function; preparing a probability distribution of the fitted probability density function into a plurality of first quantum bits; A quantum comparator is used to perform quantum operations on the plurality of first quantum bits, and an amplitude estimation is performed on the operation results to obtain a VaR value.

2. The method according to claim 1, characterized in that The obtaining of the distribution function of at least two objects includes: Obtaining the sampling point distribution of at least two objects; For each of the at least two targets, a cubic polynomial fitting is performed on the sampling point distribution of the target to obtain a distribution function of the target.

3. The method according to claim 1, characterized in that The step of fitting each of the distribution functions to obtain a fitted probability density function comprises: The copula function is used to fit each of the distribution functions to obtain a fitted probability density function.

4. The method according to claim 1, characterized in that: The step of fitting each of the distribution functions to obtain a fitted probability density function comprises: The distribution functions are fitted using a Gaussian mixture model to obtain a fitted probability density function.

5. The method according to claim 3, characterized in that: The method of fitting each of the distribution functions using a copula function to obtain a fitted probability density function includes: For each distribution function, transform the distribution function to obtain a random variable function corresponding to the distribution function, wherein the random variable function corresponding to each of the distribution functions is a strictly monotonically increasing function; The random variable function corresponding to each of the distribution functions is used as the variable function of the copula function, and the copula function is expressed to obtain the fitted probability density function.

6. The method according to claim 1, characterized in that Preparing the probability distribution of the fitted probability density function into a plurality of first quantum bits, comprising: Sampling the fitted probability density function yields 2 N sampling points; The 2 N The values ​​and probability distributions of the sampling points are prepared into the N first qubits.

7. A VaR value calculation model based on quantum circuits, characterized in that: The model includes: A data preprocessing module, used to obtain the distribution function of at least two objects; fit each of the distribution functions to obtain a fitted probability density function; A distribution preparation module, used to prepare the probability distribution of the fitted probability density function into a plurality of first quantum bits; A quantum comparator, used to perform quantum operations on the plurality of first quantum bits to prepare an amplitude of a second quantum bit in the quantum comparator; An amplitude estimation module is used to estimate the amplitude of the second quantum bit to obtain a VaR value.

8. The model according to claim 7, characterized in that The data preprocessing module is specifically used to obtain the sampling point distribution of each of at least two targets; for each of the at least two targets, a cubic polynomial fitting is performed on the sampling point distribution of the target to obtain the distribution function of the target.

9. The model according to claim 7, characterized in that The data preprocessing module is specifically used to fit each of the distribution functions using a copula function to obtain a fitted probability density function.

10. The model according to claim 7, characterized in that The distribution preparation module is specifically used to sample the fitted probability density function to obtain 2 N sampling points; N The values ​​and probability distribution of the sampling points are prepared into N quantum bits.

Citation Information

Patent Citations

  • Quantum circuit risk analysis

    CN112204584A

  • Quantum circuit-based option estimation method and device, medium and electronic device

    CN114819170A

  • Risk assessment method and device based on quantum phase estimation

    CN115375065A

  • Measurement method of quantum bit frequency, quantum measurement and control system and quantum computer

    CN115902389A

  • Quantum-computing based method and apparatus for estimating ground-state properties

    US20230081927A1

Cited By

  • Quantum computer probability model optimization processing method and system

    CN121189518A

  • Quantum computer probabilistic model optimization processing method and system

    CN121189518B