Quantum data fidelity determination method and device, electronic device and medium

Through the use of parameterized quantum circuit training and measurement bases, quantum fidelity is directly calculated, which solves the high resource consumption and error problems in the existing technology and achieves efficient evaluation and scalability of quantum data fidelity.

CN117454998BActive Publication Date: 2024-09-13BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311475401.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-07
Publication Date
2024-09-13
Estimated Expiration
2043-11-07

AI Technical Summary

Technical Problem

Existing technologies require calculation of density matrices when estimating quantum data fidelity in quantum computing, resulting in high resource consumption and non-scalability. Traditional methods such as quantum tomography and quantum spectrum truncation have computational cost and error issues.

Method used

The optimal projection measurement unitary matrix U is obtained through parameterized quantum circuit training, and U is used to splice the measurement basis for measurement, and the classical fidelity is calculated to determine the quantum fidelity, without the need for density matrices and auxiliary systems.

Benefits of technology

It saves a lot of computing resources and time costs, is scalable and practical, and can effectively evaluate the similarity of quantum states and device performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117454998B
    Figure CN117454998B
Patent Text Reader

Abstract

The present disclosure provides a method, device, electronic device, computer-readable storage medium and computer program product for determining the fidelity of quantum data, which relates to the field of quantum computers, and in particular to the field of fidelity estimation technology. The implementation scheme is: determining a parameterized quantum circuit to be trained; acting the parameterized quantum circuit on the first and second quantum states respectively to obtain the third quantum state and the fourth quantum state after the action respectively; performing multiple measurements on the third and fourth quantum states respectively based on a preset measurement basis to obtain the first probability distribution and the second probability distribution of each measurement result corresponding to the third quantum state and the fourth quantum state respectively; determining the function value of a preset loss function based on the first probability distribution and the second probability distribution; adjusting the parameter value of the parameterized quantum circuit so that the difference between the two function values ​​of the preset loss function is within a preset range; determining the fidelity between the first and second quantum states based on the adjusted loss function value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of quantum computers, in particular to the field of fidelity estimation technology, and specifically to a method, device, electronic device, computer-readable storage medium and computer program product for determining the fidelity of quantum data. Background Art

[0002] The technology of quantum computers is developing rapidly, more and more quantum applications are emerging, and the technology of quantum hardware is also improving year by year. However, in recent quantum devices, the storage and reading of quantum data still have certain technical gaps. Therefore, in quantum computing, it is necessary to identify and distinguish quantum data (i.e., quantum state). Specifically, the fidelity between two quantum states can be used to describe the similarity between them. The higher the fidelity, the more similar the two quantum data are. Summary of the invention

[0003] The present disclosure provides a method, apparatus, electronic device, computer-readable storage medium, and computer program product for determining the fidelity of quantum data.

[0004] According to one aspect of the present disclosure, a method for determining the fidelity of quantum data is provided, comprising: determining a parameterized quantum circuit to be trained, the parameterized quantum circuit comprising an adjustable parameter to be optimized; acting the parameterized quantum circuit on an unknown first quantum state and a second quantum state, respectively, to obtain a third quantum state and a fourth quantum state after the action, respectively; performing multiple measurements on the third quantum state based on a preset measurement basis to obtain a first probability distribution of each measurement result corresponding to the third quantum state; performing multiple measurements on the fourth quantum state based on a preset measurement basis to obtain a second probability distribution of each measurement result corresponding to the fourth quantum state; determining a function value of a preset loss function based on the first probability distribution and the second probability distribution, wherein the preset loss function is determined based on the similarity between the first probability distribution and the second probability distribution; adjusting the value of the adjustable parameter of the parameterized quantum circuit so that the difference between the two function values ​​of the preset loss function before and after is within a preset range; and determining the fidelity between the first quantum state and the second quantum state based on the determined last function value of the preset loss function.

