Measurement method and device for quantum fidelity, medium and equipment
Through simulation calculation and quantum process tomography methods, the calculation of single-bit quantum gate or quantum circuit fidelity is simplified, the problem of high computational complexity in the prior art is solved, and efficient and practical quantum fidelity measurement is achieved.
Patent Information
- Application Number
- CN202411492650.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-07
AI Technical Summary
The prior art is difficult to efficiently calculate quantum fidelity, especially in the measurement of single-bit quantum gates or quantum circuits. Direct application of complex operations such as density matrix square results in lower practicality.
The theoretical evolutionary final state of a single-bit quantum gate or quantum circuit is obtained through simulation calculation, and the density matrix of the actual evolutionary final state is obtained by combining the measurement results using quantum process tomography to calculate its fidelity. The specific steps include performing measurements of at least 3 projection directions, and simplifying density matrix calculations using the measurement results.
The fidelity of a single-bit quantum gate or quantum circuit is achieved simply and efficiently, reducing the computational complexity and improving the practicality and accuracy of the calculation.
Smart Images

Figure CN119398188A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of quantum computing technology, and in particular to a method, device, medium and equipment for measuring quantum fidelity. Background Art
[0002] A quantum computer is a device that follows the laws of quantum mechanics to perform high-speed mathematical and logical operations, store and process quantum information. Quantum computing is a computing technology based on the principles of quantum mechanics. It uses the superposition and entanglement of quantum bits to quickly process large amounts of data and solve some problems that are difficult to solve with classical computing. The characteristics of quantum computing include fast operation speed, strong information processing capabilities, and a wide range of applications. Compared with classical computing, quantum computing is more suitable for processing large-scale and complex data, and can more efficiently solve some key problems, such as prime factorization and discrete logarithms.
[0003] Fidelity F is an important indicator for measuring and comparing the performance of quantum computers (or quantum bits). and quantum states The fidelity F between ,in , are the density matrices of the two quantum states, and tr( ) represents the trace operation. Since the density matrix is a complex matrix, directly applying the definition to calculate the fidelity will involve complex operations such as square root and multiplication of complex matrices, which is difficult. Therefore, the method of directly calculating the fidelity according to the definition is less practical. Summary of the invention
[0004] The object of the present invention is to provide a method, device, medium and equipment for measuring quantum fidelity, so as to simply and efficiently realize the measurement of the fidelity of a single-bit quantum gate or quantum circuit.
[0005] According to one aspect of the present invention, a method for measuring quantum fidelity is provided, comprising: obtaining a theoretical evolution final state of a single-bit quantum gate or quantum circuit through simulation calculation based on a given initial state; performing measurement on the single-bit quantum gate or quantum circuit; Based on the measurement results, the density matrix of the actual evolutionary final state is obtained by using quantum process tomography; The fidelity of the single-bit quantum gate or quantum circuit is obtained according to the density matrix of the theoretical evolution final state and the actual evolution final state.
[0006] According to one embodiment of the present invention, the measuring of the single-bit quantum gate or quantum circuit includes measuring the single-bit quantum gate or quantum circuit in at least three projection directions.
[0007] According to one embodiment of the present invention, performing measurements in at least three projection directions includes: Directly along the quantum gate or quantum circuit The measurement operation is performed in the projection direction to obtain the first probability ; For quantum gates or quantum circuits, first Apply rotation to projection direction Operation or bypass Apply rotation to projection direction Operation, then along The projection is measured and the second probability is measured ; For quantum gates or quantum circuits, first Apply rotation to projection direction operation, and then along The projection of is measured to obtain the fourth probability; According to the first probability Get the zeroth probability .
[0008] According to one embodiment of the present invention, the density matrix of the actual evolutionary final state is obtained by using quantum process tomography based on the measurement results, and the density matrix of the actual evolutionary final state is obtained according to the zeroth probability , first probability , the second probability , the fourth probability , obtain the density matrix of the actual evolutionary final state for: .
[0009] According to one embodiment of the present invention, obtaining the fidelity of the single-bit quantum gate or quantum circuit according to the density matrix of the theoretical evolution final state and the actual evolution final state includes: Get the theoretical evolution ; Determining the fidelity of the single-bit quantum gate or quantum circuit for: ; in, , , , Respectively represent the theoretical The real and imaginary parts of the final state.
[0010] According to one embodiment of the present invention, in the step of performing measurements in at least three projection directions on a single-bit quantum gate or quantum circuit, the number of measurements in each projection direction is greater than or equal to 300 times and less than or equal to 5000 times.
[0011] According to one embodiment of the present invention, the single-bit quantum gate is an X gate, a Y gate, a Z gate, an S gate, a T gate, or an H gate; The quantum circuit is a quantum circuit including any one of an X gate, a Y gate, a Z gate, an S gate, a T gate, and an H gate, or a combination thereof.
[0012] According to another aspect of the present invention, there is provided a device for measuring quantum fidelity, comprising: An evolution simulation unit, configured to obtain a theoretical evolution final state of a single-bit quantum gate or quantum circuit through simulation calculation based on a given initial state; A measurement unit configured to perform measurement on the single-bit quantum gate or quantum circuit; A quantum process tomography unit is configured to obtain a density matrix of an actual evolutionary final state using quantum process tomography based on the measurement result; A fidelity generation unit is configured to obtain the fidelity of the single-bit quantum gate or quantum circuit according to the density matrix of the theoretical evolution final state and the actual evolution final state.
[0013] According to another aspect of the present invention, a computer-readable storage medium storing a computer program is provided. When the computer program is executed by a processor, the method for measuring quantum fidelity as described above is implemented.
[0014] According to another aspect of the present invention, a computer device is provided, the computer device comprising: a processor; a memory storing a computer program, and when the computer program is executed by the processor, the method for measuring quantum fidelity as described above is implemented.
[0015] Compared with the prior art, the present invention has the following beneficial effects: The method for measuring quantum fidelity of the present invention is used to strictly consider the state of quantum state and the applicable conditions of formulas in the process of obtaining the final state of theoretical evolution, so as to ensure rigorous and correct integration of multiple formulas to simplify the calculation formula that can be directly applied to calculation. It is concise and practical, and can greatly reduce the complexity of calculation and the amount of calculation. The selected fidelity calculation formula combines theoretical calculation and measurement experiment, which is more practical. When using the quantum process tomography method, only the following formula is used: Three measurement experiments were carried out to simplify the traditional Carrying out six measurements not only saves time, but also avoids problems such as conceptual confusion and decoherence caused by multiple measurements. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The above objects and features of the present invention will become more apparent from the following description in conjunction with the accompanying drawings.
[0017] Figure 1Shown is a schematic flow chart of a method for measuring quantum fidelity according to an exemplary embodiment of the present invention.
[0018] Figure 2 Shown is a schematic diagram of a device for measuring quantum fidelity according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0019] In the process of quantum computers performing quantum computing tasks, the fidelity of the measurement, calculation of quantum bits, and quantum gates between the actual evolving quantum state and the theoretical calculated quantum state is very important. When calculating the fidelity of a single-bit quantum gate or quantum circuit, the final state of the quantum gate or quantum circuit evolution simulated by matrix mechanics theory is selected as σ, and the state vector of the final state σ is set , then its density matrix for: Since the definition of fidelity F involves operations such as the square root of complex density matrices, it is difficult to directly apply the definition of fidelity to obtain the fidelity of single-bit quantum gates or quantum circuits.
[0020] The actual quantum experiment may be affected by the environment. After the single-bit quantum gate or quantum circuit is executed, the final state obtained may not be a pure state. However, the final state obtained by applying the matrix mechanics theory to deduce the evolution of quantum gates or quantum circuits must be a pure state. Therefore, for the case of calculating the fidelity of a single-bit quantum gate or quantum circuit, a pure state can be redefined The fidelity F between a mixed state ρ is: ,because is a positive real number, so taking its square root gives a positive real value.
[0021] The concept of the present invention is: Based on a given initial state, a theoretical evolutionary final state of a single-bit quantum gate or quantum circuit is obtained through simulation calculation; the single-bit quantum gate or quantum circuit is measured; based on the measurement results, a density matrix of the actual evolutionary final state is obtained using quantum process tomography; and the fidelity of the single-bit quantum gate or quantum circuit is obtained according to the density matrices of the theoretical evolutionary final state and the actual evolutionary final state.
[0022] Based on the above inventive concept, the fidelity of a single-bit quantum gate or quantum circuit can be obtained simply and efficiently.
[0023] like Figure 1 As shown, the method for measuring quantum fidelity in an embodiment of the present invention comprises the following steps: Step S1: obtaining the theoretical evolution final state of a single-bit quantum gate or quantum circuit through simulation calculation based on a given initial state; Step S2: performing measurements on the single-bit quantum gate or quantum circuit, wherein the single-bit quantum gate or quantum circuit is measured in at least three projection directions, and the number of measurements in each projection direction is greater than or equal to 300 times and less than or equal to 5000 times.
[0024] The measurement of at least three projection directions includes: Directly along the quantum gate or quantum circuit The measurement operation is performed in the projection direction to obtain the first probability ; For quantum gates or quantum circuits, first Apply rotation to projection direction Operation or bypass Apply rotation to projection direction Operation, then along The projection is measured and the second probability is measured ; For quantum gates or quantum circuits, first Apply rotation to projection direction operation, and then along The projection is measured and the fourth probability is measured ; According to the first probability Get the zeroth probability .
[0025] Step S3: Based on the measurement results, the density matrix of the actual evolutionary final state is obtained by using quantum process tomography; According to the zeroth probability , first probability , the second probability , the fourth probability Obtain the density matrix of the actual evolutionary final state for: .
[0026] Step S4: Obtaining the fidelity of the single-bit quantum gate or quantum circuit according to the density matrix of the theoretical evolution final state and the actual evolution final state.
[0027] The theoretical evolution final state obtained ; Get the density matrix of the actual evolutionary final state ; so the fidelity of the single-bit quantum gate or quantum circuit can be determined for: ;in, represent the real and imaginary parts of the final state of the theoretical evolution respectively.
[0028] like Figure 2As shown, a schematic diagram of a measuring device for quantum fidelity is provided, and the measuring device comprises: An evolution simulation unit, configured to obtain a theoretical evolution final state of a single-bit quantum gate or quantum circuit through simulation calculation based on a given initial state; A measurement unit configured to perform measurement on the single-bit quantum gate or quantum circuit; A quantum process tomography unit is configured to obtain a density matrix of an actual evolutionary final state using quantum process tomography based on the measurement result; A fidelity generation unit is configured to obtain the fidelity of the single-bit quantum gate or quantum circuit according to the density matrix of the theoretical evolution final state and the actual evolution final state.
[0029] The fidelity between the actual evolved quantum state and the theoretically calculated quantum state is an important indicator for measuring and comparing the performance of quantum computers (or quantum bits).
[0030] Example 1 This article proposes a method for measuring and calculating the fidelity of a single-bit quantum gate or quantum circuit, comprising the following three steps: First, the theoretical evolution state of the quantum gate or quantum circuit is obtained by simulation calculation using matrix mechanics theory. Based on the given initial state, the following complex matrix is used to calculate the single-bit quantum gate or quantum circuit, the single-bit quantum gate includes X gate, Y gate, Z gate, S gate, T gate, H gate, the state vector of the theoretical evolution final state obtained by calculation of the above single-bit quantum gate They are: , .
[0031] For a quantum circuit, it is usually composed of one or more quantum gates, so its theoretical evolutionary final state can specifically be the final quantum state output by the simulated quantum circuit.
[0032] Then, at least three measurement experiments are performed on the quantum gate or quantum circuit to obtain measurement results.
[0033] The first measurement experiment is to perform the measurement operation directly after the quantum gate or quantum circuit. The measurement method is to The projection of is the implicit direction), and the first probability is ; The second measurement experiment is to perform a bypass after the quantum gate or quantum circuit. Rotation (i.e. around Rotation ) and then measure. The measurement method is along The projection of ; The third measurement experiment is to perform a bypass after the quantum gate or quantum circuit. Rotation The measurement is then performed along the The fourth probability is ; After the measurement, use the formula Get the zeroth probability .
[0034] Using quantum process tomography, based on the measured zeroth probability , first probability , the second probability , the fourth probability The density matrix of the actual evolutionary final state can be obtained In the process of performing the above three measurement experiments, the number of measurements in each experiment may be in the range of [300, 5000]. Preferably, the number of measurements is 300, or 500, or 1000, or 5000, so as to ensure that the measurement results are sufficient to calculate the probability of each bright state.
[0035] The density matrix of the actual evolutionary final state It is expressed as: .
[0036] Finally, apply a pure state The fidelity definition formula between and a mixed state ρ is used to obtain the fidelity. Among them, the final state of the theoretical evolution is As pure , the density matrix of the actual evolutionary final state As a mixed state ρ.
[0037] According to the density matrix of the theoretical evolutionary final state and the actual evolutionary final state, the fidelity F of the single-bit quantum gate or quantum circuit is obtained as: Finally, the fidelity of the single-bit quantum gate or quantum circuit is obtained. for: ;in represent the real and imaginary parts of the final state of the theoretical evolution respectively.
[0038] The technology proposed in this application for measuring and calculating the fidelity of a single-bit quantum gate or quantum circuit has the following advantages: in the process of obtaining the final state of theoretical evolution, the state of the quantum state, the applicable conditions of the formula, etc. are strictly scrutinized to ensure rigorous and correct integration of multiple formulas to simplify the calculation formula that can be directly applied to the calculation. It is concise and practical, and can greatly reduce the complexity of the calculation and reduce the amount of calculation. The selected fidelity calculation formula combines theoretical calculations with measurement experiments, which is more practical. When using the quantum process tomography method, only follow the Three measurement experiments were carried out to simplify the traditional Carrying out six measurements not only saves time, but also avoids problems such as conceptual confusion and decoherence caused by multiple measurements.
[0039] In addition, a computer-readable storage medium storing a computer program may also be provided according to an exemplary embodiment of the present invention. The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform a method for measuring quantum fidelity according to an exemplary embodiment of the present invention. The computer-readable recording medium is any data storage device that can store data read out by a computer system. Examples of computer-readable recording media include: read-only memory, random access memory, read-only optical disk, magnetic tape, floppy disk, optical data storage device, and carrier wave (such as data transmission over the Internet via a wired or wireless transmission path).
[0040] In addition, a computing device may be provided according to an exemplary embodiment of the present invention. The computing device includes a processor and a memory. The memory is used to store a computer program. The computer program is executed by the processor so that the processor executes the computer program for the measurement method of quantum fidelity according to an exemplary embodiment of the present invention.
[0041] It should be noted that the first, second, third, fourth, etc. in the above description are to distinguish features with the same name in the same or different embodiments, and are not quantitative limitations. And the present invention is not limited to the specific configurations and processes described above or shown in the figures. The above is only a specific embodiment of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the described system, device, module or module can refer to the corresponding process in the method embodiment without further description. It should be understood that the scope of protection of the present invention is not limited to this. Any technician familiar with the technical field can think of various equivalent modifications or substitutions within the technical scope disclosed by the present invention, and these modifications or substitutions should be covered within the scope of protection of the present invention.
Claims
1. A method for measuring quantum fidelity, characterized in that: include: Based on a given initial state, the theoretical evolutionary final state of a single-bit quantum gate or quantum circuit is obtained through simulation calculation; performing measurement on the single-bit quantum gate or quantum circuit; Based on the measurement results, the density matrix of the actual evolutionary final state is obtained by using quantum process tomography; The fidelity of the single-bit quantum gate or quantum circuit is obtained according to the density matrix of the theoretical evolution final state and the actual evolution final state.
2. The method according to claim 1, characterized in that: The performing measurement on the single-bit quantum gate or quantum circuit includes performing measurement on the single-bit quantum gate or quantum circuit in at least three projection directions.
3. The method according to claim 2, characterized in that The performing of the measurement in at least three projection directions comprises: Directly along the quantum gate or quantum circuit The measurement operation is performed in the projection direction to obtain the first probability ; For quantum gates or quantum circuits, first Apply rotation to projection direction Operation or bypass Apply rotation to projection direction Operation, then along The projection is measured and the second probability is measured ; For quantum gates or quantum circuits, first Apply rotation to projection direction operation, and then along The projection is measured and the fourth probability is measured ; According to the first probability Get the zeroth probability .
4. The method according to claim 3, characterized in that The density matrix of the actual evolution state is obtained by using quantum process tomography based on the measurement results, and the zeroth probability , first probability , the second probability , the fourth probability Obtain the density matrix of the actual evolutionary final state for: .
5. The method according to claim 4, characterized in that Obtaining the fidelity of the single-bit quantum gate or quantum circuit according to the density matrix of the theoretical evolution final state and the actual evolution final state, comprising: Obtain the final state of theoretical evolution ; Get the density matrix of the actual evolutionary final state ; Determining the fidelity of the single-bit quantum gate or quantum circuit for: in, , , , represent the real and imaginary parts of the final state of the theoretical evolution respectively.
6. The method according to claim 2, characterized in that In the step of performing measurements in at least three projection directions on a single-bit quantum gate or quantum circuit, the number of measurements in each projection direction is greater than or equal to 300 times and less than or equal to 5000 times.
7. The method according to claim 1, characterized in that The single-bit quantum gate is an X gate, a Y gate, a Z gate, an S gate, a T gate, and an H gate; The quantum circuit is a quantum circuit including any one of an X gate, a Y gate, a Z gate, an S gate, a T gate, and an H gate, or a combination thereof.
8. A device for measuring quantum fidelity, characterized in that: include: An evolution simulation unit, configured to obtain a theoretical evolution final state of a single-bit quantum gate or quantum circuit through simulation calculation based on a given initial state; A measurement unit configured to perform measurement on the single-bit quantum gate or quantum circuit; A quantum process tomography unit is configured to obtain a density matrix of an actual evolutionary final state using quantum process tomography based on the measurement result; A fidelity generation unit is configured to obtain the fidelity of the single-bit quantum gate or quantum circuit according to the density matrix of the theoretical evolution final state and the actual evolution final state.
9. A computer-readable storage medium storing a computer program, wherein: When the computer program is executed by a processor, the method for measuring quantum fidelity according to any one of claims 1 to 7 is implemented.
10. A computing device comprising: processor; A memory storing a computer program, wherein when the computer program is executed by a processor, the method for measuring quantum fidelity according to any one of claims 1 to 7 is implemented.