[0005] According to another aspect of the present disclosure, a quantum data fidelity determination device is provided, comprising: a first determination unit, configured to determine a parameterized quantum circuit to be trained, wherein the parameterized quantum circuit comprises adjustable parameters to be optimized; a first acquisition unit, configured to act the parameterized quantum circuit on an unknown first quantum state and a second quantum state, respectively, to obtain a third quantum state and a fourth quantum state after the action, respectively; a second acquisition unit, configured to perform multiple measurements on the third quantum state based on a preset measurement basis, to obtain a first probability distribution of each measurement result corresponding to the third quantum state; a third acquisition unit, configured to perform multiple measurements on the fourth quantum state based on a preset measurement basis, to obtain a first probability distribution of each measurement result corresponding to the third quantum state; and to obtain a second probability distribution of each measurement result corresponding to the fourth quantum state; a second determining unit, configured to determine a function value of a preset loss function based on the first probability distribution and the second probability distribution, wherein the preset loss function is determined based on the similarity between the first probability distribution and the second probability distribution; an adjusting unit, configured to adjust the value of the adjustable parameter of the parameterized quantum circuit so that the difference between the two function values ​​of the preset loss function is within a preset range; and a third determining unit, configured to determine the fidelity between the first quantum state and the second quantum state based on the last function value of the preset loss function determined.

[0006] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in the present disclosure.

[0007] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided. The computer instructions are used to cause a computer to execute the method described in the present disclosure.

[0008] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which implements the method described in the present disclosure when executed by a processor.

[0009] According to one or more embodiments of the present disclosure, by training the parameterized quantum circuit, the optimal projection measurement {E m} m The corresponding unitary matrix U (i.e. the trained quantum circuit) uses the probability distribution obtained by measuring the U spliced ​​measurement basis to calculate the classical fidelity, and then obtain the quantum fidelity. It does not require the calculation of the density matrix or any auxiliary system, thereby saving a lot of computing resources and time costs, and is therefore scalable and practical.

[0010] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0012] Figure 1 A flowchart of a method for determining quantum data fidelity according to an embodiment of the present disclosure is shown;

[0013] Figure 2 A schematic diagram of obtaining fidelity based on a parameterized quantum circuit according to an embodiment of the present disclosure is shown;

[0014] Figure 3 An exemplary structural diagram of a parameterized quantum circuit according to an embodiment of the present disclosure is shown;

[0015] Figure 4A and 4B Schematic diagrams of the structures of parameterized quantum circuits before and after training according to embodiments of the present disclosure are respectively shown;

[0016] Figure 5 A schematic diagram showing how to obtain fidelity through iteration according to an embodiment of the present disclosure is shown;

[0017] Figure 6 A structural block diagram of a device for determining quantum data fidelity according to an embodiment of the present disclosure is shown; and

[0018] Figure 7 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0019] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0020] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.

[0021] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.

[0022] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0023] So far, all the different types of computers in use are based on classical physics as the theoretical basis for information processing, and are called traditional computers or classical computers. Classical information systems use binary data bits, which are the easiest to implement physically, to store data or programs. Each binary data bit is represented by 0 or 1, called a bit or bit, as the smallest unit of information. Classical computers themselves have inevitable weaknesses: one is the most basic limitation of energy consumption in the computing process. The minimum energy required for logic elements or storage units should be several times more than kT to avoid misoperation due to thermal expansion and fall; the second is information entropy and heat energy consumption; the third is that when the wiring density of computer chips is very high, according to the Heisenberg uncertainty relation, when the uncertainty of the electron position is very small, the uncertainty of the momentum will be very large. Electrons are no longer bound, and there will be quantum interference effects, which may even destroy the performance of the chip.

[0024] A quantum computer is a physical device that follows the properties and laws of quantum mechanics to perform high-speed mathematical and logical operations, store and process quantum information. When a device processes and calculates quantum information and runs quantum algorithms, it is a quantum computer. Quantum computers follow the unique laws of quantum dynamics (especially quantum interference) to achieve a new mode of information processing. For parallel processing of computational problems, quantum computers have an absolute advantage in speed over classical computers. The transformation of each superposition component by a quantum computer is equivalent to a classical calculation. All these classical calculations are completed at the same time and superimposed according to a certain probability amplitude to give the output result of the quantum computer. This calculation is called quantum parallel computing. Quantum parallel processing greatly improves the efficiency of quantum computers, allowing them to complete tasks that classical computers cannot complete, such as factoring a large natural number. Quantum coherence is essentially used in all quantum ultra-fast algorithms. Therefore, quantum parallel computing, which replaces classical states with quantum states, can achieve computing speeds and information processing functions that are incomparable to classical computers, while saving a lot of computing resources.

[0025] In quantum computing, the most basic problem is to determine whether two quantum states are similar and how to quantify the degree of similarity. Fidelity estimation is a good way to measure similarity. Fidelity estimation between quantum data (quantum states) has a wide range of applications in quantum information processing. For example, it can be used to measure the degree to which quantum data is protected during dynamic processes, as well as to measure and test the effects of quantum schemes, quantum state preparation, and other applications.

[0026] The estimation of the similarity of quantum data is an important part of quantum machine learning. It is the most basic problem that needs to be solved and serves as an indicator to measure the effectiveness of learning. Usually, for two unknown n-bit quantum states ρ and σ, quantum hardware is used to measure and estimate the fidelity between quantum states ρ and σ according to the following formula:

[0027]

[0028] Thus, the similarity of the two quantum states is confirmed, where tr represents the trace of the matrix.

[0029] Usually, the density matrix of the target quantum state can be obtained through quantum state tomography, and then the density matrix can be stored on a classical computer. Then, the fidelity function between matrices is calculated on the classical computer to obtain the target of estimating the fidelity of the quantum state. Although the quantum state tomography method is feasible in principle, quantum tomography consumes a lot of resources, and the resources required to obtain the density matrix of the quantum state will increase exponentially with the increase of quantum bits. Therefore, the cost on recent quantum devices is too high and the practicality is not high.

[0030] Alternatively, through the estimation method of quantum spectrum truncation, this method first diagonalizes the quantum state ρ to obtain the first r largest eigenvalues ​​and corresponding eigenvectors. Then, based on this information, the projection of another quantum state σ on the eigenvector basis of the quantum state ρ is calculated, and the upper and lower bounds of the fidelity F(ρ,σ) are further estimated. Based on the estimation method of quantum spectrum truncation, the fidelity between quantum state density matrices is calculated. As the number of quantum bits increases, this process may also consume a lot of time resources. In addition, the cost of diagonalizing the quantum state is very high, and additional errors will be introduced. At the same time, the subroutines involved in this method have limited versatility and can only be applied to a very small range.

[0031] Therefore, according to an embodiment of the present disclosure, a method for determining the fidelity of quantum data is provided. Figure 1 A flowchart of a method for determining quantum data fidelity according to an embodiment of the present disclosure is shown. Figure 1 As shown, the method 100 includes: determining a parameterized quantum circuit to be trained, the parameterized quantum circuit including an adjustable parameter to be optimized (step 110); acting the parameterized quantum circuit on an unknown first quantum state and a second quantum state, respectively, to obtain a third quantum state and a fourth quantum state after the action, respectively (step 120); performing multiple measurements on the third quantum state based on a preset measurement basis to obtain a first probability distribution of each measurement result corresponding to the third quantum state (step 130); performing multiple measurements on the fourth quantum state based on a preset measurement basis to obtain a second probability distribution of each measurement result corresponding to the fourth quantum state (step 140); determining a function value of a preset loss function based on the first probability distribution and the second probability distribution, wherein the preset loss function is determined based on the similarity between the first probability distribution and the second probability distribution (step 150); adjusting the value of the adjustable parameter of the parameterized quantum circuit so that the difference between the two function values ​​of the preset loss function before and after is within a preset range (step 160); and determining the fidelity between the first quantum state and the second quantum state based on the last function value of the determined preset loss function (step 170).

[0032] According to an embodiment of the present disclosure, by training the parameterized quantum circuit, the optimal projection measurement {E m}m The corresponding unitary matrix U (i.e. the trained quantum circuit) uses the probability distribution obtained by measuring the U spliced ​​measurement basis to calculate the classical fidelity, and then obtain the quantum fidelity. It does not require the calculation of the density matrix or any auxiliary system, thereby saving a lot of computing resources and time costs, and is therefore scalable and practical.

[0033] For example, the similarity of the quantum states prepared by two unknown quantum devices can be compared based on the method described in the embodiments of the present disclosure, thereby evaluating the relative performance of the two quantum devices. Furthermore, if one of the quantum devices is an ideal quantum device (such as a device in a classical simulation scenario), the method described in the embodiments of the present disclosure can be used to evaluate the similarity between the quantum state prepared by an unknown quantum device and the expected quantum state of the ideal quantum device, that is, to evaluate the accuracy of the quantum state prepared by the unknown quantum device, thereby measuring the performance of the unknown quantum device. Thereby, further development and application of the quantum field are promoted.

[0034] According to some embodiments, the similarity between the first probability distribution and the second probability distribution comprises a Bhattacharyya distance.

[0035] According to some embodiments, the preset loss function is determined based on the following formula:

[0036]

[0037] Wherein, ρ is the first quantum state, σ is the second quantum state, represents the third quantum state obtained after the parameterized quantum circuit U(θ) acts on the first quantum state ρ, represents the fourth quantum state obtained after the parameterized quantum circuit U(θ) acts on the second quantum state σ, represents the probability of obtaining a measurement result m by measuring the third quantum state based on a preset measurement basis Λ, represents the probability of obtaining a measurement result m by measuring the fourth quantum state based on a preset measurement basis Λ, wherein θ is the adjustable parameter to be optimized.

[0038] Specifically, for an n-bit quantum state, its measurement result is an n-bit binary string, which contains at most 2 n For example, for a 4-bit quantum state, 0000 is defined as the 0th measurement result, 0001 is defined as the 1st measurement result, 0010 is defined as the 2nd measurement result, and so on. In the above embodiment, represents the probability of measuring the third quantum state based on the preset measurement basis and obtaining a measurement result of m, It represents the probability of obtaining a measurement result m by measuring the fourth quantum state based on a preset measurement basis, and then determining the similarity between the two groups of probability distributions based on the product of the probabilities corresponding to the corresponding measurement results m.

[0039] In the embodiments of the present disclosure, the theorem that quantum measurement can obtain fidelity is used, which states that there exists a projective measurement (Projective Measurement) such that the quantum fidelity is equal to the classical fidelity of the probability distribution obtained after the measurement, that is,

[0040]

[0041] Among them, ρ, σ are given but unknown n-bit quantum states, {E m} m Exhaust all possible n-qubit projection measurements, and The part represents the classical fidelity of two probability distributions, also known as the Bhattacharyya distance.

[0042] On the other hand, the projection measurement {E m} m All can be measured by an n-qubit unitary matrix U and a preset computational basis (also called a standard basis measurement, such as a Z basis measurement) Connect, that is:

[0043]

[0044] Therefore, in the embodiment according to the present disclosure, the preset measurement basis may be any suitable measurement basis, such as the Pauli X, Y, Z measurement basis, which is not limited herein.

[0045] It is very easy to implement the measurement basis measurement experimentally, but how to obtain the optimal projection measurement {E m} m The corresponding unitary matrix U becomes a problem. If U can be constructed, then the probability distribution obtained by splicing the measurement basis with U can be used to calculate the classical fidelity, and then the quantum fidelity can be obtained, such as Figure 2 However, the unitary matrix U is determined by the unknown quantum states ρ and σ, so it cannot be calculated in advance.

[0046] In order to solve the problem that the unitary matrix U cannot be calculated in advance, in an embodiment according to the present disclosure, the idea of ​​parameterized quantum circuits (also called quantum neural networks) is used to construct special parameterized quantum circuits to approximate the unitary matrix U.

[0047] According to some embodiments, the parameterized quantum circuit comprises a single-qubit rotation gate and a controlled Z-gate.

[0048] For example, a parameterized quantum circuit U(θ) is usually composed of several single-qubit rotation gates and CZ gates, and several rotation angles constitute a vector θ, which represents an adjustable parameter. Figure 3 FIG. 1 shows an exemplary structural diagram of a parameterized quantum circuit according to an embodiment of the present disclosure. It should be emphasized here that there are many different implementations of parameterized quantum circuits. As long as its expression capability is strong enough, that is, there is θ * So that U(θ * )=U, where U represents the unitary matrix connecting the optimal projection measurement and the computational basis measurement in formula (3).

[0049] According to some embodiments, the value of the adjustable parameter of the parameterized quantum circuit is adjusted by a gradient descent method.

[0050] It should be emphasized here that the optimization method includes but is not limited to gradient-based optimization. Gradient-based optimization mainly includes gradient descent method, and the experimenter can also use other optimization methods or non-gradient optimization methods.

[0051] In an exemplary embodiment according to the present disclosure, the fidelity, i.e., similarity, between two unknown n-bit quantum states ρ and σ is determined. Specifically, the number of measurements M and the error value ∈ required to calculate the loss function are first determined. It should be noted that the number of measurements M and the error value ∈ can be set by the experimenter according to actual needs, and the error value ∈ is used to record the acceptable estimated error value, which is not limited here. Then, the following operations are performed:

[0052] Step 1: Construct a parameterized quantum circuit U(θ) with adjustable parameters. Let f(θ * )=0,θ * The purpose of is to record old parameters.

[0053] Step 2: Apply the parameterized quantum circuit to two quantum states ρ and σ respectively to obtain two new quantum states:

[0054]

[0055] Step 3: Based on the preset measurement basis, measure the two new quantum states M times respectively to obtain two sets of probability distributions:

[0056]

[0057] Step 4: Using the two sets of probability distributions in step 3, calculate the loss function value:

[0058]

[0059] Step 5: If |f(θ * )-f(θ)|≥∈, jump to step 6 (continue optimization); otherwise jump to step 8 (stop optimization).

[0060] Step 6: Assign θ * =θ (record the old parameters). According to the value of the loss function f(θ), the parameter θ is iteratively optimized in the direction of minimizing the loss function using the gradient descent method or other optimization methods.

[0061] Step 7: Based on the new optimization parameter θ, jump to step 2 to start a new round of optimization.

[0062] Step 8: Output the loss function value f(θ) when the optimization in step 5 stops as the estimated value of the fidelity F(ρ,σ).

[0063] In an exemplary embodiment, a single bit is used as an example for explanation. The initialization quantum state ρ is as follows, where σ is the quantum state obtained by ρ passing through a depolarization channel with p=0.5, that is, Where I is the identity matrix. The matrix form of the two quantum states is as follows:

[0064]

[0065] Construct an initialization parameterized circuit such as Figure 4A As shown in (ie, θ = (0.31, 0.11)). The parameterized circuit is optimized according to the process described in the above embodiment, wherein the optimizer used is Adam, and the learning rate is set to 0.01. The change of the loss function f(θ) during the optimization process is shown in Figure 5 As shown. Figure 5 In the figure, the wavy line is the loss function f(θ) obtained by iterating this solution, and the horizontal line is the theoretical value f(ρ,σ). The horizontal axis is the number of iterations, the vertical axis is the loss function, and the upper left corner is the unit of the vertical axis. Figure 5 It can be clearly seen that after 40 rounds of optimization, the loss function begins to converge and approaches the theoretical value. The parameterized circuit obtained by the optimization is as follows Figure 4B shown.

[0066] Through the above embodiment, the estimated value of the fidelity F(ρ,σ) is 0.9977, of which the theoretical value should be 0.9974. Therefore, the accuracy of the fidelity estimate obtained by the solution according to the embodiment of the present disclosure is 99.96%, which fully verifies the effectiveness of the solution according to the embodiment of the present disclosure.

[0067] According to the scheme of the embodiment of the present disclosure, compared with the traditional quantum tomography method and quantum spectrum truncation estimation method, there is no need to obtain the density matrix of the quantum state, so it is more practical; and according to the scheme of the embodiment of the present disclosure, no auxiliary system is required, that is, it can be implemented without additional quantum bits, which helps to achieve the fidelity estimation of larger-scale quantum systems, and is therefore scalable and universal.

[0068] According to the embodiments of the present disclosure, Figure 6 As shown, a quantum data fidelity determination device 600 is also provided, comprising: a first determination unit 610, configured to determine a parameterized quantum circuit to be trained, wherein the parameterized quantum circuit comprises adjustable parameters to be optimized; a first acquisition unit 620, configured to act the parameterized quantum circuit on an unknown first quantum state and a second quantum state, respectively, to obtain a third quantum state and a fourth quantum state after the action, respectively; a second acquisition unit 630, configured to perform multiple measurements on the third quantum state based on a preset measurement basis, to obtain a first probability distribution of each measurement result corresponding to the third quantum state; a third acquisition unit 640, configured to perform multiple measurements on the fourth quantum state based on a preset measurement basis, to obtain a first probability distribution of each measurement result corresponding to the third quantum state; , to obtain a second probability distribution of each measurement result corresponding to the fourth quantum state; a second determining unit 650 is configured to determine a function value of a preset loss function based on the first probability distribution and the second probability distribution, wherein the preset loss function is determined based on the similarity between the first probability distribution and the second probability distribution; an adjusting unit 660 is configured to adjust the value of the adjustable parameter of the parameterized quantum circuit so that the difference between the two function values ​​of the preset loss function is within a preset range; and a third determining unit 670 is configured to determine the fidelity between the first quantum state and the second quantum state based on the last function value of the preset loss function determined.

[0069] Here, the operations of the above-mentioned units 610-670 of the quantum data fidelity determination device 600 are similar to the operations of the above-described steps 110-170, and will not be repeated here.

[0070] According to an embodiment of the present disclosure, an electronic device, a readable storage medium and a computer program product are also provided.

[0071] refer to Figure 7, a block diagram of an electronic device 700 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0072] like Figure 7 As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0073] Multiple components in the electronic device 700 are connected to the I / O interface 705, including: an input unit 706, an output unit 707, a storage unit 708, and a communication unit 709. The input unit 706 can be any type of device that can input information to the electronic device 700. The input unit 706 can receive input digital or character information and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output unit 707 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 708 can include but is not limited to a disk, an optical disk. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0074] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as method 100. For example, in some embodiments, the method 100 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the method 100 described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the method 100 in any other appropriate manner (e.g., by means of firmware).

[0075] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0076] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0077] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0078] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0079] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.

[0080] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0081] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0082] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but only by the claims after authorization and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, each step can be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. It is important that with the evolution of technology, many elements described herein can be replaced by equivalent elements that appear after the present disclosure.

Claims

1. A method for determining the fidelity of quantum data, comprising: Determining a parameterized quantum circuit to be trained, wherein the parameterized quantum circuit includes adjustable parameters to be optimized; The parameterized quantum circuit acts on the unknown first quantum state and the unknown second quantum state respectively to obtain the third quantum state and the fourth quantum state respectively after the action; Performing a plurality of measurements on the third quantum state based on a preset measurement basis to obtain a first probability distribution of each measurement result corresponding to the third quantum state; Measuring the fourth quantum state multiple times based on a preset measurement basis to obtain a second probability distribution of each measurement result corresponding to the fourth quantum state; Determining a function value of a preset loss function based on the first probability distribution and the second probability distribution, wherein the preset loss function is determined based on a similarity between the first probability distribution and the second probability distribution; Adjusting the value of the adjustable parameter of the parameterized quantum circuit so that the difference between two function values ​​of the preset loss function before and after is within a preset range; and Based on the determined last function value of the preset loss function, the fidelity between the first quantum state and the second quantum state is determined.

2. The method of claim 1, wherein: The similarity between the first probability distribution and the second probability distribution comprises a Bhattacharyya distance.

3. The method of claim 2, wherein: The preset loss function is determined based on the following formula: Wherein, ρ is the first quantum state, σ is the second quantum state, represents the third quantum state obtained after the parameterized quantum circuit U(θ) acts on the first quantum state ρ, represents the fourth quantum state obtained after the parameterized quantum circuit U(θ) acts on the second quantum state σ, represents the probability of obtaining a measurement result m by measuring the third quantum state based on a preset measurement basis Λ, represents the probability of obtaining a measurement result m by measuring the fourth quantum state based on a preset measurement basis Λ, wherein θ is the adjustable parameter to be optimized.

4. The method of claim 1, wherein: The parameterized quantum circuit includes a single quantum bit rotation gate and a controlled Z gate.

5. The method of claim 1, wherein: The value of the adjustable parameter of the parameterized quantum circuit is adjusted by a gradient descent method.

6. A quantum data fidelity determination device, comprising: A first determining unit is configured to determine a parameterized quantum circuit to be trained, wherein the parameterized quantum circuit includes adjustable parameters to be optimized; A first acquisition unit is configured to act the parameterized quantum circuit on the unknown first quantum state and the unknown second quantum state, respectively, to obtain a third quantum state and a fourth quantum state after the action, respectively; A second acquisition unit is configured to perform multiple measurements on the third quantum state based on a preset measurement basis to obtain a first probability distribution of each measurement result corresponding to the third quantum state; A third acquisition unit is configured to perform multiple measurements on the fourth quantum state based on a preset measurement basis to obtain a second probability distribution of each measurement result corresponding to the fourth quantum state; a second determining unit configured to determine a function value of a preset loss function based on the first probability distribution and the second probability distribution, wherein the preset loss function is determined based on a similarity between the first probability distribution and the second probability distribution; an adjusting unit configured to adjust the value of the adjustable parameter of the parameterized quantum circuit so that the difference between two function values ​​of the preset loss function before and after is within a preset range; and The third determination unit is configured to determine the fidelity between the first quantum state and the second quantum state based on the last function value of the preset loss function determined.

7. The device according to claim 6, wherein: The similarity between the first probability distribution and the second probability distribution comprises a Bhattacharyya distance.

8. The device according to claim 7, wherein: The preset loss function is determined based on the following formula: Wherein, ρ is the first quantum state, σ is the second quantum state, represents the third quantum state obtained after the parameterized quantum circuit U(θ) acts on the first quantum state ρ, represents the fourth quantum state obtained after the parameterized quantum circuit U(θ) acts on the second quantum state σ, represents the probability of obtaining a measurement result m by measuring the third quantum state based on a preset measurement basis Λ, represents the probability of obtaining a measurement result m by measuring the fourth quantum state based on a preset measurement basis Λ, wherein θ is the adjustable parameter to be optimized.

9. The device according to claim 6, wherein: The parameterized quantum circuit includes a single quantum bit rotation gate and a controlled Z gate.

10. The device of claim 6, wherein: The value of the adjustable parameter of the parameterized quantum circuit is adjusted by a gradient descent method.

11. An electronic device, comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5.

12. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-5.

13. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.